File tree Expand file tree Collapse file tree
src/main/kotlin/com/mairwunnx/projectessentials/core/impl/vanilla/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/* *
2- * ! This command implementation by Mojang Game Studios!
2+ * ! This command implementation by Mojang Studios!
33 *
44 * Decompiled with idea source code was converted to kotlin code.
55 * But with additions such as permissions checking and etc.
@@ -33,8 +33,12 @@ internal object EnchantCommand : VanillaCommandBase("enchant") {
3333 override fun register (dispatcher : CommandDispatcher <CommandSource >) {
3434 super .register(dispatcher).also {
3535 dispatcher.register(
36- Commands .literal(name).requires { it.hasPermissionLevel(2 ) }.then(
37- Commands .argument(" targets" , EntityArgument .entities()).then(
36+ Commands .literal(name).requires {
37+ isAllowed(it, " enchant" , 2 )
38+ }.then(
39+ Commands .argument(" targets" , EntityArgument .entities()).requires {
40+ isAllowed(it, " enchant.other" , 3 )
41+ }.then(
3842 Commands .argument(
3943 " enchantment" , EnchantmentArgument .enchantment()
4044 ).executes {
You can’t perform that action at this time.
0 commit comments