mirror of
https://github.com/xSquishyLiam/mc-GeyserModelEngine-plugin.git
synced 2025-12-19 14:59:19 +00:00
31 lines
931 B
Java
31 lines
931 B
Java
package re.imc.geysermodelengine.commands;
|
|
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.command.CommandExecutor;
|
|
import org.bukkit.command.CommandSender;
|
|
import org.bukkit.entity.Player;
|
|
import re.imc.geysermodelengine.GeyserModelEngine;
|
|
|
|
public class ReloadCommand implements CommandExecutor {
|
|
|
|
private final GeyserModelEngine plugin;
|
|
|
|
public ReloadCommand(GeyserModelEngine plugin) {
|
|
this.plugin = plugin;
|
|
}
|
|
|
|
@Override
|
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
|
|
if (sender instanceof Player && !sender.hasPermission("geysermodelengine.reload")) {
|
|
sender.sendMessage("§cYou don't have permission to use this command.");
|
|
return true;
|
|
}
|
|
|
|
plugin.reloadConfig();
|
|
plugin.onEnable();
|
|
|
|
sender.sendMessage("§aGeyserModelEngine configuration reloaded!");
|
|
return true;
|
|
}
|
|
} |