#help-development

1 messages Β· Page 436 of 1

urban trout
#

ioh yo youre pink now

icy beacon
#

save your messages to a list:
List<String>
have an index somewhere:
int index = 0
every time you send the message, increase it:
sendMessage(list.get(index)); index++
when the index is equal to (lists size - 1), reset it to 0:
index = 0

urban trout
#

ok i dont think playerasyncchatevent is a thing

#

its not showing up

#

is it asyncchatevent?

icy beacon
#

the reason that it has to be (lists size - 1) is because indexing starts from 0 and lists size is its actual size

urban trout
#

hang on

icy beacon
urban trout
#

idk

#

lemme checkl

icy beacon
#

asyncchatevent is a paper thing

urban trout
#

oh paper

#

whops

icy beacon
#

and this is

#

?whereami

icy beacon
#

but they shouldn't have much of a difference

urban trout
#

πŸ‘

icy beacon
#

i boosted the serv

icy beacon
icy beacon
#

damnnnnn

#

the splash screen is already one reason to update

#

sick

urban trout
#

beautiful

icy beacon
#

yeah

#

the color scheme is something else

#

wow

urban trout
#

too true

proper notch
icy beacon
proper notch
#

I always wait for a few versions in because of my past experience with bugs

icy beacon
#

my previous was 2022.3 or smth

proper notch
#

I'll wait a little bit then. <3

icy beacon
#

and this is the first pending update

icy beacon
terse ore
proper notch
#

Based on their bullet point features also doesn't seem like it offers much for me anyway

icy beacon
#

not sure, last time i used ultimate was like a year ago

proper notch
#

Yes. Ultimate is basically just extra plugins

icy beacon
#

yep

terse ore
#

I am with 2023.3

icy beacon
#

damn you're from the future

terse ore
icy beacon
#

i'm with 2026.2

terse ore
#

I wouldn't buy ultimate ngl

proper notch
#

I use IJ for Go so πŸ’€

#

I have to

icy beacon
#

F

terse ore
proper notch
#

gonna move to fleet once it has plugins and GH Copilot. Copilot for Go is so damn good

terse ore
#

basically lmao

icy beacon
#

yeah i used to use it but then it expired or something

terse ore
icy beacon
#

the student account wasn't mine lol

torn shuttle
#

does anyone here have a preferred list making piece of software?

icy beacon
#

somebody gave it to me

terse ore
icy beacon
#

but i just kept creating new intellij accounts and getting 1-month trials

#

but then i got tired and installed community

torn shuttle
#

I've been using notepad++ but it's not really made to take quick notes and do quick checklists

icy beacon
terse ore
icy beacon
#

lmao

#

true

#

i have like 40

#

maybe more

terse ore
#

bruh

icy beacon
#

nah

#

definitely not less than 40

torn shuttle
#

just use disposable emails at that point

icy beacon
#

i just kept creating them along my journey in life lmao

#

and i have them all on my phone

#

they all have different purposes

#

for example i use this one for spam

#

i use this one because it's easy to remember

#

this one is also for spam

terse ore
#

wth

icy beacon
#

this one used to be my youtube main acc

#

etc

#

my notifications for gmail are on silent

#

and i don't get any anyways lmao

#

not exactly

#

i just created them at some point in time

#

and they served a purpose

torn shuttle
#

and I thought it was bad that I have 7 active email accounts

icy beacon
#

ultimately

terse ore
#

I have like 10

#

I used them for discord nitro promos lol

#

I use 2

#

my school and my main one

eternal oxide
#

InteliJ is a drug dealer. Give it free to all students so it's the only IDE you learn.

terse ore
#

what are you studying?

eternal oxide
#

its the IJ model. Get everyone they can used to using IJ as early as they can so when they are no longer students it's so tempting to continue using it

icy beacon
#

just a snippet of what I have

terse ore
#

ffs

icy beacon
#

ikr

#

and i'm omw to create more

#

i'll probably create 4 or 5 today out of spite

terse ore
icy beacon
#

wait i want to decipher this

#

nvm

terse ore
#

man why these keep showing on my feed

icy beacon
#

the parentheses aren't even complete

terse ore
icy beacon
terse ore
#

most normal python code

icy beacon
#

p*thon

terse ore
#

said by a python developer

#

I am trying to make a server software in python

icy beacon
terse ore
#

I've been like 4 years coding in python

icy beacon
#

do you need therapy

terse ore
#

I do

icy beacon
#

please don't

#

spare the therapist

terse ore
#

someone wanna play a game

icy beacon
#

naaaaaaaaaaaaah

#

the + .01

terse ore
#

lmao

icy beacon
#

lmao

#

and it ints the input

#

perfectly balanced

#

as all things should be

terse ore
#
import os
os.system(f"python {__file__}") 
#

this one is better

#

it's a while loop but making a process each time

icy beacon
#

wouldn't that just launch itself infinitely

terse ore
#

cya

icy beacon
#

so you're saying that deleting the core directory of an operating system is better than hanging the system once?

#

cya

icy beacon
#

but it could

#

perhaps

terse ore
#

it will delete some files that aren't being used if run on admin

icy beacon
#

wait can you try it and send a video here real quick

#

i wanna see it

#

😳

terse ore
icy beacon
#

fuck trustedinstaller

#

always forbids me from annihilating my system

#

stupid witchery

terse ore
#

the best while loop

#
for (;;) {
  System.out.println("Hello, World");
}
icy beacon
#

yeeeeees

#

for (;;) is pure style

#

the best infinite loop is

for (double i = Double.MIN_VALUE + .00000001; i != Double.MIN_VALUE; i =+ .00000001)

so it's technically infinite but it will potentially end and the user won't know why

terse ore
#

wth is this

#
#

who stole my code

icy beacon
terse ore
icy beacon
#

i;m trying to find a thing

#

yeah i can't find it

#

shit

#

there was a thing that would uwufy your spigot console

terse ore
#

this one is incredible

icy beacon
#

spare us

terse ore
#

I won't say try it because you guys don't trust me

#

welp im hungry

#

brb

ebon topaz
#

how do i set a items damage?

icy beacon
# ebon topaz how do i set a items damage?

get its item meta (make sure it has one):

if (item.getItemMeta() != null) {
  ItemMeta meta = item.getItemMeta()

cast the meta to Damageable (make sure it's Damageable indeed):

if (meta instanceof Damageable) { // make sure to import the correct Damageable
  Damageable damageable = (Damageable) meta
}

set its damage (you'll see how) and pass the meta back to the item

lost matrix
#

Why dont they have any access modifiers?

humble tulip
#

Does a damage of 0 mean fully repaired?

icy beacon
#

should, yeah

lost matrix
#

And you should write getters and setters. Dont access fields directly.

eternal oxide
#

to prevent direct access

#

no private or protected

lost matrix
#

Never make your fields public.

#

Your fields

#

But only those that need getters and/or setters

#

There is still a lot to learn but you are definitely improving.

#

Keep trying. You'll get there eventually.

icy beacon
#

i started coding my paid plugin when i barely knew shit

#

and it took me like 7-8 months

#

it got completely recoded in the process

#

and somehow even got accepted

#

i got 1 purchase, then my paypal was blocked

#

so i now have this resource as a free one lol

lost matrix
#

It takes me several weeks to do a proper minigame...

icy beacon
#

lmao

#

among us

lost matrix
#

Yes PES_Cry me plenty noob

#

Last one i did was a castle defence game where you could upgrade catapults and canons
and recruit melee, ranged and cavalry soldiers.
Then you had to defend waves of different mobs with occasional boss stages.

#

Only for the pathfinding

#

A lot was actually just tinkering with packets

icy beacon
#

not completely the same

lost matrix
#

NMS contains packets. You can also work with packets without using NMS.

icy beacon
#

but i'd say they are on the same wavelength

lost matrix
#

Packets are the information that gets sent between client and server.

hybrid spoke
#

i mean it is java

icy beacon
#

some things are not API'd

#

and you have to manually send packets for them

lost matrix
#

Because sometimes you dont want an object to be on the minecraft server.
So if you want the client to see something that is not actually on the server
then you simply send him a packet that tells him "a mob just spawned at x y z"
even tho there is no actual mob

icy beacon
#

protocollib

lost matrix
#

plib is the non-nms way to work with packets

icy beacon
#

yeah

hybrid spoke
tardy flame
#

Please don't have so many things at main class mate!!

#

It's hard to understand what half of them are for

#

Create configuration, event manager or other classes that will move out things

#

It's not that big of a deal

#

But it's better

lost matrix
#

Create new classes and group your objects in a meaningful way

hybrid spoke
#

if those are settings i would see them in a settings related class

tardy flame
#

Or for events it would be also an option to create a method like registerListeners

#

Just don't put so many things in classes / methods and it should be fine

hybrid spoke
#

its not about the lines

#

clean code

tardy flame
#

You can create class called like ListenerManager and in there you have list of events and you can add / remove events from there (not directly from map) and then register() method that will loop through all added events in list

#

And then you just create new instance of the class in your main class and can add and register it

#

That would be the best option

#

Especially that you have multiple listeners

#

You could also skip the list and register it within one static method

#

With the use of method params

#

Choice is yours

lost matrix
#

I feel like Bettanation is probably the youngest dev here...

brisk estuary
#

well, there is a 7 years old dev here too

#

lol

lost matrix
#

Someone created a Team using ProtocolLib here? My old code uses reflections which would like to avoid.

#

My main concern is the ClientboundSetPlayerTeamPacket#parameters field.
Im not sure how to modify the Optional<Parameters> object.

eternal oxide
#
        public b(ScoreboardTeam scoreboardteam) {
            this.displayName = scoreboardteam.getDisplayName();
            this.options = scoreboardteam.packOptions();
            this.nametagVisibility = scoreboardteam.getNameTagVisibility().name;
            this.collisionRule = scoreboardteam.getCollisionRule().name;
            this.color = scoreboardteam.getColor();
            this.playerPrefix = scoreboardteam.getPlayerPrefix();
            this.playerSuffix = scoreboardteam.getPlayerSuffix();
        }```
lost matrix
#

Yeah my main problem is modifying this field here

#

Because i dont find a enum wrapper for the "ChatFormatting" class

eternal oxide
#

This one? import net.minecraft.EnumChatFormat;

lost matrix
#

A ProtocolLib wrapper. I need a way of changing the ChatFormatting field in a type safe way.

eternal oxide
#

ah

#

yeah no plib here

#

was just nms

serene laurel
ivory sleet
lost matrix
sullen marlin
#

Don't use packets for scoreboards.....

#

There is literally no reason

lost matrix
#

Anyways im ditching this approach. Ill just create a scoreboard throght the api

#

Oh yeah md sniped me

#

My reasoning is that i dont want to mix purely virtual entites with server aware scoreboards

#

My main goal was changing the name of NPCs through the scoreboard. But ill take a different approach:
Add them to a scoreboard to hide the names completely and mounting them with a text display entity to display the name.

ivory sleet
#

Ah I see

final monolith
wet breach
wet breach
#

See that is not quite the same as saying set slot. Could have said it involved containers lol

final monolith
#

sorry xD

#

on the game the packet is called PacketPlayOutSetSlot

wet breach
#

Its the state of the container

#

Like blockstate

final monolith
#

πŸ€”

#

how do i get a containers state?

wet breach
#

It comes from the previous packet

final monolith
#

i need to inject the packets and hold the last set slot packet and get the container state?

wet breach
#

So a packet is sent from the server and then you should get a related packet back and it should be set already

final monolith
wet breach
#

Probably, will need to find the related area in nms where it gets info of the state of the container

final monolith
#

ok, thanks πŸ™‚

wet breach
#

So will probably need to load nms code into ide so you can have your ide do searching for you

final monolith
#

prob its on the Container class

wet breach
#

I would start from the packet code in nms

#

And work back towards the server code

#

Usually less stuff in packet area making it easier to see what info its stuffing in there and where it is coming from lol

final monolith
#

i will get all the SetSlot packets that the player receives and check the state IDs, maybe i find a pattern

wet breach
#

Its something created by the server in the beginning. So would look at the open or click container first

final monolith
#

ooh yeah

wet breach
#

The id is a way for the server to track that the containers state changed usually something added or removed

#

Reason this is like that is because you can send a set container slot packet to update window properties without the containers state changing

viral temple
#

that's pretty cool, but is there an update for vault?

wet breach
viral temple
#

1.7.1

#

it fixed

wet breach
#

Junit is for testing and since its not shaded all you have to do is just make sure you are specifying correct junit version if you are doing any testing and since you are not compiling vault from source you are not running junit tests on vault

#

Therefore the fix is simply done by you

viral temple
wet breach
#

You dont

viral temple
#

better safe than sorry

wet breach
#

Your already safe

#

Junit doesnt run on its own not even with maven

viral temple
#

oh, so it's okay to keep an vulnerability?

#

alright

#

jeez

wet breach
#

You dont have a vulnerability if you are not using that junit version

#

Not sure why that is hard to understand

viral temple
wet breach
#

Then you have nothing to worry about

viral temple
#

so it's probably getting it from somewhere

#

and that somewhere is vault api

#

that's why it got detected

wet breach
#

Do you know what a transitive dependency is?

viral temple
#

like saying "another api is using it"

#

yes

wet breach
#

Just because somethin has a transitive dependency doesnt mean said dependency is on your system or is automatically downloaded

viral temple
#

i know

wet breach
#

Then you have nothing to worry about

viral temple
#

myself? i don't worry about those things

wet breach
#

You dont even use that junit version nor are you compiling and conducting tests on vault

viral temple
#

other people do

wet breach
#

I wouldnt worry about other people

#

That cve only affects developers if at all for the mc community lol

viral temple
#

i won't care about other people

#

i fixed it, the review remains

#

that's life I guess

wet breach
#

Not sure what that has to do with junit

viral temple
#

it was "in general"

#

but alright

#

i understand that junit won't affect myself and my plugin

#

but better be safe than sorry and don't make people angry ig

wet breach
#

You can open an issue on github for vault if you want

#

Doubt the author of it pays attention to spigot discord or is even here lol

viral temple
wet breach
#

Then nothing to worry about then lol

torn shuttle
#

do any of you happen to know why goats don't have goals in their remapped nms class file?

#

it's weird because other animals have them and these don't seem to inherit anything

wet breach
#

Do goats even do anything?

torn shuttle
#

yeah

#

I mean they move around, look around, eat grass and ram people

wet breach
#

If its not present in the remap it most likely means there isnt any api for it yet or nothing is modified.

torn shuttle
#

they have to implement it somewhere

wet breach
#

Or simply they dont do anything goal wise

ebon topaz
#

so thats a yes i did need to account for unbreaking myself

torn shuttle
#

I mean even cows have goals

wet breach
#

The only time something gets remapped is because it has been modified or touched. Same principle in why not all mc code is present in the spigot jar sources

icy beacon
torn shuttle
#

then how come every mob except goats and dragons implement goals?

wet breach
#

Well dragon is different

torn shuttle
#

yeah that one didn't confuse me

wet breach
#

As for goats as i said there is probably nothing touched or provided differently from the api currently

torn shuttle
#

I mean I am also looking at the decompiled code, no goals

wet breach
#

When new things enter the scene not everything has an api component specific to it upon new spigot versions

#

This method allows spigot to update regardless if spigot implements something specific to it

#

So all this means is that in the future it might get added. I am not home yet to look at source code to see what exactly goats do lol

#

But just stating not everything in mc gets implemented into the api either

#

You could however look into making a pr for it

terse ore
wet breach
#

Anyways driving home now

echo basalt
#

goats use the brain system

icy beacon
#

i hate when shit breaks due to typos

echo basalt
#

because fuck you

#

new mobs use the brain system

icy beacon
#

spent 2 hours to figure out that i used "types" instead of "roles"

echo basalt
#

A brain has sensors, goals

torn shuttle
#

yeah the actual answer seems to be brains

echo basalt
#

memories

torn shuttle
#

I was looking at it now

echo basalt
torn shuttle
#

this sucks

icy beacon
#

btw why do they use Maps.newHashMap() and shit instead of just doing new HashMap<>(), anybody knows?

echo basalt
#

yeah

echo basalt
icy beacon
#

wise

torn shuttle
#

so for some mob types I need to set a goal but for other mob types I have to set activities?

echo basalt
#

yeas

torn shuttle
#

thanks I hate it

icy beacon
#

if there are more than 2 in a row you probably need a new wrapper class

echo basalt
icy beacon
#

because what the fuck

torn shuttle
#

ah shit are activities not something I can create

echo basalt
#

they seem to be immutable

wet breach
#

You should use new hashmap though

#

The other way doesnt work with method parameters

icy beacon
#

soooo why are they doing it this way

echo basalt
#

why not

icy beacon
#

oh ok

wet breach
#

Its essentially the same

#

Except for what i said

#

Other then that caveat doesnt really matter

icy beacon
#

then another question comes

#

why so many angle brackets

#

why not create a class

wet breach
#

It stems from before diamond operator was thing and introduced in java 1.7

hybrid spoke
#

its redundant nowadays

icy beacon
#

so, some more legacy code in a class that's used exclusively in non-legacy code

#

thanks mojang i hate it

wet breach
icy beacon
#

this makes me want to code in brainfuck

echo basalt
#

the only static thingy I use is Sets.newConcurrentHashSet

#

because I can't bother doing Collections.newSetFromMap(new ConcurrentHashMap<>())

hybrid spoke
#

Collections.empty... whyme

echo basalt
#

rarely

hybrid spoke
#

bad

torn shuttle
#

jesus how do the brains actually work

brisk estuary
#

Dequeus.Collections.newSetMapSync<>() is useful too

hybrid spoke
#

or unmodifiable dankfingers

echo basalt
#

new ImmutableWhatever

hybrid spoke
#

java needs a better immutable collections api

torn shuttle
#

@echo basalt do you have any clue of what happens if you give a goal to an entity type that relies on a brain?

echo basalt
#

pretty sure the brain overrides the goals

#

but try and see

#

I never messed with brains

torn shuttle
#

it's also what I am assuming

echo basalt
#

but messing with goals seemed to do nothing

torn shuttle
#

seems like I'll have to extend behavior and insert it into the brain somehow

echo basalt
#

from what I remember, a lot of it was immutable

#

so you'd need to use mad reflections and unsafe

#

but things might've changed

#

well

#

you can just this.getBrain().removeAllBehaviors();

#

on the fly

#

so it might not be frozen

torn shuttle
#

thing is right now i'm trying to inject further behavior

icy beacon
#

cries in adding Mutable prefix to everything

brisk estuary
#

lol

young knoll
#

Brains are weird

#

That statement is also weird

brisk estuary
#

that's why lots of people don't have them

torn shuttle
#

yep there's a lot of immutable garbage in here

icy beacon
hybrid spoke
icy beacon
#

i'm geniunely curious

#

just a couple reasons

hybrid spoke
icy beacon
#

eh ok

twilit roost
#

how can I make SimpleDateFormat which puts "d","mins","secs" after digits itself?
tried this:

twilit roost
#

thx

icy beacon
torn shuttle
#

may god have mercy on my soul

icy beacon
#

oh my god what is this

twilit roost
quaint mantle
young knoll
#

Do all new mobs just use brains now

torn shuttle
#

seems like it

rough drift
#

Is there a way to remove the background color from a text entity in spigot?

young knoll
#

Set the background color to have an alpha of 0

rough drift
#

that does not have alpha

#

nvm

serene laurel
eternal oxide
#

bad shading by the looks

pulsar veldt
#

how do I include NMS in my plugin? I tried adding 'org.bukkit:craftbukkit:1.19.3-R0.1-SNAPSHOT' to my build.gradle but it could not find that

eternal oxide
#

?nms

pulsar veldt
#

ty

young knoll
#

I thought that was craftbukkit 1.9 at first

#

I was about to have an aneurism

lavish cliff
#

hi guys , how i can create a custom enchant?

pulsar veldt
eternal oxide
#

Spigot uses maven

#

there are ways around it to use gradle but I don;t know them and they are not supported by Spigot

quaint mantle
#

you would need to use something like paperweight

tender shard
#

And then youβ€˜re forced to use paper api instead of spigot

eternal oxide
#

simpler to use maven

torn shuttle
#

uh where did I go wrong?

desert jungle
#

I use spigot 1.12.2, an error occurs about the absence of an object(see txt)
please tell me what is wrong?

tender shard
torn shuttle
#

ok so I see it's a type erasure issue but the problem is that I really want to override that

#

oh uh let me check I might be

#

extending smth abstract

tardy delta
#

me being bored in lesson

tardy delta
desert jungle
tender shard
# torn shuttle extending smth abstract
class Test<E extends LivingEntity> extends Behavior<E> {

        @Override
        protected boolean checkExtraStartConditions(ServerLevel var0, E var1) {
            return super.checkExtraStartConditions(var0, var1);
        }
    }
#

this should work

#

I gues

torn shuttle
#

uh now it just doesn't override

tender shard
#

erm my bad

#

wait

#

Test<E extends LivingEntity>

torn shuttle
#

that 's what I had

#

type erasure

tender shard
#

are you sure you have it exactly like in my code block abovne? because that compiles fine for me

torn shuttle
#

oh nvm yep

#

I was extending mob behavor

#

hmmmm

#

that should do it yeah, thanks

tender shard
#

np

torn shuttle
#

man writing this is turning out to be quite the nightmare

#

I think I finally sort of understand both AI systems

regal scaffold
#

@tender shard

#

Can I create a PersistentDataType using your library from an enum?

tender shard
#

sure

#

DataType.asEnum(Material.class)

regal scaffold
#

Do you have it premade or do I treat it as anyclass

#

There it is!

#

Thanks!

tender shard
#

np

regal scaffold
#

Wasn't able to find it, didn't look much

tender shard
grizzled oasis
#
    public static boolean checkUpdate() throws ParseException {
        Calendar c = Calendar.getInstance();

        c.set(Calendar.HOUR_OF_DAY, 0);
        c.set(Calendar.MINUTE, 0);
        c.set(Calendar.SECOND, 0);
        c.set(Calendar.MILLISECOND, 0);

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        Date today = c.getTime();
        Date date = sdf.parse("2023-03-28T22:00:00Z");

        if(today.toInstant().isAfter(date.toInstant())) {
            return true;
        } else {
            return false;
        }
    }

Hi, im having an issue with this code (java.text.ParseException: Unparseable date: "Wed Mar 29 00:00:00 CEST 2023")

tardy delta
#

why not using an Instant?

grizzled oasis
tardy delta
#

take a look at the javadocs

#

ah shit

#

should probably not read from random address offsets

grizzled oasis
tardy delta
#

could probably do something with minus the other day and see if the result has 1 day or more

#

lemme guess, that is an access violation

#

my halt instruction kinda fucks up then

#

@rocky tree no friend requests

rocky tree
tardy delta
#

better

ivory sleet
#

Unsafe!?

tardy delta
#

looks like i triggered someone

ivory sleet
#

Well, I just happen to rarely ever encounter people who use it

#

U still working on that minestom thingy?

icy beacon
tardy delta
#

ye but this is something else

flint coyote
#

Is there a way to get the dead "parent" slime when a new slime spawns?
I need to check whether the slime spawned due to a specific slime dying

ivory sleet
#

Ah, fourteen im gonna be a real annoying conclure today, and tell u to use varhandle

tardy delta
#

varhandles to access raw memory?

ivory sleet
#

But gl on that thing

#

Wait did I misread

#

Uhh

tardy delta
#

i was bored in programming class and started doing this

ivory sleet
#

Ah

icy beacon
bitter umbra
#

How do I implement minecraft api in my project? I'm trying 'net.minecraft:minecraft:1.18.2' but I'm not getting it, it's returning "Could not resolve net.minecraft:minecraft:1.18.2"

icy beacon
#

?nms

icy beacon
#

wait nvm

#

wrong

#

?bt

undone axleBOT
icy beacon
#

run buildtools for your version

tardy delta
#

i probably already caused a few memory leaks

flint coyote
tardy delta
#

whats even the dif between an arraydeque vs an arraylist?

ivory sleet
#

Internally?

tardy delta
#

why to use one or the other

ivory sleet
#

iirc resize strategy is different

flint coyote
#

Yeah deque doubles and arraylist increases by about 50%. Also arraylist starts with an initial capacity of 10 and deque with 16

tardy delta
#

wow

flint coyote
#

Just stick with an ArrayList if you just wanna use it as a List πŸ€·β€β™‚οΈ

tardy delta
#

deque has some nice pop and peek methods

ivory sleet
#

Anyway fourteen, I was gonna say u coukd use the new foreign memory api but then I remembered its still preview

flint coyote
#

Yeah but that's Stack behaviour

tardy delta
#

ye its preview and i havent used it before

#

isnt it to access C stuff?

ivory sleet
#

Its a better version of unsafe

tardy delta
#

hmm

#

cant do maths

#

its always 25900 though πŸ€”

#

ah it somehow loads 25800 and 100

ivory sleet
flint coyote
#

I suppose there's no way of checking which Vindicator a Vex belongs to?
Besides checking for the closest one on spawn or doing another workaround.

tardy delta
#

yeh ive seen it

#

ill see what usecases it brings

ivory sleet
#

Yeaa

#

When did you see it?

#

Thought I was early :|

tardy delta
#

bruh i am telling unsafe to free address offsets instead of abslute addresses

#

how am i not getting an access violation πŸ€”

tardy delta
ivory sleet
#

Oo alright

#

10x dev here Ic

ivory sleet
#

Might be possible with nms

tardy delta
#

i need smth to do when sitting in the train

ivory sleet
#

But else you’d need a hacky workaround as such

flint coyote
#

Well I'll go with the workaround then - although it might be slower

ivory sleet
tardy delta
#

uhh professor, its just college and the java lessons dont really interest me

#

havent learnt anything i didnt knew

ivory sleet
#

πŸ₯²

tardy delta
#

thats how college goes

ivory sleet
#

Valid

desert jungle
#

Please tell me if there are events that can catch keyboard presses, for example, when you press the Z key, do something

ivory sleet
#

You cant do key input logging

tardy delta
#

key logging πŸ₯Ή

ivory sleet
#

The client translates those into packets, which it sends to the server where server interprets it etc

tall lagoon
#

How to get the texture of a player's head as a URL

ivory sleet
#

PlayerProfile#getTextures I think?

#

And then you have SkullMeta#setOwnerProfile and getOwnerProfile

#

(PlayerTextures#getSkin and getCape provide you with relevant urls)

tall lagoon
#

Excuse me, can you please elaborate?

vivid skiff
#

Ho do i use maven modules for a spigot plugin to add WorldGuard6 and WorldGuard7 Dependecy? Is a question that i asked yesterday to but i didn't really understand how to do it

ivory sleet
river oracle
#

your probably going about GUI's the wrong way if you have a quesiton like this

ivory sleet
#

You have to use nms

heavy mural
#

Xessentials has a command /home username:
Which returns a list of homes of a user.
Is there a way to make the console run this command to then catch the response to use it for another action?

tardy delta
#

lol my number 2000 becomes 25808 and 200 becomes 25800

ivory sleet
#

Basically you dump some nbt data that into one of the stacks so that they’re different by definition

chrome beacon
ivory sleet
#

Yeah that works also

chrome beacon
#

No

ivory sleet
#

^ but there exists plenty of resources to learn from

heavy mural
#

Yes

ivory sleet
#

You can parse the command line

#

But doubt essentialsX exposes an api where you can hook a callback into that command

heavy mural
#

Hmmm another approach is to make changes in the userdata file of xessentials maybe

chrome beacon
#

EssentialsX has an API you can use. You don't need to run a command to get the homes

heavy mural
#

Oh

ivory sleet
#

That solves that

heavy mural
#

That would be amazing

#

I tried to look for that, but didn't find a lot of documentation. I'll give it another search tonight

#

Tyty

ivory sleet
#

They also have a discord you can get help from

#

iirc its called moss

#

Dunno if its any good but yeah, worth a shot

heavy mural
#

Is their discord easy to find?

ivory sleet
#

Linked in their plugin page iirc

heavy mural
#

Okidoki

#

That'll do :)

#

Ty

ivory sleet
#

Good luck

heavy mural
#

🫑

grizzled oasis
#
player.getInventory().addItem(ItemStack.deserialize((Map<String, Object>) plugin.getConfig().get("items." + args[1] + ".itemstack")));

Caused by: java.lang.ClassCastException: org.bukkit.configuration.MemorySection cannot be cast to java.util.Map
only if i reload this happens, but if i add the item without reloading it works just fine

chrome beacon
# heavy mural 🫑
chrome beacon
#

Why is it a one liner

#

Split things up and don't deserialize everytime

grizzled oasis
chrome beacon
#

everytime

#

You do it once

grizzled oasis
#

so why this error occurs?

torn shuttle
#

ok I think I was wrong, I think it might not be possible to inject a behavior into ai using a brain

chrome beacon
#

The brain is for remembering stuff

torn shuttle
#

yeah like remembering what behaviors mobs have

tender shard
alpine swan
#

can you directly cast a Player to an EntityPlayer? if not, how?

tender shard
#

no

#

you cast the Player to CraftPlayer, then call getHandle()

#

also you should be using mojang maps, the proper name is ServerPlayer, not EntityPlayer

torn shuttle
#

have any of you successfully injected custom behaviors into nms brains without creating the brain from scratch?

chrome beacon
#

Are you on a modern version?

alpine swan
#

no

chrome beacon
#

Like 1.17+

tender shard
#

?nms

tender shard
#

?switchmappings

tender shard
#

that's what I mean

#

if you're on 1.16.5 or older, forget what I said about mojang maps

tardy delta
alpine swan
#

wait nvm i need an (nms) Entity not an EntityPlayer, should I do ((Entity) ((CraftPlayer) player).getHandle); or what

small current
#

Hello, the metadata packet has changed in 1.19.4, what should i put in the params? (mappings or no mappings)

small current
#

the SynchedEntityData (DataWatcher) class has two methods
packDirty() and getNonDefaultValues(), which one of them should be in the params of the metadata packet?

quaint mantle
small current
tender shard
#

at least that's what I'm using, and it's been working fine so far

alpine swan
small current
#

Ok, thanks for the help.

tender shard
#

np

tardy delta
#

lol when i store at offset 1, offset 0 gets overwritten

#

and always with the same 25800 πŸ€”

hoary zodiac
#

is there any way i can give rewards to player on per hour (online) basis?

tardy delta
#

scheduler or smth

chrome beacon
#

?scheduling

undone axleBOT
tardy delta
#

@hoary zodiac no i can not

#

today is breaking stuff day

#

objective: create as many access violations as you can

#

oh ye when i write two bytes after each other, the first one gets overwritten

heavy mural
flint coyote
#

Why are blocks that are not in the game yet (or entities like the camel) already part of spigot? πŸ˜…

tender shard
#

because you can get them through the experimental data pack iirc

young knoll
#

Yes

flint coyote
#

Oh I see. Will #isSpawnable on the entity type enum return false for those entities? And what's the equivalent for blocks?

worldly ingot
#

No, they're all spawnable. We have no way to determine whether or not an entity or material is experimental

flint coyote
#

Sadge. Alright, ty

young knoll
#

Smh maybe you should

flint coyote
#

At least you get an exception. Technically I could try to spawn each mob and if I get that Exception I know it's experimental lol.

pseudo hazel
#

hmm

#

is this from the 19.4 api?

flint coyote
#

yup but I think it was in there before 1.19.4

pseudo hazel
#

I see

#

I might need to check my plugin too then haha

flint coyote
#

I tried spawning random entities - then I ran into this^^

regal scaffold
#

Bro since the last IJ update

#

My shit just completely freezes

#

And my entire computer starts lagging and I have to task manager it

flint coyote
#

It is harder for blocks tho. I made a minigame that you have to stand on a random block - new blocks are included and basically make it impossible πŸ˜…

worldly ingot
#

Yeah, Mojang sort of put us in a shitty situation

#

It's a hard problem to solve. Right now, you can't iterate over the Biome enum without getting an exception because the cherry blossom biome is there but if the pack isn't enabled then it doesn't exist

#

We're trying to migrate to a registry approach where instead those would just be null

pseudo hazel
#

usually happens when I paste stuff

worldly ingot
#

I added in API for armour trims for instance and it pulls from registries and makes the constants nullable if the pack isn't enabled

#

Pending merge, but yeah, ideally that's how all our API works moving forward

flint coyote
#

I see why there's a problem with that, yeah. Glad you are attempting to fix it for future versions though

#

I also don't know why Mojang introduced datapacks for experimental stuff and did not just stick to snapshots

torn shuttle
#

huh I actually managed to inject my custom behavior into the brain ai system

#

it wasn't too bad either, first try

#

now doing the goal-based one...

worldly ingot
flint coyote
#

Meh I still don't think that it's a good idea. I was confused on how to run the new snapshot since nothing was available after setting up the server.
Before that change I just installed a snapshot version and everything was working. Now you also have to configure datapacks.

worldly ingot
#

Well they're targeted for 1.20

#

If they'd just make their update notes more clear then it would be a bit less of an issue

flint coyote
#

Even with update notes there's now additional complexity if you want to play a snapshot version (with new content)

worldly ingot
#

They're not really snapshots

#

More of a snapshot snapshot lol

flint coyote
#

So they just contain bugfixes for experimental datapacks now?

worldly ingot
#

Hm? No. The last two snapshots have been for 1.20. The first of which removed the 1.20 experimental pack and added all of its contents into the actual snapshot

#

1.20.x may end up containing some 1.21 features under an experimental data pack

#

I doubt 1.20.0 will because they haven't revealed any info, but .1 or .2 may

flint coyote
#

Was there a 1.20 snapshot that did not have the new content? As in required the datapack?

#

Otherwise I might have installed a 1.19.4 snapshot. I don't remember

#

Was like 1 or 2 months ago

worldly ingot
#

No. The first 1.20 snapshot came out last week

flint coyote
#

Oh. Yeah in that case I installed that snapshot for nothing. Datapack would have been enough

small current
#

Why i cant run buildtools

#

i tried opening it in my browser and nothing

chrome beacon
#

Make sure you don't have anything that would block the download

small current
#

my isp

small current
#

only in iran

fluid river
#

I need free gradle lessons

remote swallow
#

speak

fluid river
remote swallow
#

isnt that meant to be on a test class

fluid river
#

yes

remote swallow
#

not in the gradle file

fluid river
#

i mean

#

that's my university task

#

i just cloned git repo to folder

#

and used eclipse to open the project

#

and it has 70 errors

ivory sleet
fluid river
#

cuz of imports

ivory sleet
#

Its a bit bigger

fluid river
#

idk like anything bout gradle

ivory sleet
#

Than like maven for instance in terms of learning

fluid river
ivory sleet
#

That’s the dependency scope of a project (module in maven)

fluid river
#

these dependencies are not resolved

#

i cant use the classes from repos

ivory sleet
#

implementation means compile
runtimeOnly means compile but u cant use classes in ur ide
compileOnly means provided

remote swallow
#

TIL runtimeOnly

fluid river
#

ok so i don't see micronaut which is compile

#

and lombok

#

which is provided

#

none of them are imported to my project

#

idk in maven there were buttons for update

#

you just paste the dependency and update

ivory sleet
#

U use eclipse?

fluid river
#

yes

#

im scared

ivory sleet
#

As much as he hates it, you may have to ask him @worldly ingot

#

He used gradle w/eclipse so he may know

fluid river
#

help me plz

#

@worldly ingot

#

errors

#

oh shit i see

#

i have jdk 17 attached

#

and the thing is for 11

worldly ingot
#

Yeah, was about to recommend the Errors or Console tabs because they tend to say what the issue is

tardy delta
#

Someone discovered gradle i see

fluid river
tardy delta
#

Im scared of it

young knoll
#

Amogus plugin

fluid river
#

πŸ™

toxic lion
#

im making a player head plugin wich should drop the player's head on death but it just drops the steve head:


        Material type = Material.PLAYER_HEAD;
        ItemStack item = new ItemStack(type, 1);

        SkullMeta meta = (SkullMeta) item.getItemMeta();
        meta.setOwner(p);

        item.setItemMeta(meta);

        return item;
    }```
#

indentation is correct and it shows no errors

young knoll
#

You should use setOwningPlayer

remote swallow
#

& use a player instance

toxic lion
remote swallow
#

have the method take a Player var and then where you use the method pass in a player instance

toxic lion
tall lagoon
#

How to get the texture of the head from the front view (should be the same as what appears in the member list when you press Tab) as an image URL.

remote swallow
#

you have getPlayerHead(String p) use getPlayerHead(Player p) and then pass PlayerDeathEvent#getPlayer() to the method

remote swallow
tall lagoon
remote swallow
#

https://mc-heads.net/avatar/NAME/UUID/100 should work

tall lagoon
#

THX

remote swallow
#

where i have NAME/UUID that means a players name or a uuid and is not need, example https://mc-heads.net/avatar/The__Epic/100

tall lagoon
#

πŸ‘πŸ‘

rough drift
#

getEyeLocation is a clone right?

young knoll
#

yes

rough drift
#

cool

young knoll
#

Everything is a clone

#

Even you

rough drift
#

Ah shit

quaint mantle
#

hi.

#

i have a few questions, but i dont really need help with my code right now though.

tardy delta
#

?ask

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!

rough drift
#

Can I use world creator async?

tribal rivet
#

Can i import a .jar.src.zip file in intellij???

hazy parrot
#

tf is jar.src.zip

young knoll
#

A jar sourcecode zip file

#

I guess

hazy parrot
#

looks like randomly concated extensions lol

tribal rivet
#

lol

#

any ideas?

quiet ice
tardy delta
#

.jar.src.zip 😳

young knoll
#

Needs more jpeg

tiny atlas
#

Can someone tell me how I can create a Threads?

tardy delta
#

new Thread()

quiet ice
#

The right way or the bad way?

tiny atlas
#

No

quiet ice
#

Using Thread groups? Using Project Loom?

#

Oh, THESE threads

#

discord threads

tiny atlas
#

Im that dumb I dont know how to create a freacking spigot thread

kind hatch
tiny atlas
#

I mean the web ones

quiet ice
#

wbe?

#

Oh Web?

#

There was a post there

kind hatch
#

You just go to the section and click on button that says create thread.

quiet ice
#

?howtomakeathread

#

well was worth trying

young knoll
#

?howtopostathread

undone axleBOT
young knoll
#

Damn I am a wizard

tiny atlas
quiet ice
#

close!

tiny atlas
#

I dont have that button

quiet ice
#

are you logged in?

#

Are you in a category (or whatever the proper term is)?

kind hatch
#

Are you new to the forums?

icy beacon
#

for a while I just had this bookmarked lmao

#

because I had a hard time finding it

#

and then it just happened to appear in my search bar whenever I needed it

tiny atlas
quiet ice
#

You need to be in a forum

kind hatch
#

You're on the New Posts section.

quiet ice
#

Don't use that link

icy beacon
#

why not

tiny atlas
#

I feel so dumb bro

quiet ice
#

that'll make a thread in the spigot-plugin-development forum

icy beacon
#

isn't that what they were looking for

quiet ice
#

Which might be what they want but probably not

icy beacon
tardy delta
#

heh Deque#get not existing

quiet ice
#

Oh - I thought we were on #verified for some reason

icy beacon
#

xD

tiny atlas
#

i still dont have the button

#

Idk why lol

kind hatch
#

Are you new to the site?

tiny atlas
#

I will just use that link

quiet ice
#

You need to be in the proper forum

kind hatch
#

Like did you sign up recently?

quiet ice
#

Like category

#

Not the new posts page

#

nor the main page

tiny atlas
#

Idk why

kind hatch
#

Have you met the post requirements?

tiny atlas
#

I disable adblocker and now i see it

icy beacon
kind hatch
#

You have to have like 20ish posts before you can post in any section of the forum.

#

I think you're limited to Spigot Discussion or something until you meet it.

quiet ice
#

🀨

icy beacon
kind hatch
#

Yea

icy beacon
#

just for clarity

kind hatch
#

Maybe it changed, but it was def a thing when I originally signed up.

icy beacon
#

I don't recall that 😦

worldly ingot
#

Don't think that's the case

#

You should be able to post in any forum

#

Exception to services & recruitment

icy beacon
#

yeah there are requirements for posting in services & adding premium plugins but that's it i think

tiny atlas
#

Another question how do i paste my console?

#

Like I saw on some forumus they show the console in a code block

kind hatch
worldly ingot
#

[CODE]your stuff here[/CODE]

tiny atlas
#

❀️ this is why I love kind people

hushed spindle
#

i just maybe fixed one of the most random ass bugs in my code ever and i just wanted to make sure here that im not going insane

#

but you know how some countries like germany use commas for decimal points instead of periods

worldly ingot
#

I see tables in that help page but I don't actually think we support tables lol

hushed spindle
#

can the double format in code too change like that

worldly ingot
#

If you mean DecimalFormat, yeah, you can pass in a Locale

kind hatch
hushed spindle
#

god

hushed spindle
#

because i had this random ass bug with my custom damage system where sometimes people were being oneshot and sometimes not and apparently this was because commas were being filtered out causing damage numbers to effectively become 10000x their original number

worldly ingot
#

Unsure how that would ever be an issue unless your damage values were being passed along via strings for some bizarre reason

hushed spindle
#

well the custom damage formula i wanted to be customizable

#

so i needed an evaluation method

#

so yeah the damage numbers are being inserted as variables into a string function

tiny atlas
#

Help

hushed spindle
#

ask question and ye shall maybe receive

#

if you are nice

tiny atlas
#

The logs are too big and the page crased

hushed spindle
#

you usually dont need to send the entire log

kind hatch
#

Then either cut down the logs or link to an external site.

hushed spindle
#

just the bit with the error

kind hatch
#

?paste

undone axleBOT
tiny atlas
hushed spindle
#

use the website shadowmaster linked

#

or if its small enough you can send it here sure

tiny atlas
hushed spindle
#

no

tribal rivet
#

But im not at my computer

quiet ice
#

Well then I cannot do anything

kind hatch
#

That's not a valid link.

tiny atlas
#

Huh

#

this is the link i got

#

let me try again

kind hatch
#

Copy the link at the top once you save it.

tiny atlas
quiet ice
#

.............................................................

kind hatch
#

^

quiet ice
#

Fabric ain't for bukkit

#

They are two different things

tiny atlas
#

know

#

I know

#

ignore that

quiet ice
#

Either you have bukkit or you have fabric. You cannot choose both without a catch that we do not support

tiny atlas
#

Okay let me delete it

quiet ice
#

Also delete the spigot.yml file

tall dragon
#

maaannn im so confused i keep getting 2 of the same library in my final jar

#

idk what im doing wrong

#

one is relocated

#

the other is not

tiny atlas
quiet ice
#

it is probably corrupt

kind hatch
#

Because of what the error says.

tiny atlas
#

ohhhh

#

Omg thanks

#

I will give my life to you guys

#

❀️

#

Now it works fine but i got a little error with the threadpool

tardy delta
quiet ice
vivid skiff
#

What could be the cause for this error from maven package me.gurwi.worldguard6 does not exist, im tring to add multi module thing to maven and im getting this error

zealous thistle
#

name: EDFplugin
version: 0.0.1
author: EtoileDeFeu65
main: fr.etoiledefeu.edfplugin.Main
commands:
test:
description: Commande de test
permission: admin.test
permission-message: Vous n'Γͺtes pas autorisΓ©.e Γ  exΓ©cuter cette comman
my plugin.yml
hi i dont understand why the console at /rl it say me "permissions.yml is missing"

quiet ice
#

Or update it if possible

#

As it is not Java 11+ compatible

tiny atlas
zealous thistle
#

in my tuto there is no permission.yml

quiet ice
#

Remove

tiny atlas
#

Opps

#

Now I got a bigger error

quiet ice
#

what the hell are you doing

tiny atlas
quiet ice
#

that is not an error

#

oh god can people not read

kind hatch
#

Server is not fully started yet. Please retry

tiny atlas
#

It happend to me before

#

I can wait hours

kind hatch
#

Apparently not. lol

tiny atlas
#

And the same thing

#

All the plugins are loaded

quiet ice
#

then some plugin is doing things it shouldn't do

tiny atlas
tribal rivet
quiet ice
#

Give plugin list

quiet ice
tribal rivet
#

yes i know

#

maybe in the wrong discord lol

#

sorry about that

quiet ice
#

Just uncompress that zip and move the files to their proper source

#

Figure out the right fabric version, set up the gradle buildscript, etc

tiny atlas
quiet ice
quiet ice
tribal rivet
#

wait let me see