#help-development

1 messages · Page 1311 of 1

tawny osprey
#

ahh okay

echo basalt
#

But you can also inline it if there's no point in keeping it separate

tawny osprey
#

Yes

#

Okay

remote swallow
#

@worldly ingot do you need help

worldly ingot
#

?softban @shrewd dome Compromised account

undone axleBOT
#

Done. Enough chaos.

remote swallow
#

idk if that was a comp account or just a very literal child trying to make money

worldly ingot
#

¯_(ツ)_/¯

#

Either way, it probably won't come back

potent atlas
#

Hi guys! I'm stuck on cancelling particle packets using packetevents. Can I share my code?

violet blade
#

sure

potent atlas
#

The console doesn't show anything

#

No error, and no "Large smoke detected"

#

When I do /pl I can see both packetevents and my plugin, and there are no other plugins installed

violet blade
#

try maybe loading packetevents first then registering the class

potent atlas
#

k

#

No luck 🙁

violet blade
# potent atlas No luck 🙁

I've modified your code a little so that it simply gives me a packet dump, and I think the reason it doesn't work is because the smoke particles surrounding the blaze are only being displayed clientside. I'm only seeing particle packets listed in the console when I run the /particle command manually

#

-# This is just my speculation, I’m not entirely sure if this is 100% accurate

potent atlas
acoustic shuttle
#

Does anyone know how to make any block output a redstone signal?

I have only done some google searching and a few searches in the docs and didn't find much, most was from years ago where it apparently wasn't possible, anyway before I go on and probably end up spending a while trying to figure this out I just wanted to know if anyone here has the answer?

thorn isle
outer ember
#

how to execute a command as a player BYPASSING their permissions?
(mention me im blind)

chrome beacon
#

You basically need to give them op or a * perm and then remove it again

#

Keep in mind that is quite risky

thorn isle
#

that's how it's done

#

it's not good but it is what it is

chrome beacon
#

Do use a try with finally block to ensure the perm is removed in case of errors etc

thorn isle
#

i don't think even luckperms allows for you to do anything smart with it

outer ember
#

I need to execute it as player

#

cause betterjails will send
masiha2ez jailed by CONSOLE
and yeah thats very annoying

thorn isle
#

smells very xy

chrome beacon
#

So this isn't a development question?

outer ember
#

Yeah it is

chrome beacon
#

But a betterjails question on how to get rid of that message

outer ember
#

i have to do one of this :
1.Make console name senders name
2.Execute as player bypassing their perms

outer ember
outer ember
chrome beacon
#

Already told you what you need to do

#

If you want to write it in code

thorn isle
#

even if they don't have explicit api, you can build directly against their plugin to call whatever jailing logic they have

outer ember
thorn isle
#

well, you don't really have any alternative

outer ember
#

Wait WHAT

#

let me check

chrome beacon
#

Now the question is why are you running the command as console in the first place

smoky anchor
#

oh wait Emily made that one ? :D
Just ask her haha

chrome beacon
#

If you want to run it as a player just let the player run it?

#

She does lurk around here sometimes

outer ember
#

Ugh...
I was working a project to interact with betterjails and do some things but I found there was a easier way to do this
Now

thorn isle
#

does betterjails let me define jail sentences in terms of coal mined rather than time online

slender elbow
#

i should at least add support for indefinite sentence times rather than requiring a duration, that way at least one could hook up to it and do whatever other releasing requirements

#

my free time:

#

my time spent on discord: 💯

young knoll
#

Pfft, just set the duration to MAX_INT

#

Or long or whatever it is

mortal vortex
#

MAX_INT + 1 just incase

alpine solar
#

HUH

#

that's possible?

worldly ingot
#

I mean, it would just give you MIN_VALUE but yeah lol

alpine solar
#

o.O

worldly ingot
#

Numbers overflow if they run out of bits

#

What's 0111111111 + 0000000001? (Demonstrative, integers have 32 bits). It's 10000000000

alpine solar
#

📓 ✏️

#

okay, I have noted this

worldly ingot
#

Fixed my explanation. Negative bit is flipped, all other bits are flipped

#

Wait no I'm stupid

#

Give up

#

I know what I want to say

#

TRUST ME IT WORKS

alpine solar
#

I'm gonna give it a try

misty ingot
#

if choco says it works then it works
(it does work)

alpine solar
#

Oh, right

#

Hypixel dev, forgor

misty ingot
#

not just that
hes also an expensive bitch

so you KNOW hes smart

#

jokes aside i am pretty sure that explanation is infact how it works

worldly ingot
#

Definitely expensive

alpine solar
#

Wait

#

It's INTEGER.MAX_INT

#

right?

worldly ingot
#

Integer.MAX_VALUE and Integer.MIN_VALUE

alpine solar
#

Ah

#

Thought so and I changed it 😭

hybrid spoke
#

i always use MIN_VALUE as debug when only positive values are possible to be extra dramatic

worldly ingot
#

Which, by the way, in-and-of-itself proves that it's true lol

    @Native public static final int   MIN_VALUE = 0x80000000;
    @Native public static final int   MAX_VALUE = 0x7fffffff;

MIN_VALUE is 1 more than MAX_VALUE

misty ingot
#

i had to deal with an integer overflow very recently because one of our devs (me) was dumb enough to multiply two player-entered numbers without any checks
and that caused people to be debited negative money

alpine solar
#

-2.14, that's the output o.O

worldly ingot
#

Well, e31 probably, but yes

alpine solar
#

Which is MIN_VALUE, im guessing?

worldly ingot
#

Correct

alpine solar
#

oh yes

#

Alright Hypixel

#

I'm working for you next

#

With my string concat skills 😭

misty ingot
#

man i love bases
mostly due to their amazing uses

alpine solar
#

GENIUENLY, uni comp classes are so boring

misty ingot
#

i love competitive programming because those people find the best ways to do stuff
i just love looking into and understanding that stuff and seeing just how unintuitive or intuitive some solutions can be

alpine solar
#

Apparently, they dont teach you Java until you're 2~3 years in cause it's too "advanced"

misty ingot
#

sounds a lot like my high school experience

alpine solar
#

Which means, you'll have JUST 1 year to get completely familiar with it, before placements

#

😭

worldly ingot
#

For people that haven't touched a programming language, that makes sense. Python or Lua is usually the starting language

#

If they're insane, sometimes they start you out with C++

alpine solar
#

I started with C++

worldly ingot
#

My university's first programming course was C++ lol

alpine solar
#

And now they're teaching python

misty ingot
#

nah but in my high school we started python in 11th fuckin grade
and from my high school i mean every single school in the country that follows the same teaching board

hybrid spoke
#

c++ makes sense to get you close to the principles programming languages like java already cover

alpine solar
worldly ingot
misty ingot
#

back when my brother was in high school it used to be cpp instead of python

alpine solar
#

Isn't python uhh

#

scripting language

worldly ingot
#

It's just the std:: in front of everything that confuses beginners with C++, which is fair. Modern C++ actually has an std::print() now though which helps a bit, but that would also require universities to catch up and teach modern C++

alpine solar
#

let's be honest

thorn isle
#

python makes me angry

worldly ingot
alpine solar
#

+1

hybrid spoke
#

no python no ai

misty ingot
#

i ignored everything tho and just kinda went my way

iirc I went python -> cpp(started competitive programming stuff) -> java(around the same time as cpp) -> lua

alpine solar
#

which is nice

thorn isle
#

more like no python = ai that doesn't require the power consumption of 25 nuclear plants to operate

hybrid spoke
misty ingot
hybrid spoke
#

like i can just be the architect and tell the ai what exactly i need in what way

alpine solar
#

can someone please save me from these python classes

#

please

#

😭

thorn isle
#

if the people working on ai didn't have the crutch that is python, someone would've done it in a real programming language instead

#

we probably would've sequenced the human genome thrice faster as well

violet blade
alpine solar
#

They just type shi into chatgpt

hybrid spoke
misty ingot
#

and all of them think they can conquer the world
THAT part is the actual problem

hybrid spoke
#

i really hate the term vibe coders actually

alpine solar
#

"please develop me an anticheat similar to hypixel" 😭

#

it's funny how chatgpt interprets action events as uhh

#

for those

#

holdon, any anticheat nerds here

#

does it actually work through action events? or?

hybrid spoke
#

packets

alpine solar
#

yes but

#

is it like

misty ingot
thorn isle
#

it depends on the actual anticheat, but almost all of them listen to packets on the protocol layer at least to some extent

#

most also have at least some bukkit api listeners as well

alpine solar
#

ACTION.LEFT_CLICK_BLOCK, no right?

hybrid spoke
violet blade
#

And you will pay me 4000$ for it

alpine solar
#

I have $4 in my bank rn

hybrid spoke
misty ingot
hybrid spoke
#

or as vcs2 said listen to bukkit listeners and interpret that data

alpine solar
#

oh, I didnt read his message

#

SORRY 😭

hybrid spoke
misty ingot
#

if there is no item in hand it returns air right

#

because the item cant be null and the type cant be null so it has to be air right

thorn isle
#

depends a bit on the specific api method

#

many inventory api methods will return null for empty slots, many others will return air

#

you can generally trust the nullability annotations to figure out which is which

misty ingot
#

#getInventory()#getItemInMainHand()

vale burrow
#

hi!! sorry, i have no clue where i need to go with this question -- but i'm looking for a dev who's capable of creating custom biomes. my dms are open! sorry if this isnt the right place to say this!!

undone axleBOT
vale burrow
#

thank you!

#

these all seem to be plugins though, am i in the wrong place lol

misty ingot
#

well plugins can create custom biomes to some extent

#

if you are explicitly looking for mods then yes, wrong place

vale burrow
#

nope, plugins or datapacks

misty ingot
#

plugins = right place
datapacks = still wrong place, sorta... maybe in #help-server ?

vale burrow
#

thank you so much!! ill check that out

round finch
#

how do you use non spigot plugin libs?
in your plugin?

#

i saw something about maven shading and ClassLoader too

remote swallow
#

shade it or add it to libraries field field in plugin.yml

round finch
#

is that the only right way?

remote swallow
#

unless its provided in the api or from mojang you have to provide it somehow

round finch
#

oh hold up what about the lib.jar?

#

where do i put it?

remote swallow
#

ideally you dont even reference a dependency from a jar, you should publish it to a repo or maven local and depend on it through your build system

round finch
#

then i build the jar
it just takes the lib source and put it into the plugin?

#

with shading right?

remote swallow
#

you should use the maven shade plugin and the right classifier to shade or use the gradle shadow plugin with the right scope

#

if its your own java lib you publish it to a repo or maven local and then reference it that way

round finch
#

alright
so shading is the way?

remote swallow
#

up to you, if its on maven central you can use the plugin.yml libraries field

round finch
graceful laurel
remote swallow
#

i dont see shadow jar or any shaded dependencies on that

#

or a valid plugin.yml for that matter

mortal vortex
remote swallow
#

i did take a wild guess when i looked at the rest of the code

mortal vortex
#

obviously AI. no human writes that amount of code without having dependencies... Like how the fuck do you have import if you dont even have the dependencies to reference.

violet blade
mortal vortex
#

that’s what I mean 😭

#

It’s lowercase too

#

And his gradle doesn’t even define the entry point.

graceful laurel
mortal vortex
quaint mantle
quaint mantle
#

Looks like the ai revolution is thriving.

azure zealot
#

Does someone know the reason why in bungeecord plugin.getExecutorService is deprecated?

#

its deprecated since it was added

chrome beacon
azure zealot
#

Sadly its not documented

chrome beacon
#

the scheduler api?

azure zealot
#

no the getExceutorService method

chrome beacon
#

I see

azure zealot
#

every other method in the plugin class is

#

i was thinking about making the executor service a virtual thread executor service, its way better if you on java 21

sullen marlin
#

Ye should use scheduler

azure zealot
sullen marlin
#

No idea

coarse hamlet
#

<3

thorn isle
alpine solar
#

vibe coded

#

😠

alpine solar
#

The plugin.yml is empty

#

Nor does your main class implement any of the methods required 😭

#

Okay wait

#

Nevermind, your main class isn't "Main" class

#

oh, epic already said that

#

@remote swallow ur epic

#
                // Optional: Send message for debugging
                // player.sendMessage("§9Sailor Protection: Reduced damage from " +
                //                   originalDamage + " to " + reducedDamage);
            }```
#

HMMM 🧐

graceful laurel
#

yea im kinda lost so im just gonna restart and see if it wil work this time 😭

alpine solar
#

AND PLEASE

#

don't copy and paste chatgpt code

graceful laurel
#

but what am i supposed to do then??? 😭

alpine solar
#
                // player.sendMessage("§9Sailor Protection: Reduced damage from " +

Does this work without translator?

alpine solar
graceful laurel
#

THAT TAKES SO LONNNNNGGGGG

alpine solar
#

Well you have to

lean pumice
#

if i edit Player#displayName, i will automatic update Player#getDisplayName?

alpine solar
#

do you mean .setDisplayName?

remote swallow
alpine solar
#

do you have a dog

misty ingot
pseudo hazel
#

ai is a tool, if you dont know how to program, you wont get good with it by just using ai

#

if you dont know what you are doing, you cant know if the ai is spouting nonsense or saying things that could actually help

alpine solar
#

Oh that's a paper thing?

#

😭

violet blade
#

yes, Component displayName()

remote swallow
thorn isle
#

Or are you talking about Player.displayName(Component)? Yes, calling that setter will change the player's display name, which is what getDisplayName gets

alpine solar
remote swallow
thorn isle
#

I don't like the adventure style getters and setters without the get/set prefix because of this

rotund ravine
thorn isle
#

You can't really overload getters I suppose

rotund ravine
#

True

buoyant viper
buoyant viper
quaint mantle
#

hello everone

quaint mantle
#

can somone code my a plugin

eternal oxide
undone axleBOT
quaint mantle
mortal vortex
misty ingot
#

the sheer amount of lowballers i get is insane

#

over time ive started to just inherently be less nice while saying no

mortal vortex
#

"faurk off"

plush current
#

Hi, I’m having trouble enabling 2FA in my Pterodactyl panel. Whenever I enter the 6-digit code from Google Authenticator, the “Enable 2FA” button stays unclickable and it keeps asking me to enter a 6-digit code. I’ve already tried multiple authenticator apps and cleared my cache, but the problem still persists. Does anyone know how to fix this?

sullen marlin
#

have you tried the pterodactyl discord?

plush current
sullen marlin
#

make sure your server time is correct

#

beyond that idk

plush current
alpine solar
#

or just switch to pufferpanel

#

🙏

plush current
#

👍🏻

wide cipher
#

I am using this code to create a particle sphere that is shot from the player, but the problem i am facing is that there is a large delay, and then all the particles appear at once, instead of there being small delays in between. for (Location loc : locs){ Block b = loc.getBlock(); if (!b.isPassable() && !b.isLiquid() && b.isCollidable() && b.isSolid()) { if (b.getType() == Material.FARMLAND){ Farmland farm = (Farmland) b; farm.setMoisture(farm.getMaximumMoisture()); } break; } List<Location> sphereLocs = ParticleUtils.fibonacciSphere(loc, 0.75, 24); for (Location loc3 : sphereLocs){ loc3.getWorld().spawnParticle(Particle.WATER_DROP, loc3, 10); } for (Entity entity : loc.getNearbyEntities(0.75, 0.75, 0.75)){ if (!entity.isDead() && entity != p){ LivingEntity le = (LivingEntity) entity; double wandPower = NBT.get(wand, nbt -> (Double) nbt.getDouble("power")); le.damage(wandPower * baseDamage); Vector unitVector = entity.getLocation().toVector().subtract(p.getLocation().toVector()).normalize(); entity.setVelocity(unitVector.multiply(1)); } } try { Thread.sleep(50); } catch (InterruptedException e) { throw new RuntimeException(e); } }

sullen marlin
#

You cannot use thread.sleep in a plugin

#

You need to use the bukkit scheduler (google it)

#

The problem is you are pausing the server for 50 ms over and over and no packets can be sent

#

Each loc from locs should be a new task scheduled 1 tick later than the last, or 1 repeating task that steps through locs

wide cipher
#

ok, thanks

#

how can i stop the for loop from within the BukkitScheduler? I can't use break, nor can i create a boolean within or edit one within the lambda

#

nvm,

wind timber
#

Hi! Looking for advice on timing/ordering.

Goal
In a specific world, when a player breaks a crop we cancel BlockBreakEvent and send a client-side AIR update for X ticks (via a third-party networking layer, conceptually similar to Player#sendBlockChange). The real block is never changed server-side.

Observed
Immediately after the break is canceled, the client briefly renders the vanilla crop before our AIR takes effect. After that, AIR holds correctly.

What we already tried

  • Listener at LOWEST with gating → cancel.
  • Sending the client update in the same tick (scheduled on main) and also next tick.
  • A short “suppress window” on our side so any immediate paint in the next few ticks should be treated as AIR for that index.
  • No /reload, main-thread only.

Questions

  1. Is there a Spigot-side pattern to guarantee that the very first render after a canceled left-click break uses our client-side state (AIR), so the vanilla crop isn’t shown first?
  2. Would you recommend hooking an earlier event than BlockBreakEvent (e.g., PlayerInteractEvent with LEFT_CLICK_BLOCK) to push the client update sooner?
  3. Is there any supported way within Spigot to veto/override a same-tick block update the server might send, even though the break is canceled?

Happy to provide a minimal repro if helpful.

sullen marlin
#

Why you cancelling the event then sending air anyway?

wind timber
# sullen marlin Why you cancelling the event then sending air anyway?

Thanks for the quick reply!

In this world we don’t want the block to actually break (no world mutation, no drops/physics, multiple players can “farm” the same crop concurrently). Showing AIR is purely per-player feedback for a short window; later we re-spoof the player’s view back to the crop state. In other words: cancel prevents the real change, AIR is only a visual overlay for the breaking player.

The only wrinkle we’re trying to solve is that right after cancel the client briefly renders the vanilla crop before our client-side AIR takes effect. We already tried sending the client update in the same tick and next tick, listener at LOWEST, and a small suppression window on our side.

Any guidance on hook/priority/timing you’d suggest?

wide cipher
#

I'm using this repeating task now ``` int i = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(Alkatraz.getInstance(), () -> {
List<Location> locs = ParticleUtils.fibonacciSphere(a.getLocation(), 0.75, 12);
for (Location loc : locs){
loc.getWorld().spawnParticle(Particle.WATER_DROP, loc, 2);

            }
            for (Entity entity : a.getNearbyEntities(1, 1, 1)){
                if (!entity.isDead() && entity != p){
                    LivingEntity le = (LivingEntity) entity;
                    double wandPower = NBT.get(wand, nbt -> (Double) nbt.getDouble("power"));
                    le.damage(wandPower * baseDamage);
                    Vector unitVector = entity.getLocation().toVector().subtract(p.getLocation().toVector()).normalize();
                    entity.setVelocity(unitVector.multiply(1));
                }
            }
        }, 0L, 1L);```

but am not sure how to stop the task if the arrow (a) hits the ground, any ideas?

sullen marlin
#

You can try a different event (ie interact like you suggest) or block the packet with a packet library. There's no API way to cancel the event but leave the client in the wrong state

sullen marlin
wide cipher
#

oh yea, thanks for the quick reply

umbral hemlock
#

Hi guys , im new to this world...so i was thinking if some incredibly good person would like to help me get into the spigotAPI programing world with minecraft ? ( in vc or dm ) 👉 👈

mortal vortex
#

Do you want someone to hold your hand or do you have specific questions?

#

Do you know Java first? Probably learn that.

dusk jetty
#

how to hide the applies to: and ingredients: fields?

worldly ingot
smoky anchor
#

I think this one hides the trim from armor

#

I don't think the lore from Smithinkg Template can be hidden tho

rotund ravine
#

Not in latest atleast

worldly ingot
#

No, there's HIDE_ARMOR_TRIM that does that

#

HIDE_TRIM is for trims

violet blade
#

what you can do is hide the tooltip entirely but that wont even show the name or lore at all

winter jungle
#

Is the bungeecord repo dead?

remote swallow
plush current
#

I want to know how to add suggestion argument

#

for command arguments

violet blade
plush current
#

like when using that /give command it give suggestions like minecrft:diamond, minecraft:iron_ore

violet blade
#

That’s possible with brigadier, which spigot doesn’t expose directly, I’d suggest using an external command framework if you want to do that

remote swallow
#

you can have non colored ones, which would be always blue afaik from the bukkit tab complete methods

violet blade
pseudo hazel
# violet blade

yeah there is no way to hide it, since like you said its hardcoded in the client, so the only way around it is to set the trim as an item model for another item, especially if your application is for in a menu

pseudo hazel
#

but, like I said another item that you give this model to

dusk jetty
#

I got my answers in paperspigot discord
Ty nonetheless

pseudo hazel
#

in what

remote swallow
#

they traveled back 10 years and asked paperspigot

tawny osprey
#

I have a java related question. With lambda expressions, I know you have to declare the parameter(s) if an abstract method requires them, but do you have to use those parameters somewhere in the code block you provide as an implementation of that abstract method?

graceful laurel
#

how to i test my plugin aternos doesnt let me put my plugin in the plugin folder

graceful laurel
tawny osprey
#

Very convenient as well

graceful laurel
smoky anchor
graceful laurel
#

hehe whoops :>

tawny osprey
smoky anchor
timber eagle
#

yall know how I can make directional particles with the cloud effect

#

nothing i am nothing is working; i'd them like to move upwards

thorn isle
#

not all particles support setting a velocity

#

what have you tried so far

#

iirc to set the velocity of a particle, you have to spawn them one at a time with count set to either 1 or maybe 0, and then the particle spread parameters are treated as a velocity vector

#

it would be very nice if it was documented somewhere in the javadocs, but i think the api method has parity with the ingame /particle command so you can check the mc wiki documentation for it

timber eagle
#

The cloud effect direction can be changed since other servers have figured it out somehow

thorn isle
#

how did damage events work with modifying the final damage again? i want to put a hard cap on damage per attack, but i want it to apply after armor, resistance, and other damage reductions have been applied

rotund ravine
#

What does the javadocs say

thorn isle
#

i don't know, the papermc javadocs are down

#

joking aside i can see that there's a getter for the final damage, but i don't see any way to set the final damage, only the raw damage

timber eagle
#

that is the final damage

#

setDamage sets the final damage to something. internally it has modifiers that it will go throuhg and reduce the damage

#

Here is the impl. for 1.8 (probably the same throughout most version)

public void setDamage(double damage) {
        double remaining = damage;
        double oldRemaining = this.getDamage(EntityDamageEvent.DamageModifier.BASE);

        for(DamageModifier modifier : MODIFIERS) {
            if (this.isApplicable(modifier)) {
                Function<? super Double, Double> modifierFunction = (Function)this.modifierFunctions.get(modifier);
                double newVanilla = (Double)modifierFunction.apply(remaining);
                double oldVanilla = (Double)modifierFunction.apply(oldRemaining);
                double difference = oldVanilla - newVanilla;
                double old = this.getDamage(modifier);
                if (old > (double)0.0F) {
                    this.setDamage(modifier, Math.max((double)0.0F, old - difference));
                } else {
                    this.setDamage(modifier, Math.min((double)0.0F, old - difference));
                }

                remaining += newVanilla;
                oldRemaining += oldVanilla;
            }
        }

        this.setDamage(EntityDamageEvent.DamageModifier.BASE, damage);
    }
thorn isle
#

right, i guess that makes some kind of sense, ty

timber eagle
#

yall know how I can make directional particles with the cloud effect
nothing i am nothing is working; i'd them like to move upwards

thorn isle
#

does what you tried work with other particles?

#

if all else fails you can use a network debugger on the client to dump the particle packets that other server you mentioned, and see what values they have

timber eagle
#

its not working however

sullen marlin
#

Code?

timber eagle
#

One second im trying something

#
ParticleEffect particleEffect = new ParticleEffect(
                EnumParticle.CLOUD,
                player.getLocation(),
                0f,
                1.0f,
                0f,
                0f,
                0,
                1
        );

        PlayerUtils.EffectProcedures.sendEffect(player.getWorld(), particleEffect);

i have my own custom class

#
public ParticleEffect(EnumParticle particle, Location location, float xOffset, float yOffset, float zOffset, float speed, int count, int... data) {
        super(new PacketPlayOutWorldParticles(particle,
                true,
                (float) location.getX(),
                (float) location.getY(),
                (float) location.getZ(),
                xOffset,
                yOffset,
                zOffset,
                speed,
                count,
                data));
    }
#

the count is 0 and the thread says the extra data is the speed

#

which is 1

#

Alright so i managed to fix the speed, but it's colliding with the player

#

specifically the head

sullen marlin
#

Wdym colliding

timber eagle
#

So it's going upwards now but when the particle reaches the player's head its going back down

#

If I run it'll go straight up forever

#

I think if I just add some xz offsets it will fix

#

Okay nvm I don't know how the hell this works at all

#

but setting the y offset to 2 instead of 1 moves it all the way up

#

i dont think it was colliding i just think it was only going up 1 unit

#

but 2 makes it go up forever so.

#

Its fixed atleast

#

nvm idk what's going on

plush sluice
#

it has defeated me, i cannot teleport player to desired location somehow,
the location that im trying to teleport player to is good
Location{world=CraftWorld{name=world},x=0.5,y=90.0,z=0.5,pitch=0.0,yaw=180.0}

eternal oxide
#

reverse your guard clause. player is likely out of scope

plush sluice
#

normally

#

there was message after it but i removed it for screenshot

hybrid spoke
plush sluice
#

ITS THE WHOLE COMMAND

#

Nothing more

#

nothing less

#

just teleports player to spawn

#

its supposed to teleport player to spawn*

#

but doesnt do it

eternal oxide
#

change the guard clause.l Its failing on an invalid player field.

smoky anchor
#

no I think that works just fine

violet blade
#

Why final

eternal oxide
#

depends on teh IDE

#

I have had an out of scope field like that with it out of scope

#

its a simple change to test. So not like he has to jump through hoops to try it

smoky anchor
#

ye, fair

chrome beacon
#

that should be perfectly fine

eternal oxide
#

It "should"

plush sluice
eternal oxide
#

Eclipse will actually error on teh player field if you attempt that

chrome beacon
#

Eclipse moment

chrome beacon
#

That's fine then

plush sluice
#

i did it just for you
it sent me a message but didnt teleport me

#

before you ask

#

why player is underlined

chrome beacon
#

Why are you teleporting the player to itself?

eternal oxide
#

well yeah, you teleport to the players own location there

plush sluice
#

wrong

#

even tho it was wrong and i changed it to this.getSpawnLocation it still didnt teleport me

eternal oxide
#

check your spawnlocation

#

sysout before it teleports

eternal oxide
#

sysout the actual spawn location you are trying to tp to. Before teh teleport happens

plush sluice
#

does it even matter if new location doesnt work?

#

funny thing is that in join event it works perfectly fine

echo basalt
#

Probably a bad command

#

Or it's running async

plush sluice
eternal oxide
#

you fixed your guard clause so there is nothing wrong with any of the code you have shown us

plush sluice
eternal oxide
#

you'll have to show more for us to see

plush sluice
eternal oxide
#

There is no issue with spigot teleport so the issue is you

#

also, yeah why is player underlined?

smoky anchor
plush sluice
eternal oxide
#

ah IJ being an ass

plush sluice
#

i always use finals wherever i can

smoky anchor
#

What you can do next is to just remove as much as you can - create minimal plugin where the issue happens
And share all the code

plush sluice
#

so i cannot overwrite crucial variables

violet blade
#

What commnd framework is that

plush sluice
smoky anchor
#

oh-

plush sluice
#

but still

#

everything works

#

and even if i teleport player in task it doesnt work

young knoll
#

Does the player have a passenger

plush sluice
#

nope

young knoll
#

Or is the player riding something

plush sluice
#

nope

violet blade
#

Try if it's working with commandexecutor first

plush sluice
#

waaait

young knoll
violet blade
smoky anchor
young knoll
#

Spigot teleport doesn’t like passengers

smoky anchor
#

Why is this so outdated
It works fine in vanilla now
This is dumb

plush sluice
young knoll
#

Well there’s your problem

plush sluice
#

I spent WAY too much time on these few lines...

violet blade
#

Create your own tp logic by dismounting the passengers, teleporting all of them and mounting again

smoky anchor
#

or call NMS teleport function
or dispatch /teleport

plush sluice
bitter spear
#

Hey, I’m trying to create something similar to the bar mini-game from the CustomFishing plugin, but I ran into an issue:

my pointer is always being rendered under the bar instead of over it. I’m moving the pointer by adjusting the textures offsets. and I'm using a action bar.

Any ideas for a workaround?

echo basalt
fair igloo
#

AnvilInventory.setRepairCost is deprecated. what do i use now?

thorn isle
#

there's a method for that on the anvil inventory view now iirc

buoyant viper
#

ye

timber eagle
#

after looking in the MCP code

#

In the onUpdate method in the EntityCloudFX (cloud particle effect) it contains this logic

EntityPlayer entityplayer = this.worldObj.getClosestPlayerToEntity(this, 2.0D);

        if (entityplayer != null && this.posY > entityplayer.getEntityBoundingBox().minY)
        {
            this.posY += (entityplayer.getEntityBoundingBox().minY - this.posY) * 0.2D;
            this.motionY += (entityplayer.motionY - this.motionY) * 0.2D;
            this.setPosition(this.posX, this.posY, this.posZ);
        }

        if (this.onGround)
        {
            this.motionX *= 0.699999988079071D;
            this.motionZ *= 0.699999988079071D;
        }
thorn isle
#

that, uh

#

i'm not sure what that's supposed to achieve

timber eagle
#

thats why when i was jumping the cloud particles were like snapping towards me

#

downwards

#

i dont know why thats even a thing

thorn isle
#

i guess to send smoke signals with campfires...

#

stand on the campfire to back up the smoke and then step off to release it, or something

timber eagle
#

This is 1.8

#

but yeah

#

I don't understand still why there isn't an option to disable this (there probably is. i just dont know how)

#

this.posY > entityplayer.getEntityBoundingBox().minY

#

this is the line that causes me issues

#

because if the particle is above the feet it just falls back down

#

so annoying man

quick parcel
#

[Looking for Developers, Lore Writers & Social Managers]

Hey everyone! 👋
I’m currently working on a new dark fantasy RPG/MMORPG Minecraft server called Shardbound.

The lore is centered around a world consumed by darkness after the Sun shattered, with unique mechanics like The Hollowing, custom bosses, dungeons, and legendary relics. ⚔️🌑

I’m looking for passionate people to join the project:
• 🛠️ Developers (plugins/datapacks/mods)
• 📜 Lore Writers (worldbuilding, quests, item stories)
• 📢 Social Managers (TikTok, Discord, community hype)

If you’re interested in helping shape a unique RPG world from the ground up, send me a dm.

thorn isle
#

isn't that some nft card trading game

undone axleBOT
timber eagle
#

I finally figured it out; they use the explosion_normal enumparticle to produce the effects similar to clouds

unkempt turtle
#

Hello guys ! I'm trying to create circular borders like with custom textures like in that clip, do someone know how to do it ? I did not find anything : https://www.twitch.tv/sowolis/clip/HappyBreakableChickenMoreCowbell-dJ3Jei6t0ikO9CM_
Probably a block/item model inside a block/item display at the center which is then scaled (if the border is resizable)

Do I need to use BlockBench ?
I can do the model etc, I extracted it and tried but I still have rendering error ingame with black and purple block
I canno't find anything on the internet, not a single code anything
It is a circular border, with a custom design

rough quartz
#

🤣

unkempt turtle
#

?

rough quartz
#

funny name block bench

unkempt turtle
#

it is a software

young knoll
#

Might be some shader magic

chrome beacon
#

doubt it

#

probably just an item model

rough quartz
#

dows not sound like Minecraft name and another thing sounds like a windows program

#

anyway cya

young knoll
#

Item models can’t be circles

slender elbow
young knoll
#

Wait is it a circle

chrome beacon
#

it's not a perfect circle

young knoll
#

Or is it 22.5° angles

#

I can’t tell, too much movement

chrome beacon
#

yeah 22.5 angles is what it looks like to me

#

but true that there is a lot of movement

#

actually hmm maybe not 🤷‍♂️

young knoll
#

Wait can’t you do any angle from -45 to +45 now

#

Or -90 to +90, idk something like that

chrome beacon
#

haven't really kept up with that so no idea

unkempt turtle
tall plinth
#

Can we make this kind of gui in which gui elements changes using spigot coding if yes then how like which methods or what things to be used to make it

sullen marlin
#

Unless Minecraft has changed a lot in ways I'm unaware, that must be a resource pack

#

Possibly with villager trades, although that could be a bedrock screenshot

tall plinth
#

i just want to know how does the color of the trades changes according to the balance

echo basalt
#

Yeah that's doable with custom GUIs

#

I do this kind of menu at work

#

Let's say you have a fancy abstraction that involves "layers"

#

You have 6 layers for the 6 trades, a layer for the up button, a layer for the down button, and a background layer

#

You can use chat colors to tint the trade layer glyphs and/or hide them when you reach the bottom

#

and just change the glyph of the up/down layers based on if you can scroll in that direction

#

I also used that principle to do this kind of stuff

#

and I used a layer system for these guild uis

unique linden
#

Buenas nececito contactar con soporte

tall plinth
tall plinth
echo basalt
#

I made the layer system myself and I just tossed some placeholders at it

tall plinth
#

or used a plugin like deluxemenu or Nexo or ItemsAdder

echo basalt
#

I'm using nexo for managing glyphs

#

everything else is custom made

tall plinth
#

I see got it

echo basalt
#

TIL that Map.copyOf doesn't copy the order of LinkedHashMaps

#

spent an hour tryna figure out why things weren't ordered

tall plinth
#

Damn

#

It took me literally hours to understand that it's fonts , glyphs and resourcepacks

echo basalt
#

and chat colors!

#

or for tinted items it can be anything but usually it's leather horse armor

#

with the attribute component hidden

tall plinth
#

It was literally white color code

#

which made the gui appear as it is

#

It took me literally 15-20 mins figuring it out

echo basalt
#

you could in theory take the dummy approach and make like 48 glyphs or whatever

tall plinth
#

Will go the smart way rather

tall plinth
winter jungle
# echo basalt

I still dont know how the calculation works, i mean everything is at the title. But if my title gets longer the other stuff is moving to other directions, so i need to shift again yk?

wet breach
#

otherwise not really

tall plinth
#

that's why it's called title layers

#

It changes accordingly

#

That's my guess

tall plinth
worn tundra
#

most of the font stuff still applies tho

tall plinth
#

I see

smoky oak
#

qq
was it recommended to use optionals or no?

young knoll
#

Ehhh

#

Optionals are kinda meh

smoky oak
#

@nullable it is

azure zealot
alpine solar
#

What's the bungeecord repo link?

azure zealot
alpine solar
#

Maven link 😭

azure zealot
#

bro

#

xd

#
<repository>
    <id>bungeecord-repo</id>
    <url>https://hub.spigotmc.org/nexus/content/repositories/public/</url>
</repository>
<dependency>
    <groupId>net.md-5</groupId>
    <artifactId>bungeecord-api</artifactId>
    <version>1.21-R0.4-SNAPSHOT</version>
    <scope>provided</scope>
</dependency>
alpine solar
#

Oh

#

Was it moved or smth?

azure zealot
#

i guess

alpine solar
#

Is it a 1.8 issue?

azure zealot
#

1.8?

#

do you mean like minecraft 1.8?

alpine solar
#

xpdz

#

no lurking 😠

azure zealot
#

lmao

alpine solar
#

Outdated

azure zealot
#

i am nut sure what bungeecord has to do with minecraft 1.8

alpine solar
#

Well, this happens whenever I try reloading or building the plugin

#
net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigotmc-repo has elapsed or updates are forced
eternal oxide
#

it no longer exists as a 1.8 binary

smoky anchor
#

I kinda hope it stays dead so ppl are forced to update to modern versions

eternal oxide
#

unsupported

alpine solar
#

😭

eternal oxide
#

build it yourself

#

There are alternate maven hosts supporting it. But nothing official

alpine solar
#

nvm I just updated the plugin to 1.21.5

thorn isle
#

you'd think some from-scratch rewrite of the entire 1.8 server would've caught on by this point

#

it's kind of uncanny how they keep it on life support still

molten hearth
#

People are too busy porting mc to rust to do that

outer elk
#

how can i block this warn ?

Method invocation 'setExecutor' may produce 'NullPointerException'

#
        this.getCommand("icon").setExecutor(new IconCommand(this));```
smoky anchor
#

define the "icon" command in plugin.yml

outer elk
#

i did

#

wait

#

i will check again

#

ye

#

i define

#

like this

smoky anchor
#

oh wait it's just warning

outer elk
#

yep

smoky anchor
#

well either do nullcheck or just have the IDE ignore it

#

Objects.requireNonNull I think could work too

outer elk
#

what need i nullcheck ?

smoky anchor
#

this.getCommand("icon") is what is giving the warning

#

'cause it can return null

outer elk
#
    if (this.getCommand("icon") != null) {
        this.getCommand("icon").setExecutor(new me.vasir.commands.IconCommand(this));
    }```
smoky anchor
#

well no

#

make a var from this.getCommand("icon") and test that variable

outer elk
#

aah oke

outer elk
smoky anchor
#

show code

outer elk
#

maybe i need ignore

#
        Command iconCommand = this.getCommand("icon");
        if (iconCommand == null) return;
        this.getCommand("icon").setExecutor(new me.vasir.command.IconCommand(this));```
#

btw

#

tried var

smoky anchor
#

well you gotta use that variable

outer elk
#

wdym for "var"?

smoky anchor
#

Command iconCommand = this.getCommand("icon");
if (iconCommand == null) return;
**iconCommand **.setExecutor(new me.vasir.command.IconCommand(this));

thorn isle
#

the ide doesn't consider the getter to have a stable return value, so just checking that it didn't return null before isn't enough to assure it won't return null in the future

outer elk
#

ah

#

ahh xddxdxdxd

#

mbmbmb

smoky anchor
#

and don't return, do the if

outer elk
#

there is no setExecutor method

#

after iconCommand

smoky anchor
#

sure there is
what did you do

outer elk
#

1m

young knoll
#

That's on PluginCommand

smoky anchor
#

oh bru

young knoll
#

and yes getCommand does return a PluginCommand

outer elk
#
        iconManager = new IconManager(getDataFolder());
        
        Command iconCommand = this.getCommand("icon");
        if (iconCommand == null) {
            getLogger().severe("error");
            return;
        }
        
        iconCommand.setExecutor(new IconCommand(this));```
#

is this right?

smoky anchor
#

Command iconCommand -> PluginCommand iconCommand

outer elk
#

ah

#

so you're talking about this

#

ookey

#

ty

smoky anchor
#

Also, I suggest learning java

outer elk
#

chatgpt helps

smoky anchor
#

no

#

man

young knoll
#

I mean the null check is really just to appease the IntelliJ gods

#

I usually ignore it

smoky oak
#

chatgpt can be used as an error checker a la 'list all errors you see'
for anything else its a bad idea to use imo

smoky anchor
#
        iconManager = new IconManager(getDataFolder());
        
        PluginCommand iconCommand = this.getCommand("icon");
        if (iconCommand != null) {
            iconCommand.setExecutor(new IconCommand(this));
        } else 
            getLogger().severe("error");
        ```
outer elk
smoky anchor
#

again, do not return in that way

outer elk
#

avtually i think do this

#

w8

#
        PluginCommand iconCommand = this.getCommand("icon");
        if (iconCommand == null) return;
        iconCommand.setExecutor(new IconCommand(this));```
thorn isle
#

i'd just wrap it in requireNonNull since it's kind of a compile time/packaging error for that to return null

smoky anchor
#

omg return again
i'm done

outer elk
#

bro i really

thorn isle
#

no action other than exploding should be taken

outer elk
#

don't like

#

else if

thorn isle
#

chatgpt has melted your brain

smoky anchor
#

"don't like else if" wtf man

thorn isle
#

nobody is telling you to use else if, you're being told not to use return

smoky anchor
#

you'll suffer if you don't like the most basic flow control

outer elk
#

yes i don't wanna use else

#

the else statement after } is bothering me.

thorn isle
#

are you getting triggered by a curly bracket

#

wait till you learn about anonymous constructors and instance initializers

molten hearth
#

wait till you hear about java syntax

smoky anchor
#

if (something)
doAThing()
else
doOtherThing()

Is also possible

#

no {}

#

(works only for one statement)

thorn isle
#

or god forbid if (something) doAThing(); else doOtherThing();

outer elk
#

why is this so important?

#

if you explain i won't do this again

thorn isle
#

((Runnable) something ? this::doAThing : this::doOtherThing).run()

smoky anchor
outer elk
#

waaaitt

#

i understand now

#

how will it work if I add something else below?

#

xd

smoky anchor
#

yes

outer elk
#

i haven't been coding for 6 months.

#

this is the onEnable method

thorn isle
#

don't return prematurely from the onEnable method

outer elk
#

okey okey sry

#

ty guys sry again

thorn isle
#

if you do want to abort your onEnable midway, do so by throwing an exception, or disabling the plugin before returning

#

otherwise the plugin will remain in the enabled state despite being partially or completely nonfunctional

smoky anchor
#

thank you for putting my thoughts into words
it's hard when I'm in a work meeting :D

outer elk
echo basalt
#

I've had it error randomly as well

plush current
#

I usually use Maven to build my projects. Now I cloned a popular plugin, and I was wondering how to turn that plugin into a JAR file.

vast ledge
#

Does it not have build.gradle or a pom.xml?

plush current
#

build.gradle

vast ledge
#

Send gh link

plush current
vast ledge
vast ledge
plush current
#

Its a private repo

plush current
#

@vast ledge i can send u the gradle code?

thorn isle
vast ledge
plush current
vast ledge
#

You run the Gradle task

#

Usually clean build

plush current
#

on the terminal?

#

@vast ledge .\gradlew clean build
like this?

vast ledge
#

Try it

plush current
vast ledge
#

It shouldve create a folder called build and a few folders inside that, look in there

#

Unsure of the direct path

thorn isle
#

by default in build/libs or something, but it depends on the script

plush current
#

👍🏻

#

its stuck in 18% execution

#

for 7m

vast ledge
#

Stacktrace?

plush current
vast ledge
#

There should still be a log

plush current
#

no?

thorn isle
#

gradle is ass

vast ledge
#

If not it might just be that the project is large and takes a while to build. On Gradle the first build always takes longer, after the first build it's cached and goes faster

plush current
# vast ledge There should still be a log

<==-----------> 18% EXECUTING [10m 20s]

:bukkit:compileJava > Resolve files of configuration ':bukkit:compileClasspath' > Mythic-Dist-5.2.0.jar > 5.1 MiB/16.5 MiB downloaded
:bukkit:compileJava > Resolve files of configuration ':bukkit:compileClasspath' > MythicMobs-4.12.0.jar > 3.4 MiB/10.1 MiB downloaded

vast ledge
thorn isle
#

i've had it sometimes shit the bed waiting indefinitely on a repo that doesn't answer

thorn isle
#

knowing how terrible mythicmobs is at making anything work properly, their repo could be doing something fucked

plush current
#

its the plugin Quests

thorn isle
#

sure but it's downloading mythicmobs

vast ledge
#

Yea, ur Plugin depends on the mythic mobs library

plush current
#

yes

vast ledge
#

So either ur network is slower then my brain or mythic mobs broke something again

plush current
#

😢

#

Its been 18m and it doesn't even moved from 18%

tawny osprey
#

genuine question

slender elbow
#

i mean, if it has to download a dependency to build, it can't just skip it lol

thorn isle
#

they do zero argument/parameter validation for anything, so things frequently explode with random npe's and undetailed illegal argument exceptions

#

and when they do, they never fail to swallow the exception message, and sometimes even the stack trace

#

half of their error messages are completely useless, like [MythicMobs] EntityType {0} does not support resetting AI selectors (they forgot to format it)

plush current
#

I’m new to server hosting and I want to create a Minecraft server hosting setup. Could someone please explain the process to me? Also, I’d like to know how much it typically costs when starting out. Any guidance would be really appreciated!

smoky oak
#

depends

#

do u have a spare PC? if yes, $12/year

nova notch
#

get a raspberry pi for a small server

slow leaf
#

don't get a raspberry pi for your server unless your gonna daisy chain like 12 of them together to make them run as if they are one pi

nova notch
#

small server

#

cheaper than an extra pc

slow leaf
#

i mean for a small server

#

raspberry pi's aren't meant for regular minecraft servers, let alone a spigot or papermc server

nova notch
#

works fine for me with up to like 10 people

slow leaf
#

last time i tried to make a minecraft server one, it won't even get to world creation stage without just shutting off

nova notch
#

skill issue

slow leaf
#

not a skill issue when it was a 8gb raspberry pi 4 using an OS without an interface, just a command terminal, setup with a papermc 1.12 server jar without any plugins, set to 15 players limit and given 5GB of ram

#

as soon as it tried to generate the overworld, it would go black and i would have to turn it off and back on again to get any response from it

lucid trellis
#

Hi i've seen on a server the death message display only on death screen but not in chat and can't find how they did anyone have an idea ?? (might be packets but idk)
1.21.8 if you wonder

young knoll
#

/gamerule showDeathMessages false

lucid trellis
warm mica
wind timber
#

Looking for help: eliminating a 1-frame vanilla crop flicker after canceling BlockBreakEvent (Paper 1.21.8 + PacketEvents 2.9.5)

TL;DR
Even after canceling the break, forcing client-side AIR immediately, and filtering/canceling outgoing block state packets, we still see an occasional 1-frame vanilla crop render on the target block. Has anyone fully eliminated this and can explain why that frame still appears?

Environment

  • Server: Paper 1.21.8, Java 21
  • Network hook: PacketEvents 2.9.5, PacketSendEvent outbound
  • Goal: Virtual “farm” → the real world never changes; clients see per-player AIR for a short TTL on the clicked crop.

What we’re doing now (outbound order)

  • Instant Air injection on LEFT_CLICK/BREAK cancel: send WrapperPlayServerBlockChange(AIR) to the player in the same tick.

  • First-Frame Latch (per (player, section, index)): in PacketSendEvent we do Latch → Cancel/Filter → Overlay → Veto → Mask.

    • Cancel BLOCK_CHANGE when it targets the latched index.
    • Filter MULTI_BLOCK_CHANGE (remove only the target entries; cancel if empty).
    • Rewrite CHUNK_DATA per index (never cancel).
  • Catch-up gating: defer sectionReady/overlay-expire a few ticks; overlay/veto TTLs increased.

Diagnostics (consistent across runs)
On the same (section, index) as the click:

[VF-INJECT] air-now … world=(x,y,z)         // same tick as click
[VF-LATCH] consume … index=…                // first Netty event on that index
// (only after this) RETINT-PE rewrite … on that index (if any)

We never see a vanilla BLOCK_CHANGE/MULTI_BLOCK_CHANGE landing before the latch; sometimes there’s still a visible frame on the client.

What I’d love to know

  1. Is there any other server→client packet (besides the three above) that can cause an immediate repaint of the target block on LEFT_CLICK even when break is canceled? (e.g., some client-side effect tied to input, particles/animation, neighbor updates side-effect, or anything in 1.21.x?)
  2. Is there a known client rendering quirk where the first frame is drawn from client predictions before any outbound packet, making a same-tick server fix insufficient unless we inject AIR even earlier/elsewhere?
  3. Any proven recipe to guarantee the very first frame is AIR on cancel (Spigot pattern or caveat we’re missing)?

Any deep insight is appreciated!

young knoll
#

Doesn’t cancelling the break event send a block change to the client telling it to change the block back to whatever it was

chrome beacon
#

I believe so

#

The breaking is client predicted

young knoll
#

Yeah, if you listen for the packet that tells the server “Hey I broke this block” you can just throw it out

#

Otherwise cancelling the event is always going to try and correct the client

wind timber
#

Hey there! For crops (instant-break blocks), when we cancel BlockBreakEvent the server never sets the block to air so there’s no “revert” ClientboundBlockUpdate/BLOCK_CHANGE emitted by vanilla. In our traces the target block sees:

  1. our nstant AIR (sendBlockChange/PacketEvents WrapperPlayServerBlockChange(AIR)) on the same tick,
  2. then the first outbound on that index is our latch consume (we clamp SINGLE/MULTI/CHUNK),
  3. only after that, any other rewrites.

We never observe a vanilla BLOCK_CHANGE or MULTI_BLOCK_CHANGE landing before the clamp on the target index, and we also don’t see BLOCK_BREAK_ANIMATION on the target (we log it).

Yet a 1-frame vanilla crop sometimes flashes client-side before any outbound is processed.

Questions:

  • Is the client doing a left-click prediction that can render one frame on the previous state before it processes the first server packet—even if break is canceled?
  • Is there any other server→client packet tied to the click (not state updates) that can force a block redraw on that position?
  • Is there a known pattern to guarantee “first frame = AIR” on cancel (e.g., a recommended timing/earlier hook than BlockBreakEvent, or a specific order for sendBlockChange relative to Paper’s event lifecycle)?
young knoll
#

There should still be at revert

#

The server may never see air, but the client does

chrome beacon
#

^ you cannot let it break on the client

young knoll
#

I think they want it to break

#

So they need to not let canceling the event send the “put this back” packet

chrome beacon
#

Ah I see

young knoll
#

There’s also the ClientBoundBlockChangeAckowledge packet

chrome beacon
#

Why'd you cancel the event then?

young knoll
#

Not entirely sure how that one works

chrome beacon
#

Nvm

#

I see

young knoll
chrome beacon
#

Yeah I saw their second message now

young knoll
#

Imo it would be better to intercept the break request from the client and discard it, and then do whatever you need from there

chrome beacon
#

Yeah just handle it on a packet level 🤷‍♂️

young knoll
#

Or rather, acknowledge the request but don’t let the server process it

#

(I’m guessing if the client doesn’t get the acknowledge packet it’ll revert the block itself? Not sure)

wind timber
#

Thanks guys, that clears it up. We’ll try handling it inbound so Bukkit never starts the break path:

Plan (PacketEvents 2.9.5, 1.21.8)

  • Hook Play.Client.PLAYER_DIGGING.

  • If action == START_DESTROY_BLOCK (and for instant-break crops also STOP_DESTROY_BLOCK?), in our VF world:

    • event.setCancelled(true) (don’t enter BlockBreakEvent at all).
    • Send immediate AIR to that player for the hit (x,y,z) (client spoof).
    • Seed our clamp (so any later outbound on that index is still forced to AIR).

Quick questions to sanity-check:

  1. On 1.21.8, for instant-break blocks do you cancel only START_DESTROY_BLOCK, or both START and STOP (and maybe ABORT) to be safe?
  2. Do you send anyting back after dropping the dig? e.g. a resync of the current block state, or ClientboundBlockChangeAcknowledge with the expected sequence or is no ACK the right choice so the client simply keeps our spoofed state?
young knoll
#

Not sure about acknowledging it

#

You could try both

tawny osprey
#

Do you guys use multiple threads often when you make plugins or nah

ivory sleet
#

Yes

#

Web api calls, databas calls, file io calls, sometimes even to do general work in the background like processing large sets of data

vapid badger
#

hi beggniner here,
when you register your commands and listeners do you do it in the main onEnable or you put it in a seperate class?

drowsy helm
#

Try to limit onEnable to just invoking helper methids

vapid badger
vapid badger
drowsy helm
#

Yeah, thats how I do it. Tends to be cleaner

#

initialiseManagers, initialiseCommands, etc etc

vapid badger
#

great thx

wind timber
# wind timber Thanks guys, that clears it up. We’ll try handling it inbound so Bukkit never st...

Following up on my earlier question about handling inbound dig packets to prevent Bukkit from starting the break path. Thanks again for the clarifications, that part is working as expected.

Current setup (Spigot 1.21.8, PacketEvents 2.9.5):

  • On Play.Client.PLAYER_DIGGING for crops in a specific world, I cancel the event so the server never starts the break logic.
  • I spoof AIR immediately to the player, seed a clamp, and after ttl+1 ticks I send the original block state back using a MULTI_BLOCK_CHANGE (per-player only).
  • Outbound, while the clamp is active, I force that index to AIR on SINGLE/MULTI/CHUNK packets.

Problem:
The restore packet is definitely sent (logs confirm correct spoof/vanilla state, sent via MULTI_BLOCK_CHANGE), but the client does not visually update the block until the player interacts with the world (right-clicking a block, placing, etc.). As soon as there’s an interaction, the block instantly appears as expected.

So it looks like the client ignores the update until it gets another trigger.

Has anyone run into this behavior? Is there a known packet or sequence that reliably forces the client to repaint a block in this situation? Would something like a section update, neighbor update, or block update flag be required instead of a plain multi-block change?

Any insights would be super helpful.

wet breach
#

but yeah, its an old bug that persists in different ways between versions where you need to do something to cause the visual to update

wet breach
#

in older versions, you needed to send a chunk packet to make the client update the chunk

#

idk what that does

#

I don't use that stuff

wind timber
#

Why?

wet breach
#

most times, I have no need for it and second I don't mess with packets all that often either

wind timber
wet breach
#

while true, the api you are using just makes use of what is present in the server

#

and a lot of times I don't need these large api's to do things

#

its fine if you want to use it, just I have no idea in relation to what you are asking since I don't use it

wind timber
#

No worries, appreciate it!

vapid badger
#

I wish I had

smoky anchor
#

Don't repost the same bad question in 3 different channels
it does not belong here

thorn isle
#

i have an idea

#

give me money

plush current
smoky anchor
#

I think that was their idea

plush current
plush current
#

what is mean by compile Folia to version 1.21.8

smoky anchor
plush current
pseudo hazel
#

to use buildtools to create spigot 1.21.8?

proven finch
#

good evening I need urgent help I received 1 email that the email address of my spigot account has been changed I do how a lot of plugin buy on this account I have to recover it that can help me I am not English

#

I'm sorry if this is not the right place for this request but I'm lost

eternal oxide
#

?support

undone axleBOT
proven finch
eternal oxide
#

yes

proven finch
#

Thx

eternal oxide
#

provide all the info you have

proven finch
#

jai everything jai the new dress with ip

thorn isle
#

jai jai

timid mango
#

How do I read the nbt of a player’s ender chest

#

And how do I write to it

thorn isle
#

paper supports this iirc

#

i don't remember if you can write to it

#

nevermind it was just for statistics and pdc

violet blade
slender elbow
#

just use player.getEnderChest() ?

violet blade
#

probably for an /invsee for offline player

thorn isle
#

i assume he wants it for offline players

slender elbow
#

i guess we'll never know

thorn isle
#

in fact i'm sure i read him saying he wanted it for offline players but maybe i'm going crazy since i don't see it now

#

i would maybe uh

#

depend on OpenInv

#

it has commands for viewing/editing the inventory and ender chest of offline players, i don't know if it has an api, but even if it doesn't you can probably hook into the internals to do what you need to do

#

i really would rather avoid trying to homebrew that on your own, there are many ways it can go wrong with e.g. player data being cached in memory even if the player is offline for a short period

violet blade
#

there is no safe way of doing it anyways

thorn isle
#

with enough hooking into nms you can make it safe enough i think, but i'm not sure if openinv does that

#

basically you'll want to call whatever logic loads the player data into memory normally, subject to whatever cache eviction logic is in place, then edit that and let autosaving deal with it

violet blade
#

yeah, well, its enderchest tho, even if the player gets on while you are accessing the data, he wont be rushing to open his enderchest

thorn isle
#

it's just that once the player logs on the data is duplicated from disk to memory, and that opens an avenue for items themselves to get duplicated

#

or lost altogether, for that matter

#

since the ender chest is part of the player data and gets loaded along with their inventory on join

potent heron
#

wat does it mean this error
The uploaded file is too large.

thorn isle
#

uh

shy comet
#

Heyo. Sorry to bother. I'm creating a custom item based on a FIREWORK_STAR, and I want to remove the attributes like ball type, color, and other attirbutes in the lore since they're a bit annoying. Does anyone know how to do it in these versions? I couldn’t find anything that actually works

thorn isle
#

have you tried this?

#

there's also a HIDE_FIREWORK_EXPLOSION or something

shy comet
outer pond
#

Not sure when this was changed, does anyone know how I can get my Spigot stuff deployed to Maven Central now? lul

reef peak
#

Hello

#

I unfortunately uploaded a wrong jar into my resource, can I replace it?

rotund ravine
reef peak
#

My plugin version is 1.0.1, spigotmc actual version 1.0.1, deleted the wrong ones

#

it still cannot find it

chrome beacon
#

give it a bit of time

#

the version api gets cached

reef peak
#

ah, what is the solution then

chrome beacon
#

waiting

reef peak
#

Alright thank you

graceful laurel
#

can someone help me my plugin is 1.21.5 is there a way to change to version to the new 1.21.9 without redoing everything?

smoky anchor
#

just change the version in pom and fix compile issues if any exist and test it for bugs

#

why do you think you'd have to redo everything ?
The point of the API is that old plugins work for as long as possible (I think, it sure looks like it)

smoky anchor
#

I assume you made your plugin with maven so it would be in the root directory of the project
if you used gradle.. I don't know gradle :D

smoky anchor
#

ok apparently you go to build.gradle and change the dependencies

tawny osprey
#

Hey guys just curious, is it wise to use BukkitRunnable to set cooldown for plugins, or is there a "better" way?

plush current
#

how to generate a bundler jar?

#

of spigot

sullen marlin
#

?bt

undone axleBOT
sullen marlin
#

java -jar BuildTools.jar ?

sullen marlin
plush current
# sullen marlin ?bt

I correctly merged the Spigot repository into my branch. After that, I built the .jar file using the Gradle command: ./gradlew build -x test. I then placed the resulting .jar into my server folder. However, when I try to start the server, I get the following error: no main manifest attribute, in server.jar.

#

some one said that i need to have a bundler jar

chrome beacon
#

Just use BuildTools

plush current
chrome beacon
#

Spigot doesn't even use Gradle?

sullen marlin
worldly ingot
#

Sounds like a slip up

#

THEY'RE USING PAPER! GETTEM!

chrome beacon
#

I do remember them mentioning Folia earlier

#

but then said Spigot when we said wouldn't give support

slender elbow
worldly ingot
#

Crazy

#

Ban Emily for evading API rate limits

slender elbow
#

what if there is a secret query parameter that will give me an easter egg

#

&thisqueryparamdoesnothing

#

i need to try them all

#

like wheatley trying out passcodes for the control pod in portal 2

hushed spindle
#

did the nms version of 1.21.9 change compared to 1.21.8?

#

or is it still R5

eternal night
#

Iirc it was bunped

violet blade
#

bunped

hushed spindle
#

it seems that it wasnt and we're still on R5

#

i think at least

iron cave
#

I thought nms version changes any time the protocol version changes

#

1.21.9 should be R7

hushed spindle
#

nms version has stayed the same since 1.21.6

#

being R5

slender elbow
#

it's completely arbitrary

onyx fjord
#

ConsumableComponent.Animation SPEAR is just a draft right?

slender elbow
#

draft?

#

it's the animation used for the trident item, for example

tawny osprey
pseudo hazel
#

yeah thats good

hybrid spoke
tawny osprey
unborn hollow
#

I'm getting "package org.bukkit.craftbukkit.v1_21_R5.entity does not exist" after updating my pom.xml to 1.21.9, did i do something wrong?

hybrid spoke
unborn hollow
slender elbow
#

it was changed to R6

#

welcome to nms

hybrid spoke
#

thats your problem, the package changes every 1-2 versions

unborn hollow
#

ty for the warm welcome, i'm definitely new to it haha

unborn hollow
buoyant viper
#

spigot

unborn hollow
#

mannequin.setPlayerProfile(player.getPlayerProfile()); didn't texture the mannequin with the player's skin. is this a bug?

chrome beacon
#

Is the player online?

unborn hollow
#

yes

sullen marlin
#

did you resolve the profile?

#

(.update())

#

there's a note in the release notes, but probably what needs to happen is that certain methods need to use dynamic rather than static profiles

#

or maybe profiles with no textures should just default to dynamic, not sure

unborn hollow
#

if by resolving the profile you meant

PlayerProfile playerProfile = player.getPlayerProfile();
playerProfile.update();
mannequin.setPlayerProfile(playerProfile);
sullen marlin
#

It's a future callback, you need a when complete or .then or whatever

#

And I'm almost certain it works because I tested it

violet blade
#

yeah this is working for me sorry i tried this with an already fetched profile, it wont work with a new player

unborn hollow
#

i'll try it again then, thanks

unborn hollow
sullen marlin
#

Because you're not passing a complete profile with textures

#

As I said you need to use a callback in the future, it's asynchronous

worldly ingot
#

update().thenAccept(profile -> mannequin.setPlayerProfile(profile))

#

Or I guess thenAccept(mannequin::setPlayerProfile)

unborn hollow
#

i'll try that choco thanks for explaining

worldly ingot
#

Futures and asynchronousy are hard