#help-development

1 messages · Page 1270 of 1

chrome beacon
#

unless you want to rely on data packs

#

hm right that's true

thorn isle
#

doing whatever /minecraft:reload does would probably be ideal

chrome beacon
#

yeah look at what that command does

fathom dirge
#

What do you mean? Seeing what that command does?

chrome beacon
#

Look at the nms code

fathom dirge
#

Ah okey thank you

#

Sorry i'm quite new to NMS and its a pretty steep learning curve lol

#

Wow just simply unfreezing and freezing without registering them again on reload fixed all the issues. Thank you so much!

sly topaz
#

I'd imagine everything would be broken if that happens

fathom dirge
#

No I meant the other way around my bad

sly topaz
#

I see

fathom dirge
#

i didnt leave them unfrozen haha

#

fixed it

sly topaz
#

if I had to guess, it works because the client sends the registry you already modified to the server so it remains unchanged unlike when you reload the server and registry gets reset causing a desync on the client

#

long shot, but if I remember correctly, that's how that works

fathom dirge
#

Thank you for the information. I do really wonder, where do you guys learn all this info? Because I'm trying to learn more about NMS and how everything works, but I can't seem to find any good documentation, courses or people that have bundled most info.

sly topaz
#

most people just look at the code honestly, it gets easier the more you get used to it

fathom dirge
#

I've been doing that yeah, but I don't feel like I'm really learning a lot from that haha

#

Every time i get into a new class there's 50 new classes to understand

sly topaz
#

there's also just taking bits and parts from other communities like the modding ones where they have more extensively documented these things as they deal directly with them unlike bukit derivatives

fathom dirge
#

I see

#

Mods don't use nms right? Cause they are client side

#

or am i wrong

sly topaz
#

well, that's not quite how that works. The client and the server aren't as tightly separated as you may think

#

So, while client mods touch mostly client-only code, things like registries and such are shared between the two codebases, singleplayer is really just an integrated server running on your desktop

chrome beacon
sly topaz
#

there's also nothing stopping mods to touch server-side only code, as you can also inject mod loaders like fabric in the vanilla minecraft server

chrome beacon
#

And mods definitely do interact with that

sly topaz
fathom dirge
#

Pretty confusing

sly topaz
fathom dirge
#

I see

#

I've been working on plugins on the safe side only using API's for a while

#

NMS is less fun lol

#

If you really get to know the workings its probably a lot of fun

#

because of all the possibs

sly topaz
#

that's surprising to hear considering there's people like Illusion that would rather create 26 classes just to use minecraft inventory internals instead of recreating that logic within the bounds of the API

#

most people prefer to use NMS where possible when the API feels lacking, and that's in more places than one would like

fathom dirge
#

Yeah but then you have to rewrite that for every version no?

#

Cause the code could change

sly topaz
#

though we're far better off than we were back in say, 1.8-1.12, the API was really lacking back then

fathom dirge
#

lmao

echo basalt
sly topaz
#

runs

echo basalt
#

My motives for going with nms on that is just the fine control I have

#

And skipping the headache of emulating every edge case scenario

sly topaz
# sly topaz yes and no

as long as you don't reference OBC, you could get away with something working for a couple of versions, it all depends whether whatever you're touching in the internals happens to be constantly changing or not

echo basalt
#

My usual method of learning something new within nms is to start at the craftbukkit layer

#

and just keep seeing where it references to

sly topaz
#

at least that's the case now that there's no version embedded the minecraft internal packages, but you'd ultimately reference OBC somewhere so it is all moot, but then you could also just do it through reflection and be happy as long as they don't change the behavior of whatever method you're calling

echo basalt
#

At a certain point you'll get somewhat familiar with some of the internal systems and then you can just skip half the steps and assume stuff

sly topaz
echo basalt
#

yeah no fml screw CraftItemStack

#

If you don't understand the craft layer just look at the nms one directly

sly topaz
#

really only works with Spigot though, when it comes to forks like Paper where they heavily modify internals you get to try and understand their logic rather than mojang's lol

echo basalt
#

I just use paperweight because gradle

#

ngl

sly topaz
#

it is mostly fine as long as you don't have to look at moonrise stuff

echo basalt
#

moonrise$getEntityLookup my beloved

#

lets me mess with entities async

wraith oasis
#

Hello, how can i like something like Persistent Data Container but on a block? im creating a building system and i need to mark the center block of a foundation and i dont really know how, I'd be really grateful if someone could help me. Version is paper spighot, maven and 1.21 ❤️

sly topaz
#

?blockpdc

undone axleBOT
wraith oasis
sly topaz
#

?whereami

echo basalt
#

brother wtf is that pfp

sly topaz
echo basalt
#

yeah no it's just a banger

umbral ridge
#

kinda nice

#

VIP vaults XD

grand flint
#

the vault gate is nice

cosmic elk
#

Would anyone know what packet deals with the display name? Like the overhead nametag and what not

chrome beacon
#

Of a player?

cosmic elk
#

Yes

chrome beacon
#

Part of the player info sent in the update packet

#

iirc

cosmic elk
#

i figured that it would be

#

thank you!

cosmic elk
valid shore
#

Would I need a datapack, texture pack or plugin to change the sky color, fog color, grass color of a custom dimension I'm making

young knoll
#

Datapack

#

Or a bunch of NMS shenanigans with a plugin

valid shore
#

thank you

chrome beacon
worn heron
#

I want to log when I do a pseudo left long press.How can I do that?(plugin)

wispy egret
#

why doesn't the minecraft development plugin work? (on Intellij IDEA)

inner mulch
drowsy helm
drowsy helm
#

?notworking

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.

worn heron
#

plugin.

drowsy helm
worn heron
#

this is left long press click

chrome beacon
#

It's a bit tricky to detect people holding left click

drowsy helm
chrome beacon
worn heron
#

umm

wispy egret
#

why cant I send screenshots?

remote swallow
#

?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

wraith oasis
#

hey, why this is not working? Im trying to add CustomBlockData dependency,

slender elbow
#

well, relocations are part of the shade plugin configuration, not the compiler plugin

#

and, did you try refreshing maven? there should be a lil' reload icon with the maven logo floating around

wraith oasis
#

into maven somewhere?

slender elbow
#

inside the maven-shade-plugin you already have in there, open a <configuration> block and put the relocations in there

wispy egret
#

why doesn't the minecraft development plugin work? (on Intellij IDEA)

slender elbow
#

it does work

#

you need to select MINECRAFT on the left

wraith oasis
wispy egret
#

and then?

#

how do I get this?

remote swallow
#

that is the old ui

wispy egret
#

then how do I know what to do?

remote swallow
#

you want to make a plugin so press plugin in groups, you want to make a spigot plugin so press spigot

#

then follow the rest of the steps the video might say, eg if they say gradle/maven press that

umbral ridge
umbral ridge
drowsy helm
#

Whens the last time you updated?

slender elbow
#

bro didn't even bother to take a screenshot 💀

mortal vortex
drowsy helm
#

Oh lmao

quaint mantle
#

Anyone familiar with a bossbar api?

slender elbow
#

Bukkit.createBossBar

drowsy helm
#

Whats the question

mortal vortex
#

are bossbars really such a complex feature or one which deserves its own library/API?

blazing ocean
quaint mantle
#

The avdenture api?

#

kyori or smth

wispy egret
#

I can't find how to change the group ID

thorn isle
#

try expanding optional settings

wispy egret
#

the optional settings

slender elbow
#

it would help if you stopped taking badly cropped screenshots lol

wispy egret
#

and what if it isnt there

slender elbow
#

it is there

#

the plugin is the same for you as it is for me

wispy egret
#

well I only have the optional setting

slender elbow
#

have you tried scrolling down?

wispy egret
thorn isle
#

oooooor paste the one dependency and one repository you need in your pom.xml and don't bother with the plugin

slender elbow
#

too much work

rotund ravine
wispy egret
unkempt pilot
#

I havee question how do I make player heads 😭

#

I tried doing Itemstack meta

#

it doesn't seem to work

wispy egret
#

have u watched tutorial

#

ore asked chat gpt?

unkempt pilot
#

chat gpt doo doo

#

it doesn't help me, but rather recommends other code of his

#

atp he is just flexing on my face

young knoll
#

?customheads

young knoll
#

Cool now I don’t have to search for the link anymore

umbral ridge
#

why does this still throw an exception?

chrome beacon
#

running old code

#

?

#

also what's the exception

umbral ridge
#

is this old code?

#

the server is in online mode

#

is there an alternative to setOwningPlayer

chrome beacon
#

That's not Spigot 🔫

umbral ridge
#

ehh potato potato same thing different story

buoyant viper
#

nyo

umbral ridge
#

the thing is, it does work for any existing player, who has premium minecraft, but still throws an exception (WARN) even though I catch it

blazing ocean
#

and this is why you use UUIDs

#

they're guaranteed to have a result

umbral ridge
#

i use uuids

blazing ocean
#

doesn't look like you are

thorn isle
#

findprofilebyname

echo basalt
#

fml I gotta emulate shift clicking with fake items

grim hound
#

is there some way to fully disable an entity's hitbox?

echo basalt
#

nms to make it have a size of zero

#

it'll noclip afaik

#

and it's purely server-sided

#

for client-side you uh

#

switch to bedrock

young knoll
#

Don’t teams work for that

sly topaz
young knoll
#

Well they didn’t specify if it’s every entity

#

Or just John the creeper over at the creeper arcade

wispy egret
#

why are there so many errors?

sly topaz
wispy egret
#

how

sly topaz
# wispy egret how

in the toolbar, Help -> Check for Updates then select Download Update and Restart

wispy egret
#

where can I find download and restart?

sly topaz
#

and then it'll ask you to restart once it finishes downloading the update

wispy egret
#

hey could u go in the voicechat real quick cause it doesn't work

sly topaz
#

I do not have a microphone right now but sure

wispy egret
#

u just have to look

stuck oar
#

Just wondering if anyone could help here, ive got a private list that determines who is in this settings gui, Ive added a debug to display the list when i open the gui it displays fine but when i run my inventoryClickEvent it has removed me from the list and I do not know why. Ill paste code

#

?paste

undone axleBOT
young knoll
#

My guess is that you are creating multiple instances of that class

eternal oxide
#

do not call closeInventory in a click event

young knoll
#

And the one you are calling openSettingsGui with is not the same one that is registered to handle the event

eternal oxide
#

ignore me, I didn;t see it was scheduled

young knoll
#

The list is different for each instance

stuck oar
#

Can remove that if needed though

young knoll
#

That’s how objects work

stuck oar
#

So its wrong because im calling openSettingsGui from a different class/

eternal oxide
#

with this code closing ANY inventory will result in the player beign removed from the list

stuck oar
#

I mean the ide also told me the check for if they were in the list was unnecessary

stuck oar
young knoll
#

That’s because the remove call is just a no-op if they aren’t in the list

young knoll
#

And pass it to whatever needs it

stuck oar
#

Im creating one in the subcommand class and in the main class for listener registry

#

Ill have to make it static or move the listeners

#

Which is best to do?

young knoll
#

?di

undone axleBOT
young knoll
#

You don’t need to do either

stuck oar
#

How come?

thorn isle
#

something doesn't need to be static to be shared for multiple classes to access

slender elbow
#

impossible

#

can't do it otherwise

young knoll
stuck oar
#

So dont make it static but how do I call it from a different class without it being a new instance

thorn isle
#

see the link

#

you create one instance and then you pass it around

#

typically as a parameter to the constructor of the class which needs it

stuck oar
#

What like create the instance on enable and then just get it from the main class?

thorn isle
#

create the instance on enable yes

stuck oar
#

Alright thanks, ill try that

thorn isle
#

then either

  • pass it to the receiver class, or
  • expose it in a getter on the main class and have the receiver class get it
#

for further questions ideally consult the link first, it's written for people with precisely your problem in mind

stuck oar
#

Still having the same issue but im using the instance from onEnable(), Ill try find what im looking for in the ?DI

#

?di

undone axleBOT
stuck oar
#

Nevermind just me being stupid because i forgot to change the registerEvents()

#

Thanks for the help

ornate patio
#

is it possible to cancel generating chunks

#

but still allow them to generate later on

#

for context i want to disable chunk loading if the player's velocity is above a certain threshold

wooden dove
#

I updated to 1.21.5 and all my text related stuff seems broken

#

I checke the 1.21.5 announcement and it says there are no API changes???

#

everything relating to Component or NamedTextColor is red

young knoll
#

That’s not spigot

#

That’s part of the adventure api, which isn’t built into spigot

wooden dove
#

how do I do text colors in spigot then?

young knoll
#

ChatColor

wooden dove
#

can you still do styles etc?

#

like bold

#

maybe I should just install the adventure api, it came default when I installed paper 1.21.4

#

does it not exist for 1.21.5?

young knoll
#

Spigot isn’t paper

wooden dove
#

inst paper built on spigor or something

young knoll
#

Doesn’t mean everything in paper is part of spigot

#

Also not anymore

#

They hardforked

wooden dove
#

oh

#

wish they would make some kind of explanation of what changed

#

every time forge or paper or anything updates I have to try and figure out the new way to do every little thing

young knoll
#

I mean I don’t think paper has changed anything about adventure

wooden dove
#

but they must have removed it, I can't even find like a changelog or anything

young knoll
#

You aren’t using paper

#

Paper 1.21.5 isn’t even out yet

#

Blame @eternal night

wooden dove
#

I think its an expirimental build

#

it let me build with compileOnly("io.papermc.paper:paper-api:1.21.5-R0.1-SNAPSHOT")

sullen marlin
#

?whereami

echo basalt
sly topaz
#

Mojang’s code is often too tightly coupled with itself to be usable as API as is

echo basalt
#

I wrote a huge abstraction to make it work as a nice API

#

it's just that I have some use cases where I want even more control

#

Like, for example, having an item that works as a sort of indirect slot

#

Where I can deposit / withdraw items from it, shift-click, number keys etc

earnest girder
#

if I put another world folder in my server folder called "world2" and then do this in onEnable:```java
new WorldCreator("world2").createWorld();
Bukkit.getWorld("world2"); //this works later?

misty oak
#

Dich

earnest girder
#

what folders/files would I need in the second world folder?

worthy yarrow
earnest girder
#

so if I put a new world folder in the server folder thats enough? Or are you saying I just have to use WorldCreator on server startup?

worthy yarrow
#

World creator is to create worlds, it makes the folder automatically… you don’t have to manually make a folder in the server

earnest girder
#

and once it creates the folder the first time it will just get the world from the folder when I call createWorld?

#

do i even need createWorld here or not

worthy yarrow
#

If you’re making a new world yes

earnest girder
#

I just want to be able to send players between 2 already made survival worlds

worthy yarrow
#

So then you only ever need to create 2 worlds, once they are made you never have to use the world creator again

worthy yarrow
#

Just get them by Bukkit.getWorld

earnest girder
worthy yarrow
#

Total, when a world is created a new directory pops up to hold all that world data which is permanently in your server (unless otherwise deleted), to load them you call bukkit.getWorld

earnest girder
#

so I dont need createWorld, I can just put it in manually

worthy yarrow
#

If you have preexisting world directories, you can try copying them over to the server -though that’s been known to cause issues with data corruption- if this is the case then you can just get references and load them with getWorld

earnest girder
#

ok thanks

#

so if I put any world folder into the server folder, Bukkit#getWorld() will work?

worthy yarrow
#

Should

#

There’s obviously other factors, ie: your server is running a different version than the world was created for and stuff like that so just be aware

earnest girder
#

why wouldnt that be an issue with the already existing worlds?

worthy yarrow
#

Because the default worlds created with your server were made using the objects native to the version of the server

earnest girder
#

oh, but if I put in a world made on the correct version, and uploadupdate spigot later, that world will still work?

worthy yarrow
#

I mean it should, you just have to try

earnest girder
#

im confused, would the new world be treated exactly the same as the default one or not

worthy yarrow
#

Treated can mean a lot of things, it’s still a usable world object to the server but the issue lies within the worlds actual data, for example you may be running an older version of spigot but trying to use a new world… perhaps there are chunks in the new world the sever is not aware of - blocks, mobs, etc - these kinds of thing

gray saddle
#

ever since i switched my nms version to 1.21.4 from 1.21.1 i've been getting this error for some reason

[03:50:56 WARN]: java.lang.IllegalAccessException: Can not set static final int field net.minecraft.server.level.ServerPlayer.ENDER_PEARL_TICKET_RADIUS to net.minecraft.server.network.ServerGamePacketListenerImpl
[03:50:56 WARN]:        at java.base/jdk.internal.reflect.FieldAccessorImpl.throwFinalFieldIllegalAccessException(FieldAccessorImpl.java:137)
[03:50:56 WARN]:        at java.base/jdk.internal.reflect.FieldAccessorImpl.throwFinalFieldIllegalAccessException(FieldAccessorImpl.java:141)
[03:50:56 WARN]:        at java.base/jdk.internal.reflect.MethodHandleIntegerFieldAccessorImpl.set(MethodHandleIntegerFieldAccessorImpl.java:107)
[03:50:56 WARN]:        at java.base/java.lang.reflect.Field.set(Field.java:836)

my npc spawning was working just fine until i updated..
and setValue(corpse, "c", ((CraftPlayer) p).getHandle().connection); is the issue

earnest girder
worthy yarrow
#

Yeah pretty much, when it comes to the code you get the reference from getWorld and you can do whatever from there

earnest girder
#

ok thanks

worthy yarrow
gray saddle
worthy yarrow
#

?mapping

#

?mappings

undone axleBOT
gray saddle
#

ty!

worthy yarrow
#

❤️

gray saddle
#

ah just found it! it's now "f" instead of "c"

paper viper
random compass
#

💀

ornate patio
#

is there way to temporarily stop loading chunks

#

just want to avoid loading chunks if the player's velocity is higher than a set threshold

wet breach
ornate patio
eternal oxide
#

what is your end goal as preventing chunk loading sounds a bad idea

#

from what you described you would end up with a player flying off into the void with no chunks and no collision checks

#

why not cap their velocity instead

mortal vortex
#

is EntityChangeBlockEvent the right event for if a player trampels on like farmland?

wet breach
mortal vortex
#

in NMS, how could one Inject a custom pathfindergoal into a mob, like how EntityCreeper avoids EntityCat?

crude zephyr
#

is there a way to allow sharpness on tridents using a plugin?

#

(ping me please)

drowsy helm
drowsy helm
mortal vortex
mortal vortex
crude zephyr
#

the plugin info doesn't say much

drowsy helm
#

What are you looking at

crude zephyr
#

spigot overview

#

but I clicked on the GitHub link to see the config

#

reading it now

drowsy helm
#

You can apply it but will have to handle interactiom yourself

crude zephyr
#

so we would need to find a fix so it would work your saying?

drowsy helm
#

Are you writing your own plugin?

crude zephyr
#

either i would try but fail awfully or id commission someone else

drowsy helm
#

This channel is for plugin development

#

So you’re just looking for an already made plugin?

crude zephyr
#

im talking to someone who codes plugins and i asked if it could be done, they said idk so im asking here if its possible

drowsy helm
#

It definitely is possible

#

Wouldnt be particularly hard really

crude zephyr
#

ok

#

ill think about it
if i shoud commission

#

thanks anyways

drowsy helm
#

Not really that niche of a plugin. Im sure theres something public out there

smoky anchor
#

Would literally be one file of "functional stuff"

crude zephyr
crude zephyr
smoky anchor
#

ok maybe a tad bit more, but still very primitive

#

Either add the trident into this tag (image) to allow the trident to have sharpness via anvil
or create new tag, put #enchantable/sword in it with trident
and change out primary_items in sharpness file
So it can be obtained via enchanting table

#

I would 100% prefer the datapack over a plugin

somber scarab
#

hi guys

#

its me again 🩰

#

I just wanted to ask if I made a custom chunkGen plugin would it work right away if I use Multiverse's api with it?

eternal oxide
#

So long as you load your gen before Multiverse

somber scarab
#

hm. my plugin that uses MV can depend on my gen

#

that should work then

somber scarab
#

OH YEAAAAA

hushed spindle
#

i wanna modify villager gifts, is there any way to do so or is there some way to detect when a villager is spawning an item?

tranquil quail
#

Hey, if anyone wants a server dev, I can be a cheap paid developer! I can provide custom guis and even icons!

hushed spindle
#

not the right place to do that

tranquil quail
#

Oh my bad

blazing ocean
#

?services

undone axleBOT
smoky anchor
hushed spindle
#

think im gonna see if Item#getThrower() returns the villager's UUID on an ItemSpawnEvent

#

and just ignore the result if its food, i dont think they throw anything else on other occasions

torn shuttle
#

well

#

finally got around to making an ai tool to autotranslate my plugin

#

the config file just for the translations is 28953 lines long

#

it takes ai 1 hour per language

#

tbf based on feedback from people it was taking them between 3 days to two weeks to translate it themselves

#

it's a lot of text

hushed spindle
#

lmao yeah, good tool to have. mine's only 3k lines long but it also takes people a long time to translate, 3 days is mad impressive for 10x that amount

#

you got some crazy users

torn shuttle
#

like 12+h a day I am pretty sure

#

to be fair though in these translations are quite literally thousands of items and hundreds of quests

#

the line count alone doesn't really make it justice

lavish vine
#

altho it detects icon.png

#

it shows up in modmenu

hushed spindle
#

this isnt really a fabric dev server so you're probably not gonna get a response from anyone here

lavish vine
#

ah okay

blazing ocean
lavish vine
#

alright i'll try there, thanks

ornate patio
ornate patio
grim ice
#

if you're not gonna load the chunks then the player won't be able to see them

#

he's just gonna be looking at an empty sky while flying

fervent gale
#

is there a way to allow ANYTHING to go into a brewing stand from a hopper? i know blocks and stuff get cancelled out but how do I allow it?

grand flint
#

Recipes with datapacks

ornate patio
#

i just want to write this optimization plugin so i could actually use my elytra launcher

ornate patio
eternal oxide
ornate patio
#

i'd want it to only load chunks if the player's speed is like under 500 blocks per second or something

eternal oxide
#

can't be done in a plugin

ornate patio
eternal oxide
#

yes you can stop them loading, by teleport to destination

ornate patio
#

i don't want to use cheats

eternal oxide
#

why would you want a player to fly through the void with no chunks, just so they could go fast?

ornate patio
#

my server is just a pure vanilla smp server no commands. we only have a few plugins that dont change gameplay

ornate patio
#

if i want to travel 100k blocks away from my base

#

maybe to find a newly released biome or something and i need to travel far out from already-generated chunks

eternal oxide
#

Thats what teleport is for. You can;t "travel" without loading chunks on the way.

fervent gale
#

not using datapacks, using kotlin or java and i can convert if i get a general idea

grim ice
#

you can't be inside an unloaded chunk

#

or maybe you can, not sure tbh

eternal oxide
#

If you want to simulate it, shoot them upwards fast, teleport them to the destination and let them fall

fervent gale
#

because I don't want dAtApacKs

grand flint
#

why wouldnt u want datapacks

#

its a server feature

fervent gale
#

oml

grand flint
#

it is not that deep buddy

#

u can code the datapack function into the plugin

#

its the same exact thing either way

#

go see how oraxen does it on github

fervent gale
grand flint
#

well id do it w datapacks just wait for someone else to reply

grand flint
fervent gale
#

No InventoryMoveItemEvent except for Composting.

grand flint
#

its nothing to do with inventory move item event lol

fervent gale
#

then wtf it's why i'm lost

grand flint
#

u basically need to register it

#

aka datapacks LMAO

fervent gale
#

WHY BE AN ASS

grand flint
#

YOU NEED TO TELL THE CLIENT??

fervent gale
#

HOW

grand flint
#

DATAPACKS 😭

fervent gale
#

OML I DONT WANT DATAPACKS

grand flint
#

then look thru oraxen it has that behaviour

fervent gale
#

a nice person would point me in the right direction dick weed

grand flint
#

i gave u 2 ways and sent a whole plugin that is litearlly all about custom behaviour lmao

#

anyways enough of this just wait for someone else to reply

fervent gale
#

God you're unbearable have a good day

#

=======================

i'm trying to allow ANYTHING to go into hoppers into brewing stands
not using DATAPACKS, using kotlin or java and i can convert if i get a general idea

smoky anchor
#

lmao, you can't even create potion recipes using datapacks
all are still hard coded :)

#

I never tried to do what you're trying to do but I think it's not possible with API
And it may be difficult with NMS
-# easiest would most likely be mixins haha

grand flint
#

if the source or destination is a hopper

smoky anchor
#

That's not what they're trying to do...

grand flint
#

cancel it maybe

#

ik what he is trying to do but im pretty sure only datapacks can do it

#

or oraxen does it

smoky anchor
#

again, datapacks can't
there is no brewing recipe type
or any other mechanism I can think of
unless

grand flint
#

he said hopper

#

also wait wtf doesnt anything can already go into hoppers LMAO

fervent gale
grand flint
#

what are u saying u said u want anything to go into hoppers

#

cant everything go into hoppers already?

fervent gale
#

I want anything to go from HOPPERS into BREWING STANDS

#

the input slots

grand flint
fervent gale
#

my apologies for mistyping my original question

smoky anchor
#

you said it wrong twice lul

#

anyways, no tag exists either
so unless some event fires for this (which I doubt) you'd have to modify the block entity itself
which is NMS and very painful probably
I can't think of a better way :D
Idk what oraxen is or what it does, if it can do that then go ask the devs

grand flint
#

cant u get the brewing stands inventory and put it there manually using onInventoryMoveItem

smoky anchor
#

I guess you could manually track all hoppers that point into a brewing stand

grand flint
#

yeah just do that

#

if source is a hopper destination is a brewing stand

#

cancel the event and put it in ur self

smoky anchor
#

ye no, I don't think that event ever fires tho

grand flint
#

then test it first silly willy

smoky anchor
#

well ye I'm reading that now too :D

grand flint
#

@fervent gale if source is hopper and destination is brewing stand then cancel event and move item manually

#

get the brewing stand from the destination and set its inventory

#

wow look who helped u the unberable ass did

#

L racist

#

if it works im expecting a apology paragraph in my dms

fervent gale
#

L Karen

quartz relic
#

To get cords to update on tablist I would use a runnable to update the tablist every X seconds?

ornate patio
#

because i want them to fly off into the distance and then glide around and find where they want to land

#

and the speed that the launcher sends the player is variable, the longer its charged the farther the player gets shot

#

then again its supposed to be a basic no cheats vanilla server, was hoping that i could supress the chunk loading as an optimization

#

because the launcher works fine on vanilla

autumn ingot
#

hey all quick question, im making a plugin that "rolls back" worlds at a point in time based on whenever you snapshot them. for some reason though World#setAutoSave isn't working. the plugin works fine except for the fact that the world just doesnt reset to its old state, whenever i make any changes they persist. am i doing something wrong?

// Snapshot method
public void snapshotWorld(World world) {
    world.save();
    world.setAutoSave(false);
    snapshottedWorlds.add(world);
}
// Restore method
Bukkit.getOnlinePlayers().forEach(player -> player.teleport(safeWorld.getSpawnLocation()));
snapshottedWorlds.forEach(world -> {
    Bukkit.unloadWorld(world, false);
    Bukkit.createWorld(new WorldCreator(world.getName()));
    world.setAutoSave(false);  // Still don't want it to auto-save.
});

edit: i couldnt figure it out, but ultimately this solution is just janky. i'd recommend copying the world files instead. also, remember to not rely on World objects because they can nullify when you unload/reload the world

thorn isle
#

disabling autosave doesn't disable saving on shutdown/world unload

#

iirc all disabling autosave does is keeps all of the loaded chunks in-memory permanently

autumn ingot
#

isnt that why the save parameter is there

thorn isle
#

presumably that would work yes

eternal oxide
#

Default worlds can not be unloaded

autumn ingot
eternal oxide
#

k

autumn ingot
#

?

thorn isle
#

can you identify maybe based on the last-accessed timestamps of the region files whether the saving occurs when you try unloading the world or before, while autosaving is supposed to be turned off

autumn ingot
#

thats a good idea, let me try that out

sly topaz
#

also check whether unloadWorld returns true

autumn ingot
#

will do

thorn isle
#

if it isn't a default world and you're disabling autosaving and passing false for save on unload, apart from an impl error i think it should work

sly topaz
#

also, are you using Spigot or Paper?

autumn ingot
sly topaz
#

I also wouldn't be sure, but I asked to check whether they change anything that might

autumn ingot
#

i can try running it on a spigot server just to see

sly topaz
#

that works too

autumn ingot
#

let me check the region files

sly topaz
#

so the world unloading isn't the issue, if anything

thorn isle
#

it definitely shouldn't be the issue, but maybe try waiting a few seconds in between unloading and loading the world

#

i generally speaking distrust the region file cache

autumn ingot
#

unless im going insane, the timestamps on the region files arent actually changing at all, regardless of when i roll back

#

but i honestly dont trust windows file explorer so ill take that with a grain of salt

thorn isle
#

that'd indicate some sort of chunk/region cache fucknuggetry

sly topaz
#

yeah, it's most likely the region cache not being cleared

#

probably a paper thing

#

try with spigot

thorn isle
#

iirc region files do have their last modified metadata updated by the server on windows

#

not sure what file explorer shows, i haven't used the stock file explorer on windows for like a decade

sly topaz
#

it just shows the file metadata, shouldn't be wrong since it doesn't cache it

near furnace
#

I can't seem to get this library onto my plugin

#

Asks me to "shade" the library

#

and when I try to shade I get hit with this error: Error creating shaded jar: Unsupported class file major version 65 -> [Help 1]

autumn ingot
near furnace
#

anyone ever shaded libraries before?

thorn isle
#

let's see the build script

near furnace
thorn isle
#

yes

#

i remember there being corner cases where you have to manually specify a higher asm version for the shade plugin

sly topaz
#

?paste

undone axleBOT
thorn isle
#

but the error could also just be you running/building with java 8 or something while the library you're trying to shade is java 16 or whatever 65 is

near furnace
#
    <build>
        <defaultGoal>clean package</defaultGoal>
        <plugins>
            <!-- Compiler plugin configured for Java 21 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <release>21</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.5.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <relocations>
                                <relocation>
                                    <pattern>com.github.obliviate</pattern>
                                    <shadedPattern>com.zitemaker.libs.obliviate</shadedPattern>
                                </relocation>
                            </relocations>
                            <minimizeJar>true</minimizeJar>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>com.github.hamza-cskn.obliviate-invs</groupId>
            <artifactId>core</artifactId>
            <version>4.3.0</version>
        </dependency>
    </dependencies>
near furnace
thorn isle
#

this doesn't seem like the entire file

near furnace
#

i had to trim it down

#

discord character limit per message

kind hatch
#

?paste

undone axleBOT
thorn isle
near furnace
#

don't download random things i send you

#

🤫

near furnace
thorn isle
#

try throwing in

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <asm.version>9.1</asm.version>
    </properties>

for properties

#

and then uh

sly topaz
thorn isle
#

and then under the maven shade task

                <dependencies>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm-commons</artifactId>
                        <version>${asm.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                        <version>${asm.version}</version>
                    </dependency>
                </dependencies>

manually specify the asm version

near furnace
sly topaz
#

that said, why are you trying to use this library, it seems like it is barely updated

thorn isle
#

so like

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>...</version>
                <configuration>...</configuration>
                <executions>...</executions>
                <dependencies>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm-commons</artifactId>
                        <version>${asm.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                        <version>${asm.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
chrome beacon
#

Update the Maven Shade Plugin

thorn isle
#

that will probably also work

#

🤡

chrome beacon
#

3.6.0 is the latest version

near furnace
#

4.3.0 will be the version right?

thorn isle
#

uh

sly topaz
#

that is the version of the library, not of the maven shade plugin

chrome beacon
#

that's not the maven shade plugin?

thorn isle
#
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
#

this version here

sly topaz
#

that one is the maven compiler plugin, but yeah, same deal

thorn isle
#

oh yeah 🤡

sly topaz
#

latest version of the maven compiler plugin is 3.14.0 so maybe update that too

near furnace
#
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.5.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <relocations>
                                <relocation>
                                    <pattern>com.github.obliviate</pattern>
                                    <shadedPattern>com.zitemaker.libs.obliviate</shadedPattern>
                                </relocation>
                            </relocations>
                            <minimizeJar>true</minimizeJar>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm-commons</artifactId>
                        <version>3.11.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                        <version>3.11.0</version>
                    </dependency>
                </dependencies>
            </plugin>```

this good?
near furnace
thorn isle
#

you probably won't need the explicit asm version with the updated shade plugin

#

xml

sly topaz
thorn isle
#

since, well, this is xml

#

i still use shade 3.1.0 🤡 i'm not very good about keeping my build scripts up to date

near furnace
#
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.11.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <relocations>
                                <relocation>
                                    <pattern>com.github.obliviate</pattern>
                                    <shadedPattern>com.zitemaker.libs.obliviate</shadedPattern>
                                </relocation>
                            </relocations>
                            <minimizeJar>true</minimizeJar>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm-commons</artifactId>
                        <version>3.11.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                        <version>3.11.0</version>
                    </dependency>
                </dependencies>
            </plugin>
``` this good?
kind hatch
thorn isle
#

the explicit asm versions can probably be omitted with the updated shade plugin

#

but try it and see

near furnace
kind hatch
#

It’s different

#

3.6.0

near furnace
#
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <release>21</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.11.0</version>```

it does
kind hatch
#

Read my messages

thorn isle
kind hatch
#

You have the wrong version

near furnace
#

oh so replace all the 3.11.0 with 3.6.0

thorn isle
#

despair

kind hatch
#

Yes

near furnace
#
<dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm-commons</artifactId>
                        <version>3.11.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.ow2.asm</groupId>
                        <artifactId>asm</artifactId>
                        <version>3.11.0</version>
                    </dependency>
``` and these two versions will be? 3.11.0 isn't workin
sly topaz
#

just remove that

#

remove the whole dependencies block inside the maven shade configuration

near furnace
#

gentleman named vcs2 told me to put it there

sly topaz
#

and I am telling you to just remove it, it isn't necessary anymore

near furnace
#

ok done but warnings

#
[WARNING] PlayerControl-1.0.0.jar, UniversalScheduler-0.1.6.jar, core-4.3.0.jar, database-2.0.6.jar, obliviate-utils-2.0.6.jar, placeholder-2.0.6.jar, string-2.0.6.jar, version-detection-2.0.6.jar define 1 overlapping resource: 
[WARNING]   - META-INF/MANIFEST.MF
[WARNING] UniversalScheduler-0.1.6.jar, core-4.3.0.jar define 2 overlapping resources: 
[WARNING]   - META-INF/maven/com.github.Anon8281/UniversalScheduler/pom.properties
[WARNING]   - META-INF/maven/com.github.Anon8281/UniversalScheduler/pom.xml
[WARNING] maven-shade-plugin has detected that some files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the file is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See https://maven.apache.org/plugins/maven-shade-plugin/```
sly topaz
#

just ignore those

kind hatch
#

Warnings are meh

near furnace
#

my OCD ass can't

kind hatch
#

Sometimes they are genuinely useless

near furnace
#

any way to remove them? or resolve them?

sly topaz
#

you have to exclude the paths it says so that it stops complaining

thorn isle
#

exclude the META-INF path in your shade configuration

near furnace
#

oh wait

near furnace
sly topaz
#

look at the second example on the link I sent

near furnace
#

ok so add these

<excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
sly topaz
#

yeah, with the filter block too

near furnace
#

maven sucks.

sly topaz
#
<filters>
  <filter>
  <artifact>*:*</artifact>
  <excludes>
    <exclude>META-INF/MANIFEST.MF</exclude>
    <exclude>META-INF/maven/com.github.Anon8281/UniversalScheduler/pom.properties</exclude>
    <exclude>META-INF/maven/com.github.Anon8281/UniversalScheduler/pom.xml</exclude>
  </excludes>
  </filter>
</filters>

in your case you need this

sly topaz
thorn isle
#

i doubt any part of the meta-inf will be needed at runtime so it could probably be excluded in whole

sly topaz
#

if they end up adding a library which makes use of service loader then the service locations will be stored in the meta-inf

near furnace
#
<configuration>
                            <relocations>
                                <relocation>
                                    <pattern>com.github.obliviate</pattern>
                                    <shadedPattern>com.zitemaker.libs.obliviate</shadedPattern>
                                </relocation>
                            </relocations>
                            <minimizeJar>true</minimizeJar>
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
- META-INF/maven/com.github.Anon8281/UniversalScheduler/pom.xml
maven-shade-plugin has detected that some files are
present in two or more JARs. When this happens, only one
single version of the file is copied to the uber jar.
Usually this is not harmful and you can skip these warnings,
otherwise try to manually exclude artifacts based on
mvn dependency:tree -Ddetail=true and the above output.
See https://maven.apache.org/plugins/maven-shade-plugin/
#

still error in red

thorn isle
#

reading errors also helps

#

here it tells you the exact duplicate file

#

and it ends in .xml

#

however you have only excluded .sf, .dsa, and .rsa

near furnace
#

nice works fine now

#

but how could i know what to exclude

thorn isle
#

by reading what it says

near furnace
#

i just copied whatever was in the docs

sly topaz
#

the error tells you

thorn isle
#

you need to read more copy less

near furnace
sly topaz
#

I mean, whatever makes you feel better

thorn isle
#

lol

near furnace
#

ok NICE

#

now finally i can use the obliviateinv library right?

thorn isle
#

supposing it is usable and actually works, yes

sly topaz
#

yes, however I wouldn't recommend using a library which hasn't received updates in 2 years

near furnace
#

but sadly i don't know how to use that library

thorn isle
#

we told you earlier

sly topaz
#

I told you way earlier

thorn isle
#

you just didn't read

near furnace
#

oh yea

near furnace
#

anyways what library will be best

#

for GUIs

thorn isle
#

depends on what you're doing

#

in most cases i'd almost wager that doing it directly with the bukkit api is the least hassle

near furnace
near furnace
sly topaz
rotund ravine
#

I’m sorry if u can’t read this might not be the profession for you

sly topaz
#

usually just following that one smile resource is good enough for most people

thorn isle
#

tan juck says the quiet part out loud

near furnace
#

suppose, instead of getCommand("noob").setExecutor(new NoobCommand(this));
to registerCommand("noob", NoobCommand(this));

#

isn't this what libraries do?

#

make things simpler

sly topaz
#

?gui

thorn isle
#

i suppose maybe

near furnace
sly topaz
#

^ read that thread, if that doesn't seem enough for whatever you're trying to do, then you may use one of the libraries I suggested

near furnace
#

problem solved 😄

#

now new problem is to make the actual GUI

trim quest
#

3.11 works ?

thorn isle
#

he's from the future

trim quest
#

latest version is 3.6.0, i mean how it works

sly topaz
#

I feel like someone did not see the "see new messages" popup when reading the convo kek

thorn isle
#

it doesn't, he's using 3.6.0 after a dozen or so round trips

trim quest
#

didnt see mb

sly topaz
#

Y2K didn't get to finish his inventory stuff so it is unclear whether one is supposed to use MenuType#create or just keep using Bukkit#createInventory tbh

near furnace
#

all that just to decide to stick to Bukkit's api

sly topaz
#

Otherwise no

ivory sleet
#

:(

#

I mean its a bit hard since the new menu api just ties to views- and containers are only accessible from views when using views, correct me if Im wrong

#

Whereas if u decide to use createInventory per say and keep track of the inventory instance urself

thorn isle
#

i think the performance impact from inventory holders is considerably lesser now after mojang overhauled itemstacks

#

itemstack::clone is fairly cheap now, even for clown-tier metadata like shulker boxes filled with written books

#

and most of the blockstate snapshot cost comes from having to clone the contents

#

to be fair i haven't benchmarked this on spigot (since nobody uses spigot) but from what i know it shouldn't be catastrophic on spigot anymore either

eternal night
#

heh

#

that'd be true if snapshot creation of block entities somehow just called itemstack#clone

thorn isle
#

don't tell me it converts them into bukkit stacks with ItemMeta

eternal night
#

no

#

its worse

#

BlockEntitiy does not have any form of mojang maintained copy functiojn

#

|| it has to save it to NBT and load again ||

thorn isle
#

🤡

eternal night
#

will be fixed once block entities are fully using components

blazing ocean
#

kekw

eternal night
#

but like, before that yea

#

getBlockState() is a full on death sentence, hence why one passes false

ornate patio
thorn isle
#

use paper and disable moving into unloaded chunks in the settings

#

on vanilla glhf

#

if you're asking how to get your server to not crash from having to load 60k blocks' worth of chunks per second, the answer is basically that you don't

#

if you're loaded with cash you can ask NASA if you can rent one of their supercomputers for a bit

#

alternatively, get a teleport plugin

cosmic elk
#

When making a new PlayerProfile object, the name of it can only include characters that only Mojang allows, so I cant add spaces or anything like that, is there a way around this?

upbeat silo
#

Hey, I'm working on a plugin for Minecraft 1.21.1 and I want to show the "Riptide" enchantment animation to the player. How can I trigger the animation that normally appears when the enchantment is used? Is there a way to show this animation directly in the game? Can you help me out with this?

drowsy helm
#

?xy

undone axleBOT
cosmic elk
#

I'm trying to make a simple nickname API for future plugins, everything ive found online is either outdated or not helpful at all

#

but after getting frustrated with protocol lib I accidentally found this method and its the only one thats even worked after a few days of trial and error

drowsy helm
#

I'm sure that you should be able to use reflection

#

but it will definitely break things

cosmic elk
#

What is reflection exactly?

drowsy helm
#

being able to change variables and methods during runtime

cosmic elk
#

So if I'm understanding this right, I could change how the SpigotAPI works?

drowsy helm
#

No, reflection doest change execution

#

you can just change variables that wouldn't usually be accessible

sly topaz
#

the workaround is to just use holograms/text displays mounted on the player

cosmic elk
#

Well it would probably be easier, but still a lot of bugs id imagine

sly topaz
#

it is easier and shouldn't have a lot of bugs since it's all supported by the API

#

only thing you have to do is spawn them on join and maybe delete the entity on quit

cosmic elk
#

I think id rather do it with ProtocolLib honestly

sly topaz
#

I mean, you can do whatever you want

#

that still doesn't get rid of the limitation you mentioned, though

cosmic elk
#

it wouldnt?

sly topaz
#

if you send an invalid username, the client will probably get kicked as that's also checked in the client

#

you can try though, maybe it isn't an issue anymore

sly topaz
drowsy helm
#

I wonder if they go to that length client side

#

But regardless, I think you’re trying to find a harder solution to something that’s already been done heaps of times

sly topaz
#

I am checking right now, cause I might just be misremembering lol

cosmic elk
#

I've seen a few ss of people who have seemed to achieve this, the over head names have spaces and invalid characters, but they dont seem to be because of any work around

sly topaz
#

are you sure they were editing the nameplate and not just using a text display though, it is indistinguishable nowadays

rough drift
#

I did it with precise teleporting of armor stands by tricking the interpolation, though you probably can just parent an armorstand to a player and use text ascents lol

sly topaz
#

if latency isn't an issue then that's also an option

cosmic elk
cosmic elk
#

I'd bet they bypassed the invalid characters because of that

sly topaz
#

well, give it a go and if it doesn't work then try the other solution

cosmic elk
#

Well I have been, I'm not familar enough with ProtocolLib lol'

sly topaz
#

what have you tried so far

#

you just have to listen to the player info packet and modify the wrapped game profile or whatever it is that protocollib returns

cosmic elk
#

I think so, I honestly cant remember now

#

I'm not even entirely sure which action of the player info packet works with usernames

#

I would assume add player?

sly topaz
#

yes

#

there's an update name one but that is for the tablist if I remember correctly

cosmic elk
#

ahhhh okay

eternal oxide
#

changing name is a pain

cosmic elk
#

Ill see what I can do and if i get confused again ill come back here 👍

cosmic elk
#

ive been at this for 4 days

eternal oxide
#

it was a while ago I did it, but its a nightmare

cosmic elk
#

yeah thats why im just making this into an API, so if i ever need to again ill just import this project

sly topaz
#

it isn't that hard but since it is all undocumented you have to to a lot of trial and error

eternal oxide
#

sec and I'll pull up my old code

#

its out of date but it did work

cosmic elk
#

that would be a HUGE help, even if its out of date just having some kind of refrance would be amazing 😭

eternal oxide
#

?paste

undone axleBOT
eternal oxide
#

NMSUtils is just a util wrapper to fetch a ServerPlayer avoiding versioned imports

cosmic elk
#

ahhhh I see

#

well either way this is more helpful than most of what else ive found online

cosmic elk
#

Like i said, no idea what im doing lol

protocolManager = ProtocolLibrary.getProtocolManager();

        PacketContainer packet = new PacketContainer(PacketType.Play.Server.PLAYER_INFO);
        packet.getPlayerInfoAction().write(0, EnumWrappers.PlayerInfoAction.REMOVE_PLAYER);

        List<UUID> playerUUID = new ArrayList<>();

        for (Player player : Bukkit.getOnlinePlayers()) {
            packet.getIntegers().write(0, packet.getIntegers().read(0) + 1);
            playerUUID.add(player.getUniqueId());
            packet.getUUIDLists().write(0, playerUUID);
        }

        for (Player player : Bukkit.getOnlinePlayers()) {
            protocolManager.sendServerPacket(player, packet);
        }
#

If anyone could give me feedback id really appreciate that, I've only been using protocollib for a few days

thorn isle
#

i would generally speaking advise against messing with player-related protocol state

#

it's quite finicky and a lot of things can go wrong

#

not to mention unstable

#

is it absolutely necessary to change the nametag over players' heads? everything else can be done very cleanly through the api

#

i.e. tab and chat

thorn isle
#

if changing the actual username of the player works, you can probably use the prelogin event and change the username on the profile

#

but changing the "nick" would then require for the player to reconnect, of course, and name-based plugins would consider them a new player

#

though not many plugins use names anymore these days

cosmic elk
thorn isle
#

i don't quite remember the api, iirc it lets you change the name and even the uuid

cosmic elk
#

if you are refering to the player profile, I have already tried that

young knoll
#

You can’t use the api PlayerProfile for this

cosmic elk
#

i works but doesnt allow characers like spaces in the name

young knoll
#

Well yeah, the game doesn’t allow that

thorn isle
#

i'm not too sure about that

cosmic elk
thorn isle
#

i know geyser for example uses this api to add a * prefix to bedrock players

#

which isn't in the standard allowed username charset either (and that's why it's used, to prevent conflicts)

cosmic elk
#

I thought about using prefixs but I would much rather use ProtocolLib for this, my goal is to change the overhead display name and I'd rather not do any work arounds

ivory sleet
#

cant u do that through some plugin like TAB?

ornate patio
ornate patio
cosmic elk
thorn isle
ivory sleet
#

yea but thats where like tab comes in, ik there is this other plugin that does it rly well w client sided text display entities

#

^BrentLoaf

young knoll
#

Tab uses an armor stand

#

Well, it was an armor stand, might be a text display now

ornate patio
#

the thing is in singleplayer my own pc is more than capable of loading 60k blocks worth of chunks just fine

thorn isle
#

you'll want to take a look at the entity::tick nms method and add a condition to anything that might cause chunk loads (blockstate, collision checks) that if the player is going over n blocks per second, skip the operation

cosmic elk
thorn isle
#

there might be better methods but this seems like the easiest to implement

thorn isle
#

the thing is, player-specific protocol state is finicky and unstable and many things can and will go wrong

ivory sleet
#

because of what vcs2 said

thorn isle
#

so finding someone who has actually done this is going to be challenging

ivory sleet
#

you likely wna spawn in some sort of display entity and hide the player's actual name above head

thorn isle
#

and someone who hasn't done this can't really help with it

ornate patio
thorn isle
#

i mean the other guy

ornate patio
#

oh

thorn isle
#

with the nametag problem

#

not to say your gig is going to be easy either

ivory sleet
ornate patio
cosmic elk
ornate patio
#

hide player names using teams, then send packets to every player for an invisible armorstand slightly positioned above each player

#

could be optimized by only sending to nearby players

#

ur gonna need like protocollib

thorn isle
#

these days using a mounted (spoofed) text display with a translation offset is probably more robust, but yeah, same principle

young knoll
#

Until the player tries to teleport

#

:(

thorn isle
#

the reason you won't want to use a real mounted text display is that having stuff riding on players prevents them from teleporting; so after creating the text display, you will want to destroy it on the server side and drop the entity destroy packet, or alternatively spoof the entity from the beginning

#

this is also very finicky and getting the packets in the wrong order will completely nuke any players within view distance

#

i did this earlier not for nametags but for healthbars

young knoll
#

Does the player teleport properly when it’s a client side mounted entity?

thorn isle
#

yeah, the client doesn't seem to care about it, it's just the server throwing a hissyfit

young knoll
#

Does the thing stay mounted after the teleport?

thorn isle
#

i remember someone here patched the server to allow teleportation while mounted, which is a cleaner solution, if not really feasible for a public plugin

#

i think so, though come to think i don't remember if i've tested that

#

i don't recall healthbars getting left behind when people use elevator signs etc. on my server, so presumably it works

young knoll
#

I think it’s mainly a spigot limitation

#

Afaik vanilla can teleport entities with passengers fine

thorn isle
#

mounting stuff on other entities doesn't always work as expected, either

#

e.g. horses will try to rear and throw off the armor stand riding them

young knoll
#

lol

thorn isle
#

so i suppose even if it got patched in spigot (or paper), i would still have to keep my 200 lines of protocollib nonsense to keep the clientside mount

ornate patio
#

dragged a breeze in a boat through a nether portal

young knoll
#

That’s different

#

Since it’s a world change

somber scarab
#

does fawe not work with world guard?

#

I am trying to build my plugin using fawe but it keep breaking into a hundred errors:
[00:22:54] [Server thread/WARN]: Could not find IQueueExtent from `com.sk89q.worldedit.bukkit.BukkitWorld` instance for entity retrieval, OncePerChunkExtent will not work. [00:22:54] [Server thread/WARN]: Could not find IQueueExtent from `com.sk89q.worldedit.bukkit.BukkitWorld` instance for entity retrieval, OncePerChunkExtent will not work. [00:22:54] [Server thread/WARN]: Could not find IQueueExtent from `com.sk89q.worldedit.bukkit.BukkitWorld` instance for entity retrieval, OncePerChunkExtent will not work. [00:22:54] [Server thread/WARN]: Could not find IQueueExtent from `com.sk89q.worldedit.bukkit.BukkitWorld` instance for entity retrieval, OncePerChunkExtent will not work. [00:22:54] [Server thread/WARN]: Could not find IQueueExtent from `com.sk89q.worldedit.bukkit.BukkitWorld` instance for entity retrieval, OncePerChunkExtent will not work. [00:22:54] [Server thread/WARN]: Could not find IQueueExtent from `com.sk89q.worldedit.bukkit.BukkitWorld` instance for entity retrieval, OncePerChunkExtent will not work.

(even if world guard is disabled)

#

also it's much much slower than when I use world edit

young knoll
#

Are you using it async

#

That’s sort of the point

somber scarab
#

hm. I have my own world load distro when using world edit. but lemme check i dont think I am

somber scarab
#

should I also use it async?

#

and by async you mean using the scheduler or my own thread?

young knoll
#

Either

#

And no, doing it async with regular worldedit will break everything

somber scarab
#

well now I'm doing ir using the scheduler but it's still going wild

somber scarab
#

because I also depend on that

young knoll
#

I don’t think worldguard can be used async

somber scarab
#
java.lang.ClassCastException: class com.sk89q.worldedit.bukkit.BukkitPlayer cannot be cast to class com.sk89q.worldedit.bukkit.BukkitPlayer (com.sk89q.worldedit.bukkit.BukkitPlayer is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @1245c9e9; com.sk89q.worldedit.bukkit.BukkitPlayer is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @5aa41b52)```
#

I get alot of this before my server starts

eternal oxide
#

you shaded WG/FAWE into yoru plugin

thorn isle
#

^

somber scarab
#

SHADED?

#

no way

#

lemme look

thorn isle
#

the class is loaded by 2 distinct classloaders

somber scarab
#

this is my pom

#

unless you mean I dont need to depend on world edit

eternal oxide
#

open yoru jar with any archive program and you will find worldedit included

somber scarab
#

I dont see it

eternal oxide
#

and, why do you have an exclusion on FAWE-core when the parent is already "provided"?

eternal oxide
#

odd

drowsy helm
#

You dont need both fawe and world edit

somber scarab
#

mainly the ones during my copy paste jobs

#

[00:52:05] [Server thread/WARN]: Could not find IQueueExtent from com.sk89q.worldedit.bukkit.BukkitWorld instance for entity retrieval, OncePerChunkExtent will not work.

#

that means smth is still not being done async?

drowsy helm
#

Do you have the fawe plugin

#

Or worldedit

somber scarab
#

well yes. fawe

drowsy helm
#

Juzt making sure lol

somber scarab
#

all good. I'd like to make sure that people could just use world edit or fawe if they want. I don't want to cut WE out

#

but rn fawe breaks my plugin completely

#

most of the world edit logic is in GenerateGameTerrain, Tools and GameLobby.generatePlot()

#

what's interesting is that none of my logging executes.. yet the plot gets copied fully. All I get is this. ```[00:50:49] [Server thread/INFO]: BlueNova2 issued server command: /mvtp BlueNova2 fil_void_world
[00:50:50] [Server thread/INFO]: Using com.fastasyncworldedit.bukkit.adapter.NMSRelighterFactory as relighter factory.
[00:50:54] [Server thread/INFO]: BlueNova2 issued server command: /mv confirm
[00:50:57] [Server thread/INFO]: BlueNova2 issued server command: /gamemode spectator
[00:50:57] [Server thread/INFO]: [BlueNova2: Set own game mode to Spectator Mode]
[00:51:52] [Server thread/WARN]: Could not find IQueueExtent from com.sk89q.worldedit.bukkit.BukkitWorld instance for entity retrieval, OncePerChunkExtent will not work.
[00:51:52] [Server thread/WARN]: Could not find IQueueExtent from com.sk89q.worldedit.bukkit.BukkitWorld instance for entity retrieval, OncePerChunkExtent will not work.
[00:51:52] [Server thread/WARN]: Could not find IQueueExtent from com.sk89q.worldedit.bukkit.BukkitWorld instance for entity retrieval, OncePerChunkExtent will not work.

paper viper
#

If you want people to use either, build on WE api

mortal vortex
#

Not very familiar with particles, but if I wanted to use particles to outline the borders of an area, like pretty big scaling, so they would be visible, what particles would I use?

nova notch
#

happy villager, redstone dust, end rod, the spark from scraping wax off something
ok actually some of those might not live long enough

#

anything with a lifetime of more than a few ticks and doesnt move (or can have its motion disabled)

rough ibex
#

Honestly just checking the wiki would be good

#

since there's listings of the images and you can see for yourself.

somber scarab
paper viper
somber scarab
#

cuz I get errors from world guard as well when I switch to fawe

#

ah my bad i see what u mean

#

okay so I build on we not fawe

paper viper
#

Yes

somber scarab
#

but using fawe causes errors. so i gotta figure this out

#

plus it "works" but breaks other part of my code

#

like copy jobs happen but when theyre done errors appear

#

idk man I never seen anything like it

#

its all errors i don't understand

#

and i dont really know where to begin

#

its like API specific errors and warns

paper viper
#

just use WE first

#

build on WE and then test with fawe after

somber scarab
#

hm aight

#

so I build using WE

#

and use the fawe plugin

paper viper
#

and dont shade

#

Yes

somber scarab
#

dw i wont shade

paper viper
#

if you want to support both we and fawe

#

because fawe is a fork of we

somber scarab
#

yeah i know

#

just making sure thanks

robust helm
#

InventoryClickEvent#getSlot is returning -999, any meaning to that?

echo basalt
#

clicked off screen

robust helm
#

I thought thats a joke first but wtf

#

anyway thx

drowsy helm
#

Anyone know of a way to get slot count of a MenuType without having to create the view?

dawn flower
#

how do i listen for when a player enters a region

#

(worldguard one)

drowsy helm
dawn flower
#

why would they only make that one event

#

that seems so random

drowsy helm
#

yeah beats me

dawn flower
#

can i check if a location is in a region

drowsy helm
#

yeah regions have a REgion#contains(BlockVector3) method

#

just need to iterate through all regions

dawn flower
#

alright thanks

#

actually there's a getRegion(String) method so no need to iterate

wet breach
drowsy helm
outer elk
#

can i prevent opening eyeblossom?

ivory sleet
trail cargo
#

If a plugin is disabled, are all schedulers owned by that plugin immediately cancelled?

young knoll
#

iirc yes

upper cypress
#

Using a plugin, is it possible to display the "horse hearts" on the players HUD without the player needing to ride an entity?

chrome beacon
#

No, but you could fake them with a resource pack

lavish hare
#

👋 I'm trying to run BuildTools, but I'm running into some issues. I'm running the latest version, in a fresh directory (specifically, java -jar BuildTools.jar --rev 1.21.1 --remapped). I've dropped the --remapped, to not success. I'm on a Mac, if that helps.

chrome beacon
#

Could you try running it in an empty folder

#

If it doesn't work send the entire buildtools log

#

?paste

undone axleBOT
lavish hare
#

It’s running in an entirely empty folder, freshly created

#

Running it again to get full logs (again, fresh folder)