diff --git a/src/main/java/hu/jgj52/wolfFFA/Commands/WolfFfaReloadCommand.java b/src/main/java/hu/jgj52/wolfFFA/Commands/WolfFfaReloadCommand.java new file mode 100644 index 0000000..1abfd14 --- /dev/null +++ b/src/main/java/hu/jgj52/wolfFFA/Commands/WolfFfaReloadCommand.java @@ -0,0 +1,25 @@ +package hu.jgj52.wolfFFA.Commands; + +import hu.jgj52.wolfFFA.WolfFFA; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.jetbrains.annotations.NotNull; + +public class WolfFfaReloadCommand implements CommandExecutor { + private final WolfFFA plugin; + + public WolfFfaReloadCommand(WolfFFA plugin) { + this.plugin = plugin; + } + + + @Override + public boolean onCommand(@NotNull CommandSender cmds, @NotNull Command command, @NotNull String s, @NotNull String[] args) { + if (cmds.hasPermission("wolfffa.admin.reload")) { + plugin.reloadConfig(); + cmds.sendMessage("§aKész!"); + } + return true; + } +} diff --git a/src/main/java/hu/jgj52/wolfFFA/WolfFFA.java b/src/main/java/hu/jgj52/wolfFFA/WolfFFA.java index 315e7d4..b92072f 100644 --- a/src/main/java/hu/jgj52/wolfFFA/WolfFFA.java +++ b/src/main/java/hu/jgj52/wolfFFA/WolfFFA.java @@ -11,6 +11,7 @@ public final class WolfFFA extends JavaPlugin { getConfig().options().copyDefaults(true); getCommand("tptoffa").setExecutor(new WolfFfaCommand(this)); + getCommand("wolfffareload").setExecutor(new WolfFfaReloadCommand(this)); }