#help-development
1 messages · Page 1025 of 1
whatever it's not worth fixing, I'll modify an interaction entity instead, I'm only going to run into other problems
io.papermc.paper
yeah, but im working with the spigot api?
and spigot nms should be compatible with paper
?fork
SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.
we cannot guarantee that all spigot plugins work on paper because we don't know what paper does
either rerun and verify that this happens on spigot or refer to paper for support
Guys, how do I tp a player to another world using pressure plates and a command block?
/execute command
Execute as @p at @s run to “coords” “world”
/execute in <world_name> run tp <player_name> X Y Z
The player name can change
It’s not always fixed to only one player
Then substitute it?
Replacements be like
Into what?
The @ selectors
Yes @ what? p s a
look up whats best for your situation
^
p = player
s = selected/current entity
a = all players
e = all entities
r = random
n = nearest (soon to be)
It doesn’t work
I’m having “impulse, unconditional and needs redstone”
And the same code, but I replaced it with @s
Oh thx!
Target selectors are used in commands to select players and entities arbitrarily, without needing to specify an exact player name or a UUID. One or more entities can be selected with a target selector variable, and targets can be filtered from the selection based on certain criteria using the target selector arguments.
Fandom. cries
why does everyone hate that site so much
it does inconveniences to its wiki owners iirc
happens on spigot too
just tested
same error?
can you click Ctrl+Shift+F (global search) and search for UNCOMMON?
oh now VERY_RARE
bc i don't see it anywhere
oh
i see it now
are you remapping properly?
It's not official anymore too. It can he inaccurate there's no one to guarentee it's accurate
what do u mean with properly?
The maintainers of the fandom page have moved to minecraft.wiki
so you should be using that
https://paste.md-5.net/xaludotidu.xml
isnt my hole pom, but should be enough right?
oh, yeah, dont got the plugin...thx!
never used the remapped mojang
hope it works now
does someone know how to compile a plugin into a jar file dm me if u know
its to hard
can someone do it for me
works now
thx!
but got an other error 🤣
i used chatgpt to make the plugin
In the inventory view yes
then use chatgpt to compile it
lol
You aren't getting help
why
ask chatgpt how to compile
chatgpt can probably explain precisely how to compile it
do NOT download jar files from strangers
10 bucks says chatgpt didn't even say to use maven
but it's #1 on google lol
Except me. Someone's gotta test my stuff. :kek:
i don have a jar file
not forever
read my message again using eyes
It won't be for many more months
plz someone help
Yes
help with what?
yes, there are only armor slots in a player inventory..
bro used chatgpt to get code for his plugin and does not know how to compile
yes
https://blog.jeff-media.com/how-to-create-your-first-minecraft-plugin-using-the-spigot-api-and-maven/
Then copy/paste your code into the project and hope for the best. And then enter ?learnjava and read one of those tutorials
i mean he could have asked chatgpt how to compile
that doesnt look correct
but that also works
ok
but i dont know how to install maven
Looks fine to me
armor slots are right after the others
I'm not on pc so I can't check nms
thats the problem
https://github.com/mfnalex/AngelChest/blob/master/src/main/resources/slot-numbers.png
these are the slot numbers that the API uses
Best Death Chest plugin for Minecraft / Spigot 1.14+! Also supports Graveyards & a ton of other features! - mfnalex/AngelChest
I swear, there are too many pictures floating around. All with different numberings.
yes that one looks correct
crafting is 41, 42, 43, 44, and result is 45
that's outdated i think
Where are you getting thr item from
if you open a chest, the view doesnt have armor slots
The view or the inventory
Inventory doesn't have raw slots
I've said this already
the picture I sent works for PlayerInventory#getItem(...)
correct
yeah just the players items
chatgpt gave me this
name: HacksPlugin
version: 1.0
main: com.yourname.hacks.PluginMain
api-version: 1.16
cool 👍
dude, either learn how to make a plugin properly or ask gpt to help you compile it
i have no experiance of making plugins
so get some
neither did I when I started
you acting like we were born knowing how to make spigot plugins
wow that code is shit
chatgpt is not taking spigot dev's jobs anytime soon
just like that
yeah probably, but I doubt youll ever need the players crafting slots
How i can do the PlayerVelocityEvent with the packetsevents?
Yes
onenable is thread safe? spigot 1.8
yes
onEnable is called on the main thread
TL;DR yes
That's because the protocol, events and the inventory array use different indexes iirc
So they're all right and wrong at the same time
im sry, that i got so much errors today...
i cant register my enchantment
i think i know why, but i dont know, if its possible
i read some things about the registry. i cant just register my enchantment with it, bc the client does not have the registry entrie right? but is it still possible to register an "empty" enchantment, just the name, max lvl etc?
thats my (relevant) code:
- Enchantment Builder Class:
- CustomEnchantments Class:
Registries eventually get frozen
you gotta unfreeze and do some weird beyblading in the code base to get it to work
or just wait until 1.21 for proper custom enchantments support via data packs 😄
i know how to unfreeze them, but when do i have to do it?
it's right around the corner anyway
yeah, but i wont use it for like 3-6 months so nah
doesn't 1.21 launch like next week?
yeah
in 6 days
yup june 13th
and md will be there to launch spigot the next day (says me blissfully ignorant of the workload)
was that confirmed?
You would be a wonderful PO 💀
ok
did I dream that when setVisibleByDefault is toggled to false it didn't register hitboxes for players?
I swear that was a thing
no?
this hitbox bs makes 0 sense
why does it just randomly cancel some projectile damage
what kind of sense does this even make
it was added in like the very first 1.21 snapshot
fixed my error, thanks!
I believe the hitbox isn't registered but it doesn't mean that projectiles shot are completely invisible
or whatever the term is
displays do have a bounding box
holy fucking shit what
but when I don't have an underlying entity the arrows do not bounce at all
they just go through
this doesn't make sense
also sometimes I straight up see it triggering twice
mojang trying not to introduce a crazy technical change for 3 updates in a row (impossible)
They're making everything data driven it'll only get worse
they wont fucking let me release underscoreenchants 2.2 in peace
istg
i'm releasing 2.2 and moving to rust idk
Its possible (for the client) as it never gets told of the player entity so can't predict the collision
Nope big ol fuck you
are arrow collisions client-authoritative?
Who knows with mojang 😛
nice
fantastic I am getting different behavior when my client doesn't see the entity spawn
so they are client-authoritative I think
which, btw, why
mojang
why would you let clients say what they hit
less processing for the server, but bad design
So hackers can more easily create clients dub
Get gud
sure and it's more convenient for me if my bank has no login number or password but it wouldn't be a very good bank if anyone could hop on and use my money
mojang is already using the most basic aabb hitbox system possible, I'm sure you could load it on the server with minimal overhead
My bank is a bitch. I have to use name + password + online banking code + 2fa AND Chip+pin authorization.
hehe
say hello to how I do banking
if you want to do basically anything you better bust this out because it will ask for 3 numbers
also the login is with a bank-issued code
I have a littel calculator thing, I have to insert my bank card in, then ask for a number from teh bank, type it in, get a response code, put that into the website, then get a 2fa auth key, pluss all my other info. Just to check my balance
also we do also have 2fa
yeah I have that calculator as well
so they can't sniff your keystrokes
the worst part is, if you use the app, basically none of this is required
yeah
I can log in with just my fingerprint and validate any transaction
but they refuse to let me do simple 2fa via website
it makes no sense
they already have lowered security standards for the app, I don't know why they imagine the website should be less convenient for added security
I maybe use it once a year as its such a pain to log in
I have to use it multiple times a month for my business and I really do not like doing it on my phone for business, it sucks
You're stopping the cause of damage..
I am not
What's the deal with player.sendBlockDamage(location, damage) ? I can't get it working.
It's blinking like crazy.
never messed with that too much but iirc it's a very fickle thing because if you stop applying it it resets or something, since it acts as though you stopped mining a block in mc
I tried applying it every tick, but that didn't really help.
not 100% sure of how it's supposed to be used but I would assume you might want to add to the damage each time it's sent or something
Sometimes when you click correctly it stays on the block until you click something else.
don't know for sure but I assume it's because of the systme that is supposed to reset blocks if you cancel mining them
never really messed with that specifically
How do I get the chat message in AsyncChatEvent?
(ik this is the spigot server but paper servere is kinda ded)
isn’t just like message() or something
Which gives you a component that u can deserialize into text
mojang's netcode with block breaking is a mess, it's probably blinking because the client is predicting the breaking
I'm also thinking maybe it's bugging out only for the grass because grass breaks normally with single click.
mojang's netcode with block breaking is a mess
But I'm not sure.
No, it's not.
oh I know, I have made the mistake of developing anticheats
I have set PLAYER_BLOCK_BREAK_SPEED to 0.0.
So there's no client side prediction anymore.
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event){
if (event.getItem() != null && event.getItem().getType() == Material.AMETHYST_SHARD) {
if (event.getAction().toString().contains("RIGHT_CLICK")) {
Player player = event.getPlayer();
Location location = player.getLocation();
Vector direction = location.getDirection();
player.setVelocity(direction.setY(0.5).multiply(2.5));
}
}
}
why do i get this error when running this
cannot find symbol
it cannot find symbol
we need the actual stacktrace
not just 3 words
rly
It's probably resetting the digging progress to 0 whilst updating digging regardless
Any tricks I can use?
give more context
that
WHAT symbol
For displaying the (fake) block breaking animation without it blinking/resetting.
you can probably test this theory by only sending the breaking progress once, if it gets removed then the client is updating it
Sure, I can test that.
you should either put it in imports or the model folder and for the rest I am pretty sure the readme is up-to-date
@short drift have you tried using the sendBlockDamage with a custom sourceId?
I have not.
How would I get an appropriate sourceId?
Just any random UUID?
it's an int
Int? What does it do?
well all entities on the network level have an int id
again, the readme says that
it's a UUID but for packets
Integer
You can probably generate it based off the block position, and probably make it negative to avoid interfering with anything, it's up to you really
Yes, I know what an int is. I just asking what it represents. I assumed it would have been UUID.
yes
Well, I mean. Can it just be -2 or something? Does Minecraft really care?
it doesn't care
so this is fun, if I'm looking at this correctly the server doesn't send the actual bounding box of an entity but the default bounding box of that entity type
oh wait
I might be wrong actually
could probably manipulate it to get what you want
The server does not send the bounding box at all
oh hey I fixed it
The client just knows the bounding box for each entity type
uuuh
I don't think so?
coll is correct
Mojang doesn't like to send data if they don't have to.
However, it's pretty easy to attach an interaction entity and redirect all interactions from it to the actual entity
^
Which is a sensible approach. But poison for modding.
not sending a flying packet every tick to save 1MB an hour, absolutely killing anticheats.
well
🥲
one of two things can't be true then, either the server decides arrow collisions (which makes sense tbh) or the client gets bounding box updates (which would make less sense)
The server decides arrow collisions
yeah now that I got it working that does seem to be the more likely thing
the client tries to predict stuff though
Old model engine uses custom sized slimes for hitboxes
New one uses interaction entities
Ok, so I tried setting the break animation only once. And yes, it does reset.
Next I'll try the negative integer.
but if you send a client a spawn packet for an entity, then modify the bounding box on the server, and shoot the entity, the arrow will almost always bounce off giving a damage event that is cancelled
but if you hide the entity from the player and do the same modification to the hitbox it works
if you think that doesn't make sense, well, 🤡
Mojank
it has to be partially client authoritative though
I mean why else would it get cancelled and double trigger
I mean I just managed to recreate the entire thing and all I'm doing is modifying the underlying living entity's hitbox
it does require exposing private fields and hiding the underlying entity from the client but now it works
I was going to do interaction entities but that just makes it annoying for some stuff
Setting the PLAYER_BLOCK_BREAK_SPEED to 0.0 does, however, remove all glitchy client side block breaking animations for materials which break normally with a single click.
So that's nice.
besides this has the fortunate side effect that the mojang pathfinding does take the bounding box into account by default so the entities will actually pathfind correctly even with large hitboxes (i.e. large entities won't go through small spaces)
well, they will not just phase through them
Oh yeah! Setting the id to -2 definitely does work!
I think they might still try to go through, haven't tested that yet
Let me shoot that on a video for you.
I did both
Since the client would use the normal hitbox for attacking/right clicking
So I added an interaction entity for that
Yeah so I think the default method uses the id of the player entity. Client starts to update breaking, and the progress is set using that id (so probably back to 0). Using a custom id means that won't be updated anymore.
@dire marshThat's very cool. Excellent advice. Thank you so much. I was getting desperate.
Now I'll just have to spend 12 months rewriting all Mojang damage logic and tool breaking logic etc.
Funny, though. I use break naturally, but the grass doesn't make breaking sound or drop anything. It just disappears.
same as filename, no extension
nametagName is the name you want to see in-game, though be warned I am literally programming the part that actually displays that right now so it's not currently implemented
though I guess it will be implemented tomorrow
that's the underlying entity
yeah
also while I'm sure people are thrilled that this is now a support room for my plugins it might make more sense for you to post questions about my plugins in my support discord, not here, plus I'm about to go to the gym and there's a 0% chance that I will respond to support messages here
I don't do dms, you can find that discord link in my spigot projects
Hello!
I am developing a plugin with Minecraft/Spigot Version 1.20.6, ProtocolLib 5.1.0. I am trying to edit the server info packets. I am getting no errors in console and I tried debugging and can confirm the event is working but there are no changes occurring
This code is in my onEnable:
getServer().getPluginManager().registerEvents(this, this);
ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Status.Server.SERVER_INFO) {
@Override
public void onPacketSending(PacketEvent event) {
WrappedServerPing packet = event.getPacket().getServerPings().read(0);
packet.setPlayersOnline(69);
packet.setPlayersMaximum(70);
}
});
On the protocollib website, it says to use 5.3.0 for >= 1.20.5 but I can't get that version working in my pom, i went to check the repository and couldn't even find it
5.2.0-SNAPSHOT is the latest version
I used the search feature on this discord and found out that you have to write event.getPacket().getServerPings().write(0, packet); at the end of the event
Thanks for the help tho
feel silly finding it 1 minute after asking 😭
Its okay to feel that way but its nice too that you found your solution c:!
i have heard somewhere that items have rarities, for example, dirt is "common" and its in white, and enchanted book is "rare" and its in blue, and like, enchanted golden apple is mythic, and its in pink, is there really a rarity system in minecraft or is it just the item name color
Is there a way I could directly kinda import a json loot table as a loot table object? or would I have to create the logic myself
just liek a normal loot table fro datapacks
so, yea
If it's actually in a datapack you can use https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Bukkit.html#getLootTable(org.bukkit.NamespacedKey)
I have the BlockState for a specific sign in Minecraft. I'm trying to modify it programmatically without relying on deprecated packages. While the 'Sign' interface seems ideal, many of its methods are deprecated. This leaves me with the 'SignSide' interface as an option, but I'm unsure how to convert the BlockState instance for the sign into a compatible SignSide instance. Any assistance would be greatly appreciated!
Sign#getSide(Side)
oh thanks man
btw you write #, is that like Sign Class and the # means like method of object?
yes
its like Sign.getSide but for documentation stuff I guess
normally # denotes class methods and . denotes static methods when talking about docs
Why r u working with protocollib? Isnt that an api feature? I think serverpingevent? But im not sure
It's not fully fleshed out with spigot
It seems like methods in the SignSide interface are also deprecated although it doesn't say in the docs?
The docs define if something is deprecated or not in the first place.
Sounds like you're not using Spigot
You're most likely depending on Paper
Yes, but they are built on top of each other and im importing the necessary packages. Is that enough?
^^
if its deprecated in ide but not on spigot docs, its paper messing around
it does
well you haven't provided any code on how you use the config
nor have you specified which load method you're talking about
so we can't really help you
That still doesn't show how you're reading from the config
that doesn't answer the question
still doesn't show how you're reading from the config
here impl https://paste.md-5.net/dixufusudi.java
can I cancel the player teleport event and prevent the player from teleporting?
event.setCancelled(true) doesnt seem to work
i not find problem but i know now config class work correct
somenthing wrong with impl classes
should work
i imported CraftPlayer from the spigot-1.20.6-R0.1 jar yet can't use CraftPlayer, and i get a red line under CraftPlayer?
?bootstrap
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
?nms
hmm, ill test it again then
yes you
but im still seeing if its me messing up the code
because sadly its not the simplest code xD
organizing players across multiple worlds
hmm yeah it might be me
xD
im teleporting them myself again after
the shaded version doesn't hold CraftPlayer?
You're making everything harder for yourself by depending on the jar
ant existed back then 
Im in 2001 c:
05
@austere cove your long lost twin in here
btw Welches Brot magste am Liebsten?
Schön Knakiges Brot
2006 here
all bread is good
loads shotgun
how'd he escape my basement
hello, in 1.20.4 the command below worked but now it doesn't work in 1.20.6 and I don't understand how to adapt it with the data components
/give @a minecraft:potion 1 {Potion:"water",display:{Name:'{"text":"Eternal Fluid","color":"yellow"}'},Enchantments:[{id:unbreaking,lvl:1}],Unbreakable:1,HideFlags:38}
Not again, please dont shoot my legs again 💀 Im swear im not running again RUNS FAST
That's a question for #help-server
oups sorry
or even better the mc commands discord
https://mcstacker.net/ use mcstacker there you can see the syntax
Function: Good
UI: WTF IS THAT
it's decent
I think it looks ok and overseeable
yea
The colors 💀
just black xd?
they're fine
Its like Lasertag Arena
Better than most sites for Java obfuscators
Black and Neon lights 😂
You studie art xd?
Hell nah, just working full time with a frontend team 💀 They would burn us for that 💀
But im backend and that has a reason xd
well he doenst have a frontend team i would think xd
isn't it just one guy developing it?
so he can do what he wants and no one can do anything xd
and doing frontend i mean
/give @p bow[item_name='{"color":"yellow","text":"Eternal Fluid"}',unbreakable={show_in_tooltip:false}] 1
I generated the command from the site but... returns an "Unknown object name".
For just one person, its good, like my own projects. I think he like backend more than frontend just as me xd
Yeah I believe one guy made the entire site
That command works fine
yes
Now the color scheme make sense too with that name tbh
love u
cuz i need to intercept packets. It is not an api feature unfortunately, serverpingevent from spigot is very limited.
nms or protocollib, and up to this day, i still don't know what's better lmao
if you just wanna use packets and dont wanna update your plugin every time a new version comes out protocollib is best if you want to use more then protocolLib offers you shouldnt use it
thats another option, i think i will try all of em atleast once
ok, ty :)
so i basically always fall back to nms or packetevents in this case haha
vollkorn
¯_(ツ)_/¯
So'n dinkel kartoffel is au nice :)
Does anyone know how to force a spawn?
Ex: I left the game at 112, 32, 64 and when I rejoin I want to be at spawn (124, 64, 240
u can teleport the player upon playerjoinevent
i sometimes make my own bread with cheese and bacon inside 🤤
selbstgemachtes dinkelbrot >>>>
Player.Spigot#respawn()
How would I do that?
Where do i find that
somePlayer.spigot().respawn()
declaration: package: org.bukkit.entity, interface: Player, class: Spigot
fr 🙏 💀
Why respawn specifically when you can just teleport?
oh my bad, I didn't properly read
I thought it was about "forcing a player to respawn", not "spawn on join at specific location"
declaration: package: org.spigotmc.event.player, class: PlayerSpawnLocationEvent
this is the correct event to force a spawn after joining ^
Ok
I'm surprised there's an event for it.
didn't even know there was another event tracking player join something haha
it was added in 1.8 iirc added in 1.7.10
;-;
I get the output "Setting block speed to 1.0".
But I can't break some things.
Like carrots.
Weird?
carrots are instabreak, prob blockbreakspeed would be null i suppose?
does it say that?
what even is the purpose of that code? where/how are you calling it?
I'm applying by default break speed of 0.0.
Setting the base value to 1 does not mean the final value is 1
There may be modifiers altering it
Doesn't really matter for me.
Basically I'm only handling the insta break blocks.
Well, maybe it's easier to show.
Grass normally insta breaks.
Make sure there are no modifiers
I think the sound pitch is wrong, tough. It seems Mojang doesn't use 1.0.
But, what do you mean by the modifiers exactly?
To the attribute
The base value is transformed by any modifers to get the final value
I mean. That's the base value. So I assume modifiers would get applied normally.
so i have this depedency in my maven
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.6-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>```
and whenever i try to use CraftPlayer I get that it cant be resolved, even though it's in the spigot jar?
?bootstrap
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
Have you run buildtools
yeah
is that not what i have?
not completely sure, just thought it might be of help but idk really
Don't forget the rest of it
?nms
Did you run it with the remapped flag specifically
yeah
i have this aswell and i think it's right
Only that ... yeah, it's not block specific. That attribute affects all breaking equally.
I also tried setting the event priority to highest, but it made no difference.
So what happens is on BlockDamageEvent I check if it's on my list - if it's not I set the base break speed to the default 1.0 value and simply exit. But the carrots will have none of that nonsense.
It somehow acts as if the break speed was still 0.0.
However dirt blocks etc break as they should.
So it's kind of weird.
Same with torches. Probably all insta break blocks.
But why - no idea.
Or ... wait .. I need to test whether it's just incredibly slow to break.
did you reload maven?
also be sure to set your JDK to java 21 at File -> Project Structure -> Project -> SDK in IntelliJ
Nope. Trying to break it for couple of minutes - nothing happens.
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
Was that for my benefit? Sure, here:
@EventHandler(priority = EventPriority.HIGHEST) public void onBlockDamageStart(BlockDamageEvent event) {
// If player is holding a tool, increase block break speed.
var player = event.getPlayer();
var block = event.getBlock();
var blockType = block.getType();
// var toolType = player.getInventory().getItemInMainHand().getType();
// If not an instantly breaking block, exit early.
if (!instantlyBreakingBlocks.contains(blockType)) {
System.out.println("Block is not instantly breaking, exiting early.");
allowNormalBreakingSpeed(player);
return;
}
// Etc, doesn't go here.
private void allowNormalBreakingSpeed(Player player) {
var playerBlockBreakSpeed = player.getAttribute(Attribute.PLAYER_BLOCK_BREAK_SPEED);
if (playerBlockBreakSpeed == null) {
System.out.println("Player block break speed was null, can't set block break speed!");
return;
}
System.out.println("Setting block break speed to 1.0");
playerBlockBreakSpeed.setBaseValue(1.0);
}
There's really not much to it.
- Is it on the list? No:
- Set break speed to 1.0.
Is carrots in the list
Try and break carrots and then lets see what your break speed actually is
/attribute @s player.block_break_speed get
Weird, right?
I suppose I might have a theory, but the fact that this doesn't happen to all blocks kind of squashes it.
I think ... one possibility might be that the same thing does happen to all blocks.
But for blocks that are not insta-break, the event fires more than once.
The second time it fires the value has already been set to 1.0 - allowing it to break.
But for insta-break blocks it never fires more than once.
It's possible it doesn't update the players breaking speed when they are already in the process of breaking a block
Right. Hm.
I mean, it's not really the end of the world. I can fix this by simply handling ALL insta-break blocks.
There aren't that many of them.
But it does seem kind of fragile.
You could apply the modifier when the player looks at a block
but that can cause latency issues
Or perhaps on playerinteract. I think it might fire before BlockDamageEvent.
how do events work, do they call the handler methods instantly or next tick?
instantly
If they were next tick idk how cancellable would work :p
then my hacky way will work
oh yeah good point haha
time travel I guess
undo redo pattern
idfk
Using PlayerInteractEvent kind of works.
But I'm not sure if I want to do that.
There's so much stuff going on in that event.
It would require quite a bit of defensive coding. And still might end up with edge cases I didn't think of.
It's not fun to deal with. I think It might rather just handle all the insta break blocks in special cases.
whats this font?
ty
It's a pretty solid font.
It gets out of the way and doesn't really bother you.
Which is what a good font does.
caskaydiacove
How to replace blocks faster than FAWE? How FAWE fast replace blocks?
i need replace certain chunks, 1000 chunks per second
If you're swapping the entire chunk that might be possible
but you'd need some quite intrusive nms code
is the easiest way to fill an area with blocks (or air) just to loop and use setType?
certainly the easiest without 3rd party apis
okay nice
public void onBlockBreak(BlockBreakEvent event) {
Block block = event.getBlock();
plugin.getLogger().info("broken a block at " + block.getLocation()); // gets logged
block.setType(Material.BEDROCK); // doesn't work
block.getWorld().setBlockData(block.getLocation(), Material.BEDROCK.createBlockData()); // doesn't work
}
``` When a player breaks a block I want to put bedrock there, how to do that?
set it one tick later
by the way I pulled this code from a 1.16.5 plugin and it works there
has anything changed?
usually it should work without delaying, unless you cancel the event
sorry for the very late response, i'm updating the maven project on eclipse
?workdistro
maven clean build?
maven doesn't have a "build" lifecycle
the event is never cancelled though
I sent literally the entire block break listener function there
I feel like 'set it one tick later' is a workaround, am I wrong and this is how people do this nowdays?
is there another plugin cancelling the event?
literally nope
plugin.getLogger().info("Event is cancelled? " + event.isCancelled());``` it logs false, even when event handler is registered with listener priority highest
I'll make sure and remove all other plugins now and try again yeah even with the only plugin, it still doesn't replace the block
are you referring to my message?
yes
under run as, there is an option for maven build and clean?
run mvn package and then show the full output
maybe might be better to have them do mvn clean package
this way we can ensure previous compile tries are not interfering
too long to send
?paste
?paste
it compiled fine, so what's the issue
i can't access craftplayer
did you set your JDK to java 21 in eclipse?
BuildTools is needed for NMS
iirc they did run buildtools, otherwise maven would have already complained
i have build tools
Wait, you're using eclipse?
yeah
oof
@worldly ingot do you know of these eclipse shenanigans?
Is it not detecting your local m2?
i assumed it is
mb where do i check this
if it compiles it can
only other thing would be java 21 maybe?
though I thought we already checked that
no clue, eclipse is weird
why not just use intellij :p
i wanna try new things
which version of eclipse are you running? (Help -> About Eclipse)
2024-03 (4.31.0)
Which "JRE System Library" does it mention in "Java Build Path" in settings?
when thats set to 21 i still get the same error + additional ones
Preferences > Maven > User Settings
What path is set there?
just use intellij and it'll magically work :p
my .m2 repo
already have this variable in there lol
whats the issue?
Maven with eclipse
can't get craftplayer to work even though i supposedly have the depedency for it
exact issue? his log looks like it built fine
Apparently they aren't getting access to nms.
right click your pom -> maven update project
update project does nothing
Have you tried setting the <localRepository> tag in the pom?
it shoudl have taken a second or two to rebuild
Oops, I meant in the settings.xml
else, select the project in the Package Explorer, then click Project menu at the top and clean
still getting the error
error?
?img
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
have you pasted yoru pom for us yet?
your special source is too old
dang it
current version is 2.0.3
oh bruh
I was gonna say that
thanks lol
Is there a way to get a list of banned players for that server on Bungeecord without using plugin messaging?
could store banned players in a DB instead
hi, I'm trying to disable chunk save in ChunkUnloadEvent event using setSaveChunk(false), but it doesn't work. Does anyone have an idea what it is?
what particular reason do you have to avoid that?
don't know if this counts as development, but for eclipse ide, i did something and now my java files have no color and i can't hover over to see errors or see the selections after the . does anyone know how to revert or fix this?
color has to do with formatting, selections has to do with with autocompletions
hope this helps find the relevant areas in the configs
yeah but it all happened at the same time so i assumed it was related. also part of my code is fine and formatted previously and the other part is broken
could try reloading the IDE but would probably undo whatever change you did
if you believe its related to it
reloading?
restarting
oh yeah i've tried that
@worldly ingot don't you use eclipse?
if i was a server owner iw ould not want to have to setup yet another database
what do you mean yet another database?
DB's are kind of a routine thing in regards to managing and hosting servers
also, there is only so much data that the yaml file can handle before it takes too long to load or save as well
so eventually you will need a DB at some point
but not setting one up because you don't like setting them doesn't seem like a good reason to avoid doing it, to include going routes that end up not being ideal
why not use SQLite
if you're too lazy to setup an offsite DB or setup mysql on windows
which is a pain in the ass
That means that you've either removed the Java nature of your project, or removed the file as a source directory
Right click the src folder, Build path -> Add to build path
Or something like that. Can't remember the exact phrasing of those settings
anyone? 😭
it's odd because half of the file is fine, and i don't think the src thing changed anything
my own xD
well its more of a library not relaly an api
but its just for my own plugins haha
idk any others
InventoryFramework, TriumpGui and Interfaces are good ones
But realistically you could write a nice one yourself since there really isn’t a lot to handle other than checking which slot a player clicked
is there a way to see the updated versions of stuff like PacketPlayOutDestroyEntity in remapped mojang
Probably ClientboundRemoveEntity or something like that
o im stupid thanks

oh yeah I saw your coment
Yeah xd
That issue is a few easy to fix but i found another things related to that meta then its a little hard to check
oof
yeah I tested it with justa give command and its borked there too
except on singleplayer ofc xD
so yeah def craftbukkit
Thanks 1.13 xd
how do i rotate this (block displays)
i tried with transformation but it didn't do what i wanted
nvm i figured it out
Pineapple!
For future reference
?mappings
Compare different mappings with this website: https://mappings.cephx.dev
oh, thank you!
do you guys use ORM's?
For website integration would it be better to change my plugin to save into a database? Or is there an easier way to pull information from the server ?
Yes, database ideally
But depends on what you’re doing
If it’s live data, then a socket or rest api would work
hibernate?
How can I draw
Something like this, the top would d be the avatar of a person then the stats that are in my custom plugin, live stats isn't necessary, they can logout to see them refresh
Yeah database would be ideal for that

Does anyone know why i get this error? I have two plugins with h2 shaded into them and relocated into the right package name but both somehow interfear with one another. I dont know this type of error https://pastebin.com/TExWz0w4
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Idk seems to be some casting issues if I read that trace correctly
Okay but i dont really know what to do with it. And why its a mix out of two different plugins. Or how to fix it
well it also seems like ur connection is null
Both plugins work without error seperatly
Not sure you can relocate h2. I know you can't SQLite
Does one of the plugins use the storage and database stuff from the other one?
no both dont use code from the other one
but if you cant relocate sqllite how does it not get errors from other plugins using sqllite?
Thought you needed to relocate it
SQLite natives can;t be relocated
they are hard coded in SQLite so alwasy look to teh original locations
no clue if h2 is the same though
If you are on current spigot just use teh libraries section of plugin.yml
what does that mean? Whats a library section?
well they’re using paper, but paper has that library feature also
okay and what does that do? does that download the libary into the spigot.jar so not every plugin needs it to implement into their plugin or?
Spigot downloads the lib and injects it into the plugins classpath
so i wouldn't need to add it to my jar file?
ahh ok thanks
Anyway justin iirc the way luckperms deal h2 and sqlite is not by relocation
But by isolated classloading
whats that
Obv yk how luckperms download dependencies at runtime
For h2 and sqlite they download the jars but they load the them up w the like platform classloader or whatever u call it
That way its isolated from the minecraft app
okay and the problem with h2 is it cant be relocated and then gives me the error because i did?
I assume it can’t be relocated, I mean I’d also assume you can find a workaround
So normaly relocation would fix this problem with other depencys for example just for me to understand
yes
it works in one plugin as part of it can;t be relocated, so a single plugin is looking at the original locations. It breaks when you have two plugins because the loaded native classes now belong to one plugins classpath
And normally you don’t have to relocate because shaded dependencies get scoped to ur plugin classloader (I think at least)
The second plugin can;t access that classpath
okay i dont know what shaded depencys are?
its when u include them in ur thicc jar
Ohh ok
such that when ur jar is loaded into runtime, yea then those classes are made sure to be loaded as well
How would i know if a depency can be relocated or is loaded only into my classloader?
"thicc jar" lmao
well, drivers tend to not be relocatable, but most libraries will be, it has to do with that the library maybe do class lookups and weird shit behind the scenes
Well its not like its only loaded into ur jar classloader, but its more like u have this parent-child tree of classloaders
so its like either the docs tell me or its like rusian roulett and i will see at runtime xd
yea lol
i think i will have to look at classloaders first dont even know whats it rellly is
Yea
I mean java has an obscure “api” in their std lib to handle and manage loading classes if so needed
and by api its like 1 class
I’d recommend checking out luckperms source also
ok thanks
what this error mean -https://paste.md-5.net/abohuwocat.rb
Show your code at the lines in the error
I figured it all out. I accidentally used metrics from the API plugin
int radius = 7; // Adjust as needed
for (int x = -radius; x <= radius; x++) {
for (int y = -radius; y <= radius; y++) {
for (int z = -radius; z <= radius; z++) {
Block block = player.getLocation().getBlock().getRelative(x, y, z);
Can I use something else to fing player in radius?
nah you got it correct, they just asked for something similar to find players too
P sure anyway
|| https://i.gyazo.com/0ae6a1eb38ab69bafa47e7ca023019d7.png ||
|| https://i.gyazo.com/b65d13cc5ef406c5a88c0fb7b5e79218.png| ||
im trying to make it so when a player spawns 3 vex's it attacks everyone besides the player that spawned it but i have no clue how to use NameSpacedKeys can someone help
thats some wild code
like, minecraft:water is a NamespacedKey
also
NamespacedKeys always have to be lowercase
you might just want to use metadata instead for this
^
i have seen way worse levels of indents, mostly command builders
28 char indent 
good lord
nested commands go brrr
Looks my code from 8 years ago but in kotlin
i wrote that yesterday
isnt that bridigar?
That code looks like my if if if if if if statements xd
except that there's nothing else you can do here
Tf is cloud or bridigar?
they meant brigadier
^
I googled brigadier and got Brandies. Hell yeah i need that lmao
Is brigadier the minecraft command builder?
yea
only ever been using acf, is there like a good kotlin one?
cloud
wondering if they themselves think this is sane
bukkit commands are worse tho
What a nice pyramid
For sure aliens made it
(aka mojang)
you can still remove indentation but the question is if you want to do that xD
or qtleast move out the majority of the code
I'm trying to use minimessage for a chat format, but it's not exactly working.. Why? How do I fix it?
var mm = MiniMessage.miniMessage();
Component parsed = mm.deserialize(e.getMessage());
e.setFormat(e.getPlayer().getName() + ": " + parsed );```
you are calling toString() on the component
this looks like it's adventure so you'll need to use paper
or you can try the LegacyComponentSerializer if you only want the colours
in general using minimessage for public chat is very dangerous because you can make text open links on click, etc
It's not going to be used for the server i'm working for, just trying to use the colors rn
^
"only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:2)
"
What does this mean?
please provide some more context
I am trying to compile my plugin & I am facing this error
and your code
Thats the entire error
okay
is that error not in your code, like no line number and stuff?
nope
just that
how are you compiling it
maven clean, compile, install
there's more to that error, not just that message
like on the left sidebar of that
if you click on tehre it'll show the entire build log
...
You have to click on that what he showed you
try going to C:\Users\Ammar\.m2\repository\studio\xstream\KeyAllX and deleting the maven-metadata-local.xml
|| https://i.gyazo.com/be323bd273823fdd078d5e0754206874.png ||
|| https://i.gyazo.com/5b1e3177eb18ae8b17e060364d1a650f.png ||
can someone tell me what i did wrong here, im trying to make it so the vexs dont attack the player who spawned them but its not working and im not getting an error
ok i got an error and its saying this "Cannot invoke "org.bukkit.entity.Player.getUniqueId()" because "vextarget" is null"
I saw that when every world containing a bukkit plugin creates a bukkit datapack which is empty (or atleast mine, running paper tho this is not a paper question so please don't send me the whereami 🥲). Is it possible for me to modify this datapack so I can add files to it automatically? and if, how would i do that?
Not having really played Minecraft for years or especially done plugin dev, what'd be the way to go for displaying custom 3D models (made with blockbench but shouldn't matter I guess) in the world? Should have gravity but no collisions with other entities, and should be rotatable
Armor stands still?
ModelEngine uses display entities now
I guess you could go for it
dang
Feels a bit overkill for my case tho (didn't explain I know), I don't need a damageable entity or/with animations, just two 3D models that I can position and rotate through code
is there a way to get marker entities in a world? It seems like checking for entities by class is resulting in no returned markers despite there 100% being a marker entity in the world Im checking.
Is it in a loaded chunk
it should be but Im not positive since I'm loading it through something else. Should I try somehow forcing the chunks to load and then check?
Sure
that did it thanks, cant believe I didnt consider that may have been it 🤦♂️
does Item or ItemStack have any functionality where I can get the name such as minecraft:netherite_pickaxe or minecraft:shulker_box?
getType and then getKey
oh right thanks
?whereami
💀
we are spigot. we cannot guarantee that something you do on spigot behaves the same on paper
thats because opening one triggers the event again, stackoverflow
wrong server :/ my bad
that won't work on Spigot
i did not read the code
The code is paper specific
i read "paper"
vanishing
and thus i redirected the dear fellow to a different server
would it be possible to open an inventory and then kick off some async task that slowly loads items into that inventory?
and any recommendations on what async task I should use
yes just jump back to the main thread when adding the items to the inventory
why does it need to be async
bukkit api doesn't support async
as in events getting called
cause it can take a few seconds sometimes
then spawn a new task
🤔 in any case, does this code cause a crash on spigot or is it due to a lower level? (just to know)
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryOpenEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryType;
public class InventoryOpenEventHandler implements Listener {
@EventHandler
public void onInventoryOpen(InventoryOpenEvent event) {
event.setCancelled(true);
event.getPlayer().openInventory(
Bukkit.createInventory(
null, InventoryType.ANVIL, "My Custom Anvil"
)
);
}
}
why would that cause a crash?
and you should probably check if the event inv is an instanceof AnvilInventory or however it's called
it's an infinite loop
well i think that this would start an infinite loop
so ofc it would crash
so do I just use runTask, or runTaskTimer? I don't know how to sync against the main thread so I don't misuse any bukkit api
you are calling createInventory in InventoryOpenEvent
ah right
OH :/
infinitely
what are you trying to do
openInventory*
ok I'm an Idiot
fill an inventory asynchronously so the results come in slowly, as I said
🤓 👆
i guess you would just have a variable index and run a timer, increasing the index?
runTask is fine for jumping back to the main thread
are you trying to load from a database or smth
kinda

