boah rein in die futterluke
This commit is contained in:
parent
99f3eef4f8
commit
7d05c16fe1
@ -68,8 +68,4 @@ class Platinum : JavaPlugin() {
|
||||
private fun registerCommands() {
|
||||
|
||||
}
|
||||
|
||||
private fun String.cmd() = instance.getCommand(this) ?: throw NullPointerException("Command '$name' not found!")
|
||||
private infix fun PluginCommand.complete(with: TabCompleter) { this.tabCompleter = with }
|
||||
private infix fun PluginCommand.execs(thing: CommandExecutor) = this.also { setExecutor(thing) }
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import io.papermc.paper.plugin.lifecycle.event.registrar.ReloadableRegistrarEven
|
||||
import io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents
|
||||
import moe.jansel.platinum.commands.PlatinumCommand
|
||||
|
||||
@Suppress("UnstableApiUsage")
|
||||
class PlatinumBootstrap : PluginBootstrap {
|
||||
override fun bootstrap(context: BootstrapContext) {
|
||||
val manager = context.lifecycleManager
|
||||
|
@ -3,11 +3,12 @@ package moe.jansel.platinum.commands
|
||||
import io.papermc.paper.command.brigadier.BasicCommand
|
||||
import io.papermc.paper.command.brigadier.CommandSourceStack
|
||||
|
||||
@Suppress("UnstableApiUsage")
|
||||
class PlatinumCommand: BasicCommand {
|
||||
override fun execute(stack: CommandSourceStack, args: Array<out String>?) {
|
||||
if (args?.size == 1 && args[0].lowercase() == "start") {
|
||||
stack.getSender().sendRichMessage("<rainbow>Fun activated!");
|
||||
stack.sender.sendRichMessage("<rainbow>Fun activated!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user