Framework adjustment
This commit is contained in:
parent
9af34b9940
commit
8b1b14ae7c
@ -21,9 +21,6 @@ LOCALE:
|
|||||||
# 启用后将会收到大量调试信息, 不建议使用
|
# 启用后将会收到大量调试信息, 不建议使用
|
||||||
SERVER: false
|
SERVER: false
|
||||||
|
|
||||||
# 网络连接测试地址
|
|
||||||
TEST-URL: 'aliyun.com'
|
|
||||||
|
|
||||||
# 玩家列表(TAB-API)是否根据前缀排序
|
# 玩家列表(TAB-API)是否根据前缀排序
|
||||||
TABLIST-SORT: true
|
TABLIST-SORT: true
|
||||||
|
|
@ -8,9 +8,9 @@ import io.izzel.taboolib.module.config.TConfig;
|
|||||||
import io.izzel.taboolib.module.config.TConfigWatcher;
|
import io.izzel.taboolib.module.config.TConfigWatcher;
|
||||||
import io.izzel.taboolib.module.dependency.TDependencyInjector;
|
import io.izzel.taboolib.module.dependency.TDependencyInjector;
|
||||||
import io.izzel.taboolib.module.inject.TListenerHandler;
|
import io.izzel.taboolib.module.inject.TListenerHandler;
|
||||||
import io.izzel.taboolib.module.mysql.IHost;
|
import io.izzel.taboolib.module.db.IHost;
|
||||||
import io.izzel.taboolib.module.mysql.hikari.HikariHandler;
|
import io.izzel.taboolib.module.db.source.HikariHandler;
|
||||||
import io.izzel.taboolib.origin.database.PluginDataManager;
|
import io.izzel.taboolib.module.db.yaml.PluginDataManager;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -4,12 +4,12 @@ import io.izzel.taboolib.module.locale.TLocaleLoader;
|
|||||||
import io.izzel.taboolib.module.config.TConfig;
|
import io.izzel.taboolib.module.config.TConfig;
|
||||||
import io.izzel.taboolib.module.config.TConfigWatcher;
|
import io.izzel.taboolib.module.config.TConfigWatcher;
|
||||||
import io.izzel.taboolib.module.dependency.Dependency;
|
import io.izzel.taboolib.module.dependency.Dependency;
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import io.izzel.taboolib.module.mysql.hikari.HikariHandler;
|
import io.izzel.taboolib.module.db.source.HikariHandler;
|
||||||
import io.izzel.taboolib.module.nms.NMSHandler;
|
import io.izzel.taboolib.module.nms.NMSHandler;
|
||||||
import io.izzel.taboolib.origin.database.PlayerDataManager;
|
import io.izzel.taboolib.module.db.yaml.PlayerDataManager;
|
||||||
import io.izzel.taboolib.origin.database.PluginDataManager;
|
import io.izzel.taboolib.module.db.yaml.PluginDataManager;
|
||||||
import io.izzel.taboolib.plugin.InternalPlugin;
|
import io.izzel.taboolib.common.plugin.InternalPlugin;
|
||||||
import io.izzel.taboolib.util.Files;
|
import io.izzel.taboolib.util.Files;
|
||||||
import io.izzel.taboolib.util.IO;
|
import io.izzel.taboolib.util.IO;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
@ -34,10 +34,11 @@ public class TabooLib {
|
|||||||
private static TabooLib inst = new TabooLib();
|
private static TabooLib inst = new TabooLib();
|
||||||
private static TLogger logger;
|
private static TLogger logger;
|
||||||
private static TConfig config;
|
private static TConfig config;
|
||||||
|
|
||||||
|
// 当前运行版本
|
||||||
private static double version;
|
private static double version;
|
||||||
|
|
||||||
// 第三方依赖下载位置
|
// 本地数据文件
|
||||||
private File libsFolder;
|
|
||||||
private File playerDataFolder;
|
private File playerDataFolder;
|
||||||
private File serverDataFolder;
|
private File serverDataFolder;
|
||||||
|
|
||||||
@ -45,11 +46,11 @@ public class TabooLib {
|
|||||||
private YamlConfiguration internal = new YamlConfiguration();
|
private YamlConfiguration internal = new YamlConfiguration();
|
||||||
|
|
||||||
public TabooLib() {
|
public TabooLib() {
|
||||||
// 创建配置
|
|
||||||
inst = this;
|
inst = this;
|
||||||
logger = TLogger.getUnformatted("TabooLib");
|
logger = TLogger.getUnformatted("TabooLib");
|
||||||
config = TConfig.create(getPlugin(), "config.yml");
|
// 配置文件从 config.yml 修改为 settings.yml 防止与老版本插件冲突
|
||||||
libsFolder = Files.folder("plugins/TabooLib/libs");
|
config = TConfig.create(getPlugin(), "settings.yml");
|
||||||
|
// 数据文件
|
||||||
playerDataFolder = Files.folder(config.getString("DATAURL.PLAYER-DATA"));
|
playerDataFolder = Files.folder(config.getString("DATAURL.PLAYER-DATA"));
|
||||||
serverDataFolder = Files.folder(config.getString("DATAURL.SERVER-DATA"));
|
serverDataFolder = Files.folder(config.getString("DATAURL.SERVER-DATA"));
|
||||||
// 加载版本号
|
// 加载版本号
|
||||||
@ -119,10 +120,6 @@ public class TabooLib {
|
|||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
public File getLibsFolder() {
|
|
||||||
return libsFolder;
|
|
||||||
}
|
|
||||||
|
|
||||||
public File getPlayerDataFolder() {
|
public File getPlayerDataFolder() {
|
||||||
return playerDataFolder;
|
return playerDataFolder;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io.izzel.taboolib;
|
package io.izzel.taboolib;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.nms.NMSHandler;
|
import io.izzel.taboolib.module.nms.NMSHandler;
|
||||||
import io.izzel.taboolib.origin.database.PluginDataManager;
|
import io.izzel.taboolib.module.db.yaml.PluginDataManager;
|
||||||
import io.izzel.taboolib.util.Strings;
|
import io.izzel.taboolib.util.Strings;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -4,10 +4,10 @@ import com.google.common.collect.Lists;
|
|||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import io.izzel.taboolib.module.dependency.TDependencyInjector;
|
import io.izzel.taboolib.module.dependency.TDependencyInjector;
|
||||||
import io.izzel.taboolib.module.inject.TSchedule;
|
import io.izzel.taboolib.module.inject.TSchedule;
|
||||||
import io.izzel.taboolib.origin.client.TabooLibClient;
|
import io.izzel.taboolib.client.TabooLibClient;
|
||||||
import io.izzel.taboolib.origin.client.TabooLibServer;
|
import io.izzel.taboolib.client.TabooLibServer;
|
||||||
import io.izzel.taboolib.origin.database.PlayerDataManager;
|
import io.izzel.taboolib.module.db.yaml.PlayerDataManager;
|
||||||
import io.izzel.taboolib.origin.database.PluginDataManager;
|
import io.izzel.taboolib.module.db.yaml.PluginDataManager;
|
||||||
import io.izzel.taboolib.util.Files;
|
import io.izzel.taboolib.util.Files;
|
||||||
import io.izzel.taboolib.util.Reflection;
|
import io.izzel.taboolib.util.Reflection;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package io.izzel.taboolib.origin.client;
|
package io.izzel.taboolib.client;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
||||||
|
import io.izzel.taboolib.client.packet.Packet;
|
||||||
|
import io.izzel.taboolib.client.packet.impl.PacketCommand;
|
||||||
|
import io.izzel.taboolib.client.packet.impl.PacketMessage;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.module.command.lite.SimpleCommandBuilder;
|
import io.izzel.taboolib.module.command.lite.CommandBuilder;
|
||||||
import io.izzel.taboolib.origin.client.packet.Packet;
|
import io.izzel.taboolib.client.packet.PacketSerializer;
|
||||||
import io.izzel.taboolib.origin.client.packet.PacketSerializer;
|
|
||||||
import io.izzel.taboolib.origin.client.packet.impl.PacketCommand;
|
|
||||||
import io.izzel.taboolib.origin.client.packet.impl.PacketMessage;
|
|
||||||
import io.izzel.taboolib.util.ArrayUtil;
|
import io.izzel.taboolib.util.ArrayUtil;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.util.NumberConversions;
|
import org.bukkit.util.NumberConversions;
|
||||||
@ -81,7 +81,7 @@ public class TabooLibClient {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
SimpleCommandBuilder.create("TabooLibClient", TabooLib.getPlugin())
|
CommandBuilder.create("TabooLibClient", TabooLib.getPlugin())
|
||||||
.aliases("tclient")
|
.aliases("tclient")
|
||||||
.permission("*")
|
.permission("*")
|
||||||
.execute((sender, args) -> {
|
.execute((sender, args) -> {
|
@ -1,11 +1,11 @@
|
|||||||
package io.izzel.taboolib.origin.client;
|
package io.izzel.taboolib.client;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLibAPI;
|
import io.izzel.taboolib.TabooLibAPI;
|
||||||
import io.izzel.taboolib.origin.client.packet.Packet;
|
import io.izzel.taboolib.client.packet.Packet;
|
||||||
import io.izzel.taboolib.origin.client.packet.PacketSerializer;
|
import io.izzel.taboolib.client.packet.PacketSerializer;
|
||||||
import io.izzel.taboolib.origin.client.packet.impl.PacketHeartbeat;
|
import io.izzel.taboolib.client.packet.impl.PacketHeartbeat;
|
||||||
import io.izzel.taboolib.origin.client.packet.impl.PacketQuit;
|
import io.izzel.taboolib.client.server.ClientConnection;
|
||||||
import io.izzel.taboolib.origin.client.server.ClientConnection;
|
import io.izzel.taboolib.client.packet.impl.PacketQuit;
|
||||||
import org.bukkit.util.NumberConversions;
|
import org.bukkit.util.NumberConversions;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.client;
|
package io.izzel.taboolib.client;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.client.packet;
|
package io.izzel.taboolib.client.packet;
|
||||||
|
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.client.packet;
|
package io.izzel.taboolib.client.packet;
|
||||||
|
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
@ -1,12 +1,12 @@
|
|||||||
package io.izzel.taboolib.origin.client.packet;
|
package io.izzel.taboolib.client.packet;
|
||||||
|
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import com.google.gson.JsonParser;
|
import com.google.gson.JsonParser;
|
||||||
import com.google.gson.JsonSyntaxException;
|
import com.google.gson.JsonSyntaxException;
|
||||||
import io.izzel.taboolib.TabooLibAPI;
|
import io.izzel.taboolib.TabooLibAPI;
|
||||||
import io.izzel.taboolib.TabooLibLoader;
|
import io.izzel.taboolib.TabooLibLoader;
|
||||||
|
import io.izzel.taboolib.client.packet.impl.PacketEmpty;
|
||||||
import io.izzel.taboolib.module.inject.TListener;
|
import io.izzel.taboolib.module.inject.TListener;
|
||||||
import io.izzel.taboolib.origin.client.packet.impl.PacketEmpty;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.client.packet;
|
package io.izzel.taboolib.client.packet;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.client.packet;
|
package io.izzel.taboolib.client.packet;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
@ -1,8 +1,8 @@
|
|||||||
package io.izzel.taboolib.origin.client.packet.impl;
|
package io.izzel.taboolib.client.packet.impl;
|
||||||
|
|
||||||
import io.izzel.taboolib.origin.client.TabooLibServer;
|
import io.izzel.taboolib.client.TabooLibServer;
|
||||||
import io.izzel.taboolib.origin.client.packet.Packet;
|
import io.izzel.taboolib.client.packet.Packet;
|
||||||
import io.izzel.taboolib.origin.client.packet.PacketType;
|
import io.izzel.taboolib.client.packet.PacketType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author sky
|
* @Author sky
|
@ -1,9 +1,9 @@
|
|||||||
package io.izzel.taboolib.origin.client.packet.impl;
|
package io.izzel.taboolib.client.packet.impl;
|
||||||
|
|
||||||
import io.izzel.taboolib.origin.client.TabooLibServer;
|
import io.izzel.taboolib.client.TabooLibServer;
|
||||||
import io.izzel.taboolib.origin.client.packet.Packet;
|
import io.izzel.taboolib.client.packet.Packet;
|
||||||
import io.izzel.taboolib.origin.client.packet.PacketType;
|
import io.izzel.taboolib.client.packet.PacketType;
|
||||||
import io.izzel.taboolib.origin.client.packet.PacketValue;
|
import io.izzel.taboolib.client.packet.PacketValue;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
/**
|
/**
|
@ -1,7 +1,7 @@
|
|||||||
package io.izzel.taboolib.origin.client.packet.impl;
|
package io.izzel.taboolib.client.packet.impl;
|
||||||
|
|
||||||
import io.izzel.taboolib.origin.client.packet.Packet;
|
import io.izzel.taboolib.client.packet.Packet;
|
||||||
import io.izzel.taboolib.origin.client.packet.PacketType;
|
import io.izzel.taboolib.client.packet.PacketType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author sky
|
* @Author sky
|
@ -1,8 +1,8 @@
|
|||||||
package io.izzel.taboolib.origin.client.packet.impl;
|
package io.izzel.taboolib.client.packet.impl;
|
||||||
|
|
||||||
import io.izzel.taboolib.origin.client.TabooLibClient;
|
import io.izzel.taboolib.client.TabooLibClient;
|
||||||
import io.izzel.taboolib.origin.client.packet.Packet;
|
import io.izzel.taboolib.client.packet.Packet;
|
||||||
import io.izzel.taboolib.origin.client.packet.PacketType;
|
import io.izzel.taboolib.client.packet.PacketType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author sky
|
* @Author sky
|
@ -1,9 +1,9 @@
|
|||||||
package io.izzel.taboolib.origin.client.packet.impl;
|
package io.izzel.taboolib.client.packet.impl;
|
||||||
|
|
||||||
|
import io.izzel.taboolib.client.TabooLibServer;
|
||||||
|
import io.izzel.taboolib.client.packet.Packet;
|
||||||
|
import io.izzel.taboolib.client.packet.PacketType;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.origin.client.TabooLibServer;
|
|
||||||
import io.izzel.taboolib.origin.client.packet.Packet;
|
|
||||||
import io.izzel.taboolib.origin.client.packet.PacketType;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author sky
|
* @Author sky
|
@ -1,10 +1,10 @@
|
|||||||
package io.izzel.taboolib.origin.client.packet.impl;
|
package io.izzel.taboolib.client.packet.impl;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.origin.client.TabooLibServer;
|
import io.izzel.taboolib.client.TabooLibServer;
|
||||||
import io.izzel.taboolib.origin.client.packet.Packet;
|
import io.izzel.taboolib.client.packet.Packet;
|
||||||
import io.izzel.taboolib.origin.client.packet.PacketType;
|
import io.izzel.taboolib.client.packet.PacketType;
|
||||||
import io.izzel.taboolib.origin.client.packet.PacketValue;
|
import io.izzel.taboolib.client.packet.PacketValue;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
/**
|
/**
|
@ -1,10 +1,10 @@
|
|||||||
package io.izzel.taboolib.origin.client.packet.impl;
|
package io.izzel.taboolib.client.packet.impl;
|
||||||
|
|
||||||
|
import io.izzel.taboolib.client.TabooLibServer;
|
||||||
|
import io.izzel.taboolib.client.packet.Packet;
|
||||||
|
import io.izzel.taboolib.client.packet.PacketType;
|
||||||
|
import io.izzel.taboolib.client.packet.PacketValue;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.origin.client.TabooLibServer;
|
|
||||||
import io.izzel.taboolib.origin.client.packet.Packet;
|
|
||||||
import io.izzel.taboolib.origin.client.packet.PacketType;
|
|
||||||
import io.izzel.taboolib.origin.client.packet.PacketValue;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author sky
|
* @Author sky
|
@ -1,9 +1,9 @@
|
|||||||
package io.izzel.taboolib.origin.client.server;
|
package io.izzel.taboolib.client.server;
|
||||||
|
|
||||||
import io.izzel.taboolib.origin.client.TabooLibServer;
|
import io.izzel.taboolib.client.TabooLibServer;
|
||||||
import io.izzel.taboolib.origin.client.TabooLibSettings;
|
import io.izzel.taboolib.client.TabooLibSettings;
|
||||||
import io.izzel.taboolib.origin.client.packet.impl.PacketJoin;
|
import io.izzel.taboolib.client.packet.impl.PacketJoin;
|
||||||
import io.izzel.taboolib.origin.client.packet.impl.PacketQuit;
|
import io.izzel.taboolib.client.packet.impl.PacketQuit;
|
||||||
import org.bukkit.util.NumberConversions;
|
import org.bukkit.util.NumberConversions;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
@ -1,10 +1,10 @@
|
|||||||
package io.izzel.taboolib.command;
|
package io.izzel.taboolib.common.command;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLibAPI;
|
import io.izzel.taboolib.TabooLibAPI;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.module.command.base.BaseMainCommand;
|
import io.izzel.taboolib.module.command.base.BaseMainCommand;
|
||||||
import io.izzel.taboolib.module.command.base.BaseSubCommand;
|
import io.izzel.taboolib.module.command.base.BaseSubCommand;
|
||||||
import io.izzel.taboolib.module.command.TCommand;
|
import io.izzel.taboolib.module.command.base.BaseCommand;
|
||||||
import io.izzel.taboolib.module.command.base.CommandArgument;
|
import io.izzel.taboolib.module.command.base.CommandArgument;
|
||||||
import io.izzel.taboolib.module.command.base.CommandRegister;
|
import io.izzel.taboolib.module.command.base.CommandRegister;
|
||||||
import io.izzel.taboolib.util.ArrayUtil;
|
import io.izzel.taboolib.util.ArrayUtil;
|
||||||
@ -17,7 +17,7 @@ import org.bukkit.entity.Player;
|
|||||||
* @Author sky
|
* @Author sky
|
||||||
* @Since 2018-07-04 21:32
|
* @Since 2018-07-04 21:32
|
||||||
*/
|
*/
|
||||||
@TCommand(
|
@BaseCommand(
|
||||||
name = "taboolibexecute",
|
name = "taboolibexecute",
|
||||||
aliases = {"texecute"},
|
aliases = {"texecute"},
|
||||||
permission = "taboolib.admin"
|
permission = "taboolib.admin"
|
@ -1,10 +1,10 @@
|
|||||||
package io.izzel.taboolib.command;
|
package io.izzel.taboolib.common.command;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.module.locale.TLocaleLoader;
|
import io.izzel.taboolib.module.locale.TLocaleLoader;
|
||||||
import io.izzel.taboolib.module.command.base.BaseMainCommand;
|
import io.izzel.taboolib.module.command.base.BaseMainCommand;
|
||||||
import io.izzel.taboolib.module.command.base.BaseSubCommand;
|
import io.izzel.taboolib.module.command.base.BaseSubCommand;
|
||||||
import io.izzel.taboolib.module.command.TCommand;
|
import io.izzel.taboolib.module.command.base.BaseCommand;
|
||||||
import io.izzel.taboolib.module.command.base.CommandArgument;
|
import io.izzel.taboolib.module.command.base.CommandArgument;
|
||||||
import io.izzel.taboolib.module.command.base.CommandRegister;
|
import io.izzel.taboolib.module.command.base.CommandRegister;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -21,7 +21,7 @@ import java.util.stream.IntStream;
|
|||||||
* @author sky
|
* @author sky
|
||||||
* @since 2018-04-22 14:36:28
|
* @since 2018-04-22 14:36:28
|
||||||
*/
|
*/
|
||||||
@TCommand(
|
@BaseCommand(
|
||||||
name = "tabooliblocale",
|
name = "tabooliblocale",
|
||||||
aliases = {"taboolocale", "tlocale"},
|
aliases = {"taboolocale", "tlocale"},
|
||||||
permission = "taboolib.admin"
|
permission = "taboolib.admin"
|
@ -1,17 +1,17 @@
|
|||||||
package io.izzel.taboolib.command;
|
package io.izzel.taboolib.common.command;
|
||||||
|
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
import io.izzel.taboolib.TabooLibAPI;
|
import io.izzel.taboolib.TabooLibAPI;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.module.command.TCommand;
|
import io.izzel.taboolib.module.command.base.BaseCommand;
|
||||||
import io.izzel.taboolib.module.command.base.BaseMainCommand;
|
import io.izzel.taboolib.module.command.base.BaseMainCommand;
|
||||||
import io.izzel.taboolib.module.command.base.BaseSubCommand;
|
import io.izzel.taboolib.module.command.base.BaseSubCommand;
|
||||||
import io.izzel.taboolib.module.command.base.CommandArgument;
|
import io.izzel.taboolib.module.command.base.CommandArgument;
|
||||||
import io.izzel.taboolib.module.command.base.CommandRegister;
|
import io.izzel.taboolib.module.command.base.CommandRegister;
|
||||||
import io.izzel.taboolib.origin.plugin.PluginLoadState;
|
import io.izzel.taboolib.util.plugin.PluginLoadState;
|
||||||
import io.izzel.taboolib.origin.plugin.PluginLoadStateType;
|
import io.izzel.taboolib.util.plugin.PluginLoadStateType;
|
||||||
import io.izzel.taboolib.origin.plugin.PluginUnloadState;
|
import io.izzel.taboolib.util.plugin.PluginUnloadState;
|
||||||
import io.izzel.taboolib.origin.plugin.PluginUtils;
|
import io.izzel.taboolib.util.plugin.PluginUtils;
|
||||||
import io.izzel.taboolib.util.ArrayUtil;
|
import io.izzel.taboolib.util.ArrayUtil;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@ -26,7 +26,7 @@ import java.util.stream.Collectors;
|
|||||||
* @Author sky
|
* @Author sky
|
||||||
* @Since 2018-05-07 20:14
|
* @Since 2018-05-07 20:14
|
||||||
*/
|
*/
|
||||||
@TCommand(
|
@BaseCommand(
|
||||||
name = "taboolibplugin",
|
name = "taboolibplugin",
|
||||||
aliases = {"tabooplugin", "tplugin"},
|
aliases = {"tabooplugin", "tplugin"},
|
||||||
permission = "taboolib.admin"
|
permission = "taboolib.admin"
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.event;
|
package io.izzel.taboolib.common.event;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.event;
|
package io.izzel.taboolib.common.event;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.listener;
|
package io.izzel.taboolib.common.listener;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.inject.TListener;
|
import io.izzel.taboolib.module.inject.TListener;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
@ -1,13 +1,13 @@
|
|||||||
package io.izzel.taboolib.listener;
|
package io.izzel.taboolib.common.listener;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLibAPI;
|
import io.izzel.taboolib.TabooLibAPI;
|
||||||
import io.izzel.taboolib.Version;
|
import io.izzel.taboolib.Version;
|
||||||
import io.izzel.taboolib.module.inject.TListener;
|
import io.izzel.taboolib.module.inject.TListener;
|
||||||
import io.izzel.taboolib.module.item.Items;
|
import io.izzel.taboolib.util.item.Items;
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import io.izzel.taboolib.module.tellraw.TellrawJson;
|
import io.izzel.taboolib.module.tellraw.TellrawJson;
|
||||||
import io.izzel.taboolib.origin.database.PlayerDataManager;
|
import io.izzel.taboolib.module.db.yaml.PlayerDataManager;
|
||||||
import io.izzel.taboolib.origin.database.PluginDataManager;
|
import io.izzel.taboolib.module.db.yaml.PluginDataManager;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
@ -1,7 +1,7 @@
|
|||||||
package io.izzel.taboolib.listener;
|
package io.izzel.taboolib.common.listener;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.inject.TListener;
|
import io.izzel.taboolib.module.inject.TListener;
|
||||||
import io.izzel.taboolib.origin.event.PlayerJumpEvent;
|
import io.izzel.taboolib.common.event.PlayerJumpEvent;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.plugin;
|
package io.izzel.taboolib.common.plugin;
|
||||||
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.plugin;
|
package io.izzel.taboolib.common.plugin;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
||||||
import io.izzel.taboolib.util.Files;
|
import io.izzel.taboolib.util.Files;
|
||||||
@ -40,7 +40,7 @@ public class InternalPlugin implements Plugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PluginDescriptionFile getDescription() {
|
public PluginDescriptionFile getDescription() {
|
||||||
return new PluginDescriptionFile("TabooLib", String.valueOf(TabooLib.getVersion()), "io.izzel.taboolib.plugin.InternalJavaPlugin");
|
return new PluginDescriptionFile("TabooLib", String.valueOf(TabooLib.getVersion()), "io.izzel.taboolib.common.plugin.InternalJavaPlugin");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.plugin;
|
package io.izzel.taboolib.common.plugin;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
@ -1,7 +1,7 @@
|
|||||||
package io.izzel.taboolib.origin.cronus;
|
package io.izzel.taboolib.cronus;
|
||||||
|
|
||||||
import io.izzel.taboolib.origin.cronus.bukkit.ItemStack;
|
import io.izzel.taboolib.cronus.bukkit.ItemStack;
|
||||||
import io.izzel.taboolib.origin.cronus.bukkit.Location;
|
import io.izzel.taboolib.cronus.bukkit.Location;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.util.NumberConversions;
|
import org.bukkit.util.NumberConversions;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.cronus;
|
package io.izzel.taboolib.cronus;
|
||||||
|
|
||||||
import io.izzel.taboolib.util.Strings;
|
import io.izzel.taboolib.util.Strings;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
@ -1,6 +1,6 @@
|
|||||||
package io.izzel.taboolib.origin.cronus.bukkit;
|
package io.izzel.taboolib.cronus.bukkit;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.item.Items;
|
import io.izzel.taboolib.util.item.Items;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.cronus.bukkit;
|
package io.izzel.taboolib.cronus.bukkit;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package io.izzel.taboolib.origin.cronus.util;
|
package io.izzel.taboolib.cronus.util;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.module.inject.TInject;
|
import io.izzel.taboolib.module.inject.TInject;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.cronus.util;
|
package io.izzel.taboolib.cronus.util;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author 坏黑
|
* @Author 坏黑
|
@ -1,6 +1,7 @@
|
|||||||
package io.izzel.taboolib.module.command;
|
package io.izzel.taboolib.module.command;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLibAPI;
|
import io.izzel.taboolib.TabooLibAPI;
|
||||||
|
import io.izzel.taboolib.module.command.base.BaseCommand;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.module.command.base.BaseMainCommand;
|
import io.izzel.taboolib.module.command.base.BaseMainCommand;
|
||||||
import io.izzel.taboolib.module.inject.TFunction;
|
import io.izzel.taboolib.module.inject.TFunction;
|
||||||
@ -107,7 +108,7 @@ public class TCommandHandler {
|
|||||||
* @param baseMainCommand 命令对象
|
* @param baseMainCommand 命令对象
|
||||||
* @return {@link BaseMainCommand}
|
* @return {@link BaseMainCommand}
|
||||||
*/
|
*/
|
||||||
public static BaseMainCommand registerCommand(TCommand tCommand, String command, BaseMainCommand baseMainCommand, Plugin plugin) {
|
public static BaseMainCommand registerCommand(BaseCommand tCommand, String command, BaseMainCommand baseMainCommand, Plugin plugin) {
|
||||||
if (Bukkit.getPluginCommand(command) == null) {
|
if (Bukkit.getPluginCommand(command) == null) {
|
||||||
registerPluginCommand(
|
registerPluginCommand(
|
||||||
plugin,
|
plugin,
|
||||||
@ -129,8 +130,8 @@ public class TCommandHandler {
|
|||||||
*/
|
*/
|
||||||
public static void registerCommand(Plugin plugin) {
|
public static void registerCommand(Plugin plugin) {
|
||||||
for (Class pluginClass : Files.getClasses(plugin)) {
|
for (Class pluginClass : Files.getClasses(plugin)) {
|
||||||
if (BaseMainCommand.class.isAssignableFrom(pluginClass) && pluginClass.isAnnotationPresent(TCommand.class)) {
|
if (BaseMainCommand.class.isAssignableFrom(pluginClass) && pluginClass.isAnnotationPresent(BaseCommand.class)) {
|
||||||
TCommand tCommand = (TCommand) pluginClass.getAnnotation(TCommand.class);
|
BaseCommand tCommand = (BaseCommand) pluginClass.getAnnotation(BaseCommand.class);
|
||||||
try {
|
try {
|
||||||
registerCommand(tCommand, tCommand.name(), (BaseMainCommand) pluginClass.newInstance(), plugin);
|
registerCommand(tCommand, tCommand.name(), (BaseMainCommand) pluginClass.newInstance(), plugin);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.command;
|
package io.izzel.taboolib.module.command.base;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
@ -11,7 +11,7 @@ import java.lang.annotation.Target;
|
|||||||
*/
|
*/
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface TCommand {
|
public @interface BaseCommand {
|
||||||
|
|
||||||
String name();
|
String name();
|
||||||
|
|
@ -13,7 +13,7 @@ import java.util.List;
|
|||||||
* @Since 2018-08-27 8:42
|
* @Since 2018-08-27 8:42
|
||||||
* @BuilderLevel 1.0
|
* @BuilderLevel 1.0
|
||||||
*/
|
*/
|
||||||
public class SimpleCommandBuilder {
|
public class CommandBuilder {
|
||||||
|
|
||||||
public static final CompleterTab EMPTY_COMPLETER_TAB = ((sender, args) -> new ArrayList<>());
|
public static final CompleterTab EMPTY_COMPLETER_TAB = ((sender, args) -> new ArrayList<>());
|
||||||
public static final CompleterCommand EMPTY_COMPLETER_COMMAND = ((sender, args) -> {});
|
public static final CompleterCommand EMPTY_COMPLETER_COMMAND = ((sender, args) -> {});
|
||||||
@ -30,7 +30,7 @@ public class SimpleCommandBuilder {
|
|||||||
private boolean forceRegister;
|
private boolean forceRegister;
|
||||||
private boolean build;
|
private boolean build;
|
||||||
|
|
||||||
SimpleCommandBuilder(String command, Plugin plugin) {
|
CommandBuilder(String command, Plugin plugin) {
|
||||||
this.command = command;
|
this.command = command;
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.description = "";
|
this.description = "";
|
||||||
@ -39,61 +39,61 @@ public class SimpleCommandBuilder {
|
|||||||
this.build = false;
|
this.build = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SimpleCommandBuilder create(String command, Plugin plugin) {
|
public static CommandBuilder create(String command, Plugin plugin) {
|
||||||
return new SimpleCommandBuilder(command.toLowerCase(), plugin);
|
return new CommandBuilder(command.toLowerCase(), plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleCommandBuilder command(String command) {
|
public CommandBuilder command(String command) {
|
||||||
this.command = command;
|
this.command = command;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleCommandBuilder plugin(Plugin plugin) {
|
public CommandBuilder plugin(Plugin plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleCommandBuilder description(String description) {
|
public CommandBuilder description(String description) {
|
||||||
this.description = description;
|
this.description = description;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleCommandBuilder usage(String usage) {
|
public CommandBuilder usage(String usage) {
|
||||||
this.usage = usage;
|
this.usage = usage;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleCommandBuilder aliases(String... aliases) {
|
public CommandBuilder aliases(String... aliases) {
|
||||||
this.aliases = ArrayUtil.asList(aliases);
|
this.aliases = ArrayUtil.asList(aliases);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleCommandBuilder permission(String permission) {
|
public CommandBuilder permission(String permission) {
|
||||||
this.permission = permission;
|
this.permission = permission;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleCommandBuilder permissionMessage(String permissionMessage) {
|
public CommandBuilder permissionMessage(String permissionMessage) {
|
||||||
this.permissionMessage = permissionMessage;
|
this.permissionMessage = permissionMessage;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleCommandBuilder execute(CompleterCommand completerCommand) {
|
public CommandBuilder execute(CompleterCommand completerCommand) {
|
||||||
this.completerCommand = completerCommand;
|
this.completerCommand = completerCommand;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleCommandBuilder tab(CompleterTab completerTab) {
|
public CommandBuilder tab(CompleterTab completerTab) {
|
||||||
this.completerTab = completerTab;
|
this.completerTab = completerTab;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleCommandBuilder forceRegister() {
|
public CommandBuilder forceRegister() {
|
||||||
this.forceRegister = true;
|
this.forceRegister = true;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleCommandBuilder build() {
|
public CommandBuilder build() {
|
||||||
Preconditions.checkNotNull(plugin, "缺少 \"plugin\" 部分");
|
Preconditions.checkNotNull(plugin, "缺少 \"plugin\" 部分");
|
||||||
Preconditions.checkNotNull(command, "缺少 \"command\" 部分");
|
Preconditions.checkNotNull(command, "缺少 \"command\" 部分");
|
||||||
Preconditions.checkNotNull(completerCommand, "缺少 \"CompleterCommand\" 部分");
|
Preconditions.checkNotNull(completerCommand, "缺少 \"CompleterCommand\" 部分");
|
@ -4,7 +4,7 @@ import com.google.common.collect.Maps;
|
|||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
||||||
import io.izzel.taboolib.TabooLibAPI;
|
import io.izzel.taboolib.TabooLibAPI;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import io.izzel.taboolib.util.Files;
|
import io.izzel.taboolib.util.Files;
|
||||||
import io.izzel.taboolib.util.Ref;
|
import io.izzel.taboolib.util.Ref;
|
||||||
import org.bukkit.configuration.InvalidConfigurationException;
|
import org.bukkit.configuration.InvalidConfigurationException;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.mysql;
|
package io.izzel.taboolib.module.db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author 坏黑
|
* @Author 坏黑
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.mysql;
|
package io.izzel.taboolib.module.db;
|
||||||
|
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
@ -1,13 +1,13 @@
|
|||||||
package io.izzel.taboolib.module.mysql.hikari;
|
package io.izzel.taboolib.module.db.source;
|
||||||
|
|
||||||
import com.zaxxer.hikari.HikariConfig;
|
import com.zaxxer.hikari.HikariConfig;
|
||||||
import com.zaxxer.hikari.HikariDataSource;
|
import com.zaxxer.hikari.HikariDataSource;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.module.config.TConfig;
|
import io.izzel.taboolib.module.config.TConfig;
|
||||||
import io.izzel.taboolib.module.inject.TInject;
|
import io.izzel.taboolib.module.inject.TInject;
|
||||||
import io.izzel.taboolib.module.mysql.IHost;
|
import io.izzel.taboolib.module.db.IHost;
|
||||||
import io.izzel.taboolib.module.mysql.builder.SQLHost;
|
import io.izzel.taboolib.module.db.sql.SQLHost;
|
||||||
import io.izzel.taboolib.module.mysql.lite.SQLiteHost;
|
import io.izzel.taboolib.module.db.sqlite.SQLiteHost;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
@ -1,7 +1,7 @@
|
|||||||
package io.izzel.taboolib.module.mysql.hikari;
|
package io.izzel.taboolib.module.db.source;
|
||||||
|
|
||||||
import com.zaxxer.hikari.HikariDataSource;
|
import com.zaxxer.hikari.HikariDataSource;
|
||||||
import io.izzel.taboolib.module.mysql.IHost;
|
import io.izzel.taboolib.module.db.IHost;
|
||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package io.izzel.taboolib.module.mysql.builder;
|
package io.izzel.taboolib.module.db.sql;
|
||||||
|
|
||||||
import io.izzel.taboolib.util.Strings;
|
import io.izzel.taboolib.util.Strings;
|
||||||
import io.izzel.taboolib.module.mysql.IColumn;
|
import io.izzel.taboolib.module.db.IColumn;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.mysql.builder;
|
package io.izzel.taboolib.module.db.sql;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author sky
|
* @Author sky
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.mysql.builder;
|
package io.izzel.taboolib.module.db.sql;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author sky
|
* @Author sky
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.mysql.builder;
|
package io.izzel.taboolib.module.db.sql;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
@ -1,6 +1,6 @@
|
|||||||
package io.izzel.taboolib.module.mysql.builder;
|
package io.izzel.taboolib.module.db.sql;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.mysql.IHost;
|
import io.izzel.taboolib.module.db.IHost;
|
||||||
import io.izzel.taboolib.util.Strings;
|
import io.izzel.taboolib.util.Strings;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
@ -1,8 +1,8 @@
|
|||||||
package io.izzel.taboolib.module.mysql.builder;
|
package io.izzel.taboolib.module.db.sql;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.mysql.IColumn;
|
import io.izzel.taboolib.module.db.IColumn;
|
||||||
import io.izzel.taboolib.module.mysql.builder.query.RunnableQuery;
|
import io.izzel.taboolib.module.db.sql.query.RunnableQuery;
|
||||||
import io.izzel.taboolib.module.mysql.builder.query.RunnableUpdate;
|
import io.izzel.taboolib.module.db.sql.query.RunnableUpdate;
|
||||||
import io.izzel.taboolib.util.ArrayUtil;
|
import io.izzel.taboolib.util.ArrayUtil;
|
||||||
import io.izzel.taboolib.util.Strings;
|
import io.izzel.taboolib.util.Strings;
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package io.izzel.taboolib.module.mysql.builder.query;
|
package io.izzel.taboolib.module.db.sql.query;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import io.izzel.taboolib.module.mysql.builder.SQLExecutor;
|
import io.izzel.taboolib.module.db.sql.SQLExecutor;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
@ -1,7 +1,7 @@
|
|||||||
package io.izzel.taboolib.module.mysql.builder.query;
|
package io.izzel.taboolib.module.db.sql.query;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import io.izzel.taboolib.module.mysql.builder.SQLExecutor;
|
import io.izzel.taboolib.module.db.sql.SQLExecutor;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.mysql.builder.query;
|
package io.izzel.taboolib.module.db.sql.query;
|
||||||
|
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.mysql.builder.query;
|
package io.izzel.taboolib.module.db.sql.query;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
@ -1,7 +1,7 @@
|
|||||||
package io.izzel.taboolib.module.mysql.lite;
|
package io.izzel.taboolib.module.db.sqlite;
|
||||||
|
|
||||||
import io.izzel.taboolib.util.Strings;
|
import io.izzel.taboolib.util.Strings;
|
||||||
import io.izzel.taboolib.module.mysql.IColumn;
|
import io.izzel.taboolib.module.db.IColumn;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.mysql.lite;
|
package io.izzel.taboolib.module.db.sqlite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author sky
|
* @Author sky
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.mysql.lite;
|
package io.izzel.taboolib.module.db.sqlite;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author 坏黑
|
* @Author 坏黑
|
@ -1,6 +1,6 @@
|
|||||||
package io.izzel.taboolib.module.mysql.lite;
|
package io.izzel.taboolib.module.db.sqlite;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.mysql.IHost;
|
import io.izzel.taboolib.module.db.IHost;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
@ -1,8 +1,8 @@
|
|||||||
package io.izzel.taboolib.origin.database;
|
package io.izzel.taboolib.module.db.yaml;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
||||||
import io.izzel.taboolib.module.inject.TListener;
|
import io.izzel.taboolib.module.inject.TListener;
|
||||||
import io.izzel.taboolib.origin.event.PlayerLoadedEvent;
|
import io.izzel.taboolib.common.event.PlayerLoadedEvent;
|
||||||
import io.izzel.taboolib.util.Files;
|
import io.izzel.taboolib.util.Files;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.database;
|
package io.izzel.taboolib.module.db.yaml;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
@ -38,10 +38,7 @@ public class PluginDataManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void saveAllCaches(boolean remove) {
|
public static void saveAllCaches(boolean remove) {
|
||||||
long time = System.currentTimeMillis();
|
CACHE_DATA_PLUGIN.keySet().forEach(plugin -> saveAllCaches(getFixedPlugin(plugin), remove));
|
||||||
for (String plugin : CACHE_DATA_PLUGIN.keySet()) {
|
|
||||||
saveAllCaches(getFixedPlugin(plugin), remove);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void saveConfiguration(FileConfiguration conf, File file) {
|
public static void saveConfiguration(FileConfiguration conf, File file) {
|
@ -1,7 +1,7 @@
|
|||||||
package io.izzel.taboolib.module.inject;
|
package io.izzel.taboolib.module.inject;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLibLoader;
|
import io.izzel.taboolib.TabooLibLoader;
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
@ -2,7 +2,7 @@ package io.izzel.taboolib.module.inject;
|
|||||||
|
|
||||||
import io.izzel.taboolib.TabooLibAPI;
|
import io.izzel.taboolib.TabooLibAPI;
|
||||||
import io.izzel.taboolib.TabooLibLoader;
|
import io.izzel.taboolib.TabooLibLoader;
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
@ -3,13 +3,13 @@ package io.izzel.taboolib.module.inject;
|
|||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import io.izzel.taboolib.TabooLibAPI;
|
import io.izzel.taboolib.TabooLibAPI;
|
||||||
import io.izzel.taboolib.TabooLibLoader;
|
import io.izzel.taboolib.TabooLibLoader;
|
||||||
import io.izzel.taboolib.module.command.lite.SimpleCommandBuilder;
|
import io.izzel.taboolib.module.command.lite.CommandBuilder;
|
||||||
import io.izzel.taboolib.module.config.TConfig;
|
import io.izzel.taboolib.module.config.TConfig;
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import io.izzel.taboolib.module.packet.TPacketHandler;
|
import io.izzel.taboolib.module.packet.TPacketHandler;
|
||||||
import io.izzel.taboolib.module.packet.TPacketListener;
|
import io.izzel.taboolib.module.packet.TPacketListener;
|
||||||
import io.izzel.taboolib.origin.lite.cooldown.Cooldown;
|
import io.izzel.taboolib.util.lite.cooldown.Cooldown;
|
||||||
import io.izzel.taboolib.origin.lite.cooldown.Cooldowns;
|
import io.izzel.taboolib.util.lite.cooldown.Cooldowns;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
@ -58,9 +58,9 @@ public class TInjectLoader implements TabooLibLoader.Loader {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
// SimpleCommandBuilder Inject
|
// SimpleCommandBuilder Inject
|
||||||
injectTypes.put(SimpleCommandBuilder.class, (plugin, field, args, instance) -> {
|
injectTypes.put(CommandBuilder.class, (plugin, field, args, instance) -> {
|
||||||
try {
|
try {
|
||||||
SimpleCommandBuilder builder = (SimpleCommandBuilder) field.get(instance);
|
CommandBuilder builder = (CommandBuilder) field.get(instance);
|
||||||
if (builder.isBuild()) {
|
if (builder.isBuild()) {
|
||||||
TLogger.getGlobalLogger().error("Command was registered. (" + field.getType().getName() + ")");
|
TLogger.getGlobalLogger().error("Command was registered. (" + field.getType().getName() + ")");
|
||||||
} else {
|
} else {
|
||||||
|
@ -3,8 +3,8 @@ package io.izzel.taboolib.module.inject;
|
|||||||
import io.izzel.taboolib.TabooLibAPI;
|
import io.izzel.taboolib.TabooLibAPI;
|
||||||
import io.izzel.taboolib.TabooLibLoader;
|
import io.izzel.taboolib.TabooLibLoader;
|
||||||
import io.izzel.taboolib.Version;
|
import io.izzel.taboolib.Version;
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import io.izzel.taboolib.origin.cronus.util.StringExpression;
|
import io.izzel.taboolib.cronus.util.StringExpression;
|
||||||
import io.izzel.taboolib.util.Strings;
|
import io.izzel.taboolib.util.Strings;
|
||||||
import io.izzel.taboolib.util.Reflection;
|
import io.izzel.taboolib.util.Reflection;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
@ -4,7 +4,7 @@ import com.google.common.collect.Lists;
|
|||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
||||||
import io.izzel.taboolib.TabooLibLoader;
|
import io.izzel.taboolib.TabooLibLoader;
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io.izzel.taboolib.module.locale;
|
package io.izzel.taboolib.module.locale;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
||||||
import io.izzel.taboolib.module.logger.TLoggerManager;
|
import io.izzel.taboolib.module.locale.logger.TLoggerManager;
|
||||||
import io.izzel.taboolib.module.nms.NMSHandler;
|
import io.izzel.taboolib.module.nms.NMSHandler;
|
||||||
import io.izzel.taboolib.module.tellraw.TellrawCreator;
|
import io.izzel.taboolib.module.tellraw.TellrawCreator;
|
||||||
import io.izzel.taboolib.util.Ref;
|
import io.izzel.taboolib.util.Ref;
|
||||||
|
@ -4,7 +4,7 @@ import io.izzel.taboolib.TabooLib;
|
|||||||
import io.izzel.taboolib.TabooLibAPI;
|
import io.izzel.taboolib.TabooLibAPI;
|
||||||
import io.izzel.taboolib.module.locale.type.*;
|
import io.izzel.taboolib.module.locale.type.*;
|
||||||
import io.izzel.taboolib.module.config.TConfigWatcher;
|
import io.izzel.taboolib.module.config.TConfigWatcher;
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import io.izzel.taboolib.util.Files;
|
import io.izzel.taboolib.util.Files;
|
||||||
import io.izzel.taboolib.util.IO;
|
import io.izzel.taboolib.util.IO;
|
||||||
import io.izzel.taboolib.util.Strings;
|
import io.izzel.taboolib.util.Strings;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.logger;
|
package io.izzel.taboolib.module.locale.logger;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLibAPI;
|
import io.izzel.taboolib.TabooLibAPI;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.logger;
|
package io.izzel.taboolib.module.locale.logger;
|
||||||
|
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
@ -5,8 +5,8 @@ import io.izzel.taboolib.TabooLib;
|
|||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.module.locale.TLocaleSerialize;
|
import io.izzel.taboolib.module.locale.TLocaleSerialize;
|
||||||
import io.izzel.taboolib.module.tellraw.TellrawJson;
|
import io.izzel.taboolib.module.tellraw.TellrawJson;
|
||||||
import io.izzel.taboolib.origin.book.BookFormatter;
|
import io.izzel.taboolib.util.book.BookFormatter;
|
||||||
import io.izzel.taboolib.origin.book.builder.BookBuilder;
|
import io.izzel.taboolib.util.book.builder.BookBuilder;
|
||||||
import io.izzel.taboolib.util.Strings;
|
import io.izzel.taboolib.util.Strings;
|
||||||
import io.izzel.taboolib.util.chat.ComponentSerializer;
|
import io.izzel.taboolib.util.chat.ComponentSerializer;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -2,7 +2,7 @@ package io.izzel.taboolib.module.locale.type;
|
|||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import io.izzel.taboolib.module.locale.TLocaleSerialize;
|
import io.izzel.taboolib.module.locale.TLocaleSerialize;
|
||||||
import io.izzel.taboolib.origin.lite.Sounds;
|
import io.izzel.taboolib.util.lite.SoundPack;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.configuration.serialization.SerializableAs;
|
import org.bukkit.configuration.serialization.SerializableAs;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -21,19 +21,19 @@ import java.util.stream.Collectors;
|
|||||||
@SerializableAs("ACTION")
|
@SerializableAs("ACTION")
|
||||||
public class TLocaleSound extends TLocaleSerialize {
|
public class TLocaleSound extends TLocaleSerialize {
|
||||||
|
|
||||||
private final List<Sounds> soundPacks;
|
private final List<SoundPack> soundPacks;
|
||||||
|
|
||||||
public TLocaleSound(List<Sounds> soundPacks) {
|
public TLocaleSound(List<SoundPack> soundPacks) {
|
||||||
this.soundPacks = soundPacks;
|
this.soundPacks = soundPacks;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TLocaleSound valueOf(Map<String, Object> map) {
|
public static TLocaleSound valueOf(Map<String, Object> map) {
|
||||||
List<Sounds> soundPacks = new ArrayList<>();
|
List<SoundPack> soundPacks = new ArrayList<>();
|
||||||
Object sounds = map.containsKey("sounds") ? map.get("sounds") : map.getOrDefault("sound", "");
|
Object sounds = map.containsKey("sounds") ? map.get("sounds") : map.getOrDefault("sound", "");
|
||||||
if (sounds instanceof List) {
|
if (sounds instanceof List) {
|
||||||
soundPacks = ((List<String>) sounds).stream().map(Sounds::new).collect(Collectors.toList());
|
soundPacks = ((List<String>) sounds).stream().map(SoundPack::new).collect(Collectors.toList());
|
||||||
} else {
|
} else {
|
||||||
soundPacks.add(new Sounds(sounds.toString()));
|
soundPacks.add(new SoundPack(sounds.toString()));
|
||||||
}
|
}
|
||||||
return new TLocaleSound(soundPacks);
|
return new TLocaleSound(soundPacks);
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ public class TLocaleSound extends TLocaleSerialize {
|
|||||||
if (soundPacks.size() == 1) {
|
if (soundPacks.size() == 1) {
|
||||||
map.put("sounds", soundPacks.get(0).toString());
|
map.put("sounds", soundPacks.get(0).toString());
|
||||||
} else if (soundPacks.size() > 1) {
|
} else if (soundPacks.size() > 1) {
|
||||||
map.put("sounds", soundPacks.stream().map(Sounds::toString).collect(Collectors.toList()));
|
map.put("sounds", soundPacks.stream().map(SoundPack::toString).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package io.izzel.taboolib.module.packet.channel;
|
package io.izzel.taboolib.module.packet.channel;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import io.netty.channel.Channel;
|
import io.netty.channel.Channel;
|
||||||
import net.minecraft.server.v1_8_R3.Packet;
|
import net.minecraft.server.v1_8_R3.Packet;
|
||||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io.izzel.taboolib.module.tellraw.internal;
|
package io.izzel.taboolib.module.tellraw.internal;
|
||||||
|
|
||||||
import io.izzel.taboolib.Version;
|
import io.izzel.taboolib.Version;
|
||||||
import io.izzel.taboolib.module.item.Items;
|
import io.izzel.taboolib.util.item.Items;
|
||||||
import io.izzel.taboolib.module.lite.SimpleReflection;
|
import io.izzel.taboolib.module.lite.SimpleReflection;
|
||||||
import io.izzel.taboolib.module.packet.TPacketHandler;
|
import io.izzel.taboolib.module.packet.TPacketHandler;
|
||||||
import io.izzel.taboolib.module.tellraw.TellrawVersion;
|
import io.izzel.taboolib.module.tellraw.TellrawVersion;
|
||||||
|
@ -2,7 +2,7 @@ package io.izzel.taboolib.util;
|
|||||||
|
|
||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.plugin.InternalPlugin;
|
import io.izzel.taboolib.common.plugin.InternalPlugin;
|
||||||
import io.izzel.taboolib.util.eagletdl.EagletTask;
|
import io.izzel.taboolib.util.eagletdl.EagletTask;
|
||||||
import io.izzel.taboolib.util.eagletdl.ProgressEvent;
|
import io.izzel.taboolib.util.eagletdl.ProgressEvent;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.book;
|
package io.izzel.taboolib.util.book;
|
||||||
|
|
||||||
import org.bukkit.Achievement;
|
import org.bukkit.Achievement;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package io.izzel.taboolib.origin.book;
|
package io.izzel.taboolib.util.book;
|
||||||
|
|
||||||
import io.izzel.taboolib.origin.book.builder.BookBuilder;
|
import io.izzel.taboolib.util.book.builder.BookBuilder;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
@ -1,9 +1,9 @@
|
|||||||
package io.izzel.taboolib.origin.book;
|
package io.izzel.taboolib.util.book;
|
||||||
|
|
||||||
import io.izzel.taboolib.util.chat.BaseComponent;
|
import io.izzel.taboolib.util.chat.BaseComponent;
|
||||||
import io.izzel.taboolib.util.chat.TextComponent;
|
import io.izzel.taboolib.util.chat.TextComponent;
|
||||||
import io.izzel.taboolib.util.chat.ComponentSerializer;
|
import io.izzel.taboolib.util.chat.ComponentSerializer;
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.book.action;
|
package io.izzel.taboolib.util.book.action;
|
||||||
|
|
||||||
import io.izzel.taboolib.util.chat.ClickEvent;
|
import io.izzel.taboolib.util.chat.ClickEvent;
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
package io.izzel.taboolib.origin.book.action;
|
package io.izzel.taboolib.util.book.action;
|
||||||
|
|
||||||
import io.izzel.taboolib.util.chat.BaseComponent;
|
import io.izzel.taboolib.util.chat.BaseComponent;
|
||||||
import io.izzel.taboolib.util.chat.HoverEvent;
|
import io.izzel.taboolib.util.chat.HoverEvent;
|
||||||
import io.izzel.taboolib.util.chat.TextComponent;
|
import io.izzel.taboolib.util.chat.TextComponent;
|
||||||
import io.izzel.taboolib.origin.book.BookAchievement;
|
import io.izzel.taboolib.util.book.BookAchievement;
|
||||||
import io.izzel.taboolib.origin.book.BookReflection;
|
import io.izzel.taboolib.util.book.BookReflection;
|
||||||
import org.bukkit.Achievement;
|
import org.bukkit.Achievement;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@ -55,7 +55,7 @@ public interface HoverAction {
|
|||||||
* @return a new HoverAction instance
|
* @return a new HoverAction instance
|
||||||
*/
|
*/
|
||||||
static HoverAction showItem(ItemStack item) {
|
static HoverAction showItem(ItemStack item) {
|
||||||
return new SimpleHoverAction(HoverEvent.Action.SHOW_ITEM, io.izzel.taboolib.origin.book.BookReflection.itemToComponents(item));
|
return new SimpleHoverAction(HoverEvent.Action.SHOW_ITEM, io.izzel.taboolib.util.book.BookReflection.itemToComponents(item));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
@ -1,7 +1,7 @@
|
|||||||
package io.izzel.taboolib.origin.book.builder;
|
package io.izzel.taboolib.util.book.builder;
|
||||||
|
|
||||||
import io.izzel.taboolib.util.chat.BaseComponent;
|
import io.izzel.taboolib.util.chat.BaseComponent;
|
||||||
import io.izzel.taboolib.origin.book.BookReflection;
|
import io.izzel.taboolib.util.book.BookReflection;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.BookMeta;
|
import org.bukkit.inventory.meta.BookMeta;
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ public class BookBuilder {
|
|||||||
* @return the BookBuilder's calling instance
|
* @return the BookBuilder's calling instance
|
||||||
*/
|
*/
|
||||||
public BookBuilder pages(BaseComponent[]... pages) {
|
public BookBuilder pages(BaseComponent[]... pages) {
|
||||||
io.izzel.taboolib.origin.book.BookReflection.setPages(meta, pages);
|
io.izzel.taboolib.util.book.BookReflection.setPages(meta, pages);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ public class BookBuilder {
|
|||||||
* @return the BookBuilder's calling instance
|
* @return the BookBuilder's calling instance
|
||||||
*/
|
*/
|
||||||
public BookBuilder pages(List<BaseComponent[]> pages) {
|
public BookBuilder pages(List<BaseComponent[]> pages) {
|
||||||
io.izzel.taboolib.origin.book.BookReflection.setPages(meta, pages.toArray(new BaseComponent[0][]));
|
io.izzel.taboolib.util.book.BookReflection.setPages(meta, pages.toArray(new BaseComponent[0][]));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.book.builder;
|
package io.izzel.taboolib.util.book.builder;
|
||||||
|
|
||||||
import io.izzel.taboolib.util.ArrayUtil;
|
import io.izzel.taboolib.util.ArrayUtil;
|
||||||
import io.izzel.taboolib.util.chat.BaseComponent;
|
import io.izzel.taboolib.util.chat.BaseComponent;
|
@ -1,11 +1,11 @@
|
|||||||
package io.izzel.taboolib.origin.book.builder;
|
package io.izzel.taboolib.util.book.builder;
|
||||||
|
|
||||||
import io.izzel.taboolib.util.chat.BaseComponent;
|
import io.izzel.taboolib.util.chat.BaseComponent;
|
||||||
import io.izzel.taboolib.util.chat.ClickEvent;
|
import io.izzel.taboolib.util.chat.ClickEvent;
|
||||||
import io.izzel.taboolib.util.chat.HoverEvent;
|
import io.izzel.taboolib.util.chat.HoverEvent;
|
||||||
import io.izzel.taboolib.util.chat.TextComponent;
|
import io.izzel.taboolib.util.chat.TextComponent;
|
||||||
import io.izzel.taboolib.origin.book.action.ClickAction;
|
import io.izzel.taboolib.util.book.action.ClickAction;
|
||||||
import io.izzel.taboolib.origin.book.action.HoverAction;
|
import io.izzel.taboolib.util.book.action.HoverAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author sky
|
* @author sky
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.item;
|
package io.izzel.taboolib.util.item;
|
||||||
|
|
||||||
import io.izzel.taboolib.Version;
|
import io.izzel.taboolib.Version;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.item;
|
package io.izzel.taboolib.util.item;
|
||||||
|
|
||||||
import io.izzel.taboolib.Version;
|
import io.izzel.taboolib.Version;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
@ -7,7 +7,7 @@ import io.izzel.taboolib.module.nms.NMSHandler;
|
|||||||
import io.izzel.taboolib.module.nms.nbt.NBTBase;
|
import io.izzel.taboolib.module.nms.nbt.NBTBase;
|
||||||
import io.izzel.taboolib.module.nms.nbt.NBTCompound;
|
import io.izzel.taboolib.module.nms.nbt.NBTCompound;
|
||||||
import io.izzel.taboolib.module.nms.nbt.NBTList;
|
import io.izzel.taboolib.module.nms.nbt.NBTList;
|
||||||
import io.izzel.taboolib.origin.lite.Numbers;
|
import io.izzel.taboolib.util.lite.Numbers;
|
||||||
import org.bukkit.Color;
|
import org.bukkit.Color;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.item.inventory;
|
package io.izzel.taboolib.util.item.inventory;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.item.inventory;
|
package io.izzel.taboolib.util.item.inventory;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.inject.TListener;
|
import io.izzel.taboolib.module.inject.TListener;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.item.inventory;
|
package io.izzel.taboolib.util.item.inventory;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.inject.TListener;
|
import io.izzel.taboolib.module.inject.TListener;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.item.inventory;
|
package io.izzel.taboolib.util.item.inventory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author 坏黑
|
* @Author 坏黑
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.item.inventory;
|
package io.izzel.taboolib.util.item.inventory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author 坏黑
|
* @Author 坏黑
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.item.inventory;
|
package io.izzel.taboolib.util.item.inventory;
|
||||||
|
|
||||||
import org.bukkit.event.inventory.InventoryCloseEvent;
|
import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.item.inventory;
|
package io.izzel.taboolib.util.item.inventory;
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.module.item.inventory;
|
package io.izzel.taboolib.util.item.inventory;
|
||||||
|
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.InventoryHolder;
|
import org.bukkit.inventory.InventoryHolder;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.lite;
|
package io.izzel.taboolib.util.lite;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
@ -1,8 +1,8 @@
|
|||||||
package io.izzel.taboolib.origin.lite;
|
package io.izzel.taboolib.util.lite;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.module.locale.TLocale;
|
||||||
import io.izzel.taboolib.module.command.TCommand;
|
import io.izzel.taboolib.module.command.base.BaseCommand;
|
||||||
import io.izzel.taboolib.module.command.base.BaseMainCommand;
|
import io.izzel.taboolib.module.command.base.BaseMainCommand;
|
||||||
import io.izzel.taboolib.module.command.base.BaseSubCommand;
|
import io.izzel.taboolib.module.command.base.BaseSubCommand;
|
||||||
import io.izzel.taboolib.module.command.base.CommandArgument;
|
import io.izzel.taboolib.module.command.base.CommandArgument;
|
||||||
@ -21,7 +21,7 @@ import java.text.SimpleDateFormat;
|
|||||||
/**
|
/**
|
||||||
* @author sky
|
* @author sky
|
||||||
*/
|
*/
|
||||||
@TCommand(
|
@BaseCommand(
|
||||||
name = "tabooliblogs",
|
name = "tabooliblogs",
|
||||||
aliases = {"tlog", "tlogs"},
|
aliases = {"tlog", "tlogs"},
|
||||||
permission = "taboolib.admin"
|
permission = "taboolib.admin"
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.lite;
|
package io.izzel.taboolib.util.lite;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
@ -1,4 +1,4 @@
|
|||||||
package io.izzel.taboolib.origin.lite;
|
package io.izzel.taboolib.util.lite;
|
||||||
|
|
||||||
import io.izzel.taboolib.Version;
|
import io.izzel.taboolib.Version;
|
||||||
import io.izzel.taboolib.module.nms.NMSHandler;
|
import io.izzel.taboolib.module.nms.NMSHandler;
|
||||||
@ -46,7 +46,7 @@ import java.util.Random;
|
|||||||
* @author DarkBlade12
|
* @author DarkBlade12
|
||||||
* @version 1.8
|
* @version 1.8
|
||||||
*/
|
*/
|
||||||
public enum Effects {
|
public enum Particles {
|
||||||
|
|
||||||
BARRIER,
|
BARRIER,
|
||||||
BLOCK_CRACK(ParticleProperty.REQUIRES_DATA),
|
BLOCK_CRACK(ParticleProperty.REQUIRES_DATA),
|
||||||
@ -110,15 +110,15 @@ public enum Effects {
|
|||||||
private final List<ParticleProperty> properties;
|
private final List<ParticleProperty> properties;
|
||||||
private int min, max;
|
private int min, max;
|
||||||
|
|
||||||
Effects(ParticleProperty... properties) {
|
Particles(ParticleProperty... properties) {
|
||||||
this(0, 0, properties);
|
this(0, 0, properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
Effects(int min, ParticleProperty... properties) {
|
Particles(int min, ParticleProperty... properties) {
|
||||||
this(min, 0, properties);
|
this(min, 0, properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
Effects(int min, int max, ParticleProperty... properties) {
|
Particles(int min, int max, ParticleProperty... properties) {
|
||||||
this.properties = Arrays.asList(properties);
|
this.properties = Arrays.asList(properties);
|
||||||
this.min = min;
|
this.min = min;
|
||||||
this.max = max;
|
this.max = max;
|
||||||
@ -173,8 +173,8 @@ public enum Effects {
|
|||||||
* @param name Name of the particle effect
|
* @param name Name of the particle effect
|
||||||
* @return The particle effect
|
* @return The particle effect
|
||||||
*/
|
*/
|
||||||
public static Effects fromName(String name) {
|
public static Particles fromName(String name) {
|
||||||
for (Effects effect : values()) {
|
for (Particles effect : values()) {
|
||||||
if (effect.name().equalsIgnoreCase(name)) {
|
if (effect.name().equalsIgnoreCase(name)) {
|
||||||
if (!effect.isSupported()) {
|
if (!effect.isSupported()) {
|
||||||
throw new ParticleVersionException();
|
throw new ParticleVersionException();
|
||||||
@ -213,7 +213,7 @@ public enum Effects {
|
|||||||
* @param data Particle data
|
* @param data Particle data
|
||||||
* @return Whether the data type is correct or not
|
* @return Whether the data type is correct or not
|
||||||
*/
|
*/
|
||||||
private static boolean isDataCorrect(Effects effect, Object data) {
|
private static boolean isDataCorrect(Particles effect, Object data) {
|
||||||
return ((effect == BLOCK_CRACK || effect == BLOCK_DUST) && (mcVersion < 13 ? data instanceof MaterialData : data instanceof BlockData)) || (effect == ITEM_CRACK && data instanceof ItemStack);
|
return ((effect == BLOCK_CRACK || effect == BLOCK_DUST) && (mcVersion < 13 ? data instanceof MaterialData : data instanceof BlockData)) || (effect == ITEM_CRACK && data instanceof ItemStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ public enum Effects {
|
|||||||
* @param color Particle color
|
* @param color Particle color
|
||||||
* @return Whether the color type is correct or not
|
* @return Whether the color type is correct or not
|
||||||
*/
|
*/
|
||||||
private static boolean isColorCorrect(Effects effect, ParticleColor color) {
|
private static boolean isColorCorrect(Particles effect, ParticleColor color) {
|
||||||
return ((effect == SPELL_MOB || effect == SPELL_MOB_AMBIENT || effect == REDSTONE) && color instanceof OrdinaryColor) || (effect == NOTE && color instanceof NoteColor);
|
return ((effect == SPELL_MOB || effect == SPELL_MOB_AMBIENT || effect == REDSTONE) && color instanceof OrdinaryColor) || (effect == NOTE && color instanceof NoteColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ public enum Effects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the color for effects like {@link Effects#SPELL_MOB}, {@link Effects#SPELL_MOB_AMBIENT}, {@link Effects#REDSTONE} and {@link Effects#NOTE}
|
* Represents the color for effects like {@link Particles#SPELL_MOB}, {@link Particles#SPELL_MOB_AMBIENT}, {@link Particles#REDSTONE} and {@link Particles#NOTE}
|
||||||
* <p>
|
* <p>
|
||||||
* This class is part of the <b>ParticleEffect Library</b> and follows the same usage conditions
|
* This class is part of the <b>ParticleEffect Library</b> and follows the same usage conditions
|
||||||
*
|
*
|
||||||
@ -422,7 +422,7 @@ public enum Effects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the color for effects like {@link Effects#SPELL_MOB}, {@link Effects#SPELL_MOB_AMBIENT} and {@link Effects#NOTE}
|
* Represents the color for effects like {@link Particles#SPELL_MOB}, {@link Particles#SPELL_MOB_AMBIENT} and {@link Particles#NOTE}
|
||||||
* <p>
|
* <p>
|
||||||
* This class is part of the <b>ParticleEffect Library</b> and follows the same usage conditions
|
* This class is part of the <b>ParticleEffect Library</b> and follows the same usage conditions
|
||||||
*
|
*
|
||||||
@ -534,7 +534,7 @@ public enum Effects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the color for the {@link Effects#NOTE} effect
|
* Represents the color for the {@link Particles#NOTE} effect
|
||||||
* <p>
|
* <p>
|
||||||
* This class is part of the <b>ParticleEffect Library</b> and follows the same usage conditions
|
* This class is part of the <b>ParticleEffect Library</b> and follows the same usage conditions
|
||||||
*
|
*
|
||||||
@ -599,18 +599,18 @@ public enum Effects {
|
|||||||
public static class Particle {
|
public static class Particle {
|
||||||
private static Random random = new Random();
|
private static Random random = new Random();
|
||||||
|
|
||||||
private Effects effect;
|
private Particles effect;
|
||||||
private ParticleShape shape;
|
private ParticleShape shape;
|
||||||
private OrdinaryColor color;
|
private OrdinaryColor color;
|
||||||
|
|
||||||
private byte typeCode;
|
private byte typeCode;
|
||||||
|
|
||||||
public Particle(Effects effect, ParticleShape shape, OrdinaryColor color) {
|
public Particle(Particles effect, ParticleShape shape, OrdinaryColor color) {
|
||||||
this.effect = effect;
|
this.effect = effect;
|
||||||
this.shape = shape;
|
this.shape = shape;
|
||||||
this.color = color;
|
this.color = color;
|
||||||
|
|
||||||
this.typeCode = (byte) (effect == Effects.NOTE ? 2 : (effect.hasProperty(ParticleProperty.COLORABLE) ? 1 : 0));
|
this.typeCode = (byte) (effect == Particles.NOTE ? 2 : (effect.hasProperty(ParticleProperty.COLORABLE) ? 1 : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
@ -649,7 +649,7 @@ public enum Effects {
|
|||||||
effect.display(color, offX, offY, offZ, amount, lc, p);
|
effect.display(color, offX, offY, offZ, amount, lc, p);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Effects.NOTE.display(new Effects.NoteColor(random.nextInt(24)), offX, offY, offZ, amount, lc, /*p.getPlayer(),*/ p);
|
Particles.NOTE.display(new Particles.NoteColor(random.nextInt(24)), offX, offY, offZ, amount, lc, /*p.getPlayer(),*/ p);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
effect.display(offX, offY, offZ, 0.001, amount, lc, p);
|
effect.display(offX, offY, offZ, 0.001, amount, lc, p);
|
||||||
@ -658,7 +658,7 @@ public enum Effects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Particle deserialize(Map<String, Object> map) {
|
public static Particle deserialize(Map<String, Object> map) {
|
||||||
return new Particle(Effects.fromName((String) map.get("particleEffect")), ParticleShape.valueOf(((String) map.get("particleShape")).toUpperCase()), new OrdinaryColor(Color.deserialize(((MemorySection) map.get("particleColor")).getValues(false))));
|
return new Particle(Particles.fromName((String) map.get("particleEffect")), ParticleShape.valueOf(((String) map.get("particleShape")).toUpperCase()), new OrdinaryColor(Color.deserialize(((MemorySection) map.get("particleColor")).getValues(false))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -736,7 +736,7 @@ public enum Effects {
|
|||||||
/*private static Class<?> enumParticle;
|
/*private static Class<?> enumParticle;
|
||||||
private static String ver;
|
private static String ver;
|
||||||
private static String pack;*/
|
private static String pack;*/
|
||||||
private final Effects effect;
|
private final Particles effect;
|
||||||
private float offsetX;
|
private float offsetX;
|
||||||
private float offsetY;
|
private float offsetY;
|
||||||
private float offsetZ;
|
private float offsetZ;
|
||||||
@ -762,7 +762,7 @@ public enum Effects {
|
|||||||
* @param data Data of the effect
|
* @param data Data of the effect
|
||||||
* @throws IllegalArgumentException If the speed or amount is lower than 0
|
* @throws IllegalArgumentException If the speed or amount is lower than 0
|
||||||
*/
|
*/
|
||||||
public ParticlePacket(Effects effect, double offsetX, double offsetY, double offsetZ, double speed, int amount, boolean longDistance, Object data) throws IllegalArgumentException {
|
public ParticlePacket(Particles effect, double offsetX, double offsetY, double offsetZ, double speed, int amount, boolean longDistance, Object data) throws IllegalArgumentException {
|
||||||
initialize();
|
initialize();
|
||||||
if (speed < 0) {
|
if (speed < 0) {
|
||||||
throw new IllegalArgumentException("The speed is lower than 0");
|
throw new IllegalArgumentException("The speed is lower than 0");
|
@ -1,14 +1,13 @@
|
|||||||
package io.izzel.taboolib.origin.lite;
|
package io.izzel.taboolib.util.lite;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scoreboard.DisplaySlot;
|
import org.bukkit.scoreboard.DisplaySlot;
|
||||||
import org.bukkit.scoreboard.Scoreboard;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
public class Boards {
|
public class Scoreboards {
|
||||||
|
|
||||||
static String fixTitle(String title) {
|
static String fixTitle(String title) {
|
||||||
if (title == null) {
|
if (title == null) {
|
@ -1,6 +1,6 @@
|
|||||||
package io.izzel.taboolib.origin.lite;
|
package io.izzel.taboolib.util.lite;
|
||||||
|
|
||||||
import io.izzel.taboolib.module.logger.TLogger;
|
import io.izzel.taboolib.module.locale.logger.TLogger;
|
||||||
import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
|
import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
|
||||||
import io.izzel.taboolib.module.inject.TFunction;
|
import io.izzel.taboolib.module.inject.TFunction;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user