-
-
Save andrewgazelka/f5721f9bbb36827cae19224eeb426d4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmd("permissions", "perms") { | |
description = "manage permissions" | |
permission = has("simplepermissions.use") | |
subCmd("group", "g") { | |
description = "manage groups" | |
arg("group") { | |
description = "the group you want to add" | |
ifType(ArgumentGroup) { | |
description = "an existing group" | |
subCmd("perms", "p") { | |
execute { sender, node, args -> | |
val group: Group by args | |
sender.sendMessage("perms enabled: ${group.permissionsEnabled}") | |
sender.sendMessage("perms disabled: ${group.permissionsDisabled}") | |
} | |
} | |
} | |
ifType(ArgumentString) { | |
description = "a non-existing group" | |
subCmd("create", "c") { | |
arg("priority") { | |
ifType(ArgumentInt) { | |
execute { sender, node, args -> | |
val group: String by args | |
val priority: Int by args | |
sender.sendMessage("group: $group") | |
sender.sendMessage("priority: $priority") | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
subCmd("player", "p") { | |
description = "manage players" | |
} | |
}.register(plugin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment