From 383448d8d65525057525cc25a2a5ab7457410d0c Mon Sep 17 00:00:00 2001 From: 502647092 Date: Tue, 15 Sep 2015 09:45:04 +0800 Subject: [PATCH] update StringUtil... Signed-off-by: 502647092 --- .../citycraft/Yum/commands/CommandInfo.java | 2 +- .../citycraft/Yum/commands/CommandRepo.java | 2 +- .../citycraft/Yum/manager/PluginsManager.java | 2 +- .../cn/citycraft/Yum/utils/StringUtil.java | 48 ------------------- 4 files changed, 3 insertions(+), 51 deletions(-) delete mode 100644 src/main/java/cn/citycraft/Yum/utils/StringUtil.java diff --git a/src/main/java/cn/citycraft/Yum/commands/CommandInfo.java b/src/main/java/cn/citycraft/Yum/commands/CommandInfo.java index b4af171..6fa7e7d 100644 --- a/src/main/java/cn/citycraft/Yum/commands/CommandInfo.java +++ b/src/main/java/cn/citycraft/Yum/commands/CommandInfo.java @@ -9,9 +9,9 @@ import org.bukkit.command.CommandSender; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginDescriptionFile; +import cn.citycraft.PluginHelper.utils.StringUtil; import cn.citycraft.Yum.Yum; import cn.citycraft.Yum.manager.YumManager; -import cn.citycraft.Yum.utils.StringUtil; /** * 插件删除命令类 diff --git a/src/main/java/cn/citycraft/Yum/commands/CommandRepo.java b/src/main/java/cn/citycraft/Yum/commands/CommandRepo.java index 2a2a77d..e2c2d39 100644 --- a/src/main/java/cn/citycraft/Yum/commands/CommandRepo.java +++ b/src/main/java/cn/citycraft/Yum/commands/CommandRepo.java @@ -6,9 +6,9 @@ package cn.citycraft.Yum.commands; import org.bukkit.command.CommandException; import org.bukkit.command.CommandSender; +import cn.citycraft.PluginHelper.utils.StringUtil; import cn.citycraft.Yum.Yum; import cn.citycraft.Yum.manager.YumManager; -import cn.citycraft.Yum.utils.StringUtil; /** * 插件删除命令类 diff --git a/src/main/java/cn/citycraft/Yum/manager/PluginsManager.java b/src/main/java/cn/citycraft/Yum/manager/PluginsManager.java index 0a4c7cc..626fe63 100644 --- a/src/main/java/cn/citycraft/Yum/manager/PluginsManager.java +++ b/src/main/java/cn/citycraft/Yum/manager/PluginsManager.java @@ -27,7 +27,7 @@ import org.bukkit.plugin.UnknownDependencyException; import com.google.common.base.Joiner; -import cn.citycraft.Yum.utils.StringUtil; +import cn.citycraft.PluginHelper.utils.StringUtil; /** * 插件管理类 diff --git a/src/main/java/cn/citycraft/Yum/utils/StringUtil.java b/src/main/java/cn/citycraft/Yum/utils/StringUtil.java deleted file mode 100644 index 4b966ef..0000000 --- a/src/main/java/cn/citycraft/Yum/utils/StringUtil.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * - */ -package cn.citycraft.Yum.utils; - -import java.util.Collection; - -import org.bukkit.command.CommandSender; - -/** - * 字符串工具 - * - * @author 蒋天蓓 - * 2015年8月22日下午12:41:59 - */ -public class StringUtil { - /** - * 转移数组后获取字符串 - * - * @param args - * - 原数组 - * @param start - * - 数组开始位置 - * @return 转移后的数组字符串 - */ - public static String consolidateStrings(String[] args, int start) { - String ret = args[start]; - if (args.length > start + 1) { - for (int i = start + 1; i < args.length; i++) - ret = ret + " " + args[i]; - } - return ret; - } - - /** - * 给玩家或控制台发送消息组 - * - * @param sender - * - 接收消息的玩家 - * @param msg - * - 消息组 - */ - public static void sendStringArray(CommandSender sender, Collection msg) { - for (String string : msg) { - sender.sendMessage("§6 - §3" + string); - } - } -}