mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-12-23 05:08:47 +00:00
update StringUtil...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
f11721dbb1
commit
383448d8d6
@ -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;
|
||||
|
||||
/**
|
||||
* 插件删除命令类
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
* 插件删除命令类
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
* 插件管理类
|
||||
|
@ -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<String> msg) {
|
||||
for (String string : msg) {
|
||||
sender.sendMessage("§6 - §3" + string);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user