Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1afe98e

Browse files
Reload command improved.
Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent ad56650 commit 1afe98e

File tree

1 file changed

+4
-2
lines changed
  • src/main/kotlin/com/mairwunnx/projectessentials/core/impl/vanilla/commands

1 file changed

+4
-2
lines changed

‎src/main/kotlin/com/mairwunnx/projectessentials/core/impl/vanilla/commands/ReloadCommand.kt‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /