config fix 3
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user