-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBackReload.java
More file actions
24 lines (20 loc) · 999 Bytes
/
BackReload.java
File metadata and controls
24 lines (20 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package simplexity.simpleback.commands;
import com.mojang.brigadier.Command;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import io.papermc.paper.command.brigadier.CommandSourceStack;
import io.papermc.paper.command.brigadier.Commands;
import simplexity.simpleback.config.ConfigHandler;
import simplexity.simpleback.config.LocaleMessage;
import simplexity.simpleback.handlers.BackPermission;
@SuppressWarnings("UnstableApiUsage")
public class BackReload {
public static LiteralArgumentBuilder<CommandSourceStack> createCommand() {
return Commands.literal("backreload")
.requires(css -> css.getSender().hasPermission(BackPermission.BACK_RELOAD.getPermission()))
.executes(css -> {
ConfigHandler.getInstance().loadConfigValues();
css.getSource().getSender().sendRichMessage(LocaleMessage.PLUGIN_RELOADED.getMessage());
return Command.SINGLE_SUCCESS;
});
}
}