#help-development

1 messages Β· Page 1023 of 1

fair rock
#

Where did that gets called?

wet breach
#

slime chunks are determined using the server seed πŸ™‚

wet breach
#

now go off and have fun

clear elm
#

like this?

remote swallow
#

no

#

try public record TPARequest(UUID uuid) {}

regal lake
slate mortar
remote swallow
#

its most likely complaning because you have no brackets

slate mortar
#

its as if he was using an older jdk

clear elm
#

i dont have the record thing

wet breach
fair rock
shadow night
#

have you guys tried invalidating caches

clear elm
slate mortar
#

it should be at 17

wet breach
chrome beacon
#

Should be of help

wet breach
#

every 10 chunks you find, there should be 1 slime chunk

clear elm
#

so what do i have to do to get the record

shadow night
#

well, since they're so often I can just go search them ig

fair rock
wet breach
#

well I am going based off the wiki for that, never really confirmed if that is true. But what is true is that which chunks specifically are to be slime chunks is pulled and calculated from the server seed every time

#

well every time a chunk loads

shadow night
#

I think I'll just go find a swamp or something

wet breach
#

lol

#

just find the relevant math

#

and you are good

shadow night
#

even tho last time I tried finding a swamp I walked 6k blocks on the x axis and 3k on the z axis and found nothing

wet breach
#

maybe your seeds are not creative enough

#

did you by chance be using an int seed and not a long?

shadow night
#

lol

#

no idea what the seed is

clear elm
clear elm
#

@fair rock wdym

slate mortar
#

does about the same

fair rock
shadow night
#

I always forget records exist

slate mortar
#

records rock

clear elm
#

not a pic

slate mortar
#
public class TPARequest {

    private final UUID target;
    private final Instant creationTimestamp;

    public TPARequest(UUID target, Instant creationTimestamp) {
        this.target = target;
        this.creationTimestamp = creationTimestamp;
    }

    public UUID getTarget() {
        return target;
    }

    public Instant getCreationTimestamp() {
        return creationTimestamp;
    }
}

wet breach
tardy delta
#

that a good or bad thing?

slate mortar
#

sounds good enough to me

#

less annoying stuff

fair rock
#

Incoming call "Mister you forgot to get your child again, its 10pm"

wet breach
shadow night
slate mortar
clear elm
#

wdym

tardy delta
#

dont need to put it back

slate mortar
#

.

#

.

#

.

clear elm
slate mortar
#

meh

#

i'm a piece of crap

clear elm
#

xD

fair rock
#

You are his blackhole

#

Better?

slate mortar
#

man, from being inactive in this channel for decades, to being called a sunshine

#

i fucking made it

clear elm
#

whats the error here now 😭

tardy delta
#

()

slate mortar
#

oh

clear elm
slate mortar
#

forgot 2 () at the end

fair rock
#

new HashMap<>();?

tardy delta
#

try and see

slate mortar
#

my bad

#

discord has no java autocorrection uwu

clear elm
#

πŸ˜™

slate mortar
#

HEY

clear elm
slate mortar
#

EMBRACE THE WARNINGS

#

theyre the absolute best

#

if you have 0 warnings in your code, you are a bad developer change my mind

#

@remote swallow RIGHT?!?

clear elm
#

fxck warnings

tardy delta
#

supress em

clear elm
#

who need them

slate mortar
#

you need to see them

#

so you can tell intellij that you wont care

#

and make it cry

fair rock
#

Im a good developer

3492 lines of SupressWarnings

clear elm
fair rock
#

xd

#

I would never do that but to think that its funny

slate mortar
#

only thing i ever suppressed was "might be null"

#

cuz it keeps popping off on everything that isnt marked as nonnull

clear elm
#

btw whats the differnce beetwenn privtate and public and final and static

slate mortar
#

private = ...... private ._.

#

public means public

#

can be accessed from "everywhere"

#

static adds the way to access it through classes (eg. Main.SOME_STATIC_FIELD)

clear elm
#

and private?

slate mortar
#

private means it can only be accessed by the class it's in

clear elm
#

how can i acces the hashmap form another class then

fair rock
#

Now explain for him: Protected im now in bathroom

slate mortar
#

do you need to?

clear elm
#

yep

slate mortar
#

if youre lazy, make it public

clear elm
#

i am

slate mortar
#

if you wanna do it the right way, make a getter method

clear elm
#

and final and static

tardy delta
#

learning some good practices here i hear

wet breach
slate mortar
#

final means unchangable after creation

wet breach
#

this is the ultimate accomplishment

clear elm
slate mortar
blazing ocean
fair rock
slate mortar
#

many don't

blazing ocean
#

i just don't get why they every java dev wants that

slate mortar
#

many are like "either do X, or youre a bad dev"

#

i don't either

blazing ocean
#

/ why it's a convention

slate mortar
#

when i'm lazy, i actually also just make stuff public

#

especially when having a lot of fields, and i just can't be bothered creating getters for every single one

clear elm
#

i just do the experation time with a runnable

slate mortar
#

basically

clear elm
#

how many ticks one sec

slate mortar
#

iirc, ```java
Bukkit.getScheduler().runTaskLater(() -> {
// remove the request from the list
}, request.getCreationTimestamp());

clear elm
slender elbow
#

ideally 20

fair rock
#

Normally 20

10 would be like 0.5s if your Server is not lagging

wet breach
#

I hear 200 ticks is fun

slate mortar
#

why have a whole constantly checking thing

clear elm
#
            @Override
            public void run() {
                
            }
        }.runTaskLater(ZenTP.getPlugin(), 1200);```
#

i think that will work too

fair rock
slate mortar
#

yea, but what's the point behind the Instant timestamp when using a fixed number

tardy delta
#

oh god dont randomly instantiate bukkitrunnables in favor of using the scheduler

wet breach
#

I remember my first time modifying the tick rate

#

I essentially died to some random mobs

#

with no time to react

slate mortar
#

they cheated

#

clearly

#

report em

wet breach
#

lol

slate mortar
#

fuckin assholes

clear elm
slate mortar
#

i swear, zombies even on 20 tickrate do be hackin sometimes

clear elm
#

zombies should ne nerfed frfr

slate mortar
#

like reach and smt

blazing ocean
#

i accidentally did this on an smp once πŸ’€

#

everybody who was on died

slate mortar
#

fun

fair rock
#

Accidently. Nice try

slate mortar
#

man commited mass murder

#

"by accident"

blazing ocean
#

oop

shadow night
slate mortar
#

i never had issues with spiders tbh

#

but always with zombies

clear elm
#

existing.remove(ptp.getUniqueId()); requests.put(p.getUniqueId() , existing);
is taht right?

slate mortar
#

idk if it's just lag or smt

fair rock
#

Imagine spider could walking vertically on walls

shadow night
#

Never had issues with zombies

clear elm
shadow night
#

Either spiders, creepers or skeletons

slate mortar
#

looks about right

slate mortar
fair rock
#

200ticks and a creeper πŸ’€

Hell nah

slate mortar
#

lol

clear elm
slate mortar
#

desperately wanting to explode inside you

#

what

shadow night
#

Skeletons are worse, creepers make one boom and that's it, skeletons will bombard you with 700 arrows until you manage to get near enough

tardy delta
#

what

slate mortar
#

i swear

clear elm
fair rock
slate mortar
#

you guys knew that sleletons have higher fire rate on hard difficulty?

#

SO ANNOYING

shadow night
#

Had no idea but they still manage to shoot 700 arrows

tardy delta
#

as long as they're not a gatling gun, its fine

fair rock
#

True true

clear elm
#

how can i check now in accept if the players uuid is in the hashmap

fair rock
#

contains sounds right?

pseudo hazel
#

if map.containsKey(player.getUniqueId())

clear elm
#

key?

wet breach
slate mortar
blazing ocean
#

😳

slate mortar
#

well

#

yea

clear elm
#

if map.containsKey(player.getUniqueId())
and if yes i should do the tp?

river oracle
blazing ocean
#

miles

#

please

clear elm
remote swallow
river oracle
slate mortar
#
Map<Key,Value> map;
List<Pair<Key, Value>> pairList;

both same technically

clear elm
remote swallow
river oracle
clear elm
#

i identify as a skibidi rizzler

slate mortar
#

yea actually it's not

#

cuz every map key can only contain one value

#

i am dumb, lemme be

river oracle
clear elm
#

thank you bro πŸ‘ πŸ‘Œ πŸ‘πŸΌ πŸ™Œ πŸ™ πŸ’ͺ πŸ‘ πŸ‘Œ πŸ‘πŸΌ πŸ™Œ πŸ™

slate mortar
#

children...

clear elm
#

πŸ‘Ά

#
            if (ptp != null){
                if (Tpa.requests.containsKey(ptp.getUniqueId())){
                    
                }
            }
        }```
is this right @slate mortar my sun shine
river oracle
#

No it's wrong very wrong

slate mortar
#

those naming conventions are worse than mine holy

river oracle
#

I've got good resources for you

#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programmingβ€”great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! πŸŽ‰

slate mortar
#

holy grace

#

and i am getting hated on not using pastes

#

fuck you ppl

clear elm
#

but is it right πŸ₯

slate mortar
#

where is that code

clear elm
#
            if (ptp != null){
                if (Tpa.requests.containsKey(ptp.getUniqueId())){

                }
            }
        }```
slate mortar
#

no

#

where do you use it

#

when accepting?

clear elm
#

in /tpaccept

#

ye

slate mortar
#

who is "ptp"

clear elm
#

the /tpaccept <ptp>

slate mortar
#

the player who sent the request?

clear elm
#

yep

slate mortar
#

yea, then it's technically not wrong

#

"technically"

#

tho you also have to check if there's valid requests that match the accepting player

clear elm
#

how can i see if a list contains smth

slate mortar
#

ugh

#

i need ide

clear elm
#

@slate mortar wanna see smth

slate mortar
#

idk

clear elm
slate mortar
#

ugh

clear elm
#

was that cringe?

tardy delta
#

that was

clear elm
#

okay i wont to that ever again

slate mortar
#
        if (args.length == 1) {
            if (ptp != null) {
                List<TPARequest> req = Tpa.requests.get(ptp);
                if (req == null || req.isEmpty()) {
                    return; // No Requests found
                }
                if (req.getUUID().equals(acceptingPlayer().getUniqueId())) {
                    // teleport the player
                    Tpa.requests.remove(req);
                }
            }
        }

taken straight outta my ass

#

might work, might not

#

oops

shadow night
#

I personally do not check if there is a certain amount of args, if there are too many I just ignore them and do everything as usual

remote swallow
slate mortar
#

i didnt create it

remote swallow
#

still ew

shadow night
#

Kotlin user being kotlin user or what

remote swallow
#

thats java

#

you shouldnt have a public map in either java or kotlin

shadow night
#

Well, I mean, in kotlin you access by using the name, not a getter usually, atleast that's what I always got suggeste

slate mortar
#

that should work instead

        if (args.length == 1) {
            if (ptp != null) {
                List<TPARequest> reqList = Tpa.requests.get(ptp);
                if (reqList == null || reqList.isEmpty()) {
                    return; // No Requests found
                }
                boolean b;
                reqList.forEach((req) -> {
                    if (req.getUUID().equals(acceptingPlayer().getUniqueId())) {
                        // teleport the player
                        reqList.remove(req);
                        b = true;
                    }
                });
                if(b) Tpa.requests.put(ptp, reqList);
            }
        }
slate mortar
#

i just adapted to i

remote swallow
#

just talking to raydan

clear elm
#

req.getUUID()
that dont works

slate mortar
#

eh

#

it doesnt?

#

tf

clear elm
#

no

remote swallow
shadow night
slate mortar
#

the request class should have the uuid tho

#

or no?

remote swallow
#

if its a record its req.uuid

#

not getUUID

shadow night
#

req.uuid()?

slate mortar
#

oh

#

getTarget()

#

my bad

#

that should work

clear elm
#

i dont have getTargetr too

slate mortar
#

THE FUCK

shadow night
#

What do you have

#

What methods on the record

slate mortar
#

should have the getTarget method

#

or did you manage to create the record?

clear elm
slate mortar
#

yea

#

then it should totally work

clear elm
#

i just changed the hashmap from final to static

#

is this important?

slate mortar
#

ugh

#

i thought it was static already

wet breach
#

probably shouldn't use static

slate mortar
#

the way you used it

shadow night
slate mortar
clear elm
wet breach
#

lol

slate mortar
#

especially when static "works" and is way easier to manage

clear elm
#

req is a hashmap for me

wet breach
#

yeah but it sometimes does funny things with hashmaps

slate mortar
#

while reqList is a list of requests

clear elm
#

or no itzs a list

shadow night
slate mortar
#

i don't

shadow night
#

Just say it's how it has to be

#

And that there are only a few rare use cases of static

#

Like singletons, but they can also often be avoided

clear elm
slate mortar
#

i will never start using dependency injection, no thanks bro

slate mortar
#

its supposed to be a request

shadow night
slate mortar
#

quite literally

#

also

                for (Request req : reqList) {
                    if (req.getUUID().equals(acceptingPlayer().getUniqueId())) {
                        // teleport the player
                        reqList.remove(req);
                        b = true;
                    }
                }

use this one instead of the "forEach"

#

i always forget that foreach sucks ass

clear elm
#

where should i paste it

slate mortar
#

replace the "forEach" part with it

clear elm
#

i dont have a for each part

slate mortar
#

?!?

clear elm
#

i have this

slate mortar
#

this has a forEach

#

here's just the whole thing

     if (args.length == 1) {
            if (ptp != null) {
                List<TPARequest> reqList = Tpa.requests.get(ptp);
                if (reqList == null || reqList.isEmpty()) {
                    return; // No Requests found
                }
                boolean b;
                for (Request req : reqList) {
                    if (req.getUUID().equals(acceptingPlayer().getUniqueId())) {
                        // teleport the player
                        reqList.remove(req);
                        b = true;
                    }
                }
                if (b) Tpa.requests.put(ptp, reqList);
            }
        }
ancient plank
#

so much effort πŸ₯„

tardy delta
#

removeIf

slate mortar
#

i'm bored

#

steel is busy with his gang

tardy delta
#

write a c parser

ancient plank
#

rough

broken nacelle
slate mortar
ancient plank
#

i'd join the vc but im sitting outside with an industrial fan going and I have nothing to add

slate mortar
#

idk how removeif works, and i have no autocomplete

clear elm
tardy delta
#

takes in a predicate

#

jAvAdOcS

shadow night
#

Oh holy god

ancient plank
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programmingβ€”great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! πŸŽ‰

slate mortar
#
                List<TPARequest> reqList = Tpa.requests.get(ptp);
                if (reqList == null || reqList.isEmpty()) {
                    return; // No Requests found
                }
                boolean b;
                // teleport the player
                reqList.remove((req) -> req.getUUID().equals(acceptingPlayer().getUniqueId()));
                b = true;
                if (b) Tpa.requests.put(ptp, reqList);

what about that?

shadow night
#

I see spoonfeeding

ancient plank
#

i forgot how big that was

slate mortar
#

and i always get hate for not using ?paste

#

meanwhile spigot mods:

ancient plank
#

I tried to shorten it but the syntax for hyperlinks makes it too long

slate mortar
#

define "no"

clear elm
broken nacelle
# clear elm

bro, it's better that each player has their own TPARequest

slate mortar
#

ffs

#

removeIf

#

forgot that

#

and getTarget()

#

which is 100% a thing

clear elm
#

now i have only 1 error left

slate mortar
#

which is?

clear elm
slate mortar
#

what is the error

#

what does it say

wet breach
#

the easiest error to solve

slate mortar
#

oh

tardy delta
#

that last put isnt even needed

slate mortar
#

ptp.getUniqueId()

clear elm
tardy delta
#
List<TpaRequest> requests = Tpa.requests.get(ptp)
if requests == null || requests.isEmpty() return false

requests.removeIf(req -> req.getUUID().equals(p.getUniqueId()))
slate mortar
#

you cant edit a list from a map directory without re-adding it

tardy delta
#

why inserting the list back , thus overwriting it with the same instance?

tardy delta
#

java with some sauce

slate mortar
#

we literally remove the request from the list, if it results in a teleport

slate mortar
#

you want the map to keep hundreds of expired requests?

tardy delta
#

val reqList = Tpa.requests.get(ptp)
reqList.removeIf ...
Tpa.requests.put(ptp, reqList)

#

what the point of that put

#

nothing?

slate mortar
#

you cant modify a map's list directory

#

literally

clear elm
#

@slate mortar i try if it works

tardy delta
#

what directory

slate mortar
#

directly*

#

you have to extract the list, modify it, and re-add it

slender elbow
#

no you don't

tardy delta
#

so youre saying you cant modify a value in a map?

slate mortar
#

no?

slender elbow
#

you are mutating the same reference

tardy delta
#

thats nonsense

#

are we talking about key hashcodes?

#

nothing to do with the value

quaint mantle
# clear elm

It would be better, in my opinion, to create a separate class for TPA requests rather than giving command class excessive responsibility.

slender elbow
#

Map#get does not copy or clone the value, and it isn't being copied or cloned after getting it

slate mortar
#

i had it not work in the past, and ppl told me exactly that, that you have to re-add it

#

meh

tardy delta
#

nonsense

slate mortar
#

in that case it is indeed useless

slate mortar
#

feel free to

tardy delta
#

if we were in kotlin we could use a nullsafe operator

slate mortar
#

kotlin sucks

wet breach
#

we don't need to be safe from null

tardy delta
#

kotlin is java for grown ups

#

well scala is

wet breach
#

we need unsafe null

ancient plank
#

linux vs windows argument all over again

tardy delta
#

billion dollar mistake, lets rethink that

slate mortar
#

"linux is better everywhere, because it does one thing better, but many things worse"

tardy delta
wet breach
slate mortar
#

ppl not seeing that both do different things

wet breach
#

its not like java created null or something XD

slate mortar
#

it didn't? WOAH

slender elbow
#

i invented null

slate mortar
#

DOUBLE WOAH

tardy delta
#

it has been a mistake to not have nullable semantics as in nullable types with explicit assertions

#

anyways

#

javas old

wet breach
#

to an extent

#

it only came out in 98

brave linden
#

What's this, I'm new.

Ik java though.

remote swallow
#

?img seems like an ?img moment

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

tardy delta
#

hello new

brave linden
slender elbow
#

python being older than java is a certified hood classic

slate mortar
#

python existing is a certified war crime

tardy delta
#

its better than js

slate mortar
#

everything is better than js

#

except gradle

tardy delta
#

ill not say anything about that

slate mortar
#

you better do

#

or are you a gradle fanboy?

tardy delta
#

||that nonsense caches half the universe||

slate mortar
#

maven is the goat

tardy delta
#

maven has one file

slate mortar
#

exactly

#

only thing gradle does better i guess is that you can run code in the buildscript, instead of having to create a whole separate maven plugin

#

eg. for my fabric template, i use a lot of copy/replace code in the builscript, which is neat

wet breach
#

as in, copy something and replace code?

#

if so, pretty sure maven has a plugin for that

slate mortar
#

copy some files, and replace some placeholder vars in some

wet breach
#

maven replacer or whatever

slate mortar
#

eg <modid> and stuff

#

so i can just clone the template repo, change 5 vars at the builscript's bottom, and then run a single task that will replace everything accordingly

#

without having to manually scroll through lots of files

#

it sure is messy, but works flawlessly

clear elm
#

yo @slate mortar when i do /tpa <palyer> im getting a error now

wet breach
#

I am going to blame paper

quaint mantle
#

I wonder why..

eternal night
#

java.lang.NullPointerException: Cannot invoke "java.util.List.add(Object)" because "existing" is null
at ZenTP-1.jar/eu.zenaria.zentp.commands.Tpa.onCommand(Tpa.java:103) ~[ZenTP-1.jar:?]

slate mortar
#

i mean

#

idk the "add" part out of my head

#

i just got the remove part on my end

clear elm
#

what

eternal night
#

I mean existing is null

#

rather straight forward error

wet breach
#

yep, just stop existing and it won't be null πŸ˜„

eternal night
clear elm
slate mortar
#

oh i see

#

.

#

map.getOrDefault(player.getUUID(), new ArrayList<>());
use this instead

#

obviously the map might just not contain a key for a player already

clear elm
#

where should i paste it

slate mortar
#

whereever that part is in your code

#

right there

remote swallow
#

nerds whats the correct way to convert a duration to xhours yminutes zseconds only showing the text that isnt 0 so like a duration of 19h 12m 0s would be 19 hours 12m 0seconds but just 12m would be 12minutes 0seconds

eternal night
#

Copy from stackoverflow or shade yodatime

tardy delta
#

you are showing the text that is 0

clear elm
# slate mortar right there
        existing.add(new TPARequest(ptp.getUniqueId() , Instant.now()));
        requests.put(p.getUniqueId() , existing);```
where in this part
remote swallow
tardy delta
#

just do manual checking

kind hatch
#

Apache has a utility for that too

slate mortar
#

2nd line

tardy delta
#

or convert to Duration

slate mortar
#

or wiat

#

no

#

dont replace the add

#

replace the requests.get()

remote swallow
clear elm
slate mortar
#

gosh i want to die

eternal night
#

The spoon chloe is running around with is giant

#

damn

slate mortar
#

SHUT UP

ancient plank
#

world's largest spoon

slate mortar
#

thats what she said

wet breach
#

lol

clear elm
tardy delta
#

i believe theres Duration::getSecondsPart and such

slate mortar
#

requests i guess

#

idfk

fair rock
# clear elm

List<TPARequest> existing = request.getOrDefault(p.getUniqueId(), new ArrayList<>());

tardy delta
#

nooooooo

#

computeIfAbsent

ancient plank
#

I'd have blown a gasket by now

tardy delta
#

check javadocs

slate mortar
#

i dont speak english

ancient plank
#

its a car engine part

#

but to blow a gasket means to get angry

slate mortar
#

ah

#

i guess we say "ICH KRIEG SO NEN HALS"

clear elm
#

omg u german

fair rock
slate mortar
#

thats even better

clear elm
#

seit ihr deutsch

slate mortar
#

"ICH GLAUB MEIN SCHWEIN PFEIFT"

#

seid*

clear elm
#

mein sonnen schein

slate mortar
#

och nΓΆΓΆ

fair rock
#

DER KRAN MUSS VERDICHTET SEIN

slate mortar
#

NICHT SO TIEF RÜDIGER

#

DAS WAR KEIN METER

clear elm
#

now it goes into this if

slate mortar
#

oh

#

i cant read

clear elm
fair rock
#

You cant see*

slate mortar
#

you should just replace the part i sent above, where the error came from

fair rock
clear elm
#

i did

slate mortar
#

then it should work

#

i guess

clear elm
slate mortar
#

or it might explode

clear elm
slate mortar
#

what doesn't work

clear elm
formal field
#

what are you trying to make @clear elm?

slate mortar
#

tpa

formal field
#

and the problem is?

slate mortar
#

i dont fucking know

small valve
#

For bungeecord, is there a way to check if a player is banned?

clear elm
slate mortar
formal field
#

btw did he add any debugging?

formal field
#

oh

clear elm
#

oh

fair rock
#

oh

formal field
#

what is "reqList"?

clear elm
#

(why do you say oh)

slate mortar
#

well then there's apparently no open requests

fluid river
#

hi guys

fair rock
fluid river
#

guess who is back

clear elm
slate mortar
fluid river
#

jree fava lesson's back

formal field
#

who's shady?

slate mortar
slate mortar
#

thats a war crime for sure

fair rock
fluid river
#

so

clear elm
fair rock
formal field
slate mortar
# clear elm

i mean, this should get a list from the map (or create one if there's none), add a new request, and put the list into the map

fluid river
#

is there a way to setup Structure Block and make it paste a structure

formal field
young knoll
#

Wait until you learn about Multimap

fluid river
#

using spigot api

formal field
fair rock
young knoll
#

Would you be content without the structure block?

fluid river
#

in spigot server

slate mortar
#

structure blocks are pain

fair rock
formal field
#

just use spigot api instead of the normal blocks

young knoll
#

Load structure with structure manager, slap it down wherever you want

fluid river
#

i returned to minecraft after 3 years of no-java

#

just to ask this question

formal field
fluid river
fair rock
#

?paste

undone axleBOT
formal field
fluid river
#

i wrote shit on c#

fair rock
#

Im sharp too, im a good knife.

fluid river
#

but i missed the entire 1.19 and later

fair rock
#

I can slice bread

clear elm
fluid river
#

haven't played minecraft for years

formal field
# clear elm

seems like no one put an active request to teleport to you...

young knoll
#

I think the structure api was added in 1.18

#

So checkmate

slate mortar
#

the question is

#

is the list empty

#

or just null

clear elm
formal field
slate mortar
#

to be fair

clear elm
slate mortar
#

you might replace that "get" as well with the "getOrDefault" i sent

formal field
fair rock
#

boolean b;

... ...

b = true;

if(b)

Is fucking wild

slate mortar
#

i assume it's just null, because there's no list by default

clear elm
young knoll
#

Have you heard of offline mode

#

Smh

fair rock
formal field
young knoll
#

I mean

#

It’s certainly one of the booleans of all time

remote swallow
formal field
slate mortar
#

i assume they forgot to remove it

clear elm
slate mortar
formal field
slate mortar
#

nah

formal field
slate mortar
#

its in a command

slate mortar
formal field
slate mortar
#

actually

young knoll
#

Cache a Collections.emptyList()!!!1111

slate mortar
#

this whole code is a mess, after i found out you can just modify map-lists directly

formal field
#

the list is empty anyways and you'll just waste time creating an arraylist

#

am I missing something here or what?

slate mortar
#

its not. there is the possibility of sending multiple tpa's to multiple players

fair rock
#

Can you send the TPA and TPACCEPT again this time in a good format?

slate mortar
#

so the map may already contain a list with tpa's, or it may not (like here), so we add one

young knoll
#

computeIfAbsent

slender elbow
#

me when guava Multimap exists

clear elm
#

@slate mortar its the empty error

slate mortar
#

as i said, this is really messy now, because you can apparently (against my belief at that point of writing it) modify map values directly

formal field
#

instead it just return the value but doesn't keep it

young knoll
slate mortar
#

i guess

#

apparently not smt java native?

fair rock
#

Guava

young knoll
#

It's guava

slate mortar
#

ugh

#

google

#

nvm no hate on google

#

i love gson

fair rock
#

Its like a Map with a key can have multiple values

slender elbow
#

not that it's difficult to make your own anyway

formal field
#

I haven't used java in a serious manner in a long time now to be honest

fair rock
#

like

map.put("A", 1)
map.put("A"), 2)

Collection<Integer> idkNumber = map.get("A");

formal field
#

had to much fun making boats

slate mortar
#

so THAT is the equivalent of List<Pair<Key,Value>

young knoll
#

It's a fancy wrapper for Map<K, Collection<V>> basically

slate mortar
#

i knew there was one somewhere

#

or wait nvm

formal field
#

damn

slate mortar
#

it's only multiple values

#

i'm confused

formal field
fair rock
#

short and simple

slate mortar
#

someone pls rewrite that code

#

i was never here (the IDE produced it itself uwu )

fair rock
slate mortar
#

what

fair rock
grim hound
#

Could someone help? My intelliJ just never quits this screen

fair rock
#

GetOrDefault is not setting in map. Its just returning

broken nacelle
#

alt f4

grim hound
slate mortar
# fair rock .

didn't think about it, cuz the list was getting re-added later anyway

#

so it'd have been a double-add with this piece of code-crap

fair rock
#

Idk what is where set xd

slate mortar
#

I WROTE IT LIKE THIS

#

IT WAS PAIN ALREADY

fair rock
remote swallow
slate mortar
slate mortar
#

there was code removed

#

and they forgot to remove it too, and when i copied their part back, i overlooked it

fair rock
#

I had a reason and im a mistake too. So you can be bothπŸ‘€

slate mortar
#

it was to indicate that the list was modified, so it doesnt get re-added when it's the same contents

slate mortar
#

hi a mistake too

grim hound
grim hound
#

I'm asking for how I'm supposed to fix this

slate mortar
#

it's a bug

#

yea, it's a bug that happened to be sometimes

grim hound
#

this shows up whenever I want to create a new project

slate mortar
#

oh

fair rock
#

oh

slate mortar
#

well, can you close the current project?

#

manually

grim hound
#

I'm not sure

slate mortar
#

File > Close Project

#

does it freeze, or close it

grim hound
#

It's restarting, wait

fair rock
#

Clone just with git command and import the project🀨

grim hound
#

gotta kill it and it takes it's sweet time restarting

slate mortar
#

cuz this might be caused by several reasons, pc too whack, too many files, intellij being intellij

tardy delta
grim hound
slate mortar
#

i needed autocompletion

slate mortar
fair rock
#

Imagine he is using a floppy disk and thats why is loading for hours

slate mortar
#

the welcome menu

#

then nothing should try to "close"

slate mortar
#

i had my dev environment for a mod on my hdd

fair rock
#

πŸ’€

slate mortar
#

and exiting a world took a solid 2 minutes

fair rock
#

Hell nah. Do that in work and get payd in hours.

#

That would be okay

#

πŸ‘€

grim hound
#

and sorry for being rude

wet breach
grim hound
#

bruh I disabled the gradle and maven plugins along with some others and intellij works like 5x faster now

#

and the project changes work

chrome beacon
#

or just a deadlock πŸ€·β€β™‚οΈ

fluid river
#

How to place a structure

#

I have a Structure ref and StructureManager ref

slender elbow
#

using one of the various place methods

fluid river
#

yeah just found it

#

?stash

undone axleBOT
marble hearth
#

Guys I am trying to develop a factions servers, I have developed different types of servers before but none of this matter does anyone know or have any idea where should I start? I have seen some premade setups but I don't really want to spend too much specially if I can do lot of the things myself

chrome beacon
#

This channel is for making plugins

marble hearth
#

My apologies

drowsy cloud
#

If I disable another spigot plugin with this method:
plugin.getServer().getPluginManager().disablePlugin()

Does it delete the data stored in it ( hashMaps, .. ) ?

tardy delta
#

the whole plugin unloads so everything stored in memory vanishes yes

#

just do Bukkit.getPluginManager() tbf, another dependency on your plugin avoided

quaint mantle
#
int kills = main.getConfig().getInt("Niveles." + k.getUniqueId() + "(" + k.getName() + ")" + ".kills");
int level = main.getConfig().getInt("Niveles." + k.getUniqueId() + "(" + k.getName() + ")" + ".nivel");


main.getConfig().set("Niveles." + k.getUniqueId() + "(" + k.getName() + ")" + ".kills", kills + 1);
#

the integer in the config is not summing

tender shard
quaint mantle
#

why?

tardy delta
#

what the

tender shard
tardy delta
#

no removing of the plugin instance?

quaint mantle
blazing flare
#

How does inventory dragging work? I was wanting to handle an single slot drag event as a click, so I created an InventoryClickEvent from that and passed it to my click handler. For the most part it works, but it doesn't detect the cursor as having an item. It seems as though dragging places the item in the inventory before the event is called, unlike with clicks but I'm not sure 🀷

tardy delta
#

save the config?

tender shard
quaint mantle
tardy delta
#

what a

quaint mantle
#

its like "oh"

#

thx buddy, i forgot it hahahha

tender shard
#

You should save the config async though (and/or on server shutdown)

tardy delta
#

if i were in kotlin i wouldve done

fun YamlConfiguration.write(block: YamlConfiguration.() -> Unit) = block().apply(save)

config.write {
  setInt("x", 1)
  setInt("y", 3)
}```
thin iris
#

hi, how would i force a player to say a certain message? like a sudo basicaly. i want to make an autogg plugin

tender shard
#

isn't there Player#chat(...) ?

tardy delta
#

yes

thin iris
#

is this bc of my java

tardy delta
#

mismatched } if i would guess

loud osprey
#

Ok thanks

patent adder
#

Does anyone know about paid addons on Spigot?

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

river oracle
#

@young knoll I made a PR praise me

worthy yarrow
#

Good job y2!

patent adder
worthy yarrow
#

upgrade?

river oracle
#

upgrade?

worthy yarrow
#

You purchase the plugin and then you're able to get future updates of the plugin free of charge, there is no "upgrade" feature

river oracle
#

but 99.99% of premium plugins allow free updates

worthy yarrow
#

Yeah could but that's not like common kek

#

At least I hope not lol

tender shard
#

you can only remove people you manually added as buyer

patent adder
#

No, I'm talking about paid resource posts

worthy yarrow
#

I thought resources were plugins...

patent adder
#

?

#

I think you don't understand, I'm looking for the tool to be able to publish resources for pay, since the function in Spigot is different, I wanted to know how to access that.

worthy yarrow
#

Mate then say that

patent adder
#

I don't want to buy, it's for my own resources

worthy yarrow
#

It takes a long time to get your plugins approved as paid resources

#

I lowkey forgot how to publish a paid plugin

patent adder
#

Is there some kind of instruction? because I had an account since 2016, but even in that I couldn't

river oracle
#

?premium

river oracle
#

you must follow and meet these guidelines to post premium plugins

#

it is likely your account does not meet the following guidelines

#

account age is not the only requirement

night scroll
#

Hello guys i have a question, if i modify minecraft server files and try to rebuild spigot core with changes will it build?

#

Or will redownload everything

quaint mantle
#

Spigot does not download anything

river oracle
#

spigot doesn't download anything

quaint mantle
#

It has everything inside

#

And it extracts it

river oracle
#

moreover if your spigot server is making web requests to places other than maven central you may have some form of malware

quaint mantle
#

After checking if the "library" has been already extraced, and doing a hash validation

night scroll
#

Huh

#

Thanks

river oracle
#

oh I thought that was a resource thread lmfao

chrome beacon
chrome beacon
#

if so yes it might wipe stuff if you run BuildTools again

#

?contribute

chrome beacon
#

^^ take a look at these

#

on how to compile your custom jar

river oracle
night scroll
#

Thank you!

slender elbow
river oracle
silver robin
#

Hello, I have a question about what is the best way to implement this.
Say there is a mine with blocks with regenerate. When it's full (untouched for a long time), it is composed of 80% ores and 20% stone, and players can mine both of those blocks. When blocks are mined, it turns into bedrock, and after some time it turns into stone and then back into ore.

  • have all these Locations in a set
  • on block break event, check if that block is broken, if it is, replace it with bedrock and schedule a task that will put stone back there after a random amount of ticks, after stone is put, schedule a new task which will put ore there
    but when a player mines stone before ore is put there, I'll have to cancel that task and it seems complicated and feels like it could be made better
blazing flare
echo basalt
#

In short use some sort of priority queue and an interface for your task and how many ticks left

#
public interface RespawnableBlock {

  int getTicksUntilRespawn();
  void respawn();

}
#
public class RespawnableBlockTracker {

  private final Queue<RespawnableBlock> queue = new PriorityQueue<>(Comparator.comparingInt(RespawnableBlock::getTicksUntilRespawn));

  public void schedule(RespawnableBlock block) {
    queue.add(block);
  }

  public void tick() {
    // USE 7smile7's CODE REFERENCED ON MY REPLY BELOW
  }
}
silver robin
echo basalt
#

The implementation just represents a location and target state

#

and maybe a timestamp

#

?workdistro

echo basalt
#

this

silver robin
#

thank you, seems like it only handles block respawning to just one type (for example bedrock->stone), I'll try to modify it to support multiple, to remove a block stone->ore from priority queue if player mines stone in the meantime, shouldn't be too hard probably

spice burrow
#

Is PacketPlayOutEntityTeleport generally what people use to animate armor stands?

dawn flower
#

can you wait in a bukkit task? like this

AtomicInteger delay = new AtomicInteger(0);
AtomicInteger i = new AtomicInteger(0);
Bukkit.getScheduler().runTaskTimer(plugin, () -> {
  wait(delay.get()); // how do i do this
  if (i.getAndIncrement() >= 15) {
    delay.getAndAdd(10);
    i.set(0);
  }
}, 0, 5L)```
remote swallow
#

Run task later

slender elbow
#

you really shouldn't wait/sleep on the main thread

river oracle
#

cope

#

literally cope bro I freeze my server every tick

#

what you gonna do about it πŸ˜‚

slender elbow
#

I'm gonna tell momd5

river oracle
restive mango
#

How could you make two different wheat seeds which when planted produced two different wheats which when harvested yield those two different seed types again?

#

Is there anyway besides like a database

#

Like can you attach a persistentdatacontainer to wheat

river oracle
#

block's aren't PersistentDataHolder

#

you could use blockpdc though

#

?blockpdc

undone axleBOT
restive mango
#

@river oracle oh

#

Cool thanks man

#

You are Charly

river oracle
#

I'm actually Miles

#

but thanks anyways

restive mango
#

Chadly

#

@river oracle rofl

noble lantern
#

Does anyone here have experience removing particles from the END_GATEWAY and END_PORTAL - or are these entirely client-side? I tried using protocol lib to cancel packets but it appears the packets aren't being sent when logged (1.20.6), tbf they arent even logged when things like a potion is thrown either, unless these are also entirely client side?

https://hastebin.com/share/zipuzupenu.csharp

#

Ah the /particle command does trigger this packet though

drowsy helm
#

just like floating sand's effect

noble lantern
#

sadge

#

Looks so goofy with the particles 😭

drowsy helm
#

you encapsulating them?

#

maybe just make the box really big lol

noble lantern
#

I did 🀣 they have unlimited range

#

For some reason those particles are just, beyond reality XD

drowsy helm
#

i wonder if you can debug stick them

noble lantern
#

The gateways themselves? If so it says no properties available

#

just found out you can water log barriers, alright then

#

huh 🀣 walking on water lmfao

drowsy helm
#

are resource packs out of the picture?

noble lantern
#

hmm

#

Would I be able to texture a block somehow with the end gateway effects?

drowsy helm
#

I believe so

#

im tryna see if theres some hacky way to do it without resource packs

noble lantern
#

Only issue is, when the player first joins is I think they might see some weird block before the pack renders in too, or wasn't there some update that allows the resource pack to render while connecting? I remember something vaguely about this in one of the recent updates

dawn flower
#

is there such a unicode that's insanely high or stack vertically if alot of them are there?

umbral ridge
#

ask chatgpt

spice burrow
#

does using Player#getItemInHand have any benefit for backwards compat

dawn flower
winter scarab
#

if anybody is an expert with protocollib, i cant figure out why my entity metadata packet isnt working correctly for my block display entity

                new WrappedDataValue(22, WrappedDataWatcher.Registry.getBlockDataSerializer(false), WrappedBlockData.createData(Material.DIAMOND_BLOCK).getHandle()),
                new WrappedDataValue(20, WrappedDataWatcher.Registry.get(Float.class), 2F),
                new WrappedDataValue(21, WrappedDataWatcher.Registry.get(Float.class), 2F),
                new WrappedDataValue(11, WrappedDataWatcher.Registry.get(Vector3f.class), new Vector3f(2F, 2F, 2F))
        ));```
heres how im setting the attributes within an entity metadata packet and sending it to the client but the entity is invisible
spice burrow
dawn flower
#

if you use the inventory method it gives you backwards compatability and it isn't depracted iirc

spice burrow
#

ah ok

#

thx

dawn flower
#

can u use \n in a title by anyway

blazing ocean
dawn flower
#

damn

blazing ocean
dawn flower
#

where are they

blazing ocean
dawn flower
#

do i need a texture pack

blazing ocean
#

yes

dawn flower
#

rip

silent wave
#

when i shoot a player with that custom armour the event dont work, it isnt giving the effects

pseudo hazel
#

can you add visual durability (like the bar on tools) to any item?

#

I just need to it be visual

valid burrow
#

got added recently

#

so if youre on a newer/newest it’s possible

pseudo hazel
#

1.20.4 new enough?

#

if so big W

#

how do you use it though

#

is it just item meta stuff?

#

like can I add damagable itememeta to any item and it will just work?

valid burrow
#

not sure

#

i only know it got added recently

#

might have to do some research yourself

pseudo hazel
#

okay I see

tender shard
#

IIRC it was added in 1.20.5/1.20.6

shadow night
#

Ye

tender shard
pseudo hazel
#

damn

#

really..

#

thats kinda dumb

#

welp, time to ditch support for anything except for latest again

shadow night
#

Lol

#

That's how it gotta be

pseudo hazel
#

yup

short drift
#

Who/what is responsible for Chat Component API? I can't find their Github.

pseudo hazel
pseudo hazel
short drift
#

So I should go to the Bungeecord Github then?

pseudo hazel
#

yes probably

short drift
#

Yes there we go.

#

So I'll complain there.

pseudo hazel
#

lmao

silver robin
silver robin
#

it's okay to ask here

pseudo hazel
tender shard
short drift
tender shard
#

the whole itemmeta thing is completely different in 1.20.6 and the client in 1.20.4 wouldnt understand anything

pseudo hazel
#

oh so mc vanilla added this feature in 1.20.5

#

and spigot just made the api for it to actually use it as a dev

tender shard
short drift
#

Are you still talking about the damageable items thing?

pseudo hazel
#

yeah

short drift
tender shard
tender shard
#

it simply loads the lang.json file or however it's called and then you can just map the translation key <> translated string

short drift
# pseudo hazel yeah

What's the deal there? In the olden days we used the different damage values define different custom models, which allowed the creation of custom items - but you had to prevent damage or create a custom system for handling it.
But these days you can just create any amount of custom items and give them what ever ID you like.
So what's your interest in the damage values exactly?

tender shard
pseudo hazel
#

I want to display the durability bars in my menu for clarity reasons

#

like an expiry date on the item essentially

#

so its just the visual part I want

#

idc about using the item or if it actually has that durability

short drift
pseudo hazel
#

the issue with custom translations is that you would have to provide translations for all languages?

#

or am i crazy

short drift