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.
@@ -19,7 +19,9 @@ internal object ReloadCommand : VanillaCommandBase("reload") {
1919 override fun register (dispatcher : CommandDispatcher <CommandSource >) {
2020 super .register(dispatcher)
2121 dispatcher.register(
22- Commands .literal(name).executes {
22+ Commands .literal(name).requires {
23+ isAllowed(it, " server.reload" , 2 )
24+ }.executes {
2325 it.source.sendFeedback(TranslationTextComponent (" commands.reload.success" ), true )
2426 it.source.server.reload().also { ConfigurationAPI .reloadAll() }.let { 0 }
2527 }
You can’t perform that action at this time.
0 commit comments