#help-development

1 messages · Page 1120 of 1

glossy laurel
#

ive been there

hybrid turret
#

wsl?

frail pilot
#

Linux on windows

#

Basically

hybrid turret
#

oh

#

vm

spare hazel
glossy laurel
undone axleBOT
glossy laurel
#

uh-huh

hybrid turret
#

install virtual box or sum

frail pilot
#

Dual boot

glossy laurel
hybrid turret
#

or dual boot

#

yeah

hybrid turret
#

idek why

frail pilot
#

But with secure boot and windows it became more difficult

hybrid turret
#

but generally tAsTe yoUr OwN MedIcIne won't get u far in life. just saying

hybrid turret
#

and i got windows on my main pc

#

i mean there's still VirtualBox. Not the best way of doing it but it is one ig

frail pilot
#

The only "good" solution I found was to use a shim to launch Linux with secure boot without signing the whole Linux system

hybrid turret
#

hmmm i feel like just having a second mid range machine is the least stressful lmao

frail pilot
#

Which force me to use the boot selector of my bios

hybrid turret
#

oh and that displays missing stuff? that's so cool!

pseudo hazel
#

well you should be able to see what you need

#

but I just use it for clearing all criteria

#

so idk how advanced it is

#

but p sure you can see what progress someone has

hybrid turret
#

alright i'll fiddle around with it (the criteria)

vast ledge
hybrid turret
#

dude

#

cmonnnn

#

don't quote me on it xd

glossy laurel
#

XD

pseudo hazel
#

remember kids, dont fiddle with your criteria

hybrid turret
#

monkaW

spare hazel
young knoll
#

Defaults are magical values that get used if the value isn’t set in the file

quaint mantle
#

i want to serialize items to a blob column in an sqlite database but persistantdatacontainers dont implement configurationserializable or serializable. is there any other option? im really not sure how to approach this

frail pilot
#

They are already stored in the item tags

young knoll
#

BukkitObjectOutputStream

quaint mantle
frail pilot
#

Persistent data container use nbt tags to store data

#

Under the "bukkit domain" to avoid conflicts

#

You can see it if you use a tool to see nbt files

pseudo hazel
#

yeah or when you serialize an item to yaml file it will also show the added pdc stuff

quaint mantle
#

i guess i was just trying to navigate the bukkit classes to find wherei t does that and i got confused haha

#

whats the difference between the serializable interface and the configruationserializable?

hybrid turret
#

if i wanna get an advancement using Bukkit#getAdvancement, I have to use this, right?

Bukkit.getAdvancement(new NamespacedKey(NamespacedKey.MINECRAFT, <advancement key here>));
#

bc i get the @Internal warning (and it annoys me)

tardy delta
#

NamespacedKey.minecraft btw

glossy laurel
#

guys, how usually do you press ctrl + s?

hybrid turret
tardy delta
hybrid turret
glossy laurel
hybrid turret
#

vim

glossy laurel
#

right

hybrid turret
#

:w = write

candid galleon
#

:wqa

glossy laurel
hybrid turret
#

was gonna say

#

drop the !

lost matrix
hybrid turret
#

the moment you tab out

tardy delta
#

another one: ggVG"+y

frail pilot
hybrid turret
tardy delta
#

ah yes ctrl+s in discord opens the stickers tab

candid galleon
#

what is “+

hybrid turret
#

oh wait

tardy delta
#

register +, system clipboard

candid galleon
#

i have yet to learn registers tbh

tardy delta
#

theres probably a shorter way

hybrid turret
#

oh i get it. lower case minecraft generates a new namespaced key

#

thanks i was blind

#

mb

tardy delta
#

looks like you can simply do :%y+

#

ive always been using the long way

hybrid turret
#

When is an AdvancementDisplay set? I don't quite get that. When the UI is open?

hybrid turret
pseudo hazel
#

probably

hybrid turret
#

hmmm is there another way to get the advancement name then for prettier display?

pseudo hazel
#

like when the player opens the menu maybe

hybrid turret
#

except for an ugly ass switch-case 💀

pseudo hazel
#

translatable component

hybrid turret
#

whaa?

pseudo hazel
#

put the key of the advancement in a translatable component, it will show the name to the client

#

(in any language)

hybrid turret
#

yooooo whaaaaat?

#

that's crazy

glossy laurel
#

oh yeah, that might be a thing

pseudo hazel
#

works for anything that mojang has translations for

#

you just need the key in the right format

hybrid turret
#

wait what key exactly

#

the key of the namespaced key?

pseudo hazel
#

well yeah, the ns key for the advancement in this case

hybrid turret
#

thanks spigot resource

#

good hyperlink

#

so sum like this nether/distract_piglin

#

asking this much bc in the resource they're using the classic property/yaml . seperator

pseudo hazel
hybrid turret
#

oh i'll take a look

#

is the Component the BaseComponent in spigot? :thonk:

#

i want nitro ffs

#

hmm not really, idk can't make this spigotty, imma skim through the docs a bit

glossy laurel
#

what would happen if I would try to set soemones health to a negative number

hybrid turret
#

my guess would be death

pseudo hazel
#

Component is from adventure, but it would be TranslatableComponent in your case

hybrid turret
#

and then it being set to 0

#

bc i feel like this happens naturally very often.
what if you hit someone with a sword when they're on 0.5 hp

#

oh also

#

?tas

undone axleBOT
pseudo hazel
#

if you switch to an older branch of this code you might be able to find the spigot version of it

#

i only recently converted it to adventure

glossy laurel
#

fr

quaint mantle
glossy laurel
hybrid turret
#

"back in the good days" how old r u again?

frail pilot
#

So you might want to implement BukkitObjectOutputStream in your data class

hybrid turret
pseudo hazel
#

no thats my beautiful class

hybrid turret
#

ahaaa

#

i see

#

oh oh

#

oh god

blazing ocean
#

you can just :%y

#

to copy to system clip

pseudo hazel
#

because someone messed up with naming them normally

blazing ocean
#

assuming it's configured properly

pseudo hazel
#

so a switch is required to get all statistics working

hybrid turret
#

if you don't mind, i might just yoink that

pseudo hazel
#

sure

hybrid turret
#

ty :)

pseudo hazel
#

i dont think mojang will add any new statistics soon anyways

hybrid turret
#

true

blazing ocean
#

man i have to compile spark for every platform rn

#

this is annoying

pseudo hazel
#

skill issue

blazing ocean
#

how else will i shade spark into my mod

#

and mixin to it

quaint mantle
tardy delta
pseudo hazel
#

why shade spark

tardy delta
#

i dont

blazing ocean
#

why

blazing ocean
pseudo hazel
#

yikes

#

mix me with that shit

hybrid turret
pseudo hazel
#

thats half true

#

implementing configurationserializable means you need to serialize it to some map of string string and object

hybrid turret
#

yeah

#

oh

#

yteah

#

i mean

pseudo hazel
#

idk where the bukkitoutputstream comes in

blazing ocean
#

wait

hybrid turret
#

yeah was not well said

#

mb

blazing ocean
#

i'm just gonna shade the spark jar

#

ezpz

#

wait can i just modImplementation(fileTree("libs/spark.jar"))

young knoll
#

BukkitObjectOutputStream is for serializing Bukkit objects to byte arrays

frail pilot
#

Mb

blazing ocean
#

yesss i can

quaint mantle
pseudo hazel
#

last time I checked I cant create a config with byte arrays

blazing ocean
#

hehehehehehe

hybrid turret
tardy delta
#

wtf

tardy delta
blazing ocean
#

mixins

tardy delta
#

hmm?

pseudo hazel
#

but I guess it depends on the criteria itself

hybrid turret
#

I mean I suppose since they're never displayed ingame, there won't be translations

tardy delta
#

just throw everything in a byte array and call it a day

pseudo hazel
#

right

tardy delta
#

then cry cuz the reader is broken when it finds an eof in the middle of your file

hybrid turret
pseudo hazel
hybrid turret
#

well, i'll just display the keys, that's fine

young knoll
quaint mantle
pseudo hazel
#

but items and stuff do

blazing ocean
#

this is gonna be really fun

pseudo hazel
#

fabric is cursed

tardy delta
#

id just modify the minecraft source myself at this point 🗿

blazing ocean
#

whaaaa

#

is it because i'm shading the spark jar

#

and using that for mixing

kindred valley
#

?learnjava

undone axleBOT
#

For Beginners:

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

For Intermediate to Advanced Learners:

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

Practice and Hands-on Learning:

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

Free Resources and Documentation:

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

Community and Support:

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

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

lost matrix
kindred valley
grim hound
#

How can I stop the sound of a player's fall?

#

stopSound doesn't really work

#

Best it does is cutting into the middle of the sound playing

echo basalt
#

client-sided sound though

#

also world events are a thing

grim hound
#

Packet or bukkit ones?

echo basalt
#

something about entity landing

grim hound
#

But I block those I think, and the sound's still there

echo basalt
#

world events usually spawn both particles and sounds or whatever

grim hound
#

My current solution is spoofing a ghost cobweb

pseudo hazel
grim hound
pseudo hazel
#

ghobweb

kindred valley
pseudo hazel
#

i never said you did?

grim hound
#

So I'd need to delay it by some fixed amount, like of 1 second, which is never a good idea

#

Maybe I should like wait for like 5 move packets from the player?

#

After teleport confirm

#

Also, does the server use TeleportConfirm for anything?

pseudo hazel
#

maybe for bed spawns or smth

#

idk

grim hound
#

Like the server teleports a player and the player sends a TeleportConfirm

#

But what for? Does the server use it?

grim hound
hybrid turret
#

dont need to go on discord then

pseudo hazel
#

end portal teleport after credits?

#

im just spitting ideas

hybrid turret
#

yeah there are definitely different ways of the packet used for different cases. credits, death and world switch i think?

hybrid turret
#

granted, i've never had that happen, but my guess would be a... data consistency feature, if you will?

then again, this is completly out of the blue. just guessing

grim hound
#

Mmm makes sense

pseudo hazel
#

yeah thats the most likely

#

but probably just either not implemented/needed anymore or never properly used in the first place

grim hound
#

Can the ping on layer 4 and layer 7 of the same connection vary a lot?

hybrid turret
#

Does adding a chunk ticket using World#addPluginChunkTicket only make the chunk not unload or does it also automatically load the chunk?

smoky anchor
hybrid turret
#

BRUH

#

i read the documentation to find out about this in the first place, how tf did i miss that???

smoky anchor
#

¯_(ツ)_/¯

hybrid turret
#

istg i thought it wasnt there 😭

#

what am i doing bruh

#

sorry, thanks tho

smoky anchor
#

np

wet breach
#

layer 7, the application layer is where the packet is processed. Yes there could be delay from when layer 4 gets the packet, and layer 7 actually processes the data in said packet

twin venture
#

hi iam trying to use mongodb :
mongodb.net but when i connect it tells me No such host is known

hybrid turret
#

what are you inputting to connect and do you have the server running?

worn valve
#

can I use mods at the same time as plugins?

eternal oxide
#

Not on Spigot but there are forks which handle mods and plugins

sacred ice
#

hi, is this name still valid for black stained pane in newer versions : BLACK_STAINED_GLASS_PANE

ebon hawk
#

How to make the plugin file update automatically after updating the plugin jar file

ebon hawk
steady turtle
#

is it possible to create your own custom mobs in 1.20?

hybrid turret
#

idk where you're going with this question tho 😅

sacred ice
#

ok ty

hybrid turret
#

or tell the user to add the lines you added manually

ebon hawk
steady turtle
azure zealot
#

yes

#

give me a second

hybrid turret
azure zealot
#

MythicMobs and ModelEngine combined

#
Official MythicCraft Compatible Plugins:
ModelEngine - Combine with our powerful ModelEngine plugin to give your mobs fully custom models that shouldn't exist outside of mods
hybrid turret
#

compare keys, if there are missing keys in the latter, you add those entries

steady turtle
frail pilot
hybrid turret
#

fair enough idk about all that lol

grim hound
#

can I decrease the view distance to certain players or generally in certain worlds?

slender elbow
#

not on spigot

hybrid turret
brazen badge
#

I'm coding a Region Manager, for you is useful to save also the world in the config
as well as the coordinates?

hybrid turret
#

you mean in the default config config.yml?

#

absolutely not. do not do that

brazen badge
hybrid turret
#

That's better.

Though: YAML is not really made for data storage. It's a markup language designed to store configuration entries.

#

You can do it like that but if you want to go with files i recommend either JSON or SQLite

eternal oxide
#

json is no different than yaml for storage

#

both are just flat file and should only be used to store data which rarely changes

hybrid turret
#

isn't json still better than yaml tho?
i'm pretty sure this has also been stated multiple times.

brazen badge
#

I want that editable in a file, so SQLite isn't a choice

eternal oxide
#

no

ivory sleet
hybrid turret
#

An well if they don't want to learn SQL then they have to go with one of the two

grim hound
ivory sleet
#

so if you want you can parse valid json to be valid yaml

hybrid turret
#

watch this then

#

grrr

slender elbow
brazen badge
#

Going back to the question, do you think it is useful to save the world or not?

hybrid turret
#

well

#

if you don't store the world name

#

you have to get it in a different way

#

otherwise you can't construct a Location object

#

so either with something like Player#getWorld or by a string/id

eternal oxide
# hybrid turret watch this then

Thats just a personal opinion. His statement is somewhat correct in that json has nice object serialization, however spigot has ConfigurationSerializable to Yaml which is the same thing

hybrid turret
#

i mean yeah

#

spigot makes yaml easier, that's true

brazen badge
#

I'll get region only in listeners, so I can get the world in the listener

grim hound
brazen badge
#

personally, I find yaml easier to understand than JSON

hybrid turret
slender elbow
#

in storage

hybrid turret
#

tbh long story short: i would always store the world name as well.

slender elbow
#

unless any given x/y/z applies to all worlds

hybrid turret
#

which would only makes sense if you want to mirror worlds or something

#

(at least that's the only real use case i can think of)

slender elbow
eternal oxide
#

Storing a World/Location in a config is a bit iffy, as the whole config is parsed and objects deserializes the moment you first touch it. If you do so before worlds are loaded your config will break

hybrid turret
#

so store the world name, problem solved

eternal oxide
#

yep

hybrid turret
#

or id i guess

eternal oxide
#

or even yoru own object which holds a vector, two doubles and the world name

hybrid turret
#

custom location moment

eternal oxide
#

yep

hybrid turret
#

floats tho

#

for pitch and yaw

eternal oxide
#

yep too

grim hound
slender elbow
#

both!

hybrid turret
#

I think what she wants to say is: we don't really know bc we're on the spigot server and not papermc

slender elbow
#

but paper questions belong in the paper discord 😌

grim hound
eternal oxide
#

Stop using paper then

slender elbow
#

this discord remains as the spigot discord

#

the place for spigot questions

glossy laurel
#

how do I set the name that shows above player's head

eternal oxide
glossy laurel
#

ffs

#

😭

eternal oxide
#

well you could probably avoid packets using hide Player these days

glossy laurel
#

wdym?

eternal oxide
#

a simpler method is to create a TextDisplay and mount it as a passenger on the player

glossy laurel
#

wb protocolLib

#

is that the plugin that allows me to do it

grim hound
glossy laurel
#

...

#

is it nms?

dark moth
#

@grim hound i asked someone who does modding and asked if i can interact a plugin by a mod

#

he said no.

#

if this doesnt work

#

ima be mad bro

#

ima airstrike your home

pseudo hazel
#

packetevents is protocollib but better

shadow night
#

I agree

grim hound
#

but custom payload is a packet literally designed for mod - non modded server integration

pseudo hazel
#

I think thats what simple voice chat uses

#

there is a server plugin but its a client mod

dark moth
#

OOOOOOO

pseudo hazel
#

so the person you talked to was either lying or didnt know

glossy laurel
#

another plugin?

pseudo hazel
#

well yeah

#

its a plugin with an api

glossy laurel
#

alr

pseudo hazel
#

its like the same idea as protocollib

#

but better

glossy laurel
#

gotcha

pseudo hazel
#

better wrappers etc

#

i mean its subjective

pure dagger
#
@Override
    public boolean onCommand(CommandSender sender, Command command, String s, String[] args) {
        Player player1 = (Player) sender;
        Player player2 = Bukkit.getOnlinePlayers().iterator().next();
        Vector vector = player2.getLocation().toVector().subtract(player1.getLocation().toVector())
                    .normalize()
                    .multiply(1.5)
                    .setY(0.5);
        player2.setVelocity(vector);
        return true;
    }```

its exacly this code that gives me
java.lang.IllegalArgumentException: x not finite
pseudo hazel
#

but its just better xD

glossy laurel
#

cant there just be a pom dependency

paper viper
#
  1. you can't cast directly to Player like htat
  2. its because you are using the location of player1
eternal oxide
#

I can;t see that code giving that error, it would require a divide by zero or somethign similar to cause x toi be infinite

slender elbow
#

that'll blow up like that if both player objects are the same player

pseudo hazel
glossy laurel
eternal oxide
#

No, if its teh same player the vector will just be zero

pseudo hazel
#

but its to prevent 20 plugins to have 20 versions of packetevents in a single server

glossy laurel
#

but can I use it just as the dependency?

#

or nah

pseudo hazel
#

its like that with most libraries that arent inventory libs or whatever

#

not really

paper viper
#

i remember running into a similar problem while trying to launch people

slender elbow
pseudo hazel
#

you use it like a hard depend

#

and the owner adds packet events to their server as a plugin

eternal oxide
#

thats where its getting NaN

glossy laurel
#

cant run without it?

paper viper
#

Yes

glossy laurel
#

and soft depend is can run but without some features?

paper viper
#

Yes

azure zealot
glossy laurel
#

and then its very hard to setup because you need to tell it not to parse something if you dont have the dependency?

azure zealot
#

i didnt know that there are like clans on discord

pseudo hazel
#

yeah

azure zealot
#

that grants you a badge like that

slender elbow
#

i am cute

pseudo hazel
#

your plugin will fail to load if the server doesnt have the dependency

glossy laurel
pseudo hazel
#

thats why you specify it in your plugin.yml

azure zealot
blazing ocean
azure zealot
#

rad

#

go away

blazing ocean
#

nah i'm good

azure zealot
#

lynx

glossy laurel
slender elbow
#

lynx i will delete your minecraft base

azure zealot
#

why is this discord so much trolling

glossy laurel
eternal night
#

nah I'm good

pseudo hazel
#

what what

glossy laurel
#

how do you specify it in your plugin.yml

pseudo hazel
#

dependencies: [packetevents] from the top of my head

blazing ocean
eternal night
blazing ocean
#

not the dirt hut!

pseudo hazel
#

that will also make sure that packetevents has been loaded before your plugin

paper viper
#

Jk lol

eternal night
#

update intellij

glossy laurel
#

appearantly it's "INCREASE_DAMAGE"??

#

wtf?

eternal night
#

oh

#

are you in old versions

glossy laurel
#

i mean

#

don

#

't think so?

eternal night
#

1.21 should have the correct name

glossy laurel
#

is that old?

eternal night
#

Well it was released nearly 9 months ago

glossy laurel
#

damn, alright

#

updated to 1.20.6, nice

eternal night
#

(just go 1.21.1)

glossy laurel
#

good thing this error got thrown, I forgot I was making a plugin for a 1.20.6 server

#

💀

grim hound
#

why can't it be 1?

glossy laurel
#

cuz you would see nothing

#

imo

slender elbow
#

that's just a minecraft limitation

pure dagger
glossy laurel
#

Guys

#

was there a cancellable event on connect that would get called before on join or am I tripping?

slender elbow
#

AsyncPlayerPreLogin or PlayerLogin

#

those come before PlayerJoin

glossy laurel
#

thx 🙏

glossy laurel
slender elbow
#

both are, yes

#

those are the events you should use to disallow a player from joining the server

glossy laurel
#

how do I check that on docs?

slender elbow
#

how do you check what?

glossy laurel
#

the fact that theyre cancelable

#

I cant see it anywhere

dawn flower
#

https://paste.md-5.net/eluvisoxob.cs

java.lang.ClassCastException: class net.minecraft.network.syncher.DataWatcher$Item cannot be cast to class net.minecraft.network.syncher.DataWatcher$b (net.minecraft.network.syncher.DataWatcher$Item and net.minecraft.network.syncher.DataWatcher$b are in unnamed module of loader java.net.URLClassLoader @17d10166)```
slender elbow
#

they don't implement Cancellable per se, but they have disallow/allow and get/setResult methods

pure dagger
#

how to check if player shoot an arrow with specific bow? if it would be a crossbow or a snowball you can check with ProjectileLaunchEvent and check if either player's main hand is the special snowball or the offhand is, while main hand is not (becaause if the offhand is the special snowball and mainhand is some normal snowball, then player shoots the normal one), but with the bow... its possible that the player has special bow in for example main hand, and shoots an arrow from a bow in offhand (i hope you get what i mean)

worthy yarrow
worthy yarrow
#

Easy enough kek

slender elbow
#

well, both events are post auth which is way past handshake

worthy yarrow
#

Oh

slender elbow
#

disallowing in APPLE will send a login disconnect packet, disallowing in PLE will send a regular disconnect packet

#

and return from the rest of the "let player in" logic ofc

worthy yarrow
#

A login disconnect packet kek

#

Kinda funny

slender elbow
#

hm?

worthy yarrow
slender elbow
#

🤔

#

if anything goes wrong during the login phase, the server will send that

#

it's a separate packet from the common disconnect packet because it's a different phase

#

oh, the normal login event uses that as well, duh, it's right after login but not quite yet in config phase

worthy yarrow
#

I mean I was just laughing at the naming, “login disconnect” just sounds funny to me

dawn flower
#

how do i make a player glow for one player only? (in protocoollib)

paper viper
#

You need to send a metadata packet and add the glow mask

dawn flower
#

I know, but how

paper viper
#

you basically take the first byte (the data value with id 0)

rotund ravine
paper viper
#

and then either append or get rid of 0x40

#

depending on if you want the glow or not

cedar saffron
paper viper
#

but actually are you making just Player glow and not other entities?

#

because i just found a spigot api method added in 1.20.4 which only applies to LivingEntity so including Player

#

in my case i wanted items to also glow but you can use the spigot method if you want just one player to glow

paper viper
#

added in 1.20.4

#

i think

dawn flower
#

Ok

slender elbow
#

i would never

cedar saffron
#

One piece is the best!

dawn flower
#

Does Player#isGlowing return true if the player has the glow potion effect

cedar saffron
#

You WILL NOT DISS ODA

eternal night
paper viper
#

you might need to store the data somewhere

#

like a multimap of watchers or smthing

eternal oxide
#

if you need the bow later just set its data in the projectiles PDC in the launch event

dawn flower
#
PotionEffect glowing = new PotionEffect(
  PotionEffectType.GLOWING,
  1,
  0,
  true,
  false
);
nearby.forEach(p -> player.sendPotionEffectChange(p, glowing));

this doesn't work

pure dagger
#

thats what i do, add pdc key, and when it hits a player it checks for the key

eternal oxide
#

so what is the issue? In teh launch event the player will have the bow in their hand

pure dagger
#

but which one

#

he can shoot from main or offhand

eternal oxide
#

which? They will only have one bow in their hand

pure dagger
#

umm there are 2 hands

#

as i said, its possible that player shoots an arrow with mainhand bow or offhand bow while having 2 bows in 2 hands

#

you understand?

eternal oxide
#

only one hand shoots

pure dagger
pure dagger
eternal oxide
#

Pretty sure only the main hand shoots

pure dagger
#

bruuuh look

dawn flower
eternal oxide
#

Then use the EntityShootBowEvent

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

dawn flower
#

It just doesn't work

#

It does nothing

#

No errors

paper viper
#

is that intentional

dawn flower
#

Yeah

paper viper
#

but it just wont like

#

show up

dawn flower
#

I changed it to 100 to test, still doesn't work

hybrid spoke
#

show the full code

#

we need context

paper viper
paper viper
#

can you show full code

dawn flower
hybrid spoke
#

what does runLoop do

dawn flower
#

Runs the code x amount of times with a delay

pure dagger
#

but why did they make separate event for that?

#

i mean yeah its usefull

hybrid spoke
dawn flower
#

Sync

paper viper
#

hm

#

the javadoc says

Note: Sending an effect change to a player for themselves may cause unexpected behavior on the client. Effects sent this way will also not be removed when their timer reaches 0, they can be removed with sendPotionEffectChangeRemove(LivingEntity, PotionEffectType)

#

are you sending the effect to itself

#

does your own getNearbyEntities method get the player itself

dawn flower
#

No

glossy laurel
#

"Man, I wonder why my files aren't saving!"

hybrid spoke
glossy laurel
paper viper
glossy laurel
#

my brain

dawn flower
#

I did

glossy laurel
#

is just cooked

dawn flower
#

They exist

hybrid spoke
#

does your nearbyPlayers list have any entries?

dawn flower
#

Yeah

#

I printed them

hybrid spoke
#

provide full info and context, i dont want to have to ask you everything

dawn flower
#

I tried just doing Entity#addPotionEffect, and it worked, but using sendPotionEffectChange doesn't work

paper viper
#

not entirely sure then, have you tried just doing it outside of any of your code

#

and just itself

hybrid spoke
#

do you have to necessarily use sendPotionEffectChange? addPotionEffect and setGlowing sounds like a good alternative

paper viper
#

not all players

#

setGlowing would make it glow for everyone

hybrid spoke
#

ah gotcha

dawn flower
#
    @Override
    public void onEnable() {
        PotionEffect glowing = new PotionEffect(
                PotionEffectType.GLOWING,
                100,
                1,
                true,
                false
        );
          Bukkit.getPlayer("MissingReports").sendPotionEffectChange(Bukkit.getPlayer("MrBot"), glowing);
}```
Still doesn't work
eternal oxide
#

um

paper viper
#

well that wouldnt work anyways cause you guys arent on the server

#

when the plugin enables on server load

#

unless you use plugman or smthing

dawn flower
paper viper
#

o

paper viper
#

maybe it doesnt work

#

when i look into the nms it uses ClientboundUpdateMobEffectPacket

#

which is different from the ClientboundSetEntityDataPacket packet which would be used to make players glow usually

#

so maybe thats the reason why the glow effect isn't working?

#

Choco do you know why maybe

#

what if you tried using a different potion effect like regeneration

#

and allow particle effects

#

do you see the particles?

eternal oxide
#

are you using optifine?

dawn flower
#

Yeah

#

no

eternal oxide
#

optifine and soime shaders break glow effects

dawn flower
#

Sodium

#

Normal glow works tho

eternal oxide
#

k

paper viper
#

it's prolly cause its not the metadata packet

#

i think you might have to use nms or plib

#

for ex, the setGlowing method uses the metadata packet flags to mark the player as glowing

blazing ocean
paper viper
#

Yeah, I'm not sure tbh

dawn flower
#
    public void setGlowing(Entity entity, boolean glowing) {
        ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
        Player player = getPlayer();
        if (player == null) return;

        PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.ENTITY_METADATA);
        packet.getIntegers().write(0, entity.getEntityId());
        
        byte bitmask = (byte) (glowing ? 0x40 : 0x0);

        List<WrappedDataValue> dataValues = new ArrayList<>();
        dataValues.add(new WrappedDataValue(0, WrappedDataWatcher.Registry.get(Byte.class), bitmask));

        packet.getDataValueCollectionModifier().write(0, dataValues);
        protocolManager.sendServerPacket(player, packet);
    }```
I got it to work with this, but now it overrides all other metadata
#

For example if the entity was on fire, it overrides that

paper viper
#

That's because you directly set it to only 0x40 or 0

#

you need to append it

dawn flower
#

Yeah i know

paper viper
#

for ex |= 0x40

#

to add

dawn flower
#

How do i get the current metadata

paper viper
#

Not sure in plib but in nms you'd get SynchedEntityData from the nms entity

halcyon hemlock
#

how to change this

pseudo hazel
#

epic null server

#

why change perfection

blazing ocean
halcyon hemlock
#

can u make it animated

blazing ocean
#

it gets sent during handshake so prob not

halcyon hemlock
#

send a billion server brand packets frfr

#

i know what im about to do

dawn flower
#

How do i get the current metadata in ProtocolLib?

eternal oxide
#

PLib is not for fetching in memory data

halcyon hemlock
#

my bad i mistakenly opened lunar client

blazing ocean
blazing ocean
#

i mean just sending a packet like that shouldn't override i believe

#

Updates one or more metadata properties for an existing entity. Any properties not included in the Metadata field are left unchanged.

eternal oxide
#

it will because its a Bit mask

paper viper
#

^

#

you have to use | 0x40 or & ~0x40 to add or remove existing masks

blazing ocean
#

oh right

dawn flower
#
        byte bitmask = 0;
        bitmask |= (byte) (entity.getFireTicks() == 0 ? 0x01 : 0x0);
        bitmask |= (byte) (entity.isSneaking() ? 0x02 : 0x0);
        bitmask |= (byte) (entity.isSprinting() ? 0x08 : 0x0);
        bitmask |= (byte) (entity.isSwimming() ? 0x10 : 0x0);
        bitmask |= (byte) (entity.isInvisible() ? 0x20 : 0x0);
        bitmask |= (byte) (glowing || entity.isGlowing() ? 0x40 : 0x0);
        bitmask |= (byte) (entity.isGliding() ? 0x80 : 0x0);```?
paper viper
#

i wouldnt rlly recommend doing that, but if it works, then sure

blazing ocean
#

yea i mean

#

there's more than just those

#

nms.Entity#getEntityData ig

#

ig this is what you're looking for?

dawn flower
#

I don't want to use NMS

glossy laurel
#

what happens when I use YamlConfiguration conf = YamlConfiguration.loadConfiguration(file); on a file that is empty? Does it create an empty configuration file?

dawn flower
#

It creates an empty YamlConfiguration

paper viper
#

maybe an api idk

dawn flower
paper viper
#

yea

glossy laurel
# dawn flower It creates an empty YamlConfiguration
            File file = new File(filePath);
            file.getParentFile().mkdirs();
            if(!file.exists()){
                file.createNewFile();
            }
            YamlConfiguration conf = YamlConfiguration.loadConfiguration(file);
            OfflinePlayer p = sorcerer.getPlayer();
            UUID uuid = null;
            if(p != null){
                uuid = p.getUniqueId();
            }
            conf.set("map." + sorcerer.getName(), uuid);
            conf.save(filePath);
        }catch (Exception e){
            throw new RuntimeException(e);``` it's weird cuz I have this code
paper viper
#

but if mc updates or smthing its prolly gonna break

glossy laurel
glossy laurel
dawn flower
#

I won't

glossy laurel
#

ight nice

dawn flower
#

But please use saveResource

glossy laurel
#

what's that

dawn flower
#

Do you know the resources folder in your project?

glossy laurel
#

uhm

#

idk

dawn flower
#

Where plugin.yml is

glossy laurel
#

nah

#

wait lemme see

dawn flower
#

This folder

glossy laurel
#

right, found it

#

wb it

#

can I save stuff there?

dawn flower
#

Yeah, then you can do saveResource("myFile.yml", false)

#

False means it won't replace it if it already exists

glossy laurel
#

lemme check out docs

dawn flower
#

Ok

glossy laurel
#

what???

#

what does it do, im so lost

#

also, use that why

dawn flower
#

It's easier

#

It saves the file in your resources into the data folder

#

Which is plugins/pluginName/..

glossy laurel
dawn flower
#

How many files do you have

glossy laurel
#

solid 1

#

in this plugin

dawn flower
#

Then yeah

glossy laurel
#

okay

#

and how do I do that?

halcyon hemlock
#

different packet

glossy laurel
#

I already have my system set up

pure dagger
# eternal oxide Then use the EntityShootBowEvent

actually.. after thinking.. it also wont work... i dont know if i said that but i also need to detect if player threw a snowball, or an egg, or a crossbow, so... i dont know how to check if player did not use a bow... in the ProjectileLaunchEvent 🤦‍♂️

glossy laurel
#

and its almost working XD

halcyon hemlock
#

there, better

eternal oxide
pure dagger
#

what? bow data? what is bow data

eternal oxide
#

the bow data you apply in the shoot bow event

blazing ocean
pure dagger
#

but shoot bow event and projectile launch event... is it called in the same time or like what

halcyon hemlock
zealous osprey
#

XD

halcyon hemlock
#

dancing crab

blazing ocean
#

YOU COULD MAKE A FUCKING CUTSCENE WITH THAT

glossy laurel
glossy laurel
blazing ocean
#

i wonder how it works in spigot

#

@halcyon hemlock!!!

halcyon hemlock
#

I got off my pc

blazing ocean
halcyon hemlock
#

I think I forgot to fucking commit it

#

One sec I'll send the code

blazing ocean
#

.expect("tf") relatable

halcyon hemlock
#

For testing purposes frfr

zealous osprey
#

that's what they all say

glossy laurel
#
            file.getParentFile().mkdirs();
            if(!file.exists()){
                file.createNewFile();
            }
            YamlConfiguration conf = YamlConfiguration.loadConfiguration(file);
            OfflinePlayer p = sorcerer.getPlayer();
            UUID uuid = null;
            if(p != null){
                uuid = p.getUniqueId();
            }
            conf.set("map." + sorcerer.getName(), uuid);
            conf.save(file);```
So everything works just fine but when I save it into the config file it gets this:
```map:
  'null': !!java.util.UUID '9d14ab37-0c6b-4967-ac56-51586d60473d'```
and I do not understand why whatsover. Anyone wanna help?
halcyon hemlock
#

Maybe name isn't cached

smoky anchor
smoky anchor
#

ignore that, I read it wrong completely actually

glossy laurel
#

💀

smoky anchor
#

my bad, sorry

blazing ocean
halcyon hemlock
blazing ocean
#

oh

halcyon hemlock
#

Check old protocol

glossy laurel
#

guys

#

😭

halcyon hemlock
#

👨‍❤️‍👨

blazing ocean
blazing ocean
#

oh it's just a plugin message

halcyon hemlock
#

It's the brand thing

#

U can do crazy shit with the packets

#

I'm sending 100 chunks per second rn 💀

blazing ocean
#

damn

halcyon hemlock
#

What were u gonna do though

blazing ocean
#

make font magic there

halcyon hemlock
#

U prolly can

#

I saw someone color it

blazing ocean
#

legacy color codes?

halcyon hemlock
#

Try it idk I got off

blazing ocean
#

i will later

proud obsidian
#

How to show player specific Scoreboard Objective board? I created scoreboard with many objectives and set display slot to SIDEBAR. I need to display objective named "test" from scoreboard to player. I see only one method player.setScoreboard(Scoreboard); but it's not objective.

pseudo hazel
#

a player is assigned a scoreboard to see

#

if the objective is on display sidebar it will be shown to all players who have that scoreboard set

proud obsidian
#

So I should create scoreboards instead of objectives to display different variations of sidebar boards for every player?

pseudo hazel
#

if every player has a sidebar with different content, all players need their own scoreboard yes

wintry dagger
#

protocollib or custom packet handler to make a simple 1.21 anticheat?

#

which is more convenient / benefits

novel kite
#

ProtocolLib or PacketEvents is probably the better decision to make tbh

pseudo hazel
#

custom packet handler is always gonna be less convienent

#

the only benefit is independence

#

which hardly matters

#

since its pretty easy to make changes if the protocol changes

novel kite
#

ProtocolLib:

  • Lots of existing documentation
  • Only parse what you need
  • Most servers already have it installed
  • Huge community
    PacketEvents:
  • Packets are parsed for you
  • Discord server available
  • Requires explicit version support for the mc version
  • Light documentation and community
    Custom Packet Handler:
  • You're on your own, enjoy your independence.
#

(I'm not sure if an official discord exists for protocollib)

slender elbow
#

(it doesn't)

halcyon hemlock
#

(write your own server from scratch)

wintry dagger
#

so protocollib

#

are there any good anticheats on the market rn

slender elbow
#

yeah there's like three or so big ones

glossy laurel
#

Guys

#

Does Spigot happen to have some code that prevents YamlConfiguration from saving the values for a key if the vlaue is null?

eternal oxide
#

if the value for a key is null it will be removed

tardy delta
#

dont you mean the value being null?

#

what key would you remove if it is null?

#

wait

#

cant read english

glossy laurel
echo surge
#

Is using DI worth it for the Plugin initializer(JavaPlugin child) class?

magic drift
#

idk if im stupid or stupid but why so many errors

#

``package me.echo145642.rank;

import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.HashMap;
import java.util.Map;

public final class Rank extends JavaPlugin {

@Override
public void onEnable() {
    // Plugin startup logic
    public enum Rank {
        Player(ChatColor.GRAY + "PLAYER"),
        Owner(ChatColor.GOLD + "OWNER"),
        Admin(ChatColor.RED + "ADMIN"),
        Dev(ChatColor.DARK_PURPLE + "DEVELOPER"),
        Helper(ChatColor.GREEN + "HELPER"), prefix(;);

        Private Final
        String Prefix;

        Rank(String Prefix) {
            this.prefix = prefix;
        }

    }

    Map<Player, Rank> =new HashMap<>();

    public void setRank (Player player, Rank rank){
        ranks.put(player, rank);
    }

    public Rank getRank (Player player){
        return ranks.get(player);
    }

    public void loadRank (Player player){
        String rankString = getConfig().get(player.getUniqueId() + ".rank");
        Rank rank = (rankString == null) ? Rank.NONE : Rank.valueOf(rankString);
        player.setDisplayName(prefix.get(rank) + player.getName());
        player.setPlayerListName(prefix.get(rank) + player.getName());
        ranks.put(player, rank);
    }

    public void saveRank (Player player){
        getConfig().set(player.getUniqueId() + ".rank", ranks.get(rank));
        ranks.remove(player);
    }

}

}

if (getRank(player) == Rank.Owner) {
player.
}``

magic drift
#

import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.HashMap;
import java.util.Map;

public final class Rank extends JavaPlugin {

    @Override
    public void onEnable() {
        // Plugin startup logic
        public enum Rank {
            Player(ChatColor.GRAY + "PLAYER"),
            Owner(ChatColor.GOLD + "OWNER"),
            Admin(ChatColor.RED + "ADMIN"),
            Dev(ChatColor.DARK_PURPLE + "DEVELOPER"),
            Helper(ChatColor.GREEN + "HELPER"), prefix(;);

            Private Final
            String Prefix;

            Rank(String Prefix) {
                this.prefix = prefix;
            }

        }

        Map<Player, Rank> =new HashMap<>();

        public void setRank (Player player, Rank rank){
            ranks.put(player, rank);
        }

        public Rank getRank (Player player){
            return ranks.get(player);
        }

        public void loadRank (Player player){
            String rankString = getConfig().get(player.getUniqueId() + ".rank");
            Rank rank = (rankString == null) ? Rank.NONE : Rank.valueOf(rankString);
            player.setDisplayName(prefix.get(rank) + player.getName());
            player.setPlayerListName(prefix.get(rank) + player.getName());
            ranks.put(player, rank);
        }

        public void saveRank (Player player){
            getConfig().set(player.getUniqueId() + ".rank", ranks.get(rank));
            ranks.remove(player);
        }

    }

}

if (getRank(player) == Rank.Owner) {
    player.
        }```
tardy delta
#

now add java after the ```

magic drift
#

import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.HashMap;
import java.util.Map;

public final class Rank extends JavaPlugin {

    @Override
    public void onEnable() {
        // Plugin startup logic
        public enum Rank {
            Player(ChatColor.GRAY + "PLAYER"),
            Owner(ChatColor.GOLD + "OWNER"),
            Admin(ChatColor.RED + "ADMIN"),
            Dev(ChatColor.DARK_PURPLE + "DEVELOPER"),
            Helper(ChatColor.GREEN + "HELPER"), prefix(;);

            Private Final
            String Prefix;

            Rank(String Prefix) {
                this.prefix = prefix;
            }

        }

        Map<Player, Rank> =new HashMap<>();

        public void setRank (Player player, Rank rank){
            ranks.put(player, rank);
        }

        public Rank getRank (Player player){
            return ranks.get(player);
        }

        public void loadRank (Player player){
            String rankString = getConfig().get(player.getUniqueId() + ".rank");
            Rank rank = (rankString == null) ? Rank.NONE : Rank.valueOf(rankString);
            player.setDisplayName(prefix.get(rank) + player.getName());
            player.setPlayerListName(prefix.get(rank) + player.getName());
            ranks.put(player, rank);
        }

        public void saveRank (Player player){
            getConfig().set(player.getUniqueId() + ".rank", ranks.get(rank));
            ranks.remove(player);
        }

    }

}

if (getRank(player) == Rank.Owner) {
    player.
        }```
tardy delta
#

dont just post it again...

peak depot
#

just ?paste

#

?paste

undone axleBOT
tardy delta
#

and what on earth is
Map<Player, Rank> =new HashMap<>();

magic drift
tardy delta
#

Private Final
String Prefix;

#

if (getRank(player) == Rank.Owner) {
player.
}

magic drift
#

idk i folloed This

tardy delta
#

you cannot define an enum in a function...

#

dont just paste in your main method bruh

#

you unlocked a new quest: go learn java

shadow night
#

exactly

shadow night
kind hatch
#

What the hell?

tardy delta
#

youre slow

kind hatch
#

No u

peak depot
#

is it to early to drop a ?learnjava

tardy delta
#

a bit

#

yes

echo surge
#

yes to what?

tardy delta
#

yes to your question

echo surge
#

alr ty

glossy laurel
#

World.spawn() a consumer of what class do I need to pass? I cannot figure it out whatsoever

#
                    @Override
                    public void accept(Entity object) {

                    }
                });``` that's what I have so far
#

what do I replace the consumer with?

#

alr, I figured it out :D

glossy laurel
halcyon hemlock
ornate mantle
#

can i make BlockDisplay entities with a custom player skull?

young knoll
#

No

#

But you can make item display entities with a custom player skull

slender elbow
#

block displays bad?

young knoll
#

Yes

ornate mantle
#

why

slender elbow
#

idk coll said so

ornate mantle
#

dont be a sheep

young knoll
#

She’s a cat

slender elbow
#

meow

young knoll
#

According to the ears anyway

slender elbow
#

the ears don't lie

#

I, however, might

young knoll
#

What about the hips

glossy laurel
#

how do I get the closest entity to X, that meets a certain criteria I get by passing it into a function?

#

am I being confusing

young knoll
#

You could get nearby entities and then further filter it

glossy laurel
#

wait that actually makes sense, I wouldn't even need entities that are further than X

#

lmfao

#

thx

blazing ocean
glossy laurel
#

in EntityTargetEvent, after cancelling it, how do I check if the target entities target is null (if it had a target before)

buoyant viper
glossy laurel
#

data packs, trust

#

(very spigot)

young knoll
#

There’s an event

#

LootGenerateEvent iirc

slender elbow
glossy laurel
#

Btw, when setting someones target you can make anyone attack anyone right?

young knoll
#

Yes

#

Well, not players or entities that don’t attack

#

Players have free will and entities that never attack don’t have the goals or attributes to do so

echo surge
#

?img

undone axleBOT
#

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

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

echo surge
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

glossy laurel
#

So like the description of the "setCancelled" says that if I setTarget to null it looses its target but if it cancel the event it regains the previous target

#

So how do I check if the precious target was null

#

Does noone actually know 😭

#

Also, I just realised my code didnt retarget anyone cuz I cancelled the event bruh

young knoll
#

It’s current target should be the previous target

slender elbow
#

The sentence has a slight grammatical issue. The word "current" should be preceded by a possessive pronoun, so the correct version would be:

"It’s its current target should be the previous target."

  • "It’s" is a contraction of "it is" or "it has," which is incorrect in this context.
  • "Its" is the correct possessive form, indicating that something belongs to "it."
eternal oxide
#

Emily wants a cookie

lone oracle
#

I've taken somebody's advice to make a Scheduler class where all runTaskLaters are handled. But my only issue is that I don't know how to add a runTaskLater to a List.
Right now I have:
ArrayList<BukkitTask> tasks = new ArrayList<BukkitTask>();
but idk how to add something like Java Bukkit.getScheduler().runTaskLater(Main.getPlugin(), new Runnable() { @Override public void run() { //anything } }, 1800);
Any1 able to help me?

paper viper
#

you can't really add the task to the list inside the task, take the BukkitTask you get from running that and add that to the List

glossy laurel
young knoll
#

getTarget should stay the same if you cancel the event

glossy laurel
young knoll
#

To check if the previous target is null you should just be able to do event#getEntity#getTarget

glossy laurel
#

No method

#

I couldn't find any methods for finding the target outside the target event

young knoll
#

You may need to check and cast to LivingEntity or something

clear elm
#

Are there some tutorials or something like that how to use gradle?

young knoll
#

Ah its Mob

#

Mob#getTarget

glossy laurel
#

Gotcha

#

And it's guaranteed that the entity in the event is a mob right?

young knoll
#

Not sure

glossy laurel
#

Alr

#

And one more, if I don't cancel the event, mob#getTarget would still be the previous target right?

young knoll
#

During the event yes

#

Right after the event it will be the new target

glossy laurel
#

Ight

#

Anyone happens to know if World#getNearbyEntities returns the entities in ascending order?

glossy laurel
#

Distance

drowsy helm
#

I beleive so

pseudo hazel
#

spent a few hours on my brand new never before seen super easy serialization

#

only to find out its actually just NBT like almost exactly 💀

paper viper
#

Wait @young knoll is the code you used to serve resourcepacks without a server port public?

#

Making a plugin using a pack and I don’t wanna write a whole http server implementation for it

pseudo hazel
#

I just put the pack on my github 😂

wet breach
eternal oxide
paper viper
pseudo hazel
#

oof

#

nvm then

#

start writing mr http

#

youll be done before sunrise, I trust you

wet breach
#

well apache already has libs that has like the majority of the stuff done

paper viper
#

Actually I already had a sever using a lib which did it for me

orchid gazelle
#

sever

paper viper
#

But I was interested in how he managed to do it without needing to port forward

#

Like an actual port

wet breach
pseudo hazel
#

imagine working on a server that has http blocked

#

can only be nasa

wet breach
#

that is the default port for http related things. Unless you specifically use something else like curl etc, java defaults to using port 80 for url connections

orchid gazelle
#

Not only java

#

80 is generally default for http

#

And 443 for https

paper viper
#

Do you think it won’t be used?

wet breach
#

yes, but depending on the language, url connections are not inherently port specific

paper viper
#

If I host like a mini daemon using it

wet breach
#

it is just that Java implemented 80 as the default if none is specified

young knoll
#

Which should already be forwarded cuz yknow, kinda need that to make the server work

paper viper
#

Ohhhh i see

pseudo hazel
#

big brain

blazing ocean
edgy crystal
#
            if (state instanceof Banner) {
                BlockData data = block.getLocation().getBlock().getBlockData();
                ((Banner) data).setBaseColor(faction.getBannerColor());
                ((Banner) state).setPatterns(faction.getBannerPattern());
                state.update();
            }```

why doesnt this change the basecolor ?
eternal oxide
#

you never use teh data

young knoll
blazing ocean
#

what a nerd

edgy crystal
# eternal oxide you never use teh data

mb, data doesnt work because it can not be casted.

                ((Banner) state).setBaseColor(faction.getBannerColor());
                ((Banner) state).setPatterns(faction.getBannerPattern());
                state.update();
            }```

this also doesnt work
eternal oxide
#

that looks fine

edgy crystal
#

yeah but it doesnt change the baseColor

lone oracle
eternal oxide
edgy crystal
#

yes

#

"BLUE"

#

it reads the props of a banner and sets them to others

eternal oxide
#

as in DyeColor.BLUE ?

edgy crystal
#

so it must be valid

edgy crystal
eternal oxide
#

looks like it should work to me

young knoll
#

Any errors?

edgy crystal
#

no

#

it jsut doesnt change

#

version is 1.16.5

young knoll
#

Sets the base color for this banner. Only valid for shield pseudo banners, otherwise base depends on block type

edgy crystal
#

ah thats shit

young knoll
#

You need to change the block itself

edgy crystal
#

cause there are 2 types of banner

paper viper
#

made your own ChannelInboundHandlerAdapter and then inject into all the connections of MinecraftServer