#help-development
1 messages · Page 1306 of 1
commands/hello.json
{
"type": "minecraft:literal",
"nodes": {
"world": {
"type": "minecraft:literal"
"nodes": []
"permission": {
"level": "minecraft:operator"
}
"action": "handlers:world"
}
}
}
example datapack json file
you would define permission levels are predicate handlers inside registries and actions as consumers of command dispatcher inside another registry
it even aligns with minecraft datapack fashion, i think its just a matter of time till this comes to vanilla NMS
didn't lucko do this
iiirc there's something like this but it it has its own syntax and uses some kind of weird configuration format
specifically for brigadier
what i would try to do is to make it as close to datapacks as possible
with json
lame
I wouldn't call it revolutionary
developers still need to link commands to actions
why use a config file for it over, let's say, a well built api
to expose server admins to disable certain command nodes
or change their behaviour in plug and play fashion
they'd need to know the full brigadier syntax
server admins don't care about that
they're really practical and would rather just have all commands that start with "/world *" disabled
either way configuration like this is hardcoded into source code with constants which do not change
what's the point of having hardcoded configuration in the first place, over, let's say, a typed API
so it must belong to config file
the same reason we have custom enchantments with actions we can have commands too
mojang already did something like this similar with custom enchantments in datapacks
where they assign actions of what enchantment does essentially but allowing you to register more enchantments in case you want to extend the NMS registry for that
It's a different scenario because we can already do custom commands
and even custom enchants don't use hardcoded json configs
What exactly is ClientboundPlayerInfoUpdatePacket used for?
Like I know the name might be self explanatory but is there other applications than for making player npcs?
It's used to inform the client of players
Ty
NOOOOOOOOOOOOO
lmao pay up
Hey! Do you know how to modify spigot to my likings and want to help me? https://www.spigotmc.org/threads/modifying-spigot-server-software.712677/
This tutorial explains how to create a data pack that adds custom enchantments.
The ability to add custom enchantments was added in 1.21, meaning this tutorial does not work in versions prior to it.
This tutorial assumes you know how to create a data pack.
Refer to Enchantment definition to learn about enchantment's JSON format used in this tuto...
{
"description": "Reach",
"supported_items": "#minecraft:enchantable/mining",
"weight": 5,
"max_level": 3,
"min_cost": {
"base": 1,
"per_level_above_first": 1
},
"max_cost": {
"base": 51,
"per_level_above_first": 10
},
"anvil_cost": 4,
"slots": [
"hand"
],
"effects": {
"minecraft:attributes": [
{
"id": "block_interaction_range",
"attribute": "minecraft:block_interaction_range",
"amount": {
"type": "minecraft:linear",
"base": 1,
"per_level_above_first": 1
},
"operation": "add_value",
"uuid": "3a4f09dc-231d-41ac-8c6b-ba5adb86ac0c"
}
]
}
}
?
it does use operations, attributes which are registered inside NMS registries for custom enchantments
enchantments including vanilla ones are defined in the datapack itself
since 1.21
its just that bukkit api provides a programatic way to define them via the API
everything that can be configurable is being moved into datapacks and I adore mojang for this
datapacks already supports functions which are essentially a bundle of commands which can be executed in order to do something, you can use .mcfunction files to define command actions for brigadier registration
https://minecraft.wiki/w/Function_(Java_Edition)
of course you extend this with mods through injecting custom command handlers using NMS but the concept is already there
every component that mojang needs to make commands configurable and declarative is there
mojang is seeking to make datapacks its own server API but with commands in order to loosely couple version compatibility with newer or older minecraft versions
its starting to become a modern vanilla skript
advancements in datapacks already uses functions to give rewards to the players for example:
{
"rewards": {
"function": "test:test"
}
}
tbh i more and more lean towards fabrics approach of modding minecraft client/server
it closely aligns with NMS
NMS is not what it was in 2013 anymore (spaghetti hardcoded mess)
and mojang refactors of NMS code are astounding since 1.13
i believe that developers should adopt datapacks as their primary source content creation, even if its limiting or can cause performance issues in some areas
if its limiting, you can always design a mixin for a fabric or a plugin for spigot which extends the datapack standard to add new functionality into the server which is not in the game server code yet, instead of hardcoding the rules into the .jar blobs or using server software specific configuration files like plugin config.yml
yeah they have pro probably, but then they ran put so the only sane solution is empty your credit card a bit more so you can ask your ai how to write a progress bar or whatever
lmao
I mean a lot of stuff is data driven now
But that’s really only for configuring things, like biomes and recipes
IDE really said robot rights
im not sure about this one dovidas- dont think u were cooking with that one
its a bit of a leap to go from 'nms has improved" to "we should all use datapacks for our plugins"
i do wonder whats the overhead if we regard executing a cmd through a datapack contrary to just invoking it directly w the command dispatcher
you say that as a joke, but aside from configuring the data-driven registries and such, datapacks are pretty much just copy pasting a bunch of command blocks and redstone into your world's spawn chunks
they're optimized versions of that pretty much
without block ticking and other redstone nonsense with rideable commandblocks and other shenanigans
datapack gets loaded during the world load iirc, some things are preloaded before execution
Datapacks parse all the commands in functions (excluding the macro ones) and execute those
If you dispatch a command in plugin, MC has to parse the command every time
yea but
thats obvious
sure it does have overhead but you can mainly fix it with good hot cache
it has more pros than cons imo
yes but thats not what I said, I meant directly invoking the command
since thats a more fair comparison since w datapacks u already know the command in mind
(usually)
I mean really how much can command handling really impact your server
i think its kind of cheap
a lot of things are cheap on their own
not as cheap as API, but cheaper than entity ticking for sure
its when you scale where issues start to arise
conceptually you can always register your own native mcfunctions inside registry via java if you care about performance
and just hook it up using namespace inside datapack
handling everything atomically through commands can be kinda awful for performance
i mean yea but that wasnt exactly my point
well that can be performance hit even by using bukkit api by scheduling ticks
not as much as lets say datapacks due to overhead but if you suck you can make it happen 😄
Yes but with Bukkit you don’t need to search through all entities every time you want to do something
You can just cache them by uuid
i could see datapacks potentially being more performant than api in certain hotspots since they potentially receive better native support- correct me if im wrong but doesnt datapacks involve a lot of registry lookups, like a serious amount of it?
you obv cant create intrusives
im not saying that datapack is capable right now to do everything as bukkit api, im raising an idea to make unofficial extensions of datapack standard to provide ways to do things which datapacks currently do not expose
so lookup by namespace/resource key
by also providing the datapack standard suggestions to minecraft feedback
so that way they would be maybe implemented by mojang officially
just like with ecmascript standard
well this is an overstretch
but server modding community should embrace datapacks in a way to extend their functionality and then push them to the mojang devs as a PoC to implement them officially
The biggest issue
mojang? standard?
dovidas, so you still stand by this?
i believe that developers should adopt datapacks as their primary source content creation, even if its limiting or can cause performance issues in some areas
mojang standing by a "datapack standard" just means they can't refactor things when they should
yes, but i believe that developers shouldnt use scoreboards to store data in a ram and instead do mixins which extend datapack standard to provide more efficient algorithms
datapacks are already versioned and pretty extensively documented
basically instead of trying to avoid datapacks with custom API's which do not match NMS anymore that well, embrace them by wrapping extensions in a way that follows vanilla nature
that might be possible on platforms that dont offer an api interface
How do you think datapacks store things
but mixins n api dont go very well together
let me introduce you to the concept of
putting things in a map
you dont get the idea. The idea is to provide generic api's exposed from datapacks which are currently non standard in minecraft datapacks but exist in bukkit api
by implementing those extensions through fabric mixins as server mods
anything remotely recursive or programmatic with datapacks is going to perform like shit
because your "stack frame" is now like 1,500 lines of command parsing code
you compute the command tree once and be done with it
im not saying write everything in .mcfunction
except that you can't do that for every command
Datapacks still store data in chests placed in a force loaded chunk by the world border
that's called inlining, and we do it in the programming world, and there is a limit to it
you can't inline the entire application
you sure?
one of the biggest performance hogs in data packs is the fact that so many commands need to be parsed every time they run
if you remove commands, data packs aren't really an issue
because it's just configuration
Parsing selectors isn’t cheap
im talking not about .mcfunction files, but about declarative configuration files in datapakcs like advancements or custom enchantments where they're only parsed once on world load
but then that is no longer a command tree you parse?
{
"description": "Reach",
"supported_items": "#minecraft:enchantable/mining",
"weight": 5,
"max_level": 3,
"min_cost": {
"base": 1,
"per_level_above_first": 1
},
"max_cost": {
"base": 51,
"per_level_above_first": 10
},
"anvil_cost": 4,
"slots": [
"hand"
],
"effects": {
"minecraft:attributes": [
{
"id": "block_interaction_range",
"attribute": "minecraft:block_interaction_range",
"amount": {
"type": "minecraft:linear",
"base": 1,
"per_level_above_first": 1
},
"operation": "add_value",
"uuid": "3a4f09dc-231d-41ac-8c6b-ba5adb86ac0c"
}
]
}
}
this is not a command, this is declared enchantment type which is loaded
a command is a command, not a command is not a command
yes, that is not a command
shockingly
That’s an enchantment definition

commands/hello.json
{
"type": "minecraft:literal",
"nodes": {
"world": {
"type": "minecraft:literal"
"nodes": []
"permission": {
"level": "minecraft:operator"
}
"action": "handlers:world"
}
}
}
example datapack json file
you compute the command tree once and be done with it
you can't replace a plugin with these
this is the command node declaration
but not all commands can be parsed once
what gets executed you implement it in java and register manually via nms registry or implement it via .mcfunction
that's the point
i'm talking about command execution, not definition
the definition happens once, yes
it has to
but every time you need to execute a command it needs to parse it
and that is the expensive part
and that's that im trying to achieve, declare command definitions, not handle everything in .mcfunctions
that is the sole reason data packs can be a performance problem
you can but its better to use nms registries for that
you can't do shit with simply a command tree declaration if you don't run it
@e[scores={poop=1..5}]
expose brigadier definiitions through datapack config files
and attach actions through namespaced keys
Yay looping through every entity
basically im trying to implement declarable command definitions in datapacks, and then command executions with specific namespaced key like "minecraft:warp:spawn" which will get bound either with .mcfunction file which executes command or you can use a mixin to register your own custom command executor via the code
"action" key is Consumer<CommandDispatcher> which will be either parsed .mcfunction file or your own custom implementation passed manually
just like they do with custom enchantments
or with advancements
with custom enchantments there a namespaced keys with registered effects for an enchantment in a registry
and i suppose all of these command executions will strictly be no-args consumers and receive no parameters, or we end up encoding the parameters as strings
why do you think so
for .mcfunction files the functionality would be limited but for manual registration you can expose the whole command dispatcher context
just like brigadier already does in NMS
the point is to remove hardcoded declarations of command nodes from the code and put it inside declarations so that you can tweak those things easier without recompiling code
bukkit plugin.yml already does something like this with its command section
lol
but its outdated in a way that it only supports handling root command node without any child nodes
its stuck in legacy era prior to brigadier
and how precisely do i for example pass a blockposition that isn't a "compile-time constant" to the command handler?
you pass it as a numeric argument inside a command and use brigadiers command dispatcher context to retrieve the value?
so we encode it as a string
bruh
if you do onCommand and get the argument is it int by default?
your argument doesnt make sense
commands parse strings
in the trivial case of a blockposition which is just three integers, parsing it is simple and fairly cheap
im not saying EXECUTION in a config files. DECLARATION of static command nodes should be inside configuration files
but for more complex data, this will not hold
what problem does this solve anyway?
yes, but if we want to get any kind of data into that EXECUTION, we are going to have to get it there from the context of the declaration
and that means throwing strings back and forth
you already do this in bukkit command api
yes, for manually issued commands
now imagine if we did it for something that gets invoked on player move
every time damage is dealt to an entity? functions can be invoked very frequently
i clarified that .mcfunction files are just one way to create command executors. you can make your own custom command executors by doing a fabric mixing to nms registry which would handle things in java fashion for you
.mcfunction command handler are just being used for simple text based commands
yes and i'm saying that for those executors to do anything useful, they need to receive some kind of context to operate on
ofc, and im not negating that, but the same principle goes for custom enchantments
and to get that context to them, since they are commands, they need to be encoded as strings, which is haram
yet mojang implemented that knowing that
in 1.21 with enchantment effects are being in the code but declaration in config files
mojang is hardly a source of ground truth
it should be a hybrid nature. you can expect to put everything in commands
if you want performance register a custom command handler inside registry which handles things for you and then reference that handler via namespaced key in brigadier declaration configuration file
have to realize that some things they do is in relation to realms
i still don't know what the problem is that this is attempting to solve
fixing plugin.yml command section
by providing access to child nodes
instead of whole ass command
and why does mojang care about plugin.yml when someone could PR a brigadier exposure api?
never had an issue with plugin.yml and commands =/
by controlling permissions levels, executions aliases per child node declaratively instead of doing parsing outside manually
like, why is mojang the one responsible for doing this?
instead of the api responsible for requiring a plugin.yml in the first place?
...
permission levels? What issue are you having with commands and permission levels?
its so hard to explain lmao
there is only like 3 permission levels provided by the vanilla server
and you can set them in the plugin.yml if you really want to
you know there's only 2 bosses which uses boss bar in minecraft but yet they expose boss bar command to create custom ones
because they know its used feature
they dont ignore server modders
you say the problem is "plugin.yml command section [not] providing access to child nodes"
then the people responsible for requiring a plugin.yml should be responsible to change that, not mojang in their game
i wouldn't mind having some expanded datapack api that lets us register a receiver for a function through the bukkit api, but then again the extant datapack api is basically not very extant so that goes for a lot of related things
and you don't have to
because they're limited in a nature
only if you want to fiddle with registries without nms, really
well I can't really see them being more free then default language either
and if mojang expanded it as it does now it can replace like 60-70% things that bukkit does just on configuration
there's a reason why they moved lots of server.properties rules inside nms registries too
but the things it replaces in bukkit does it really matter though? o.O
it leaves less work to have for bukkit devs
and there would be better parity
with vanilla NMS
lets be real bukkit api is an outdated api
which works
but requires hacks to do so
some parts of it like world generation are, most of it not really
outdated? And what has replaced it?
if nothing has replaced it, then it isn't outdated
tbf if you want to do custom world generation you would probably be better off with datapacks than bukkit at this point
i have high criticism for spigot for not adopting brigadier api or at least wrapping it in a decent way
not entirely sure on this, you can do quite a lot of world generation with the API and then you could just hook into NMS if you need something further
Custom worldgen still doesn’t work on realms
i don't really think the solution is whatever we're talking about currently though, rather maybe a worldgen 2.0 api might be in order
the way spigot wraps brigadier is a massive hack just for the sake of legacy compatibility with old api standards
That’s true for a lot of the api
not sure why people care so much about command frameworks
never had a problem with them
but they deprecate those things, or at least provide new ways to do things
we dont have neither proper text components nor commands which are miles better in NMS
I have personally not cared much about brigadier and whatever it does.
it's alright but i'd rather not tie myself down to it
I also don't attempt to block input either or whatever that preview thing is lol
since if you don't have access it doesn't really matter if you know the name of a command. I would make silly command names just to mess with people with that
Blame choco
idk what is meant about there isn't proper commands either
personally i think bukkit does everything that needs to be done in terms of commands
string goes in, tab completions maybe come out, something maybe happens
everything else is up to what you want to do
it skips argument types which client supports and parses everything as string literals
when client supports parsing boolean, integers, floats out of the box
Yeah sadly you don’t get the nice errors on the client like you do with vanilla commands
not sure why I care about the client here with those things
well... the server receives a string from the client
if you want to parse it with your magic mumbo jumbo, you can do that, just like the client does
and that is all the client should be sending
precisely
it starts to become a bit of a headache in terms of security if the client is sending anything other then a string when it comes to commands
you don't care about user experience?
depends really
when ever I run a server, my players are not paying me and as long as that is the case then no I have no reason to really care
lol
well to be fair good error messages and feedback are always better
but i don't see what prevents you from emitting proper error messages with the current api
that is what I have always done =/
always seems people want to do less and want more to happen all at once
not sure how it is on spigot but on paper at least you can register the command parameters through brigadier so the client gets the realtime parameter hints as well, but personally i think just tabcomplete is enough
that's the same as saying i dont see what prevent you from reverse engineering source code with the ghidra instead of having one in a first place
why bother doing something that's already there
wat
what source code are you reverse engineering?

how did we get here
The error messages come before you even send the command
also after sending it
on server side
you can use an existing library or a framework if you want, or you can reverse engineer source code for ghidra or whatever if you like, or you can write something simple yourself
if parseint throws, reply with the exception message
I mean the after sending ones are trivial with the existing api
It’s the before ones that aren’t
yeah for the realtime parameter hints you do need to register it through brigadier so that the client can see the definition
i'm not sure if spigot supports this, paper does but i've never used it because imo error messages + tabcomplete + command help is enough
kind of weird to do erroring before anything has been sent and seems like a lot of unnecessary work
it doesnt
it declares the commands as one argument string literal ones
for every registered command
in a brigadier
which is a hack
is it really all that weird to tell the user ahead of time "hey, this is not able to be parsed and is wrong"
i don't think it is
it means I am using up processing for no reason though
it's limited to simple pattern matching which is an acceptable level of complexity imo
oh no my precious 1ns
it adds up
probably cheaper than spellcheck, plus it happens on the client so it's not my problem
you know what's more expensive? rendering the whole 3d scene on the gpu
okay
you know what is more expensive? calculating prime numbers up to a trillion
thank god i don't do that on my server
i don't do it on my server either, i hire third world people to do it for me by hand for cents on the hour instead
I wonder if there is a ratio of people to server power where you could have enough people where its just as quick if a computer does it
depends on what you're doing sort of
i've actually saw yt video like couple years ago about this
someone had a thought about this but not sure who anymore
for example, there's a firm that hires indians to solve captchas despite image classification models being very cheap these days, because the indians are cheaper still
like cheaper than the electricity to run the model
I was more or less talking about the prime number thing, but I guess anything else works too
all the reviews are 5 stars except the people working there who complain that they don't get paid
at that point just go flip burgers at maccas 💀
i fail to see what the issue with that is
You're right. Australians are kinda cool
What are you getting at, huh!?
unless you come and fix that, australians are cooler
and they are funnier too
and they don't neighbour with the usa
weird I have the opposite problem
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
Is it possible to use Material#getMaterial without enabling legacy material support? It seems like using that method, even when setting the boolean param to false, it enables legacy material support
source: https://paste.md-5.net/axapajabuh.java
log:
[18:06:15] [Server thread/INFO]: [PrimeEssentials] Enabling PrimeEssentials v2.0.3-SNAPSHOT
[18:06:15] [Server thread/INFO]: [PrimeEssentials] Register LOCAL database provider for EssentialsDatabaseProvider
[18:06:15] [Server thread/INFO]: [PrimeEssentials] Schema is up to date
[18:06:15] [Server thread/INFO]: [PrimeEssentials] [ACF] Enabled Asynchronous Tab Completion Support!
[18:06:15] [Server thread/INFO]: [PrimeEssentials] Successfully hooked into PrimeFriends.
[18:06:15] [Server thread/INFO]: [PrimeEssentials] Register command defaults
[18:06:15] [Server thread/WARN]: [PrimeEssentials] Inventory Framework is running as a shaded non-relocated library. It's extremely recommended that you relocate the library package. Learn more about on docs: https://github.com/DevNatan/inventory-framework/wiki/Installation#preventing-library-conflicts
[18:06:15] [Server thread/WARN]: [org.bukkit.craftbukkit.legacy.CraftLegacy] Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!
[18:06:21] [Server thread/INFO]: [de.primecodes.essentials.manager.StonecutterWoodRecipeManager] Registered 43 recipes for wood type OAK
[18:06:21] [Server thread/INFO]: [de.primecodes.essentials.manager.StonecutterWoodRecipeManager] Registered 43 recipes for wood type JUNGLE
[18:06:21] [Server thread/INFO]: [de.primecodes.essentials.manager.StonecutterWoodRecipeManager] Registered 43 recipes for wood type DARK_OAK
[18:06:21] [Server thread/INFO]: [de.primecodes.essentials.manager.StonecutterWoodRecipeManager] Registered 43 recipes for wood type ACACIA
[18:06:21] [Server thread/INFO]: [de.primecodes.essentials.manager.StonecutterWoodRecipeManager] Registered 43 recipes for wood type BIRCH
[18:06:21] [Server thread/INFO]: [de.primecodes.essentials.manager.StonecutterWoodRecipeManager] Registered 43 recipes for wood type SPRUCE
[18:06:21] [Server thread/INFO]: [de.primecodes.essentials.manager.StonecutterWoodRecipeManager] Registered 39 recipes for wood type CRIMSON
[18:06:21] [Server thread/INFO]: [de.primecodes.essentials.manager.StonecutterWoodRecipeManager] Registered 39 recipes for wood type WARPED
[18:06:21] [Server thread/INFO]: [de.primecodes.essentials.manager.StonecutterWoodRecipeManager] Registered 43 recipes for wood type MANGROVE
[18:06:22] [Server thread/INFO]: [de.primecodes.essentials.manager.StonecutterWoodRecipeManager] Registered 43 recipes for wood type CHERRY
[18:06:22] [Server thread/INFO]: [de.primecodes.essentials.manager.StonecutterWoodRecipeManager] Registered 7 recipes for wood type BAMBOO
[18:06:22] [Server thread/INFO]: [de.primecodes.essentials.manager.StonecutterWoodRecipeManager] Registered 43 recipes for wood type PALE_OAK
[18:06:22] [Server thread/INFO]: [de.primecodes.essentials.manager.StonecutterWoodRecipeManager] Total Recipes registered: 472
anyone got any idea?
Isn’t there a registry for material
I guess yeah, but then what's the purpose of the boolean option if it enables legacy support anyway D:
enable verbose somewhere in the config and make sure the stack trace corresponds to what you think is triggering it; it could be something else
how does anti xray plugins like orebfuscator know which blocks are being visible in player's frustum?
anyone willing to explain the trick behind that
ray tracing could be one way but it sounds very expensive
i guess one way is to iterate over all ores and check immediate neigbours if it doesnt have air block nearby mask it as stone
or you can do BFS/DFS search for air pockets and not maskit only those pockets, if they're in certain range to the player
raytrace?
why would ray trace be very expensive
basically if BFS search across translucent/air blocks doesnt reach the player's position, you can hide it
that's expensive af
🙏
first person to call raytracing expensive
also it can probs just get the chunk
and see the blocks above
I mean raytrace for voxel structure has one very efficient algo
the problem with raytracing that it wont follow FOV
doesn't have to
💀
xray
isnt that deep
have a smart staff team
have an ore logger
and use papers builtin
i just hate people who try to mitigate xray
like its a server crashing exploit
no i just cant find proper anti xray mod for fabric so im going over "fine ill do this myself moment"
fun fact: the thing is opensource...
doesn't it have smth on par with paper inbuilt
i think this is how it should work in naive impl:
- capture world gen y-levels where ores spawn in particular biome,
- then iterate blocks over that particular y-max value
- if it finds air or translucent block do breadth first search across those blocks, until the last block is reached
- if immediate neightbour is an ore - store that block position in a list of ores to be hidden
- capture all those bread first translucent/air block locations in a map
- check if translucent/air block position map contains players location
- if it doesnt contain player location, hide the ores from the list, if its not, keep it
that would hide cave ores, over other ore would be hidden and only air exposed ones would be unhidden
^
copy paste license 🙏
i dont think using the same method it uses
is gainst anythin g
the code is licensed, not the algorithm :thinksmart:
licensed code sounds like bs
I never license my projects so they all just fall under ARR
i still feel like its best to do xray which hooks to world gen in a way it unedited version of world and only obfuscating those blocks in real version of the chunk
or maybe not
we still want to hide player placed blocks hmm
you cant also trust player head facing vector position too since freecam exists
tbh this wouldnt be a problem if notch made chunks cubic
😔
chunk sections are cubic in memory and in the protocol
personally i find any kind of obfuscation type anti-xray to be futile, you might as well use analytics instead to honeypot players
no smoke without fire; if a player is willing to xray they'd probably cheat in other ways as well
and xray is much easier to detect than say a well-written aimbot
that said, paper does have ore obfuscation built in, although you can still see ores in cave walls; in practice this doesn't make a significant difference since you can also see the ores in cave walls by standing in a cave
if you really wanted to eliminate those ores, you could do something similar to what you suggested but coarser: find the translucent blocks on the surface of each its 6 faces, then use a*/floodfill to map the connections between those surface areas; discard the volume data, keep only the surface data and the mappings, and use the mappings as a node in a higher hierarchy a-star/floodfill search
this will very efficiently find any air volumes that any given player is "in" at any given time, and only needs to be updated when crossing chunk sections
i did something a little bit similar to hide blocks with laggy custom models to help with client fps, though the problem parameters were a bit different
write an algorithm that basically does a flood fill
except instead of it iterating over neighbours of the same type, it also has a failsafe if it finds air
this is a hierarchical version of that yes
where the flood fill results are cached per-section and only the connections on a section<->section level are retained to keep the memory footprint low
then a second "flood fill" goes over those connections, although it's more like a graph now than a volume you fill
also useful for e.g. pathfinding
Maybe
how would you set the background color of an nms text display given that setBackgroundColor() has private access
Why are you using a nms text display
if i say why does that help you answer my question
Yes
I want some players to see certain text displays exclusive from other players
You can do that with the api
set background color or have some players see certain text displays exclusive from other players?
Both
what if I don't want the text displays to exist in the world
Why
it's fine nvm i figured it out
i dont understand why eclipse dont know org.bukkit.plugin and i put spigot.jar on the project
Well that depends on how u did it
Hey
It is possible for an entity to inherit the skin or texture of another entity.
Example, can a player inherit the texture of a zombie or a piglin?
Or that an armor stand looks like a zombie?
it was because i put BuildTool.jar on eclipse...
Fun
No, not by default
What if I use LibsDisgues?
Sure prolly ask them though
???
I want to make custom chat messages in my minigame using AsyncChatEvent. However I need to access HashMap which contains all my lobbies and then for each lobby check if player is in it (one boolean check and HashMap<> key check). Then I need to get player color and send a custom message to all players inside that lobby. Do I need to worry about thread safety and make all structures which get into contact thread safe or it's not necessary?
If you are executing code concurrently on multiple threads you need to worry about thread safety
In this case I guesstimate that using the Collections.synchronizedX wrappers or a concurrenthashmap would be enough
thanks
Hey! How can I disable chat ClickEvent command confirmation?
Use CUSTOM instead of CLICK_ACTION, then listen to it with the PlayerCustomClickEvent
Or, set your commands to have permission level of 0
It is impossible to disable this fully, it is a built-in safety feature, give the perm. level condition
dogshit feature
my command has no permission
well the client recieves information that the command has permission level of 1 or above
somehow
This is vanilla permission level
or the command is not being sent to the client for one or another reason
ClickEvent clickEvent = ClickEvent.runCommand("/showinv " + invMessageUUID);
1.21 +
so 1.21.0 and up
yeah
well the simplest solution is: don't, support latest and use CUSTOM
I do not know how or even if it is possible to change the permission level of a command
Actually I might
they are 0 if default players can use it and the command is sent to the client
do you see your command in chat when you start typing /sho ?
Ok so the way I did this I think is: use NMS and register the command as a vanilla command would - use Brigadier
Which I probably would not recommend
i mean, registering your command as usual will work fine
as long as you don't stop it from being sent to the client
whether that is via a permission or removing it from the send commands event
if you have plugins like "plugin hider" or "command hider" etc those are probably interfering with that shit
@brazen badge ^ ?
well that's the issue
check my messages directly above
something, either you or another plugin, is preventing the command from being sent to the client
i setted it up to the command hider
context
run command click event warning
^ so you can't hide it and not get the warning
silly question, but is your command even registered? Others may have asked already but I didn't see you answer
yeah is re
if you OP yourself and still can;t see the command I doubt it is registered
can you run the command even if you type it out?
I solved! EasyCommandBlocker was blocking my command, now it works, thank you for the help.
yep
i really don't see the point in those plugins
just configure your permissions properly
seems it worked by blocking command easy
Ty for the info about "unknown" commands btw!
to not show other commands
a) configure your permissions properly b) what's the issue with that?
We have a lot of public commands on Hypixel and do just fine
well since 1.21.6+ there should be 0 need for those in any scenario
for chat click - use custom
and permissions
/thiscommanddoesliterallynothing for instance
I LOVE THAT COMMAND
what does it do
It is a good command
what does it do
Literally nothing!
i don't believe you
The implementation is quite literally {}
this also means there is a lot of private commands 🤔
if you do / you can view tab completion to all plugin, even if a player doesn't have permission
you are selling my personal data to the chinese
no, if you configure permissions properly, commands are not sent
lemme report you to mr Simon Hypixel on Twitter for leaking internal stuff
Oh noes, Choco getting sacked!
But then it would be doing something 😟
yeah then it wouldn't do literally nothing
the command dispatcher could keep track of that info, but not the command itself!
it must remain empty
I'm surprised you guys don't have global command metrics
It feels so easy to implement
They'll never accept me lmao
why not
I think I almost got accepted, I'm fairly certain I messed up an answer on a code review but I can't remember it because my brain doesn't work correctly anymore
what do they even do on a code review
give you a class with some errors in it, and then ask you to look over it for a few minutes before giving answers to what is wrong/bad
are PDCs no longer part of whatever /data get entity spits out?
should be
I think it might be saved in the custom_data component, but that might be paper only
but it should be in something like bukkitValues
well it has to be there somewhere on spigot too 'cause there is no other component that can hold that data
how can i check if an item has a durability at all?
like for example a pickaxe would have some usable durability whereas a snowball would not
See if the item meta is damageable
declaration: package: org.bukkit.inventory.meta, interface: Damageable
well, just checking if it is will always be true
gotta check hasMaxDamage or whatever the has method is called
Does anyone know how I could update tab since I'm wanting to have it display the number of players but it's only static it seems
Player p = e.getPlayer();
int playingWith = Bukkit.getOnlinePlayers().toArray().length - 1;
String header = "\n§6§lTango§2§lNet\n§7Season 3\n\n§f Currently playing with §7" + playingWith + "§f others. \n";
String footer = "\n§7IP REMOVED\n";
p.setPlayerListHeaderFooter(header, footer);
This is called on Player Join
Not sure if I would have to keep playingwith updated or what
you need to either run that code on a scheduled timer task, or run that code whenever a player joins/leaves
Ahhh I see.
for that specifically I'd run it in the join and quit events
yea
Alright, thanks!
btw you can do Bukkit.getOnlinePlayers().size() - 1, no need to convert it into an array you're not using otherwise
ahhhh, cheers!
So i've run into a problem where I want to have custom helmet/armor models, but minecraft (base anyway) doesnt support that very well even with resource packs (helmets are possible). I do not want to make installing any mods a requirement, so plugins that don't have mod dependencies would be great
whos ray alt
what 💀
are u stuck in 2020
Check out over 3,000 products on MCModels, along with a vast selection of other 3D models, textures, and graphics. Join MCModels to access top-tier assets and improve your creative projects!
use nexo
its the best one currently
i wonder
and has the best custom stuff of all
HI RAY 
Hello
hru
alr, you?
Nothing much atm, had to deal with some linux stuff and not got much to code atm
If I use Adventure API from Paper as my dependency, the plugin will not work on Spigot servers, correct?
According to their website, their API is not included in Spigot
It won’t work even if you do include it
Since the one built into paper api is actually built into paper
And relocated and whatnot
Yes, that's what I understood from reading. So what's the best approach here?
test if paper or spigot and handle your adventure appropriately
If I switch to Spigot as a dependency for my resource to work and be accepted on SpigotMC, what should I do to use the API?
The home of Spigot a high performance, no lag customized Bukkit Minecraft server API, and BungeeCord, the cloud server proxy.
You can shade adventure and use the built in Bukkit adapter
But it’s minimal, only really supports chat, boss bars, and titles
Is this what you're referring to https://docs.advntr.dev/platform/bukkit.html ?
Yes
Okok, thanks
Hi, I am currently working on a plugin with abilities. I have an ability, where when the ability is activated, the player should tp to the block they are looking at no matter how far away it is. I have tried, but only got it to tp to the block when the block is in mining distance (/ has a Black outline). Does anyone have an idea to get it to tp to the block you're looking at although its further than your reach? Thanks for any help.
World::rayTrace
Player::getTargetBlock or whatever you're using only gets the block if it's actually targeted, i.e. within interaction distance
Ok, thanks a lot
What about it?
For Gradle use https://github.com/patrick-choe/mojang-spigot-remapper
Assuming a modern version
it's not that different
Mmm
Okay, but literally the "protocollib" plugin is the same, right?
What's the best paste site these days, or is Discord good enough (or limits too short for not nitro)?
Yes protocol lib is a Spigot plugin
But it is the same as:
no
What I linked is a Gradle plugin
?
not sure if it's the "best", but i've seen people use paste.gg
Can’t resist
?paste
good morning
im a big pastes.dev fan
is it possible to create like a field change listener?
context?
Discord is the best, if the message is too long you just have to click this button
Ah I cannot post images
discord is far from the best, text file embeds do not show on mobile and I don't wanna be downloading lots of tiny files
using a web paste is best regardless of which
how do I set a sign to be "waxed" ? The docs said it does not persist / has some special usage
if it is a self-hosted one, I like rustypaste. Otherwise github gist
pastes.dev is nice if it is something you don't care about, but it doesn't have any kind of permanent storage or write history like gists do
Hate to agree with you but yeah, very good service.
I enjoy sourceb.in
Is this where we go to find developers ?
No, rather this is a place to ask for help with developing a plugin of your own.
If you are interested in hiring a developer there is a specific forum for that, with people offering their services.
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
how would i go about having a spigot server plugin communicate with a fabric mod client to verify that both are installed?
grok is this true?
thank you
aight bro you aint me, change the pfp
Oh that's why I was confused
smh bruh everyone tryna pretedn to be me
i want to make a menu, but the items in it have the informations like attack dmg, attack speed etc.
can i hide it without hiding the displayname and lore? i know there's a method called sethidetooltips but it does hide the name, my server is on spigot and idk if it's possible here
Add the hide attributes item flag
if (hideTooltips) {
itemMeta.addItemFlags(
ItemFlag.HIDE_ATTRIBUTES,
ItemFlag.HIDE_ENCHANTS,
ItemFlag.HIDE_UNBREAKABLE,
ItemFlag.HIDE_DESTROYS,
ItemFlag.HIDE_PLACED_ON
);
}
that's what i do
then apply it to the item
and still doesn't work
I assume you're not running Spigot then
If you are running Paper or any of its forks you need to add an attribute modifier for the hide flags to work
For self-host and code pastes Snipdox
but i heard of sourcebin too
There is a really good one, but I forget its link
Hi there, does anyone have experience with customizing the default spawner properties? I'm working on a spawner upgrade plugin, and each level should have more mobs spawning (configured in config). To apply these effects i'm using the following method (yes the values are passed through correclty)
public static void applyEffects(Block block, int spawnAmount, int maxNearby, int distance) {
if (block.getState() instanceof CreatureSpawner cs) {
cs.setSpawnCount(spawnAmount);
cs.setMaxNearbyEntities(maxNearby);
cs.setRequiredPlayerRange(distance);
cs.setMinSpawnDelay(200); // 10s
cs.setMaxSpawnDelay(400); // 20s
cs.setDelay(20);
cs.update(true, true);
}
}
But the spawner doesnt seem to care about the spawnCount (didnt test the rest yet). My testing setup is a Zombie spawner high in the sky so no other mobs are nearby.
Anyone knows how i can fix this?
by lucko again
"by lucko again" sounds like a surprised expression from someone who's never sworn before
lucko goated
The Bungeecord java docs for Dialogs is not available? https://javadoc.io/doc/net.md-5/bungeecord-api/latest/net/md_5/bungee/api/connection/ProxiedPlayer.html#showDialog(net.md_5.bungee.api.dialog.Dialog) Is there even an APi where i can build an Dialog and Listen to Inputs and get Text from TextInput in Spigot?
Okay thanks
I hadn't thought to use the index 🙂 https://javadoc.io/doc/net.md-5
I can't seem to find nexo available for download anywhere?
I mean i see it on polymart but its not on the spigot website
im unsure if polymart is a safe website to buy from though
i don't quite remember what your issue was, but if it's just custom models for armor and suchlike, you don't need a plugin for it
all those plugins really do is act as item managers
and possibly resourcepack aggregators, building a resourcepack from multiple components
nothing that you can't do by hand
I know all that, but there is one issue
As far as im aware, vanilla minecraft resource packs do not support custom models for armor
Well I havent managed to figure it out yet then lol
Do you have a resource you can point me to? Even just a resource pack that has custom armor models would be enough for me
nope, i haven't worked with custom equipment models either
if you can't find one you could log on a server that has a server resourcepack with some, and then look at the pack they send you
buy from mcmodels
its just the equipment model of an item
however tryna manage all those without a plugin is completely stupid
not necessarily
if you are making all of your models yourself, and don't need to bundle together model/texture definitions from multiple sources, there's no need for a manager plugin to manage them
so what would u manage them with
there's no management to be done
what would u easily give ur custom items, custom armor
easily update them for all players
./give
and/or any plugin config
and/or configure it into a plugin
so
what nexo does
?
so ur saying
instead of buying nexo
remake nexo
very smart
you can configure it directly into essentials, mythicmobs, or any other plugin of your choice that supports custom model data
holy crap can you send a message with more than 3 words
no
this isn't rocket science
u need crucible
nuh uh
for custom resources on mythicmobs
mythicmobs allows item definitions through the bukkit serialization api
otherwise there isnt an option to set the texture / model of the item
which means you can define any item with any properties you want
apart from texture stuff
custom armor models can only be done with core shaders right now, so if Nexo has an easy way to integrate into that, then I'd just use it to be honest
any property you want
core shaders??
yes
it literally loads an org.bukkit itemstack from a ConfigurationSerializable
item_model doesn't change the armor model
the 3D model can only be done with core shaders, if that's what the plugin can do
i said equipment model
its so stupid of me to argue with stupids
idek why i continue
dum dum
what component changes the equipment model?
like ik im better than u
ik i know more than u
idk why i contribute to ur stupid argument
mythicmobs is 🚮 btw
i maintain a fork of it
equip -> model id
This is what I've gleaned from my research. I don't mind needing to use other plugins when I need to, but only when I need to
use nexo
it provides everything i promise u its the best plugin u could get
u can run a server purely by just using nexo
that only changes the texture, not the model IIRC
yeah and it allows 3d models
not it does NOT
yes it does, i have them
That is simply not a vanilla feature
proof then
^^
why are you guys so hellbent on arguing here, go to #general. This conversation isn't helping anyone
I am fairly aware of most changes done to vanilla and this is just not a thing I know of
idk then maybe im stupid
i do use nexo for the armor, and i do have custom modelled armor
apart from the helmet obv
i was under the impression that custom equipment models were doable as of like 1.21.4 or something. without core shaders, but i don't know the specifics
so maybe it is a shader
yeah im pretty sure u can
i very vaguely remember looking at the changelogs and going "hey, neat"
and then never got around to setting it up
tbh all these item component stuff are sick
It's only the head slot that supports custom models
and nexo makes so much use of them
custom tridents, elytras
horse armor, wolf armor
dude it litearlly has a connectable furniture mechanic
and everything is well made idk why all of u just hate nexo
its super well made, well maintaned and mostly bug free
https://minecraft.wiki/w/Equipment
This is the whole definition of the equipment thing, only texture for hardcoded model
Meaning it is only possible to use core shader to change the model
i have no idea what it is and i've never used it but i have great inherent distrust in anything even remotely associated with the mythic ecosystem, and also anything involved with custom models
its not a mythic plugin
because historically both have been mostly just grifts to get easy lunch money from beginner tier server admins
I really hope they change this at some point, maybe they will since they've already made it so you can wear a custom model on your head
yea but like custom spawns and custom item models are the 2 cash cows of the server scam industry
why do u think that though, like some of their plugins are extra yeah but like whats wrong with mythic mobs or modelengine
have u sen the types of mobs people make iwth those
prospective entrepreneurs go on mcmarket to buy a premade server or a bunch of cosmetic packs and paid plugins and a spawn and try to grift money from their players, then go bankrupt because everyone else has the same shit
id much rather config, than code it by my self
this is a huge valid point
but i wouldnt hate mythic for that, their plugins imo is well made and works as intended
i don't hate mythic because of that, but i do distrust anything related to custom item models because of it
i hate mythic because their codebase is a disaster
is it 😭
well the config is the main reason i use it
u can do anything u want with ur mobs or items
One day these things may just die out in favor of datapacks :)
I don't know their codebase, but I do know their API is kinda horrible to work with. Helped people with it more than a couple of times and it is very restrictive
it's very flexible and robust yes, that's the only reason i still use it
but what goes under the config and api is utterly horrid
https://github.com/DartCat25/CEM-S there's this if you're willing to try it
that day is never to come 🙏
u still need a plugin to manage it
or maybe a datapack 🤡
i'm super disappointed now that we don't have custom entity models after all
i don't really want to require my players to use core shaders either
One day for sure
Soon™
Look, im fine with rabbit holes when I need to jump in them. In this case I definitely do not need to. Ty though lol
and blocks
100% blocks
|| get nexo 🙏 ||
blocks are a bit later down the road since they'll need the block/item registries to become network synchronized to the client
does nexo deal with the core shaders part for you or does it just let you register custom textures
but i see absolutely no reason why entity/equipment models couldn't already be customizable
It says custom models for armor so it has to do shaders
nexo does everything
I believe they have started poking at entities with the component system
So it’ll probably happen soon
rp management, shader management
the furniture is one of my favs cuz its the best one
itemsadder is so fucking buggy
i had like half the furniture dissapear into barrier blocks
and u cant even break them
never had that with oraxen which now moved to nexo
how do core shaders work when players have their own shaderpacks they want to use?
Ha
then yeah, just use Nexo. It is open source so at least you can poke at it if things don't work out
i remember server resourcepacks having issues with conflicts, not sure about shaders
good shit
Pretty sure optifine does too
yeah i won't be getting that then
well, optifine is no surprise but I am surprised Sodium does
iirc there is some mod that makes core shaders compatible with sodium :D (or was it iris)
so I guess even when using Nexo it is pretty futile then, most players use optimization mods like Sodium
I know there’s one that lets resource packs edit sodium’s shaders as well
Idk if it magically makes the vanilla ones work tho
personally i probably would just wait for mojang to properly support equipment models rather than hack it together with shaders
people do a lot of cool stuff with core shaders tho, mods should probably try to keep compatibility given Mojang itself tries
ye, mainly with the graphics rewrite where things may work only specifically on 1.21.7 and then break forever
cue that meme of the skeleton in a chair in front of a computer with cobwebs growing on it
doesnt break my armor
it breaks mythichud though
i hate mythichud
dogshit plugin
yes
betterhud better
but overall i hate hud systems they are always dogshit someway
why does bedrock get OreUI and we dont 🙏
you do not want OreUI
laggy mess
we're stuck with fucking chest guis and horrible negative space custom font black magic for custom uis
even the dialogs we got look terrible
its dope
whose idea was it to implement a browser view in a game
hey, at least we don't get microtransactions
tbf, most games are leaning towards that direction
id much prefer if we did tbh
in terms of servers
i would like some microtransactions in my back pocket
just like most desktop software
rather than like avatars
Doesn't mean it's good
it is good enough, that's the thing
eventually someone will care enough to make it good, but in the meantime we settle for good enough
ha
Electron in minecraft when
i'm sure that's what the guys working on win95 told themselves
"someone will fix it eventually"
anyways sorry guys i hate being ragebaited
hardware will continue getting faster
ima go get ragebaited in ranked instead bye
I just joined the nexo discord and asked about the core shader conflict with sodium and optifine.
Briefly, from looking through some chat history, people say some things might not work
its not total incompat
I believe sodium has said they won’t hesitate to make further breaking changes if warranted though
fase here seems to have equipment models which work fine even with sodium, so it is probably fine
Optifine who tf knows
what warrants it tho
performance is already fine, if they want to go for harder optimization tactics involving just breaking stuff then they should do that in a different mod altogether
¯_(ツ)_/¯
does anyone even use it still
my poor donator capes 🙏
like i mean on new versions
ik they obv do on 1.8
you would be surprised how many people still use optifine
on new versions?
yes
crazy shit
I've seen a ton of youtubers using it at least
most people who aren't really in the modding community just don't care, and when you search for how to make minecraft run faster, optifine still comes up
I seem to have found a way to do custom armor models in vanilla. Gonna do a bit more digging before I say for certain though
u can
make the armor visible
and put a disp[lay entity
that rides the player
that... doesn't seem possible ?
how do you solve these problems:
- you can see the armor in first person
- the armor would have rotation delay
I might have something else in mind than you tho
the rotation delay idk i forgot
u can do something by using multiple models
the armor in first person
i dont solve it 🙏
however if u do use it for any other reason, there is a shader boxic made that hides it in first person
but is visible on 3rd person and such
Not a work around hacky solution but an elegant one. If it does work ill post code in here
well, maybe in general if thats a better place for it
all these problems are roughly solvable if you make the cosmetics invisible to the player wearing them
which then eliminates you being able to see them in third person
of course that kind of defeats some of the point of cosmetics
ye
but most of the point of cosmetics is to make other people jealous
as long as you provide some controlled facility where you display a dummy player wearing the cosmetics, so the player can have a rough idea of what they look like, it'd probably be good enough 👍
a "dressing room" gui
I want to make an ability, where when the ability is activated, the player should tp to the block they are looking at no matter how far away it is. now I have following code, but when I tested it, I was only able to teleport to blocks, that have black outlines/ blocks, that were in my reach. can someone help me?
RayTraceResult result = p.getWorld().rayTraceBlocks(
p.getEyeLocation(),
p.getEyeLocation().getDirection(),
500.0,
FluidCollisionMode.ALWAYS,
true
);
if (result != null && result.getHitBlock() != null) {
Block hitBlock = result.getHitBlock();
Location tp = hitBlock.getLocation().add(0, 1, 0);
p.teleport(tp);
}
- don't use single letter variable names, use more descriptive ones
- to me the code looks fine, are you running on Spigot ?
- maybe try with not 500 blocks distance, just like 16 ?
$20 says right click air isn't being sent 
After a lot of digging, nexo has the same limitation. You can't have 3d models for leggings, chestplates, and boots lol
Yes because Mojang has a hard-coded armour renderer which is 2D
Nothing you can change server-sided or with resource packs. It's just a straight up layer renderer
Helmets are different because technically you can put a block on the player's head and it's a "helmet", so it will render using the head transform
Just 3d armour rendering would be nice to start with
You can already make custom 2d armour now
Yea ik that lol
single letter variables are quicker to type XD. yes I am running it on Spigot. ok, let me try it.
Its only a part of the ability. the ability also gives potion effects. I am activating it with sneaking and right clicking
With an item in hand?
I think single letter variables are fine under certain circumstances
Counter argument
for event listeners I almost always do SomeEvent e
I mean sure, but I'd still say to use them as little as you can
without
Also, for (int i = 0 ; i < whatever ; i++)
It still doesnt work after changing it to 16
No data is sent to the server when you right click air with no item in hand
Therefor no click event is fired
I dont look into the air. It somehow works if the block is in your reach tho
yes, 'cause you're clicking the block then, that sends a packet to the server
if I look at a block 10 blocks away it wont work tho...
yes, in that case you're clicking air
which as stated above, does not work without an item in hand
if "no block has an outline" then you're clicking air
so you need to hold a block so that it works?
you either need to hold an item in your hand, or click a block (or both)
i mean the correct answer is it depends, more specifically, the smaller the scope- the shorter the variable name has to be, and the larger the scope, usually you'll need a longer variable name
who the fuck decided that having a key called "on" in a config makes it a true/false
config.getConfigurationSection("on") doesn't work
Oh man. I need to start making comments in my code and sort it a bit. I did it so the ability doesnt work when I hold an item but I cant find it...
how to i add nms to my 1.8 spigot/bukkit plugin
Depend on spigot instead of the spigot-api artifact
then it just says it doesnt recognize dependency
Run BuildTools
where do i set the output directory
You don't need to set one
Having it build in the folder where the BuildTools jar is works fine
In game my plugin name is the same as the command which creates a annoying extra command tab complete like /plugin:plugin. I renamed the plugin in the plugin.yml but that also changed the config.yml folder. Is there any other way to remove the extra commands?
players dont end up seeing that AFAIK.
Thats apart of how bukkit works
wdym? i see it
r u opped?
its a plugin for ops
If you see it, its because you're doubling up, you shouldn't register the command the same as the plugin name,

