Command Builder
If you are using Kotlin, you can use this class to create Brigadier commands Kotlin-style.
You should probably implement your own command system if you are making your own addon, rather than using anything from Pylon Core. We recommend checking out Aikar's commands, as it makes adding commands very easy and simple.
(Blame Kotlin for not allowing us to hide this class in any way from Java).
Functions
Link copied to clipboard
inline fun argument(name: String, type: ArgumentType<*>, block: CommandBuilder.() -> Unit): CommandNode<CommandSourceStack>
Link copied to clipboard
Link copied to clipboard
inline fun executes(crossinline handler: CommandContext<CommandSourceStack>.(CommandSender) -> Unit)
Link copied to clipboard
inline fun executesWithPlayer(crossinline handler: CommandContext<CommandSourceStack>.(Player) -> Unit)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun requires(errorMessage: Component, crossinline predicate: CommandContext<CommandSourceStack>.(CommandSender) -> Boolean)
Link copied to clipboard