版本更新至 3.68

新增:Language2Value 对象新增 toString() 方法。
删除:CooldownUtils2 工具取消注册/注销提示
This commit is contained in:
坏黑 2018-02-27 12:27:55 +08:00
parent 778a454e18
commit 13a9bb5f75
3 changed files with 15 additions and 6 deletions

View File

@ -40,7 +40,7 @@ public class HelpCommand extends SubCommand {
helps.put("/taboolib cycle info §8[§7名称§8]", "§e查询检查器信息"); helps.put("/taboolib cycle info §8[§7名称§8]", "§e查询检查器信息");
helps.put("/taboolib cycle reset §8[§7名称§8]", "§e初始化时间检查器"); helps.put("/taboolib cycle reset §8[§7名称§8]", "§e初始化时间检查器");
helps.put("/taboolib cycle update §8[§7名称§8]", "§e更新时间检查器"); helps.put("/taboolib cycle update §8[§7名称§8]", "§e更新时间检查器");
helps.put("¡ìd", null); helps.put("¡ìf", null);
helps.put("/taboolib shell load §8[§7名称§8]", "§e载入某个脚本"); helps.put("/taboolib shell load §8[§7名称§8]", "§e载入某个脚本");
helps.put("/taboolib shell unload §8[§7名称§8]", "§e卸载某个脚本"); helps.put("/taboolib shell unload §8[§7名称§8]", "§e卸载某个脚本");
helps.put("§e", null); helps.put("§e", null);

View File

@ -18,23 +18,27 @@ import me.skymc.taboolib.message.MsgUtils;
public class CooldownUtils2 implements Listener { public class CooldownUtils2 implements Listener {
private static ConcurrentHashMap<String, CooldownPack2> packlist = new ConcurrentHashMap<>(); private static ConcurrentHashMap<String, CooldownPack2> packlist = new ConcurrentHashMap<>();
public static ConcurrentHashMap<String, CooldownPack2> getCooldownPacks() {
return packlist;
}
public static void register(CooldownPack2 pack) { public static void register(CooldownPack2 pack) {
packlist.put(pack.getPackName(), pack); packlist.put(pack.getPackName(), pack);
MsgUtils.send("注册冷却包: " + pack.getPackName() + ", 时间: " + pack.getPackSeconds() + " 秒 (匿名注册)"); // MsgUtils.send("注册冷却包: " + pack.getPackName() + ", 时间: " + pack.getPackSeconds() + " 秒 (匿名注册)");
} }
public static void register(CooldownPack2 pack, Plugin plugin) { public static void register(CooldownPack2 pack, Plugin plugin) {
pack.setPlugin(plugin.getName()); pack.setPlugin(plugin.getName());
packlist.put(pack.getPackName(), pack); packlist.put(pack.getPackName(), pack);
MsgUtils.send("注册冷却包: " + pack.getPackName() + ", 时间: " + pack.getPackSeconds() + " 秒 (" + plugin.getName() + ")"); // MsgUtils.send("注册冷却包: " + pack.getPackName() + ", 时间: " + pack.getPackSeconds() + " 秒 (" + plugin.getName() + ")");
} }
public static void unregister(String name) { public static void unregister(String name) {
packlist.remove(name); packlist.remove(name);
MsgUtils.send("注销冷却包: " + name + " (主动注销)"); // MsgUtils.send("注销冷却包: " + name + " (主动注销)");
} }
@EventHandler @EventHandler
@ -52,7 +56,7 @@ public class CooldownUtils2 implements Listener {
if (pack.getPlugin().equals(e.getPlugin().getName())) { if (pack.getPlugin().equals(e.getPlugin().getName())) {
packlist.remove(pack.getPackName()); packlist.remove(pack.getPackName());
MsgUtils.send("注销冷却包: " + pack.getPackName() + " (自动注销)"); // MsgUtils.send("注销冷却包: " + pack.getPackName() + " (自动注销)");
} }
} }
} }

View File

@ -23,7 +23,7 @@ import me.skymc.taboolib.string.language2.type.Language2Title;
* @author sky * @author sky
* @since 2018年2月13日 下午3:05:15 * @since 2018年2月13日 下午3:05:15
*/ */
public class Language2Value { public class Language2Value extends Object {
@Getter @Getter
private Language2 language; private Language2 language;
@ -272,4 +272,9 @@ public class Language2Value {
} }
return list; return list;
} }
@Override
public String toString() {
return asString();
}
} }