config fix 3

This commit is contained in:
2025-02-16 21:13:12 +01:00
parent 85f2c01eab
commit 54a6679582
2 changed files with 26 additions and 0 deletions

View File

@@ -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;
}
}

View File

@@ -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));
}