mirror of
https://e.coding.net/circlecloud/Residence.git
synced 2025-11-28 22:26:09 +00:00
@@ -0,0 +1,36 @@
|
||||
package com.bekvon.bukkit.residence.commandmain;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandException;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.bekvon.bukkit.residence.Residence;
|
||||
|
||||
import cn.citycraft.PluginHelper.commands.BaseCommand;
|
||||
|
||||
public class CommandResReload extends BaseCommand {
|
||||
Residence plugin;
|
||||
|
||||
public CommandResReload(Residence plugin) {
|
||||
super("resreload");
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, Command command, String label, String[] args) throws CommandException {
|
||||
if (sender instanceof Player) {
|
||||
Player player = (Player) sender;
|
||||
if (Residence.getPermissionManager().isResidenceAdmin(player)) {
|
||||
plugin.reloadPlugin();
|
||||
sender.sendMessage(ChatColor.GREEN + "[Residence] 重载配置文件.");
|
||||
System.out.println("[Residence] 重载 by " + player.getName() + ".");
|
||||
}
|
||||
} else {
|
||||
plugin.reloadPlugin();
|
||||
System.out.println("[Residence] 重载 by 控制台.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user