#help-development

1 messages · Page 348 of 1

mortal hare
#

it can collide

dire bluff
#

Server thread/[ERROR] Could not pass event PlayerInteractEvent to BaronSMPM v1.0-SNAPSHOT the error

dire bluff
#

Server thread/[ERROR] Could not pass event PlayerInteractEvent to BaronSMPM v1.0-SNAPSHOT

tardy delta
quiet ice
#

block.getState().getMetadata("chest-last-opener") is null

dire bluff
#

ok ok

#

wait

dire bluff
mortal hare
austere cove
mortal hare
#

wait nvm

tardy delta
#

ah english moment

austere cove
#

therefore different strings must have the same hash

quiet ice
#

i.e. when there is no such metadata

austere cove
#

e.g. take the strings {a, aa, ...} up until 2^32+1 a'se

dire bluff
#

i opened the chest

mortal hare
dire bluff
#

and still problem

austere cove
#

a 32 bit int can only represent 2^32 different values

#

therefore at least one of those string's hashes must be duplicate

dire bluff
tardy delta
#

hmm good to know

quiet ice
#

The thing below that - which we call stacktrace - is the error

mortal hare
#

hashcode is a hash function, but kinda weak one compared to bcrypt or sha

quiet ice
#

And without stacktraces we are basically guessing what is happening

dry yacht
#

Can anybody spot a logic-problem in this little algorithm? I'm having a byte-array of RGBA values, which I want to transform in-place to an RGB array, so just remove all alpha bytes. I'm basically pulling the rgb-groups "forward", copying them into the alpha slots, then moving to the end of that group and repeating.

The resulting image looks okay, I'm just having some small pixel sized artifacts. Wondering whether they are due to color approximations. Another opinion would be very much appreciated.

dire bluff
quiet ice
dire bluff
#

i cant understund im a new coder

quiet ice
dire bluff
#

?

quiet ice
#

Exception in thread "main" java.lang.IllegalStateException: Broken mixin: de/geolykt/starloader/micromixin/test/j8/mixin/erronous/TooManyAtMixin (attached via null)
at de.geolykt.micromixin.MixinTransformer.addMixin(MixinTransformer.java:76)
at de.geolykt.starloader.micromixin.MixinMerger.main(MixinMerger.java:145)
Caused by: de.geolykt.micromixin.internal.MixinParseException: Unimplemented key in @Inject: method
at de.geolykt.micromixin.internal.annotation.MixinInjectAnnotation.parse(MixinInjectAnnotation.java:72)
at de.geolykt.micromixin.internal.MixinMethodStub.parse(MixinMethodStub.java:38)
at de.geolykt.micromixin.internal.MixinStub.parse(MixinStub.java:37)
at de.geolykt.micromixin.MixinTransformer.addMixin(MixinTransformer.java:59)
... 1 more
A stacktrace looks kinda like this

mortal hare
#

you can crack sha with the modern hardware under an hour or so, imagine how easy would it be to crack hashcodes if you can generate them easily 😄

quiet ice
#

Without stacktrace we might as well roll the dice

dire bluff
vivid hill
#

what is

init {
}

from kotlin in java?

dire bluff
#

take it all

#

idk

quiet ice
hazy parrot
remote swallow
dire bluff
#

geol i send u

hazy parrot
remote swallow
#

ohh

hazy parrot
#

As primary constructor is embedded into class name

sterile token
#

Vaggos22 not wondering to be rude, but you must first learn the lang were you are coding and then i would suggest start using libraries or apis. Its just a personal recommendation from my bad experiences i had had

tardy delta
#

kotlin moment

vivid hill
quiet ice
brittle loom
#

Hello, I'm getting an error but even when I use try catch the message is still getting displayed, does anyone know what I'm doing wrong? ```public void rotateSkull(final Skull skull, final BlockFace blockFace) {
if (MinecraftVersion.atLeast(MinecraftVersion.V.v1_8))
return;

    try {
        //final Rotatable skullRotation = (Rotatable) skull.getBlockData();
        final Directional skullRotation = (Directional) skull.getBlockData();

        skullRotation.setFacing(blockFace);
        skull.setBlockData(skullRotation);
    } catch (final NoClassDefFoundError t) {
        skull.setRotation(blockFace);
    }

    skull.update(true);
}```The error that is getting displayed: https://pastebin.com/9gQPLsK2
remote swallow
#

remove the / from the end

remote swallow
#

not that

#

the slash

hazy parrot
quiet ice
vivid hill
#

oh alr ty very much

sterile token
hazy parrot
dire bluff
quiet ice
#

I.e.

class X {
  { /* CODE */ }
}

@vivid hill

remote swallow
#

you dont need to remove the .extension

#

it didnt like the / on the end of thelink

quiet ice
dire bluff
#

and graphics

#

i know how it works

sterile token
#

oh right, my bad i just got confused because you said you didnt know what was a stracktrace

hazy parrot
#

Basically embedded into class declaration

tardy delta
#

record

hazy parrot
quiet ice
#

so basically a constructor that will get invoked no matter what?

tardy delta
#

laughs at Boolean

dire bluff
#

stracktrace i dont know what is it

quiet ice
#

In that case {} is the right approach

tardy delta
glossy venture
#

if you want the code to always run on init{ } yeah

quiet ice
dire bluff
#

guys i cant understund

#

im trying to make a plugin that tells who opened chest

shut mauve
#

Hi guys, I come back again looking for help for my 1.8.8 spigot plugin (yes 1.8.8).
After finishing all the plugin, I have some graphical bugs, and I can't solve this issue. When I'm trying to move an item in my inventory, at the moment when I'm closing my inventory, the item goes back to his first position. I tried to handle this with InventoryMoveItemEvent, InventoryDragItemEvent, InventoryOpenEvent and InventoryCloseEvent by adding "player.updateinventory(), but it doesn't solve the problem.
Can you help me ?

dire bluff
#

using a stick

quiet ice
#

Basically it means that block.getState().getMetadata("chest-last-opener").get(0) is an invalid operation as there is no such item 0 @dire bluff

dire bluff
#

so i must make it?

quiet ice
#

most likely because there is no such metadata

dire bluff
#

ok needs data

quiet ice
sterile token
dire bluff
#

where

quiet ice
shut mauve
#

I think it's more clientside, but I don't really know how to find it

dire bluff
#

can someone help me on dms by screenshots so i can fully understund what to do

sterile token
#

Im really seeing that main java knowndledges are missing, maybe im wrong

mortal hare
#

rip my intellij

dire bluff
#

i am i understund

quiet ice
dire bluff
#

😦

#

i try so mutch but what i can do

sterile token
# mortal hare

Happens to me today, its was really anoyying, i couldnt be able to fix it with just a machine reboot

shut mauve
sterile token
#

Some times the Player#closeInventory() and then calling Player#openInventory() can bug the items cursor, is not related but its something extra

shut mauve
sterile token
shut mauve
#

yep

quiet ice
#

Are you sure you want to proceed? You WILL need to give them actually working code - they won't figure it out themselves

sterile token
#

idc? What lang is this 🤔

quiet ice
#

player.sendMessage("This chest was last opened by " + block.getState().getMetadata("chest-last-opener").get(0).asString());

#

I don't care

dire bluff
sterile token
dire bluff
#

im just trying to tell u

#

how to make it kep metadata

sterile token
#

No, he doesnt set it from what i saw

dire bluff
#

idk if u want to help me to it and send me

#

whatever

tardy delta
#

just tell the user there isnt metadata or smth

dire bluff
#

i tryed my best

#

working 3 days :PPPPP

#

tried

#

this is i want to get a stick named MPATSOS so i can check it with that

tardy delta
#

man been trying for 3 days to send the user a message there is no such metadata

dire bluff
#

ok

#

mb

shut mauve
dry yacht
dire bluff
#

guys i dont know what to do i think im fking trash

#

legit

#

i just spend like 3 hours x3 days no reason

shut mauve
dire bluff
#

whatever

#

fkjdfgnkjfdnhdks

#

my friend opened teh chest

#

that must set metadata

#

right?

#

but still

#

im trying like 2 monmths \

#

this is my first try by myself

#

i want to make it /mpatsos

tardy delta
#

check if label.equals("mpatsos") then

dry yacht
dire bluff
#

ok have u got smth to suggest me

tardy delta
#

its the alias being used

#

cmd.getName() refer to the actual command name

#

its the same if theres no alias

shut mauve
dire bluff
#

bro

#

yes

#

suggest me

dry yacht
dire bluff
#

some video

#

i wanna learn

#

i just need to learn i listen to all of u

#

can KodySimpson help

#

suggest me someone

#

if possible send me a link

#

so

#

a site?

hazy parrot
#

how is watching video easier then reading ?

eternal night
#

relaxing

hazy parrot
#

it like takes 2x time

kind patrol
#

bivieh is the goat 🫡

dire bluff
#

i use intelliJ

hazy parrot
#

how did you even found this video 😂

#

10 years ago, 1k views, craftbukkit

dire bluff
#

bro

#

i cant use netbeans

#

its disgusting xD

sterile token
#

I think that coding tutorial are not really good, i think the way for going is to learn the main concepts, how to create commands and events, listen to events, scheduling, config files, basic plugin structure. And then most of the api you will learn it by coding and making small plugins

dry yacht
sterile token
#

I prefer taking hours reading, rather watching videos

dire bluff
#

i think i will start next year because i finish school and go to college

dry yacht
#

Valid yes, but not equally efficient. It hugely depends on the type of personality, but still, games tend to provide the fastest progress, as they're interactive and present the topic in a fun- instead of a dry and boring way.

sterile token
#

Wrong channel

tardy delta
#

stop playing with pets and start studying son

sterile token
#

There amazing and free books about Java

#

I was told since I was a child that those who do not learn it is because they really do not want to, because there are many options without money

#

I just search the dependency via artifact on google, something like Maven dependency <artifact-id> and then you can see the latest and old version/s

quiet ice
#

You probably need to use a custom maven repo

#

That being said I am not sure whether you can use DFU like that in spigot world

#

I know that Paper's ItemStack#toByteArray (or somethin like that) goes through DFU though

#

At worst use Bukkit's BukkitObjectOutputStream and BukkitObjectInputStream to serialize itemstacks under spigot

#

with the warning that they may break at any point in time if you go between minecraft versions

shut mauve
#

Hello again guys, I'm just wondering why do my Merchants don't spawn when I'm starting my local server, but only after a reload ? (I receive messages in my console when they are supposed to spawn, but they don't spawn), did you see that before ?

quiet ice
#

is it night perchance?

shut mauve
quiet ice
#

then they will be invisible

shut mauve
#

but why after a reload they are visible ?

quiet ice
#

minecraft being bugged I guess

small current
#

What is the best way to keep track of amount of a block in a chunck

sterile token
small current
#

I want to track player heads

sterile token
small current
#

Idk it gets placed it gets removed

#

I dont want to do a for loop each time

#

For 65k blocks

#

So the only way a block is placed is on playerblockplace but the block being removed, what are the possible events?

serene egret
#

hey, how can i spawn BlockCrack particle ? This doesn't work for me java Main.world.spawnParticle(Particle.BLOCK_CRACK, a, 5,0,random.nextDouble(0.6),0, Material.BLUE_STAINED_GLASS.getData());

barren trail
#

what is a?

serene egret
#

location

sterile token
serene egret
#

it says that it cant get the data

#

i also tryed new Blockdata() but didn't work too

sterile token
serene egret
#

i already tryed to find something but all things on the spigot page didn't help actually

sterile token
serene egret
#

i mean this isn't java related

#

yeah but i tryed all

#

and find nothing

barren trail
#

what version are you on?

serene egret
#

1.19

barren trail
#

have you tried Material.BLUE_STAINED_GLASS.createBlockData()?

serene egret
#

nope wait

#

works, thank you

barren trail
#

🫡

pseudo hazel
#

when I am changing the drops from a player that died, is it safe to set the amount to 0 to remove it ?

round finch
#
public void SaveReSource(String SourceFileName, String FileName) throws IOException {
    
    if(plugin.getResource(SourceFileName) != null ) {
    
    InputStream Stream = plugin.getResource(SourceFileName);

    byte[] buffer = Stream.readAllBytes();
    CreateFile(FileName);        
    
    OutputStream outStream = new FileOutputStream(File(FileName));

    outStream.write(buffer);
    outStream.close();
    
    }
    
    }
pseudo hazel
#

or does that create weird air items

remote swallow
#

er

#

that method name hurts

pseudo hazel
round finch
remote swallow
#

yeah

pseudo hazel
#

yeah, Resource is 1 word

round finch
#

any better name?

pseudo hazel
#

and methods names should start without capitals

remote swallow
#

saveResource

sterile token
barren trail
restive mango
#

Hrm

#

Right now

barren trail
#

event.getDrops().clear() might be better though, but i havent tested that

round finch
pseudo hazel
#

I dont want it cleared

#

I just want to remove a few items based on their pdc contents

sterile token
remote swallow
#

you can probably just set the amount to 0

barren trail
#

ah then yeah just do that

pseudo hazel
#

okay

#

thx

round finch
#

it way shorter

#

xD

terse ocean
#

hey guys what particle is red because REDSTONE doesnt work for some reason

quiet ice
#

redstone can be colored

#

or well, redstone dust I mean

#

You can have blue redstone particles I am fairly sure

#

Although I think it's just called dust

wooden osprey
#

is it possible to store an item in nbt?

quiet ice
quiet ice
#

not really

#

the client will probably limit it to 256^3 possible colors again

#

plus lighting and shadows and you have more like 245^3 colors

terse ocean
#

wait how do i do a blood lookalike particle?

#

you mean Particle.REDSTONE_DUST?

#

like 1.19.3

#

does it exist?

#

it doesnt work

#

like nothing shows up

#

yes

#

intellij

flat zodiac
#

hello. i am new to plugin development and i have a question: Is it possible to create like the command argument title? Not like tab completion but just a suggestion what you should put to that argument. For example when you type /say message above the argument will pop up text <message>. Thanks for any help 🙂

terse ocean
#

the line of code is
event.getPlayer().getWorld().spawnParticles(Particle.REDSTONE,event.getPlayer().getLocation(),10);

remote swallow
#

that

#

is not what i corpied

flat zodiac
terse ocean
#

in 1.8.8

event.getPlayer().getWorld().spawnParticle()
doesnt show up

#

how do i spawn particles in 1.8.8

undone axleBOT
barren trail
#

World#playEffect maybe? after that you're on your own

terse ocean
#

no but i need it in 1.8.8 cuz the REDSTONE particle doesnt work in 1.19.3

chrome beacon
#

?

terse ocean
#

cuz the REDSTONE particle doesnt work for some reason

#

ye lol

#

has any of you guys ever made money with mc coding??

barren trail
#

yep

terse ocean
#

how?

#

sold spigot pl0ugins>

#

?

#

oh ok

#

wat about fivver?

#

ye i think its a long procces to register

#

is 5$ a lot for a custom plugin?

quaint mantle
#

depends on the size and amount of effort required

terse ocean
#

tbh idk like custom items and stuff

#

ok

#

yea

#

yes but i guess it would also be hard to get people to buy it even for 5$

#

how old r u btw?

#

oh ok

#

any body know why they teach all the functions and sh** in school like has anyone here ever used calculus to do smth?

eternal night
#

yes

quaint mantle
#

yes

terse ocean
#

when??

eternal night
#

spigot plugin development already gets you into it

quaint mantle
#

^

#

And modding also deals with a lot of math

terse ocean
#

wdym how does

y = ln(ae^x)
find the maximum and minum

ever helped you guys?

dry yacht
barren trail
#

you arent going to use everything they taught at school but when a situation comes up and you need to do something like trigonometry or vector math, you'll be grateful you were taught it

tardy delta
#

Maybe the reason why i failed it

restive mango
#

Is the player.spawnParticle method threadsafe?

#

I was trying to send packets with ProtocolLib but it seems that there are issues with its outgoing packet system for particle packets.

#
com.comphenix.protocol.reflect.FieldAccessException: Field index out of bounds. (Index: 4, Size: 4)
        at com.comphenix.protocol.reflect.StructureModifier.writeInternal(StructureModifier.java:371) ~[?:?]
        at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:347) ~[?:?]
        at com.comphenix.packetwrapper.WrapperPlayServerWorldParticles.setOffsetY(WrapperPlayServerWorldParticles.java:155) ~[?:?]
        at co.lotc.aesopianproject.commands.PacketHandling.sendFakeParticle(PacketHandling.java:251) ~[?:?]
        at co.lotc.aesopianproject.commands.GaelBoltCommand$1.run(GaelBoltCommand.java:33) ~[?:?]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.16.5.jar:git-Airplane-11]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:485) ~[patched_1.16.5.jar:git-Airplane-11]
        at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1489) ~[patched_1.16.5.jar:git-Airplane-11]
        at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:439) ~[patched_1.16.5.jar:git-Airplane-11]
        at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1402) ~[patched_1.16.5.jar:git-Airplane-11]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1134) ~[patched_1.16.5.jar:git-Airplane-11]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:292) ~[patched_1.16.5.jar:git-Airplane-11]
        at java.lang.Thread.run(Thread.java:832) [?:?]```
#

index out of bounds for some reason

eternal oxide
#

index starts at zero

#

for all arrays

#

0,1,2,3 = length of 4

restive mango
#

@eternal oxide yeah i know

#

but the bigger issue it seems like is protocollib is doing that, not me

#

i can circumvent this, though: Is the player.spawnParticle method threadsafe? if i can call it from an asynchronous task thats fine

eternal oxide
#

nothing in Bukkit is threadsafe.

#

Packets can be sent Async but no idea if ProtocolLib is threadsafe

restive mango
#

yeah

#

like i said im trying to send packets but protocollib

#

is effing up my particles

#

its fine

#

ill figure it out

dapper hill
#

hey is there any way to change the value of the burn time in a furnace of an allready existing fuel (1.19.3) e.g. changing the default coal burn time from 1600 ticks to 2000 ticks?

orchid night
#

hello all, im using ultimate kits on my factions server. i need help the kits i have do not show up when doing /kits?

#

however when i /kit {kit name} i recieve the kit

orchid night
#

any ideas?

eternal oxide
#

^^

orchid night
#

my bad x

tall dragon
#

all good

minor garnet
#

what?

#

and because I set it to rotate based on a time, (speed) of course there are some things to be fixed yet, and therefore outside the 20 ticks thread

minor garnet
warm mica
#

ig because thats how a compass works

#

a brilliant idea of solving a problem that would make it even worse for players with a greater ping

mortal hare
#

it should be thread safe

#

the fact that the minecraft 1.8.8 is as old as a first grader makes me so old inside

#

i still remember beta 1.8 days

sterile token
#

Okay, im having some troubles with redis. Its not opening the connection and i tried to try-catch the issue but it doesnt seem to throw any exception
Mainly just telling me that my JedisPool jedisPool is null when calling any redis command or while trying to use jedis pub/sub, which makes sense if the connction is not being opened

humble tulip
sterile token
# humble tulip Does your jedis have a username and pass?

dw i alredy fixed that it was a dumb issue, i was doing sout for RedisPool#isClosed() and was returning false, so i thought the conection wasnt being opened. But that is already out, now im having the Jedis instance null i will have to check what happening new

#

That why i love coding spigot plugins, they are a box of prizes, every day a new surprise

quaint mantle
sterile token
#

Okay im tired so its momment to harcode it, to see what the fuck happens

past wedge
#

I have 2 questions about the citizens API:

  • do I have to place the citizens jar file in my spigot server in ordrer to work ?
  • Is citizens API compatible with 1.19.3 java version ?
chrome beacon
#

Yes and yes

past wedge
#

do you have the jar file of citizens api ? I can't find it :/

chrome beacon
#

I recommend using maven or gradle

#

Instead of depending on the jar directly

fresh timber
#

how do I get the Minecraft server's total days online?

past wedge
# chrome beacon Instead of depending on the jar directly

I already have some code but that doesn't spawn an npc:

NPCRegistry registry = CitizensAPI.getNPCRegistry();
NPC npc = registry.createNPC(EntityType.PLAYER, "npc test");
npc.spawn(Bukkit.getWorlds().get(0).getSpawnLocation());
chrome beacon
#

What happens when you run that

past wedge
#

Normally it spawn a base npc at the server spawn point, but it doesn't spawn anything, not event a log in command

sterile token
fresh timber
#

hmm

#

how does hypixel restart their servers every few days

#

thats what I was gonna do

#

ig I could just do it in a certain time

sterile token
#

They jave some soft of timestamp which when its ends the time, just stop the sever or run an script (named as .bat or .sh (depends the paltform)) file

past wedge
#

So any idea on why it doesn't spawn ? :/

sterile token
chrome beacon
#

They do

past wedge
#

yes, but they don't respond :/

sterile token
#

That why most people laught at me when i said i dont like depending on 3rd parties, there you have the answer. Custom libraries != needing to wait for support 😂

chrome beacon
#

Takes more time to write it yourself

sterile token
#

idk they are just prefecenes

chrome beacon
vivid hill
#
ItemStack item = new ItemStack(Material.DIRT);
JsonObject JSON = json.getAsJsonObject();
JsonElement type = JSON.get("type".toString());
JsonElement amount = JSON.get("amount".asInt());

item.type = (Material.getMaterial(String.valueOf(type)));
item.amount = amount;

So i get some errors starting of at asInt and going further to item.type and item .amount

sterile token
#

Also, dont get spawn world

sterile token
vivid hill
#

alright ty

sterile token
quiet ice
sterile token
past wedge
#

I did this code and doesn't work. No errors, no logs, no npc:


NPCRegistry registry = CitizensAPI.getNPCRegistry();
NPC npc = registry.createNPC(EntityType.PLAYER, "npc test");
World world=Bukkit.getWorlds().get(0);
Location loc=new Location(world,-41,200,-120);
npc.spawn(loc);
sterile token
past wedge
#

how do I do that ?

sterile token
chrome beacon
#

So you know you're in the right world

sterile token
#

Oh right that makes sense olivo maybe are in diff worlds

past wedge
sterile token
past wedge
#

ok, I don't have the jar file lmaooo

sterile token
#

💀 now everything makes sense

past wedge
#

let me create a spigot account and dl it

sterile token
#

Yeah ofc it wont work

#

Because the api will probably trying to get the citizens plugin instance which is null, so its just doesnt do anything
Which is not a good design tho, because if the citizens plugin is not enabled. Atleast the api should throw an exception telling you that he cannot get the citizens plugin instance

past wedge
#

where can I have the jar file for spigot ? It says that I do not have permition to view the page :/

chrome beacon
past wedge
#

oh

chrome beacon
past wedge
#

I am logged in lmao

sterile token
#

What is ci?

sterile token
chrome beacon
sterile token
#

🤔

#

I know what its but why will he grabe it from there

past wedge
#

ok got it

#

oh no

#

so I have to grab the git repo and compile it myself ?

quiet ice
past wedge
sterile token
crimson relic
#

no..

rotund tartan
#

org.bukkit.command.CommandException: Unhandled exception executing command 'givesword' in plugin FoolingAround v19.0.2

#

what does this mean

rotund tartan
#

ok

sterile token
#

?paste

undone axleBOT
sterile token
#

Send it using that site please

rotund tartan
#

ok

#

wait

#

what is a stracktrace

sterile token
# crimson relic no..

In my case my ci/cd are in setup in the repo but you pickup the latest(s) jar version from the releases area

crimson relic
rotund tartan
#

ok

sterile token
# rotund tartan what is a stracktrace

Hmn okay, let start from begining have you learnt basics java? Because you mustnt be coding without knowing the lang where you code - Not wondering to sound rude, just say it from personal experiences i have had in the past caused of that

rotund tartan
#

I have some knowledge of java I just forget alot💀

sterile token
#

Okay, so that is no the way for going

#

I would refresh first all the java knowledge and then yes try using apis or libraries

#

Its just an advice you can take it or not

rotund tartan
#

ok ima read all my notes

sterile token
rotund tartan
#

ye

#

found problem

#

if (cmd.getName().equalsIgnoreCase("give-sworsd")) {

#

sworsd lol

sterile token
#

oh right haha

#

I hate those issues they are so simple but you dont realize

rotund tartan
#

ye

icy monolith
#

Can any one help me in dms with code? Im cinda new and ive been trying for ever to get a code to work. Need some one that knows java cinda well.

vivid hill
#

When converting from Kotlin to Java do I still need the ::class.java thing from WarpItem::class.java ?

rotund ravine
#

@vivid hill ur question makes little sense.

#

Though that is the equivelent of getClass in javs on WarpItem @vivid hill

vivid hill
#

oh my bad

#

sorry i guess its just a little late

icy monolith
#

90% answers here is "Learn Java", but that dosnt help, cuz it is boring doing regular java. I learn from trial and error and minecraft makes it so much more fun and is the only reason i can even spend hours trying to do few lines is bc mc makes it so much more fun when something works rather than just numbers on console.

But ok. I have commands set up /maps create <name> - creates a map/hash map key
/maps addspawn <map name> - adds a value to the hash map key
and so on

Ok, so i have /maps join. Which is supposed to send the player to a random element out of the current active map/hash map key.

all that is fine, but i cannot figure out how to make it so every 5 minutes the active map switches
So i need it to do:
every 5 minutes
set currentMap to random key out of all the keys (random map out of all maps)

and then make it so when ever player does /maps join it sends them to a random spawnlocation that is saved inside of the maps name.

Maps name = hash map key
keys content = all of the spawn locations inside of that specific key/map

rotund ravine
#

How is the map made.

#

You can have a repeating scheduler that sets the current map to a random map.

icy monolith
rotund ravine
#

M8. This is help development.

#

Obviously any question pertains to code.

icy monolith
#

?

#

how would i make a scheduler that repeats and how do i make it so the veriable updates. Where do i put the scheduler, in the same class as the command that creates the maps and sends players to them?

rotund ravine
#

?nocode

icy monolith
#

?

lethal knoll
#

I got an issue I've never encountered before.
This simple event listener, actually doesn't cancel, the moment I cancel this event listener, console gets spammed at an incredible speed "NATURAL"

    public void onCreatureSpawn(CreatureSpawnEvent e){
        e.setCancelled(true);
        System.out.println(e.getSpawnReason());
        if(1 == 1)return;
}
#

well it actually does cancel, but it starts spamming the event

rotund ravine
#

@lethal knoll The server wants to spawn creatures, you canceling just make it try to spawn somewhere else.

lethal knoll
#

But this was not an issue before :/

rotund ravine
#

Maybe you had enough creatures in the world then.

lethal knoll
#

I can't believe that, the result of what I had in code didn't change, the only difference is that the world get's spammed

#

Maybe paper is causing this?

#

or an unstable version?

icy monolith
#

Well thats why i dont ask here

rotund ravine
#

@worldly ingot tell him i’m right or smth

crimson relic
lethal knoll
#

It's not that I tell you are wrong, I only tell you that this didn't use to be an issue at all

#

Also

#

something else

#

when I cancel the event, another mob is spawned by me

#

and the fun fact

#

The spawn reason is still natural

rotund ravine
# icy monolith Well thats why i dont ask here

You asked a development question without including relevant code expecting us to simply guess how you are doing everything. I gave you a generel pointer to how to do stuff. Googling would have shown you how to make a tasktimer using the scheduler.

#

Fun event lol

lethal knoll
#

so even though it's spawned by me using the API, it doesn't say spawn reason CUSTOM

#

it's always Natural

icy monolith
worldly ingot
#

It most certainly was not detailed as much as possible. You asked a question, yes, but you asked it with so little substance and context that we literally cannot answer it without guessing lol

rotund ravine
#

?cba

undone axleBOT
#

Jan Tuck#0142 definitely regrets to for the most part inform you that unfortunately, they essentially are unable to definitely assist with definitely your enquiry, which essentially is fairly significant. Please simply really ask again later or possibly kind of ask someone else about this enquiry, demonstrating that the person that ran this command generally regrets to kind of inform you that unfortunately, they for the most part are unable to generally assist with actually your enquiry in a subtle way. Thank you very sort of much for kind of your time and the person that ran this command specifically wishes you a really good day, so the person that ran this command really regrets to actually inform you that unfortunately, they literally are unable to definitely assist with very your enquiry, or so they particularly thought.

worldly ingot
#

I read your question three times and I really don't know what your goal is

haughty granite
#

in my listener file, how can I use several methods that are in my main class?

undone axleBOT
ancient plank
#

what's a map

#

🗺️

rotund ravine
# ancient plank what's a map

Ikr, I first wanted to see how he made the hashmap etc, to see if he used a POJO for his values and then ask about that. Then I’d be interested in seeing how and what he is setting in this map, and how he is attempting to call it the join subcommanf.

icy monolith
#

What part you want me to clerify?

worldly ingot
#

Relevant code, for starters, would be useful

#

Your goal, context, etc.

icy monolith
#

Of the commands?

lethal knoll
icy monolith
haughty granite
#

but I can't call itemWithUuid, why?

rotund ravine
#

Ah it’s static

#

Just do Flyheads.itemWithUuid then

rotund ravine
#

All you need to do

#

Is update that

#

Every 5 minutes

haughty granite
rotund ravine
icy monolith
#

Am i allowed to paste the 90 line command code in here even?

undone axleBOT
haughty granite
# rotund ravine Nop

and you could explain me simply the difference between "public" and "public static" ?

icy monolith
#

https://paste.md-5.net/rocepigonu.cs
List<Location> currentMap = mapSpawnLocations.get(new Random().nextInt(mapSpawnLocations.size()));
This line updates it, how do i make it update every 5 minutes using scheduler so that the veriable can be used outside of the scheduler

rotund ravine
#

Change the scope of the variable.

#

Nvm checked the paste

#

Either create a getter and setter, then use those to set it in a tasktimer you start. Remember to pass an instance of your “single” Maps class.

haughty granite
#

EntityDeathEvent = e.g when a mob dies?

rotund ravine
lethal knoll
#

My issue solved, as expected, a broken server version causing the issue

icy monolith
#
    Bukkit.getScheduler().runTaskTimer(this, new Runnable() {
        @Override
        public void run() {
            List<Location> currentMap = mapSpawnLocations.get(new Random().nextInt(mapSpawnLocations.size()));
        }
    }, 20, 20);```
Errors:
lethal knoll
rotund ravine
haughty granite
rotund ravine
haughty granite
remote swallow
haughty granite
#

FUCK

remote swallow
wary topaz
#

And this error message only happends on linux machines

#

it doesnt happen on windows

#

(Minehut is linux)

remote swallow
#

this hurts icl

#

return translate.replace('&','§');

#

its error on that

#

the translate stuff is null

wary topaz
#

yeah i know that but idk why its null

#

again it works on my windows device

#

not minehut

haughty granite
#

there is another way to create a head of a mob than having to go through skins sites?

remote swallow
#

are you compiling with utf8

wary topaz
#

whatever minehut defaults

#

which is most likely yes

remote swallow
#

check that the message actually exists in the config

wary topaz
#

it does

#

AGAIN it works on my pc

remote swallow
#

im gonna take a guess that its an issue with the hundreds of Objects.requireNonNull

wary topaz
#

and the same shit happend to my other plugins, now they dont work no minehut

#

on*

remote swallow
wary topaz
#

Such as betterserver & betterchatcolor

crimson relic
icy monolith
#

Any one know a fix for this?

remote swallow
#

remove the extra closing parenthesis

icy monolith
#

allready did

#

same errors

#
    Bukkit.getScheduler().runTaskTimer(this, new Runnable() {
        @Override
        public void run() {
            List<Location> currentMap = mapSpawnLocations.get(new Random().nextInt(mapSpawnLocations.size()));
        }
    }, 20, 20);```
New code:
#

same errors

wary topaz
#

remove the ;

#

,*

#

Bukkit.getScheduler().runTaskTimer(this, new Runnable() {
@Override
public void run() {
List<Location> currentMap = mapSpawnLocations.get(new Random().nextInt(mapSpawnLocations.size()));
}
}(// ->,) 20, 20);

remote swallow
#

that comma is correct

wary topaz
#

it is?

remote swallow
#

yeah

#

the comma means its the next param

wary topaz
#

well still any idea on my plugin?

remote swallow
#

there is most likely a npe not being found

#

because you require not null or add empty strings

wary topaz
#

bottom one different server

remote swallow
#

which mobs

wary topaz
#

i think he means like player names

haughty granite
rotund ravine
remote swallow
undone axleBOT
icy monolith
# rotund ravine Needs to be placed within the correct scope.
public class Maps implements CommandExecutor {
    HashMap<String, List<Location>> mapSpawnLocations = new HashMap<>();

    List<Location> currentMap = mapSpawnLocations.get(new Random().nextInt(mapSpawnLocations.size()));

    Bukkit.getScheduler().runTaskTimer(this, new Runnable() {
        @Override
        public void run() {
            List<Location> currentMap = mapSpawnLocations.get(new Random().nextInt(mapSpawnLocations.size()));
        }
    }, 20, 20);
remote swallow
#

its not in a method

rotund ravine
#

incorrect scope.

#

Also

#

this is not the correct thing to put there.

remote swallow
#

seen what

#

pparty

wary topaz
#

rousty add a }

remote swallow
#

?learnjava!

undone axleBOT
wary topaz
#

brah

remote swallow
#

stuff has to be in methods

haughty granite
#

ebicpipic

wary topaz
#

well can you atleast help me with my plugni?

remote swallow
#

yo

remote swallow
sterile token
#

Lmao im really tired of seeing people who dont fully learn java

#

I mean what the problem, you must learn Java

#

The same happen when you expact to make a delicious cake following and amazing recipe, but you never cooked before its obviously it wont be like the recipe

remote swallow
#

it shouldnt be used like that in a plugin

#

in an api or library, sure

crimson relic
#

just follow recipe

remote swallow
#

there is so much wrong

crimson relic
#

in this case theyre eating the recipe instead of following it

sterile token
haughty granite
remote swallow
#

give me 2 minutes

wary topaz
#

I tried that but it didnt do shit

remote swallow
#

your best bet is to learn java

wary topaz
#

you were the one trying to figure it out 💀

sterile token
remote swallow
icy monolith
remote swallow
#

it needs a plugin instance

#

not another random class instance

undone axleBOT
remote swallow
#

wait until you find the map.get(0) + ""

crimson relic
#

he used every auto-correction the ide gave him 💀

remote swallow
#

very null safe

#

null checks are way better

icy monolith
#

Then where do i put the code? in the main class?

remote swallow
#

you pass an instance to that class

undone axleBOT
river oracle
#

Yea what if you were wrong he first time

crimson relic
#

make sure true is true and false is false aswell

river oracle
#

Thisss

icy monolith
#

How do i pass the instance?

new AnotherClass().doSomething(this); in main class?

undone axleBOT
haughty granite
#

you forgot me picpicebic 🥹

icy monolith
#

this.getServer().getPluginManager().registerEvents(new Maps(),this);
Added this, still the error

river oracle
#

Myes

#

?learnjava

undone axleBOT
remote swallow
haughty granite
remote swallow
#

can be via a skin, can be a texture like 621197e53c1ab112e68079d3c83fa4714c77a83d0621a29d762e99e9feaae4d5

#

mainly on custom heads

haughty granite
#

ok ty

icy monolith
#

If i put the startTaskTimer in main class. How am gona update the veriable in the other class. Ill try tho

crimson relic
#

for the love of god learn java

icy monolith
#

yeah the veriable dosnt go thru

remote swallow
#

do you have a matching constructor

river oracle
#

I've provided links that explain di and links to learn Java with

glad prawn
#

Why not just return true 💀

rotund ravine
#
Boolean intToBoolean(int x) throws IllegalArgumentException {
    switch (x) {
        case 0:
            return Boolean.FALSE;
        case 1:
            return Boolean.TRUE;
        default:
            throw new IllegalArgumentException("Invalid integer value for boolean conversion: " + x);
    }
}
river oracle
crimson relic
#

check for 2 too

#

maybe another typo

river oracle
#

Yea true

rotund ravine
# river oracle Check for -1 incase they made a typo
Boolean intToBoolean(int x, int threshold) throws IllegalArgumentException {
    if (x < 0 || x > 100) {
        throw new IllegalArgumentException("Invalid integer value outside range [0, 100]: " + x);
    }

    boolean y;
    if (x >= threshold) {
        y = true;
    } else {
        y = false;
    }

    // Log the conversion result for auditing purposes
    logConversion(x, y);

    return y;
}

private void logConversion(int x, boolean y) {
    System.out.println("Converted int " + x + " to boolean " + y);
}
remote swallow
#

anyone know if its possible to like set a default path for a FileConfiguration, ive checked the base stuff and options but cant seem to find anything

remote swallow
#

set a config section to be the default

icy monolith
#

Sorry, but idk what constructur is.

would it be like this:

        mapSpawnLocations = new ArrayList<>();
    }```
But if so problem with this would be that it sets a new empty veriable?
remote swallow
#

?learnjava

undone axleBOT
remote swallow
#

please

icy monolith
#

private List<List<Location>> mapSpawnLocations;
oh its this

#

i think

#

not sure

crimson relic
#

are you trolling?

river oracle
#

List<List>> lol

#

They def are

remote swallow
#

new ClassName(this)
---

private final JavaPlugin plugin;

public ClassName(JavaPlugin plugin) {
    this.plugin = plugin;
}
remote swallow
#

that looks like the nbt data for /give commands

#

its probably used in a plugin somewhere so they can have all the heads

haughty granite
haughty granite
remote swallow
#

its pretty much how a lot of stuff works on items

quaint mantle
#

Anyone know how to setup proguard in spigot plug-in

sterile token
wet breach
#

is it that time of the year already

#

that time where we get the mass influx of new people joining asking about obfuscation again

remote swallow
#

i think were at 3 so far

wet breach
#

its like every year almost around the same time

remote swallow
#

you know what it is

#

its the people that spend the past 2 months on their computers learning to code

#

now want to sell stuff but dont want it stolen

wet breach
#

Lol, either that or this lines up with some schools and possibly have a class on programming or related and this is about the time where they get into obfuscation or something

#

and thus the kids are like, wait I can apply this to spigot

echo basalt
#

I swear we share braincells

remote swallow
#

too early into a school year imo

echo basalt
#

I was lurkin and just thought

#

"ye just some high school memeing about obfuscation"

remote swallow
#

actually

#

it might be that

wet breach
remote swallow
#

i just realised how late in were are

wet breach
#

school year ends in like June, starts in August

echo basalt
#

wtf

remote swallow
#

ends july, starts september here

echo basalt
#

school year ends mid june here

#

and starts mid september

#

or well, if you're an idiot intern like me

wet breach
#

lol

echo basalt
#

mid july to like october

#

I caught covid and they forced me to be an intern for an extra week >:/

wet breach
remote swallow
#

this might align up to school stuff

#

and if its yearly

#

probably is school stuff

echo basalt
#

could be

#

do y'all actually know any spigot devs irl?

#

or is it just me

#

because like

#

what if all these people are from the same school

#

or follow the same program

wet breach
#

lol

remote swallow
#

you think i know people irl?

wet breach
#

I do know some devs IRL

echo basalt
#

well

wet breach
#

not specifically spigot

echo basalt
#

I guess it's kinda cheating when the spigot dev I know IRL is like my best friend and I kinda forced him to be my assistant

remote swallow
wet breach
#

lmao

orchid gazelle
#

yo. any idea why Player#sendBlockChange(25 blocks) halves the FPS of the client? Could it be that some serverside thing is slowing it down?

wet breach
#

probably because it sends a few different packets for it

orchid gazelle
#

yeah but its only 25

#

people do thousands without issues

#

(sending every tick)

wet breach
#

are you sending a multi-block change?

orchid gazelle
#

yes

wet breach
#

if so you could disable lighting update along with it

#

might improve your FPS

orchid gazelle
#

how?

#

and doesn't it need to update the lighting? lol

wet breach
#

doesn't need to

#

just set the boolean to true

lethal knoll
#

Did anyone else play around with BarFlag.PLAY_BOSS_MUSIC ? I never get that flag actually playing music

orchid gazelle
#

@wet breach I do not use BlockStates

wet breach
#

you would create a boss bar that has that flag set

lethal knoll
#

You actually got it working before?

wet breach
#

then that might be the cause for it

#

don't think if its invisible music will play on the client

lethal knoll
#

No true, but you have to call setVisible first anyway before it becomes visible no?

#
        BossBar bossBar = Bukkit.createBossBar("Bloodmoon", BarColor.RED, BarStyle.SOLID);
        Bloodmoon bloodmoon = new Bloodmoon(world, bossBar);
        bloodmoon.getBossBar().addFlag(BarFlag.CREATE_FOG);
        bloodmoon.getBossBar().addFlag(BarFlag.DARKEN_SKY);
        bloodmoon.getBossBar().addFlag(BarFlag.PLAY_BOSS_MUSIC);
#

that's all

#

and a setVisible

#

everything works, except the music

#

not too much of an issue tbh, I was just very curious as I never got it working

wet breach
#

instead of just adding flags

#

how about include the flags as a list

#

when creating the bossbar

tender shard
#

hewwo frostiboi

lethal knoll
#

hmm

wet breach
#

howdy

lethal knoll
#

I'll try

#

see if it makes a difference

tender shard
#

if you say howdy, I cant help it but imagine you with a cowboy hat, shouting YEEHAW at others

orchid gazelle
#

I hate the minecraft client

lethal knoll
#

why is that? :p

tender shard
orchid gazelle
#

no bro you can't tell me that this garbage is halving its FPS when I send 25 blocks to it

lethal knoll
#

I think it's safe to say that this is broken

wet breach
#

possibly

#

but you can always send sounds

lethal knoll
#

Yeah, true

wet breach
#

as there is another api method for that

lethal knoll
#

I am just curious why this flag never worked

wet breach
#

it probably did, and something in mojang code probably broke it

lethal knoll
#

Yeah must be

wet breach
#

?jira

undone axleBOT
wet breach
#

can always report it too 🙂

lethal knoll
#

Yeah, will do

tender shard
#

or just instantly PR it yourself, that'd probably be faster

lethal knoll
#

Not sure if I would be able to fix it as I never look into NMS

#

but I could give it a shot

#

Only not now

tender shard
#

what exactly is the issue btw?

lethal knoll
#

BarFlag.PLAY_BOSS_MUSIC is not working

#

But to be honest I tried this long time ago and then I also couldn't get it working

lethal knoll
#

Maybe it's the ENDER_DRAGON_AMBIENT

tender shard
#

net.minecraft.world.BossBattle it is

#

it has a boolean field "playBossMusic"

#

spigot simply uses that

#

if it doesn't work, it's a vanilla issue

lethal knoll
#

Well maybe it requires you to be involved into a boss battle

orchid gazelle
#

any ideas why sendBlockChange(25 blocks every tick) literally bully the client FPS to demolishion literally letting the FPS implode while halving it?

tender shard
wet breach
orchid gazelle
#

well technicly its also setting the old blocks to air

#

so 50

lethal knoll
#

is there?

#

hmm

wet breach
#

its at the bottom

#

near the music for records

#

below them

lethal knoll
#

okay

#

let's see

tender shard
lethal knoll
#

Yeah sound is running but doesn't sound like boss music tbh xd

wet breach
#

lol

orchid gazelle
#

uhm no but I could port forward rq lol

lethal knoll
#

It's actually sound to fall asleep hahaha

orchid gazelle
#

shit I forgot the password for dad's router LMAO

lethal knoll
tender shard
lethal knoll
sterile token
#

What would be the best way for delegating the redis pub/sub input to the outside of my library?

orchid gazelle
lethal knoll
#

Oh like a fritz?

orchid gazelle
#

yes

lethal knoll
#

And I assume you don't want to change the existing password? :p

tender shard
#

unfortunately all consumer routers suck ass, and not in the good way

lethal knoll
#

I mean, you can check? :p

#

is there a sticker like that?

orchid gazelle
#

nah I know we changed it

lethal knoll
#

make your dad believe that he forgot the password

orchid gazelle
#

I even set it up for the family, but forgot the pw that my dad chose lol

lethal knoll
#

or that something went wrong

orchid gazelle
lethal knoll
#

nice

#

here to

#

that's the best time to be awake

tender shard
#

my router's pw is merkelgabrielsteinmeiermaiziere

lethal knoll
#

and work

orchid gazelle
#

I GOT IN LMAO

lethal knoll
#

Hold on xd

lethal knoll
#

need to scratch something xd

tender shard
#

ok 😄

orchid gazelle
#

holy shit I forgot how this works lmao

lethal knoll
tender shard
#

wtf

lethal knoll
#

That is not supposed to be visible, even not the last 4 characters xd

tender shard
#

are those the actual AVM people?!

lethal knoll
#

the answer is even better

#

I don't think the guy understood

tender shard
#

wtf by no chance that's the real AVM support lol?

lethal knoll
#

AVM?

orchid gazelle
#

that correct? @tender shard

tender shard
#

the manufactoror of Fritz!box

#

oooh

#

wait

lethal knoll
#

No xd

#

hahaha

tender shard
#

yeah I was confused

#

I thought you also sent the first screenshot

lethal knoll
#

this was a webhosting provider xd

tender shard
#

that seems like a very shady company lol

lethal knoll
#

Well, fun fact, they are one of the best rated web hosts out there

#

And to be fair, for their support yes, for price HELL no, for this? shady asf

orchid gazelle
#

@tender shard im done

tender shard
#

shared webhosters in general suck

tender shard
lethal knoll
#

IT's not xd

wet breach
orchid gazelle
lethal knoll
wet breach
#

yeah surprised the boss bar music isn't in there

tender shard
wet breach
#

maybe the client has that music specifically tied to the boss bar

orchid gazelle
#

try again

tender shard
wet breach
#

just not sure why the api for it is messed up

lethal knoll
#

Yeah well, doesn't matter, if this is the music it's supposed to play then I really don't need it haha

orchid gazelle
#

how's it?

lethal knoll
#

I expected epic battle music, not ambient sounds :p

tender shard
orchid gazelle
#

can't you see that its going down?

remote swallow
#

we love ghost blocks

tender shard
orchid gazelle
#

oh its not going down?

remote swallow
#

its going down

#

by like 20 fps

#

then comes back

tender shard
#

lemme try again on the laptop

orchid gazelle
#

why does it half my fps then? Hardware not even close to full load

remote swallow
#

what cpu you got

orchid gazelle
#

i5-9600k

lethal knoll
#

let me try that with my rtx 3090 :p

remote swallow
#

get out

lethal knoll
#

:p

#

you don't believe it? xD

tender shard
#

well 400

#

not 500

lethal knoll
remote swallow
#

love the ghost blocks btw

orchid gazelle
orchid gazelle
tender shard
#

wdym

orchid gazelle
#

it began at 800

lethal knoll
#

going to sleep now, good night

orchid gazelle
#

gn

remote swallow
#

they arent really air

#

thats why alex got stuck

orchid gazelle
#

step by step coding lool

tender shard
#

doesnt matter whether I move or not. on 3456x2234 pixels it's still always at 300-350 fps

orchid gazelle
#

why tf is it halfing for me then?

tender shard
#

no clue

orchid gazelle
#

gonna disable port again btw.

tender shard
#

kk

#

how the fuck can an integrated gpu achieve >300fps on a resolution of 3456x2234 lol

orchid gazelle
#

lol

#

thats the server times

tender shard
#

wasn't there this "render diagram" in F3 that showed you which of the render tasks took how long?

#

or was that removed?

orchid gazelle
#

Oh idk

#

Imma look at that tomorrow, already shut down the pc

sterile token
#

I need recomendations about delegating some data arrived from a redis listener, but i dont know any good way. Something like retriving the arrived in the redis listener into a listener or smth like that

orchid gazelle
#

I coded for 10 hours today lol

tender shard
#

verano needs recommendations about delegating sme data arrived form a redis listener

sterile token
#

yeah, because i cannot think any good idea so then i can retrive the data received by custom payload class

orchid gazelle
#

Use redis pub/sub

sterile token
#

Let me send smth code

orchid gazelle
#

But you need a structure to translate data to send it and then deserialize it?

orchid gazelle
#

Ahh you wanna send code via pub/sub?

sterile token
#

I already have the packet serialization/deserialization, just dont really know how to delegate the packet data

orchid gazelle
#

Is Packet a custom class?

sterile token
#

Do know i explain what i was trying to do?

sterile token
orchid gazelle
#

Then send the byte array with redis pub/sub?

sterile token
#

Let me use the translator 1m cuz my english doesnt really allow me to explain

orchid gazelle
#

My English isn't the best either lol

sterile token
#

Look, I have already designed everything as it is to send information through redis, I am using an abstract class called Packet (which has an int id and boolean queue), it is also in charge of serializing/deserializing to/from byte array. The thing is when I receive the payload in redis listener, I don't know which is the best option to use information, if to use an event system (like the one in spigot) or some better alternative.

orchid gazelle
#

So you need a deserializer

#

To turn the received bytearray into a Packet again?

sterile token
#

No no

#

I already all the data processing

#

Just dont know how to code the way for retriving the data received

orchid gazelle
#

And you have a Packet-Object on the receiver-server?

sterile token
#

Do u explain?

#

Hmn its confusing to explain what i need to do

orchid gazelle
#

You listen to the sub channel of redis and then turn it into a Payload

sterile token
#

Just missing the part for getting the payload data

orchid gazelle
#

What is the payload exactly?

sterile token
#
public class UserUpdate extends Packet {

   private final UUID uuid;
    
   public UserUpdate(UUID uuid) {
      super(int[id], boolean[queue]);
   }

    // getters
    // setters  
}
#

This is exactly what i call a payload, and its what is transmited thru Redis (serialized to byte array)

orchid gazelle
#

Ok

#

And what do you wanna do with it after receiving it?

sterile token
#

How i would get tthe data back and do some operations

orchid gazelle
#

You use your deserializer

sterile token
#

Yes i know

orchid gazelle
#

To turn it back into an Object

#

And then just call the operations in the UserUpdate Object

sterile token
#

Let say i already coded the serialization/deserialization, the obejct is already parsed etc, but what i do with that object, i dont know what i should do

orchid gazelle
#

What do you wanna do with it?

sterile token
orchid gazelle
#

So you want an Event, for example UserUpdateEvent?

#

And then pass data there?

sterile token
#

Which is the best option in this cases

orchid gazelle
#

What does UserUpdate update?

sterile token
#

The packet impls will be just for the data transmissions

orchid gazelle
#

Yes

wet breach
#

kind of obvious on that

orchid gazelle
#

But what exactly do you want to do with UserUpdate?