-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: minecraft brigadier argument types #23
Comments
Lamp already uses some reflection (through commodore) to access custom Minecraft argument types, EntitySelector being one example. Unfortunately, as you pointed out, arguments like Vec2 and Vec3 are not supported by the nature of Lamp, therefore they could be challenging to add, and simply registering them would serve no purpose. |
This is super weird because last time I tried, I couldn't get
That's totally understandable, their syntax is pretty complex and could be complicated to handle, I agree. Although, what do you think about drawing a line between Bukkit arguments and Brigadier arguments? They're both different in some ways and sometimes you want them to be handled differently from each other (like the I'd really like the ability to override existing, or even register my own brigadier argument handlers with a type reference for the client (eg. |
Should be fixed. Thank you for the report. |
Lamp currently supports arguments provided by Brigadier library directly. There are, however more Minecraft-specific arguments included in game internals. All of them are handled by the client to support completions etc. (see wiki)
They can be accessed with a bit of reflection or NMS on supported platforms. Do note there is a Paper PR (PaperMC/Paper#6695) open to expose them directly to the API which may, or may not be merged in the future.
Notes
StringArgumentType
forString
which expects validation (see this)EntitySelector<T>
should refer to internalminecraft:entity
type to support rich client-side completions.minecraft:vec2
andvec3
) could be a bit hacky and would most likely require internal changes.Thoughts
Since that have more side effects than it sounds, I think that addition of
BrigadierCommandHandler
(or similar) is necessary. This would keep current users unaffected by these changes and also make brigadier easier to maintain.Sponge
I know nothing about Sponge and can't really suggest anything in that regards. I can only say that since all (minecraft) platforms can use Brigadier, maybe a new module structure is needed. (example)
The text was updated successfully, but these errors were encountered: