Skip to content

Commit c4cbd91

Browse files
committed
SaveAllCommand.kt improved.
Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent 1afe98e commit c4cbd91

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • src/main/kotlin/com/mairwunnx/projectessentials/core/impl/vanilla/commands

src/main/kotlin/com/mairwunnx/projectessentials/core/impl/vanilla/commands/SaveAllCommand.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 SaveAllCommand : VanillaCommandBase("save-all") {
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, "save.all", 4)
24+
}.executes {
2325
ConfigurationAPI.saveAll()
2426
SaveAllCommand.saveAll(it.source, false)
2527
}.then(

0 commit comments

Comments
 (0)