Delete src/main/java/com/yuyu/srdisassemble/command/RepairCommand.java
This commit is contained in:
@@ -1,46 +0,0 @@
|
|||||||
package com.yuyu.srdisassemble.command;
|
|
||||||
|
|
||||||
import com.sakurarealm.sritem.bukkit.command.SubCommand;
|
|
||||||
import com.yuyu.srdisassemble.SrDisassemble;
|
|
||||||
import com.yuyu.srdisassemble.disassemeble.DisassembleManager;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author 峰。
|
|
||||||
* @version 1.0
|
|
||||||
* @project SrDisassemble113
|
|
||||||
* @date 2024/7/25 20:55:21
|
|
||||||
* @description 维修指令
|
|
||||||
*/
|
|
||||||
public class RepairCommand implements SubCommand {
|
|
||||||
@Override
|
|
||||||
public void onCommand(CommandSender commandSender, String[] strings) {
|
|
||||||
if (strings.length == 1) {
|
|
||||||
if (strings[0].equalsIgnoreCase("reload")){
|
|
||||||
commandSender.sendMessage(ChatColor.RED+"分解配置文件重载!");
|
|
||||||
//重载文件
|
|
||||||
SrDisassemble.getConfigManager().reload();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (strings.length < 2){
|
|
||||||
commandSender.sendMessage(ChatColor.RED+"正确的格式为:/srrepair open 姓名 ");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = Bukkit.getPlayer(strings[1]);
|
|
||||||
if (player == null){
|
|
||||||
commandSender.sendMessage(ChatColor.RED+"玩家"+strings[1]+"不存在!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//为玩家打开GUI列表
|
|
||||||
DisassembleManager.getInstance().openRepair(player);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user