From 8b1b14ae7c390599c471155c0a33dfd2f26004a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9D=8F=E9=BB=91?= Date: Sat, 6 Jul 2019 12:03:15 +0800 Subject: [PATCH] Framework adjustment --- .../resources/{config.yml => settings.yml} | 3 -- .../scala/io/izzel/taboolib/PluginLoader.java | 6 +-- .../scala/io/izzel/taboolib/TabooLib.java | 25 ++++++------ .../scala/io/izzel/taboolib/TabooLibAPI.java | 2 +- .../io/izzel/taboolib/TabooLibLoader.java | 8 ++-- .../{origin => }/client/TabooLibClient.java | 14 +++---- .../{origin => }/client/TabooLibServer.java | 12 +++--- .../{origin => }/client/TabooLibSettings.java | 2 +- .../{origin => }/client/packet/Packet.java | 2 +- .../client/packet/PacketParser.java | 2 +- .../client/packet/PacketSerializer.java | 4 +- .../client/packet/PacketType.java | 2 +- .../client/packet/PacketValue.java | 2 +- .../client/packet/impl/PacketAlive.java | 8 ++-- .../client/packet/impl/PacketCommand.java | 10 ++--- .../client/packet/impl/PacketEmpty.java | 6 +-- .../client/packet/impl/PacketHeartbeat.java | 8 ++-- .../client/packet/impl/PacketJoin.java | 8 ++-- .../client/packet/impl/PacketMessage.java | 10 ++--- .../client/packet/impl/PacketQuit.java | 10 ++--- .../client/server/ClientConnection.java | 10 ++--- .../command/TabooLibExecuteCommand.java | 6 +-- .../command/TabooLibLocaleCommand.java | 6 +-- .../command/TabooLibPluginCommand.java | 14 +++---- .../event/PlayerJumpEvent.java | 2 +- .../event/PlayerLoadedEvent.java | 2 +- .../listener/ListenerNetWork.java | 2 +- .../listener/ListenerPlayerCommand.java | 10 ++--- .../listener/ListenerPlayerJump.java | 4 +- .../plugin/InternalJavaPlugin.java | 2 +- .../{ => common}/plugin/InternalPlugin.java | 4 +- .../plugin/InternalPluginLoader.java | 2 +- .../{origin => }/cronus/CronusParser.java | 6 +-- .../{origin => }/cronus/CronusUtils.java | 2 +- .../{origin => }/cronus/bukkit/ItemStack.java | 4 +- .../{origin => }/cronus/bukkit/Location.java | 2 +- .../cronus/util/StringExpression.java | 4 +- .../cronus/util/StringNumber.java | 2 +- .../module/command/TCommandHandler.java | 7 ++-- .../{TCommand.java => base/BaseCommand.java} | 4 +- ...ommandBuilder.java => CommandBuilder.java} | 30 +++++++-------- .../izzel/taboolib/module/config/TConfig.java | 2 +- .../module/{mysql => db}/IColumn.java | 2 +- .../taboolib/module/{mysql => db}/IHost.java | 2 +- .../hikari => db/source}/HikariHandler.java | 8 ++-- .../hikari => db/source}/MapDataSource.java | 4 +- .../{mysql/builder => db/sql}/SQLColumn.java | 4 +- .../builder => db/sql}/SQLColumnOption.java | 2 +- .../builder => db/sql}/SQLColumnType.java | 2 +- .../builder => db/sql}/SQLExecutor.java | 2 +- .../{mysql/builder => db/sql}/SQLHost.java | 4 +- .../{mysql/builder => db/sql}/SQLTable.java | 8 ++-- .../sql}/query/RunnableQuery.java | 6 +-- .../sql}/query/RunnableUpdate.java | 6 +-- .../builder => db/sql}/query/TaskResult.java | 2 +- .../sql}/query/TaskStatement.java | 2 +- .../lite => db/sqlite}/SQLiteColumn.java | 4 +- .../sqlite}/SQLiteColumnOption.java | 2 +- .../lite => db/sqlite}/SQLiteColumnType.java | 2 +- .../{mysql/lite => db/sqlite}/SQLiteHost.java | 4 +- .../db/yaml}/PlayerDataManager.java | 4 +- .../db/yaml}/PluginDataManager.java | 7 +--- .../module/inject/PlayerContainerLoader.java | 2 +- .../module/inject/TFunctionLoader.java | 2 +- .../taboolib/module/inject/TInjectLoader.java | 12 +++--- .../module/inject/TListenerHandler.java | 4 +- .../module/inject/TScheduleLoader.java | 2 +- .../izzel/taboolib/module/locale/TLocale.java | 2 +- .../taboolib/module/locale/TLocaleLoader.java | 2 +- .../module/{ => locale}/logger/TLogger.java | 2 +- .../{ => locale}/logger/TLoggerManager.java | 2 +- .../module/locale/type/TLocaleBook.java | 4 +- .../module/locale/type/TLocaleSound.java | 14 +++---- .../channel/InternalChannelExecutor.java | 2 +- .../tellraw/internal/InternalTellraw.java | 2 +- .../scala/io/izzel/taboolib/util/Files.java | 2 +- .../book/BookAchievement.java | 2 +- .../{origin => util}/book/BookFormatter.java | 4 +- .../{origin => util}/book/BookReflection.java | 4 +- .../book/action/ClickAction.java | 2 +- .../book/action/HoverAction.java | 8 ++-- .../book/builder/BookBuilder.java | 8 ++-- .../book/builder/PageBuilder.java | 2 +- .../book/builder/TextBuilder.java | 6 +-- .../{module => util}/item/ItemBuilder.java | 2 +- .../taboolib/{module => util}/item/Items.java | 4 +- .../item/inventory/ClickEvent.java | 2 +- .../item/inventory/ClickListener.java | 2 +- .../item/inventory/ClickListenerOffhand.java | 2 +- .../item/inventory/ClickTask.java | 2 +- .../item/inventory/ClickType.java | 2 +- .../item/inventory/CloseTask.java | 2 +- .../item/inventory/MenuBuilder.java | 2 +- .../item/inventory/MenuHolder.java | 2 +- .../{origin => util}/lite/Catchers.java | 2 +- .../taboolib/{origin => util}/lite/Logs.java | 6 +-- .../{origin => util}/lite/Numbers.java | 2 +- .../Effects.java => util/lite/Particles.java} | 38 +++++++++---------- .../lite/Scoreboards.java} | 5 +-- .../{origin => util}/lite/Scripts.java | 4 +- .../{origin => util}/lite/Servers.java | 2 +- .../Sounds.java => util/lite/SoundPack.java} | 12 +++--- .../{origin => util}/lite/Weights.java | 2 +- .../lite/cooldown/Cooldown.java | 2 +- .../lite/cooldown/Cooldowns.java | 2 +- .../plugin/PluginLoadState.java | 2 +- .../plugin/PluginLoadStateType.java | 2 +- .../plugin/PluginUnloadState.java | 2 +- .../{origin => util}/plugin/PluginUtils.java | 2 +- .../serialize/DoNotSerialize.java | 2 +- .../serialize/TSerializable.java | 2 +- .../serialize/TSerializeCollection.java | 2 +- .../serialize/TSerializeCustom.java | 2 +- .../serialize/TSerializeMap.java | 2 +- .../serialize/TSerializer.java | 2 +- .../serialize/TSerializerElement.java | 2 +- .../serialize/TSerializerElementGeneral.java | 4 +- .../serialize/TSerializerExample.java | 2 +- .../{origin => util}/tag/TagDataHandler.java | 2 +- .../{origin => util}/tag/TagPlayerData.java | 2 +- .../{origin => util}/tag/TagUtils.java | 4 +- .../tlibscala/runtime/RichOfflinePlayer.scala | 2 +- .../lzzel/tlibscala/runtime/RichPlayer.scala | 8 ++-- 123 files changed, 287 insertions(+), 296 deletions(-) rename src/main/resources/{config.yml => settings.yml} (95%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/TabooLibClient.java (91%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/TabooLibServer.java (92%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/TabooLibSettings.java (97%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/packet/Packet.java (92%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/packet/PacketParser.java (98%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/packet/PacketSerializer.java (97%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/packet/PacketType.java (87%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/packet/PacketValue.java (90%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/packet/impl/PacketAlive.java (66%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/packet/impl/PacketCommand.java (72%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/packet/impl/PacketEmpty.java (64%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/packet/impl/PacketHeartbeat.java (70%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/packet/impl/PacketJoin.java (70%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/packet/impl/PacketMessage.java (74%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/packet/impl/PacketQuit.java (79%) rename src/main/scala/io/izzel/taboolib/{origin => }/client/server/ClientConnection.java (89%) rename src/main/scala/io/izzel/taboolib/{ => common}/command/TabooLibExecuteCommand.java (97%) rename src/main/scala/io/izzel/taboolib/{ => common}/command/TabooLibLocaleCommand.java (97%) rename src/main/scala/io/izzel/taboolib/{ => common}/command/TabooLibPluginCommand.java (96%) rename src/main/scala/io/izzel/taboolib/{origin => common}/event/PlayerJumpEvent.java (95%) rename src/main/scala/io/izzel/taboolib/{origin => common}/event/PlayerLoadedEvent.java (93%) rename src/main/scala/io/izzel/taboolib/{ => common}/listener/ListenerNetWork.java (93%) rename src/main/scala/io/izzel/taboolib/{ => common}/listener/ListenerPlayerCommand.java (88%) rename src/main/scala/io/izzel/taboolib/{ => common}/listener/ListenerPlayerJump.java (95%) rename src/main/scala/io/izzel/taboolib/{ => common}/plugin/InternalJavaPlugin.java (78%) rename src/main/scala/io/izzel/taboolib/{ => common}/plugin/InternalPlugin.java (95%) rename src/main/scala/io/izzel/taboolib/{ => common}/plugin/InternalPluginLoader.java (97%) rename src/main/scala/io/izzel/taboolib/{origin => }/cronus/CronusParser.java (95%) rename src/main/scala/io/izzel/taboolib/{origin => }/cronus/CronusUtils.java (99%) rename src/main/scala/io/izzel/taboolib/{origin => }/cronus/bukkit/ItemStack.java (97%) rename src/main/scala/io/izzel/taboolib/{origin => }/cronus/bukkit/Location.java (98%) rename src/main/scala/io/izzel/taboolib/{origin => }/cronus/util/StringExpression.java (96%) rename src/main/scala/io/izzel/taboolib/{origin => }/cronus/util/StringNumber.java (98%) rename src/main/scala/io/izzel/taboolib/module/command/{TCommand.java => base/BaseCommand.java} (85%) rename src/main/scala/io/izzel/taboolib/module/command/lite/{SimpleCommandBuilder.java => CommandBuilder.java} (81%) rename src/main/scala/io/izzel/taboolib/module/{mysql => db}/IColumn.java (77%) rename src/main/scala/io/izzel/taboolib/module/{mysql => db}/IHost.java (95%) rename src/main/scala/io/izzel/taboolib/module/{mysql/hikari => db/source}/HikariHandler.java (95%) rename src/main/scala/io/izzel/taboolib/module/{mysql/hikari => db/source}/MapDataSource.java (88%) rename src/main/scala/io/izzel/taboolib/module/{mysql/builder => db/sql}/SQLColumn.java (97%) rename src/main/scala/io/izzel/taboolib/module/{mysql/builder => db/sql}/SQLColumnOption.java (90%) rename src/main/scala/io/izzel/taboolib/module/{mysql/builder => db/sql}/SQLColumnType.java (98%) rename src/main/scala/io/izzel/taboolib/module/{mysql/builder => db/sql}/SQLExecutor.java (94%) rename src/main/scala/io/izzel/taboolib/module/{mysql/builder => db/sql}/SQLHost.java (97%) rename src/main/scala/io/izzel/taboolib/module/{mysql/builder => db/sql}/SQLTable.java (92%) rename src/main/scala/io/izzel/taboolib/module/{mysql/builder => db/sql}/query/RunnableQuery.java (96%) rename src/main/scala/io/izzel/taboolib/module/{mysql/builder => db/sql}/query/RunnableUpdate.java (93%) rename src/main/scala/io/izzel/taboolib/module/{mysql/builder => db/sql}/query/TaskResult.java (79%) rename src/main/scala/io/izzel/taboolib/module/{mysql/builder => db/sql}/query/TaskStatement.java (80%) rename src/main/scala/io/izzel/taboolib/module/{mysql/lite => db/sqlite}/SQLiteColumn.java (97%) rename src/main/scala/io/izzel/taboolib/module/{mysql/lite => db/sqlite}/SQLiteColumnOption.java (91%) rename src/main/scala/io/izzel/taboolib/module/{mysql/lite => db/sqlite}/SQLiteColumnType.java (92%) rename src/main/scala/io/izzel/taboolib/module/{mysql/lite => db/sqlite}/SQLiteHost.java (93%) rename src/main/scala/io/izzel/taboolib/{origin/database => module/db/yaml}/PlayerDataManager.java (97%) rename src/main/scala/io/izzel/taboolib/{origin/database => module/db/yaml}/PluginDataManager.java (93%) rename src/main/scala/io/izzel/taboolib/module/{ => locale}/logger/TLogger.java (99%) rename src/main/scala/io/izzel/taboolib/module/{ => locale}/logger/TLoggerManager.java (92%) rename src/main/scala/io/izzel/taboolib/{origin => util}/book/BookAchievement.java (98%) rename src/main/scala/io/izzel/taboolib/{origin => util}/book/BookFormatter.java (92%) rename src/main/scala/io/izzel/taboolib/{origin => util}/book/BookReflection.java (99%) rename src/main/scala/io/izzel/taboolib/{origin => util}/book/action/ClickAction.java (98%) rename src/main/scala/io/izzel/taboolib/{origin => util}/book/action/HoverAction.java (95%) rename src/main/scala/io/izzel/taboolib/{origin => util}/book/builder/BookBuilder.java (92%) rename src/main/scala/io/izzel/taboolib/{origin => util}/book/builder/PageBuilder.java (98%) rename src/main/scala/io/izzel/taboolib/{origin => util}/book/builder/TextBuilder.java (91%) rename src/main/scala/io/izzel/taboolib/{module => util}/item/ItemBuilder.java (99%) rename src/main/scala/io/izzel/taboolib/{module => util}/item/Items.java (99%) rename src/main/scala/io/izzel/taboolib/{module => util}/item/inventory/ClickEvent.java (95%) rename src/main/scala/io/izzel/taboolib/{module => util}/item/inventory/ClickListener.java (98%) rename src/main/scala/io/izzel/taboolib/{module => util}/item/inventory/ClickListenerOffhand.java (92%) rename src/main/scala/io/izzel/taboolib/{module => util}/item/inventory/ClickTask.java (70%) rename src/main/scala/io/izzel/taboolib/{module => util}/item/inventory/ClickType.java (66%) rename src/main/scala/io/izzel/taboolib/{module => util}/item/inventory/CloseTask.java (78%) rename src/main/scala/io/izzel/taboolib/{module => util}/item/inventory/MenuBuilder.java (98%) rename src/main/scala/io/izzel/taboolib/{module => util}/item/inventory/MenuHolder.java (90%) rename src/main/scala/io/izzel/taboolib/{origin => util}/lite/Catchers.java (98%) rename src/main/scala/io/izzel/taboolib/{origin => util}/lite/Logs.java (97%) rename src/main/scala/io/izzel/taboolib/{origin => util}/lite/Numbers.java (97%) rename src/main/scala/io/izzel/taboolib/{origin/lite/Effects.java => util/lite/Particles.java} (95%) rename src/main/scala/io/izzel/taboolib/{origin/lite/Boards.java => util/lite/Scoreboards.java} (98%) rename src/main/scala/io/izzel/taboolib/{origin => util}/lite/Scripts.java (94%) rename src/main/scala/io/izzel/taboolib/{origin => util}/lite/Servers.java (97%) rename src/main/scala/io/izzel/taboolib/{origin/lite/Sounds.java => util/lite/SoundPack.java} (93%) rename src/main/scala/io/izzel/taboolib/{origin => util}/lite/Weights.java (98%) rename src/main/scala/io/izzel/taboolib/{origin => util}/lite/cooldown/Cooldown.java (96%) rename src/main/scala/io/izzel/taboolib/{origin => util}/lite/cooldown/Cooldowns.java (96%) rename src/main/scala/io/izzel/taboolib/{origin => util}/plugin/PluginLoadState.java (91%) rename src/main/scala/io/izzel/taboolib/{origin => util}/plugin/PluginLoadStateType.java (90%) rename src/main/scala/io/izzel/taboolib/{origin => util}/plugin/PluginUnloadState.java (90%) rename src/main/scala/io/izzel/taboolib/{origin => util}/plugin/PluginUtils.java (99%) rename src/main/scala/io/izzel/taboolib/{module => util}/serialize/DoNotSerialize.java (89%) rename src/main/scala/io/izzel/taboolib/{module => util}/serialize/TSerializable.java (94%) rename src/main/scala/io/izzel/taboolib/{module => util}/serialize/TSerializeCollection.java (89%) rename src/main/scala/io/izzel/taboolib/{module => util}/serialize/TSerializeCustom.java (89%) rename src/main/scala/io/izzel/taboolib/{module => util}/serialize/TSerializeMap.java (88%) rename src/main/scala/io/izzel/taboolib/{module => util}/serialize/TSerializer.java (99%) rename src/main/scala/io/izzel/taboolib/{module => util}/serialize/TSerializerElement.java (81%) rename src/main/scala/io/izzel/taboolib/{module => util}/serialize/TSerializerElementGeneral.java (98%) rename src/main/scala/io/izzel/taboolib/{module => util}/serialize/TSerializerExample.java (97%) rename src/main/scala/io/izzel/taboolib/{origin => util}/tag/TagDataHandler.java (99%) rename src/main/scala/io/izzel/taboolib/{origin => util}/tag/TagPlayerData.java (98%) rename src/main/scala/io/izzel/taboolib/{origin => util}/tag/TagUtils.java (95%) diff --git a/src/main/resources/config.yml b/src/main/resources/settings.yml similarity index 95% rename from src/main/resources/config.yml rename to src/main/resources/settings.yml index af131cc..9e0b493 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/settings.yml @@ -21,9 +21,6 @@ LOCALE: # 启用后将会收到大量调试信息, 不建议使用 SERVER: false -# 网络连接测试地址 -TEST-URL: 'aliyun.com' - # 玩家列表(TAB-API)是否根据前缀排序 TABLIST-SORT: true diff --git a/src/main/scala/io/izzel/taboolib/PluginLoader.java b/src/main/scala/io/izzel/taboolib/PluginLoader.java index b5cf65c..9d3e01a 100644 --- a/src/main/scala/io/izzel/taboolib/PluginLoader.java +++ b/src/main/scala/io/izzel/taboolib/PluginLoader.java @@ -8,9 +8,9 @@ import io.izzel.taboolib.module.config.TConfig; import io.izzel.taboolib.module.config.TConfigWatcher; import io.izzel.taboolib.module.dependency.TDependencyInjector; import io.izzel.taboolib.module.inject.TListenerHandler; -import io.izzel.taboolib.module.mysql.IHost; -import io.izzel.taboolib.module.mysql.hikari.HikariHandler; -import io.izzel.taboolib.origin.database.PluginDataManager; +import io.izzel.taboolib.module.db.IHost; +import io.izzel.taboolib.module.db.source.HikariHandler; +import io.izzel.taboolib.module.db.yaml.PluginDataManager; import org.bukkit.plugin.Plugin; import java.util.List; diff --git a/src/main/scala/io/izzel/taboolib/TabooLib.java b/src/main/scala/io/izzel/taboolib/TabooLib.java index c67ae4b..f2ab4cf 100644 --- a/src/main/scala/io/izzel/taboolib/TabooLib.java +++ b/src/main/scala/io/izzel/taboolib/TabooLib.java @@ -4,12 +4,12 @@ import io.izzel.taboolib.module.locale.TLocaleLoader; import io.izzel.taboolib.module.config.TConfig; import io.izzel.taboolib.module.config.TConfigWatcher; import io.izzel.taboolib.module.dependency.Dependency; -import io.izzel.taboolib.module.logger.TLogger; -import io.izzel.taboolib.module.mysql.hikari.HikariHandler; +import io.izzel.taboolib.module.locale.logger.TLogger; +import io.izzel.taboolib.module.db.source.HikariHandler; import io.izzel.taboolib.module.nms.NMSHandler; -import io.izzel.taboolib.origin.database.PlayerDataManager; -import io.izzel.taboolib.origin.database.PluginDataManager; -import io.izzel.taboolib.plugin.InternalPlugin; +import io.izzel.taboolib.module.db.yaml.PlayerDataManager; +import io.izzel.taboolib.module.db.yaml.PluginDataManager; +import io.izzel.taboolib.common.plugin.InternalPlugin; import io.izzel.taboolib.util.Files; import io.izzel.taboolib.util.IO; import org.bukkit.configuration.file.YamlConfiguration; @@ -34,10 +34,11 @@ public class TabooLib { private static TabooLib inst = new TabooLib(); private static TLogger logger; private static TConfig config; + + // 当前运行版本 private static double version; - // 第三方依赖下载位置 - private File libsFolder; + // 本地数据文件 private File playerDataFolder; private File serverDataFolder; @@ -45,11 +46,11 @@ public class TabooLib { private YamlConfiguration internal = new YamlConfiguration(); public TabooLib() { - // 创建配置 inst = this; logger = TLogger.getUnformatted("TabooLib"); - config = TConfig.create(getPlugin(), "config.yml"); - libsFolder = Files.folder("plugins/TabooLib/libs"); + // 配置文件从 config.yml 修改为 settings.yml 防止与老版本插件冲突 + config = TConfig.create(getPlugin(), "settings.yml"); + // 数据文件 playerDataFolder = Files.folder(config.getString("DATAURL.PLAYER-DATA")); serverDataFolder = Files.folder(config.getString("DATAURL.SERVER-DATA")); // 加载版本号 @@ -119,10 +120,6 @@ public class TabooLib { return version; } - public File getLibsFolder() { - return libsFolder; - } - public File getPlayerDataFolder() { return playerDataFolder; } diff --git a/src/main/scala/io/izzel/taboolib/TabooLibAPI.java b/src/main/scala/io/izzel/taboolib/TabooLibAPI.java index 3b17d32..372cfb2 100644 --- a/src/main/scala/io/izzel/taboolib/TabooLibAPI.java +++ b/src/main/scala/io/izzel/taboolib/TabooLibAPI.java @@ -1,7 +1,7 @@ package io.izzel.taboolib; 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 org.bukkit.Bukkit; import org.bukkit.command.CommandSender; diff --git a/src/main/scala/io/izzel/taboolib/TabooLibLoader.java b/src/main/scala/io/izzel/taboolib/TabooLibLoader.java index 322821e..7651c83 100644 --- a/src/main/scala/io/izzel/taboolib/TabooLibLoader.java +++ b/src/main/scala/io/izzel/taboolib/TabooLibLoader.java @@ -4,10 +4,10 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import io.izzel.taboolib.module.dependency.TDependencyInjector; import io.izzel.taboolib.module.inject.TSchedule; -import io.izzel.taboolib.origin.client.TabooLibClient; -import io.izzel.taboolib.origin.client.TabooLibServer; -import io.izzel.taboolib.origin.database.PlayerDataManager; -import io.izzel.taboolib.origin.database.PluginDataManager; +import io.izzel.taboolib.client.TabooLibClient; +import io.izzel.taboolib.client.TabooLibServer; +import io.izzel.taboolib.module.db.yaml.PlayerDataManager; +import io.izzel.taboolib.module.db.yaml.PluginDataManager; import io.izzel.taboolib.util.Files; import io.izzel.taboolib.util.Reflection; import org.bukkit.Bukkit; diff --git a/src/main/scala/io/izzel/taboolib/origin/client/TabooLibClient.java b/src/main/scala/io/izzel/taboolib/client/TabooLibClient.java similarity index 91% rename from src/main/scala/io/izzel/taboolib/origin/client/TabooLibClient.java rename to src/main/scala/io/izzel/taboolib/client/TabooLibClient.java index 445f364..8e657fc 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/TabooLibClient.java +++ b/src/main/scala/io/izzel/taboolib/client/TabooLibClient.java @@ -1,12 +1,12 @@ -package io.izzel.taboolib.origin.client; +package io.izzel.taboolib.client; 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.command.lite.SimpleCommandBuilder; -import io.izzel.taboolib.origin.client.packet.Packet; -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.module.command.lite.CommandBuilder; +import io.izzel.taboolib.client.packet.PacketSerializer; import io.izzel.taboolib.util.ArrayUtil; import org.bukkit.Bukkit; import org.bukkit.util.NumberConversions; @@ -81,7 +81,7 @@ public class TabooLibClient { } }); - SimpleCommandBuilder.create("TabooLibClient", TabooLib.getPlugin()) + CommandBuilder.create("TabooLibClient", TabooLib.getPlugin()) .aliases("tclient") .permission("*") .execute((sender, args) -> { diff --git a/src/main/scala/io/izzel/taboolib/origin/client/TabooLibServer.java b/src/main/scala/io/izzel/taboolib/client/TabooLibServer.java similarity index 92% rename from src/main/scala/io/izzel/taboolib/origin/client/TabooLibServer.java rename to src/main/scala/io/izzel/taboolib/client/TabooLibServer.java index 9e01726..816d96f 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/TabooLibServer.java +++ b/src/main/scala/io/izzel/taboolib/client/TabooLibServer.java @@ -1,11 +1,11 @@ -package io.izzel.taboolib.origin.client; +package io.izzel.taboolib.client; import io.izzel.taboolib.TabooLibAPI; -import io.izzel.taboolib.origin.client.packet.Packet; -import io.izzel.taboolib.origin.client.packet.PacketSerializer; -import io.izzel.taboolib.origin.client.packet.impl.PacketHeartbeat; -import io.izzel.taboolib.origin.client.packet.impl.PacketQuit; -import io.izzel.taboolib.origin.client.server.ClientConnection; +import io.izzel.taboolib.client.packet.Packet; +import io.izzel.taboolib.client.packet.PacketSerializer; +import io.izzel.taboolib.client.packet.impl.PacketHeartbeat; +import io.izzel.taboolib.client.server.ClientConnection; +import io.izzel.taboolib.client.packet.impl.PacketQuit; import org.bukkit.util.NumberConversions; import java.io.IOException; diff --git a/src/main/scala/io/izzel/taboolib/origin/client/TabooLibSettings.java b/src/main/scala/io/izzel/taboolib/client/TabooLibSettings.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/origin/client/TabooLibSettings.java rename to src/main/scala/io/izzel/taboolib/client/TabooLibSettings.java index c7dc373..b14194c 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/TabooLibSettings.java +++ b/src/main/scala/io/izzel/taboolib/client/TabooLibSettings.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.client; +package io.izzel.taboolib.client; import java.io.IOException; import java.io.InputStream; diff --git a/src/main/scala/io/izzel/taboolib/origin/client/packet/Packet.java b/src/main/scala/io/izzel/taboolib/client/packet/Packet.java similarity index 92% rename from src/main/scala/io/izzel/taboolib/origin/client/packet/Packet.java rename to src/main/scala/io/izzel/taboolib/client/packet/Packet.java index 9d2ea00..c74c03e 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/packet/Packet.java +++ b/src/main/scala/io/izzel/taboolib/client/packet/Packet.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.client.packet; +package io.izzel.taboolib.client.packet; import com.google.gson.JsonObject; diff --git a/src/main/scala/io/izzel/taboolib/origin/client/packet/PacketParser.java b/src/main/scala/io/izzel/taboolib/client/packet/PacketParser.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/origin/client/packet/PacketParser.java rename to src/main/scala/io/izzel/taboolib/client/packet/PacketParser.java index 21f95e2..9e95c62 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/packet/PacketParser.java +++ b/src/main/scala/io/izzel/taboolib/client/packet/PacketParser.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.client.packet; +package io.izzel.taboolib.client.packet; import com.google.gson.JsonObject; import io.izzel.taboolib.TabooLib; diff --git a/src/main/scala/io/izzel/taboolib/origin/client/packet/PacketSerializer.java b/src/main/scala/io/izzel/taboolib/client/packet/PacketSerializer.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/origin/client/packet/PacketSerializer.java rename to src/main/scala/io/izzel/taboolib/client/packet/PacketSerializer.java index f01a907..d44bc6e 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/packet/PacketSerializer.java +++ b/src/main/scala/io/izzel/taboolib/client/packet/PacketSerializer.java @@ -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.JsonParser; import com.google.gson.JsonSyntaxException; import io.izzel.taboolib.TabooLibAPI; import io.izzel.taboolib.TabooLibLoader; +import io.izzel.taboolib.client.packet.impl.PacketEmpty; import io.izzel.taboolib.module.inject.TListener; -import io.izzel.taboolib.origin.client.packet.impl.PacketEmpty; import org.bukkit.Bukkit; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; diff --git a/src/main/scala/io/izzel/taboolib/origin/client/packet/PacketType.java b/src/main/scala/io/izzel/taboolib/client/packet/PacketType.java similarity index 87% rename from src/main/scala/io/izzel/taboolib/origin/client/packet/PacketType.java rename to src/main/scala/io/izzel/taboolib/client/packet/PacketType.java index c8798c7..545c976 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/packet/PacketType.java +++ b/src/main/scala/io/izzel/taboolib/client/packet/PacketType.java @@ -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.Retention; diff --git a/src/main/scala/io/izzel/taboolib/origin/client/packet/PacketValue.java b/src/main/scala/io/izzel/taboolib/client/packet/PacketValue.java similarity index 90% rename from src/main/scala/io/izzel/taboolib/origin/client/packet/PacketValue.java rename to src/main/scala/io/izzel/taboolib/client/packet/PacketValue.java index ccdb7d3..d4f9108 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/packet/PacketValue.java +++ b/src/main/scala/io/izzel/taboolib/client/packet/PacketValue.java @@ -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.Retention; diff --git a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketAlive.java b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketAlive.java similarity index 66% rename from src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketAlive.java rename to src/main/scala/io/izzel/taboolib/client/packet/impl/PacketAlive.java index 8349ee6..d6356e0 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketAlive.java +++ b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketAlive.java @@ -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.origin.client.packet.Packet; -import io.izzel.taboolib.origin.client.packet.PacketType; +import io.izzel.taboolib.client.TabooLibServer; +import io.izzel.taboolib.client.packet.Packet; +import io.izzel.taboolib.client.packet.PacketType; /** * @Author sky diff --git a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketCommand.java b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketCommand.java similarity index 72% rename from src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketCommand.java rename to src/main/scala/io/izzel/taboolib/client/packet/impl/PacketCommand.java index cd74aff..879ed8d 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketCommand.java +++ b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketCommand.java @@ -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.origin.client.packet.Packet; -import io.izzel.taboolib.origin.client.packet.PacketType; -import io.izzel.taboolib.origin.client.packet.PacketValue; +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 org.bukkit.Bukkit; /** diff --git a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketEmpty.java b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketEmpty.java similarity index 64% rename from src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketEmpty.java rename to src/main/scala/io/izzel/taboolib/client/packet/impl/PacketEmpty.java index 887b948..ab0f950 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketEmpty.java +++ b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketEmpty.java @@ -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.origin.client.packet.PacketType; +import io.izzel.taboolib.client.packet.Packet; +import io.izzel.taboolib.client.packet.PacketType; /** * @Author sky diff --git a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketHeartbeat.java b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketHeartbeat.java similarity index 70% rename from src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketHeartbeat.java rename to src/main/scala/io/izzel/taboolib/client/packet/impl/PacketHeartbeat.java index 8acc7be..523f4b5 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketHeartbeat.java +++ b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketHeartbeat.java @@ -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.origin.client.packet.Packet; -import io.izzel.taboolib.origin.client.packet.PacketType; +import io.izzel.taboolib.client.TabooLibClient; +import io.izzel.taboolib.client.packet.Packet; +import io.izzel.taboolib.client.packet.PacketType; /** * @Author sky diff --git a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketJoin.java b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketJoin.java similarity index 70% rename from src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketJoin.java rename to src/main/scala/io/izzel/taboolib/client/packet/impl/PacketJoin.java index d67d77d..f7a0f93 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketJoin.java +++ b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketJoin.java @@ -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.origin.client.TabooLibServer; -import io.izzel.taboolib.origin.client.packet.Packet; -import io.izzel.taboolib.origin.client.packet.PacketType; /** * @Author sky diff --git a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketMessage.java b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketMessage.java similarity index 74% rename from src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketMessage.java rename to src/main/scala/io/izzel/taboolib/client/packet/impl/PacketMessage.java index f63a8a4..2ab419a 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketMessage.java +++ b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketMessage.java @@ -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.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; +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 org.bukkit.Bukkit; /** diff --git a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketQuit.java b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketQuit.java similarity index 79% rename from src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketQuit.java rename to src/main/scala/io/izzel/taboolib/client/packet/impl/PacketQuit.java index 9d27054..0c4ed43 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/packet/impl/PacketQuit.java +++ b/src/main/scala/io/izzel/taboolib/client/packet/impl/PacketQuit.java @@ -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.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 diff --git a/src/main/scala/io/izzel/taboolib/origin/client/server/ClientConnection.java b/src/main/scala/io/izzel/taboolib/client/server/ClientConnection.java similarity index 89% rename from src/main/scala/io/izzel/taboolib/origin/client/server/ClientConnection.java rename to src/main/scala/io/izzel/taboolib/client/server/ClientConnection.java index ce854df..3097685 100644 --- a/src/main/scala/io/izzel/taboolib/origin/client/server/ClientConnection.java +++ b/src/main/scala/io/izzel/taboolib/client/server/ClientConnection.java @@ -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.origin.client.TabooLibSettings; -import io.izzel.taboolib.origin.client.packet.impl.PacketJoin; -import io.izzel.taboolib.origin.client.packet.impl.PacketQuit; +import io.izzel.taboolib.client.TabooLibServer; +import io.izzel.taboolib.client.TabooLibSettings; +import io.izzel.taboolib.client.packet.impl.PacketJoin; +import io.izzel.taboolib.client.packet.impl.PacketQuit; import org.bukkit.util.NumberConversions; import java.io.BufferedReader; diff --git a/src/main/scala/io/izzel/taboolib/command/TabooLibExecuteCommand.java b/src/main/scala/io/izzel/taboolib/common/command/TabooLibExecuteCommand.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/command/TabooLibExecuteCommand.java rename to src/main/scala/io/izzel/taboolib/common/command/TabooLibExecuteCommand.java index 08738dc..99281ce 100644 --- a/src/main/scala/io/izzel/taboolib/command/TabooLibExecuteCommand.java +++ b/src/main/scala/io/izzel/taboolib/common/command/TabooLibExecuteCommand.java @@ -1,10 +1,10 @@ -package io.izzel.taboolib.command; +package io.izzel.taboolib.common.command; import io.izzel.taboolib.TabooLibAPI; import io.izzel.taboolib.module.locale.TLocale; import io.izzel.taboolib.module.command.base.BaseMainCommand; 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.CommandRegister; import io.izzel.taboolib.util.ArrayUtil; @@ -17,7 +17,7 @@ import org.bukkit.entity.Player; * @Author sky * @Since 2018-07-04 21:32 */ -@TCommand( +@BaseCommand( name = "taboolibexecute", aliases = {"texecute"}, permission = "taboolib.admin" diff --git a/src/main/scala/io/izzel/taboolib/command/TabooLibLocaleCommand.java b/src/main/scala/io/izzel/taboolib/common/command/TabooLibLocaleCommand.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/command/TabooLibLocaleCommand.java rename to src/main/scala/io/izzel/taboolib/common/command/TabooLibLocaleCommand.java index ca4dfa2..3f16b73 100644 --- a/src/main/scala/io/izzel/taboolib/command/TabooLibLocaleCommand.java +++ b/src/main/scala/io/izzel/taboolib/common/command/TabooLibLocaleCommand.java @@ -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.TLocaleLoader; import io.izzel.taboolib.module.command.base.BaseMainCommand; 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.CommandRegister; import org.bukkit.Bukkit; @@ -21,7 +21,7 @@ import java.util.stream.IntStream; * @author sky * @since 2018-04-22 14:36:28 */ -@TCommand( +@BaseCommand( name = "tabooliblocale", aliases = {"taboolocale", "tlocale"}, permission = "taboolib.admin" diff --git a/src/main/scala/io/izzel/taboolib/command/TabooLibPluginCommand.java b/src/main/scala/io/izzel/taboolib/common/command/TabooLibPluginCommand.java similarity index 96% rename from src/main/scala/io/izzel/taboolib/command/TabooLibPluginCommand.java rename to src/main/scala/io/izzel/taboolib/common/command/TabooLibPluginCommand.java index 5ee11aa..8035b93 100644 --- a/src/main/scala/io/izzel/taboolib/command/TabooLibPluginCommand.java +++ b/src/main/scala/io/izzel/taboolib/common/command/TabooLibPluginCommand.java @@ -1,17 +1,17 @@ -package io.izzel.taboolib.command; +package io.izzel.taboolib.common.command; import com.google.common.base.Joiner; import io.izzel.taboolib.TabooLibAPI; 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.BaseSubCommand; import io.izzel.taboolib.module.command.base.CommandArgument; import io.izzel.taboolib.module.command.base.CommandRegister; -import io.izzel.taboolib.origin.plugin.PluginLoadState; -import io.izzel.taboolib.origin.plugin.PluginLoadStateType; -import io.izzel.taboolib.origin.plugin.PluginUnloadState; -import io.izzel.taboolib.origin.plugin.PluginUtils; +import io.izzel.taboolib.util.plugin.PluginLoadState; +import io.izzel.taboolib.util.plugin.PluginLoadStateType; +import io.izzel.taboolib.util.plugin.PluginUnloadState; +import io.izzel.taboolib.util.plugin.PluginUtils; import io.izzel.taboolib.util.ArrayUtil; import org.bukkit.Bukkit; import org.bukkit.command.Command; @@ -26,7 +26,7 @@ import java.util.stream.Collectors; * @Author sky * @Since 2018-05-07 20:14 */ -@TCommand( +@BaseCommand( name = "taboolibplugin", aliases = {"tabooplugin", "tplugin"}, permission = "taboolib.admin" diff --git a/src/main/scala/io/izzel/taboolib/origin/event/PlayerJumpEvent.java b/src/main/scala/io/izzel/taboolib/common/event/PlayerJumpEvent.java similarity index 95% rename from src/main/scala/io/izzel/taboolib/origin/event/PlayerJumpEvent.java rename to src/main/scala/io/izzel/taboolib/common/event/PlayerJumpEvent.java index d8f158b..27700ef 100644 --- a/src/main/scala/io/izzel/taboolib/origin/event/PlayerJumpEvent.java +++ b/src/main/scala/io/izzel/taboolib/common/event/PlayerJumpEvent.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.event; +package io.izzel.taboolib.common.event; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; diff --git a/src/main/scala/io/izzel/taboolib/origin/event/PlayerLoadedEvent.java b/src/main/scala/io/izzel/taboolib/common/event/PlayerLoadedEvent.java similarity index 93% rename from src/main/scala/io/izzel/taboolib/origin/event/PlayerLoadedEvent.java rename to src/main/scala/io/izzel/taboolib/common/event/PlayerLoadedEvent.java index bf0e0d2..2d9bc5c 100644 --- a/src/main/scala/io/izzel/taboolib/origin/event/PlayerLoadedEvent.java +++ b/src/main/scala/io/izzel/taboolib/common/event/PlayerLoadedEvent.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.event; +package io.izzel.taboolib.common.event; import org.bukkit.entity.Player; import org.bukkit.event.Event; diff --git a/src/main/scala/io/izzel/taboolib/listener/ListenerNetWork.java b/src/main/scala/io/izzel/taboolib/common/listener/ListenerNetWork.java similarity index 93% rename from src/main/scala/io/izzel/taboolib/listener/ListenerNetWork.java rename to src/main/scala/io/izzel/taboolib/common/listener/ListenerNetWork.java index c4f21fb..b5a53b3 100644 --- a/src/main/scala/io/izzel/taboolib/listener/ListenerNetWork.java +++ b/src/main/scala/io/izzel/taboolib/common/listener/ListenerNetWork.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.listener; +package io.izzel.taboolib.common.listener; import io.izzel.taboolib.module.inject.TListener; import org.bukkit.event.EventHandler; diff --git a/src/main/scala/io/izzel/taboolib/listener/ListenerPlayerCommand.java b/src/main/scala/io/izzel/taboolib/common/listener/ListenerPlayerCommand.java similarity index 88% rename from src/main/scala/io/izzel/taboolib/listener/ListenerPlayerCommand.java rename to src/main/scala/io/izzel/taboolib/common/listener/ListenerPlayerCommand.java index c965d01..8a59486 100644 --- a/src/main/scala/io/izzel/taboolib/listener/ListenerPlayerCommand.java +++ b/src/main/scala/io/izzel/taboolib/common/listener/ListenerPlayerCommand.java @@ -1,13 +1,13 @@ -package io.izzel.taboolib.listener; +package io.izzel.taboolib.common.listener; import io.izzel.taboolib.TabooLibAPI; import io.izzel.taboolib.Version; import io.izzel.taboolib.module.inject.TListener; -import io.izzel.taboolib.module.item.Items; -import io.izzel.taboolib.module.logger.TLogger; +import io.izzel.taboolib.util.item.Items; +import io.izzel.taboolib.module.locale.logger.TLogger; import io.izzel.taboolib.module.tellraw.TellrawJson; -import io.izzel.taboolib.origin.database.PlayerDataManager; -import io.izzel.taboolib.origin.database.PluginDataManager; +import io.izzel.taboolib.module.db.yaml.PlayerDataManager; +import io.izzel.taboolib.module.db.yaml.PluginDataManager; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerCommandPreprocessEvent; diff --git a/src/main/scala/io/izzel/taboolib/listener/ListenerPlayerJump.java b/src/main/scala/io/izzel/taboolib/common/listener/ListenerPlayerJump.java similarity index 95% rename from src/main/scala/io/izzel/taboolib/listener/ListenerPlayerJump.java rename to src/main/scala/io/izzel/taboolib/common/listener/ListenerPlayerJump.java index feecb74..05f8c56 100644 --- a/src/main/scala/io/izzel/taboolib/listener/ListenerPlayerJump.java +++ b/src/main/scala/io/izzel/taboolib/common/listener/ListenerPlayerJump.java @@ -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.origin.event.PlayerJumpEvent; +import io.izzel.taboolib.common.event.PlayerJumpEvent; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.Location; diff --git a/src/main/scala/io/izzel/taboolib/plugin/InternalJavaPlugin.java b/src/main/scala/io/izzel/taboolib/common/plugin/InternalJavaPlugin.java similarity index 78% rename from src/main/scala/io/izzel/taboolib/plugin/InternalJavaPlugin.java rename to src/main/scala/io/izzel/taboolib/common/plugin/InternalJavaPlugin.java index 6e1e806..eec45ee 100644 --- a/src/main/scala/io/izzel/taboolib/plugin/InternalJavaPlugin.java +++ b/src/main/scala/io/izzel/taboolib/common/plugin/InternalJavaPlugin.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.plugin; +package io.izzel.taboolib.common.plugin; import org.bukkit.plugin.java.JavaPlugin; diff --git a/src/main/scala/io/izzel/taboolib/plugin/InternalPlugin.java b/src/main/scala/io/izzel/taboolib/common/plugin/InternalPlugin.java similarity index 95% rename from src/main/scala/io/izzel/taboolib/plugin/InternalPlugin.java rename to src/main/scala/io/izzel/taboolib/common/plugin/InternalPlugin.java index f271614..1d95132 100644 --- a/src/main/scala/io/izzel/taboolib/plugin/InternalPlugin.java +++ b/src/main/scala/io/izzel/taboolib/common/plugin/InternalPlugin.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.plugin; +package io.izzel.taboolib.common.plugin; import io.izzel.taboolib.TabooLib; import io.izzel.taboolib.util.Files; @@ -40,7 +40,7 @@ public class InternalPlugin implements Plugin { @Override 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 diff --git a/src/main/scala/io/izzel/taboolib/plugin/InternalPluginLoader.java b/src/main/scala/io/izzel/taboolib/common/plugin/InternalPluginLoader.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/plugin/InternalPluginLoader.java rename to src/main/scala/io/izzel/taboolib/common/plugin/InternalPluginLoader.java index f1a2a35..a5fcde3 100644 --- a/src/main/scala/io/izzel/taboolib/plugin/InternalPluginLoader.java +++ b/src/main/scala/io/izzel/taboolib/common/plugin/InternalPluginLoader.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.plugin; +package io.izzel.taboolib.common.plugin; import org.bukkit.Bukkit; import org.bukkit.event.Event; diff --git a/src/main/scala/io/izzel/taboolib/origin/cronus/CronusParser.java b/src/main/scala/io/izzel/taboolib/cronus/CronusParser.java similarity index 95% rename from src/main/scala/io/izzel/taboolib/origin/cronus/CronusParser.java rename to src/main/scala/io/izzel/taboolib/cronus/CronusParser.java index 452ddd2..3a6bae4 100644 --- a/src/main/scala/io/izzel/taboolib/origin/cronus/CronusParser.java +++ b/src/main/scala/io/izzel/taboolib/cronus/CronusParser.java @@ -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.origin.cronus.bukkit.Location; +import io.izzel.taboolib.cronus.bukkit.ItemStack; +import io.izzel.taboolib.cronus.bukkit.Location; import org.bukkit.Bukkit; import org.bukkit.util.NumberConversions; diff --git a/src/main/scala/io/izzel/taboolib/origin/cronus/CronusUtils.java b/src/main/scala/io/izzel/taboolib/cronus/CronusUtils.java similarity index 99% rename from src/main/scala/io/izzel/taboolib/origin/cronus/CronusUtils.java rename to src/main/scala/io/izzel/taboolib/cronus/CronusUtils.java index 99cb847..901c2c9 100644 --- a/src/main/scala/io/izzel/taboolib/origin/cronus/CronusUtils.java +++ b/src/main/scala/io/izzel/taboolib/cronus/CronusUtils.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.cronus; +package io.izzel.taboolib.cronus; import io.izzel.taboolib.util.Strings; import org.bukkit.Material; diff --git a/src/main/scala/io/izzel/taboolib/origin/cronus/bukkit/ItemStack.java b/src/main/scala/io/izzel/taboolib/cronus/bukkit/ItemStack.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/origin/cronus/bukkit/ItemStack.java rename to src/main/scala/io/izzel/taboolib/cronus/bukkit/ItemStack.java index a0d99f6..e2c594a 100644 --- a/src/main/scala/io/izzel/taboolib/origin/cronus/bukkit/ItemStack.java +++ b/src/main/scala/io/izzel/taboolib/cronus/bukkit/ItemStack.java @@ -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.entity.Player; diff --git a/src/main/scala/io/izzel/taboolib/origin/cronus/bukkit/Location.java b/src/main/scala/io/izzel/taboolib/cronus/bukkit/Location.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/origin/cronus/bukkit/Location.java rename to src/main/scala/io/izzel/taboolib/cronus/bukkit/Location.java index e3a4279..50bd130 100644 --- a/src/main/scala/io/izzel/taboolib/origin/cronus/bukkit/Location.java +++ b/src/main/scala/io/izzel/taboolib/cronus/bukkit/Location.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.cronus.bukkit; +package io.izzel.taboolib.cronus.bukkit; import org.bukkit.Bukkit; diff --git a/src/main/scala/io/izzel/taboolib/origin/cronus/util/StringExpression.java b/src/main/scala/io/izzel/taboolib/cronus/util/StringExpression.java similarity index 96% rename from src/main/scala/io/izzel/taboolib/origin/cronus/util/StringExpression.java rename to src/main/scala/io/izzel/taboolib/cronus/util/StringExpression.java index f5ed441..9d508da 100644 --- a/src/main/scala/io/izzel/taboolib/origin/cronus/util/StringExpression.java +++ b/src/main/scala/io/izzel/taboolib/cronus/util/StringExpression.java @@ -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.inject.TInject; diff --git a/src/main/scala/io/izzel/taboolib/origin/cronus/util/StringNumber.java b/src/main/scala/io/izzel/taboolib/cronus/util/StringNumber.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/origin/cronus/util/StringNumber.java rename to src/main/scala/io/izzel/taboolib/cronus/util/StringNumber.java index 72fb04c..e0a4c09 100644 --- a/src/main/scala/io/izzel/taboolib/origin/cronus/util/StringNumber.java +++ b/src/main/scala/io/izzel/taboolib/cronus/util/StringNumber.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.cronus.util; +package io.izzel.taboolib.cronus.util; /** * @Author 坏黑 diff --git a/src/main/scala/io/izzel/taboolib/module/command/TCommandHandler.java b/src/main/scala/io/izzel/taboolib/module/command/TCommandHandler.java index 783f540..7ea8446 100644 --- a/src/main/scala/io/izzel/taboolib/module/command/TCommandHandler.java +++ b/src/main/scala/io/izzel/taboolib/module/command/TCommandHandler.java @@ -1,6 +1,7 @@ package io.izzel.taboolib.module.command; 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.command.base.BaseMainCommand; import io.izzel.taboolib.module.inject.TFunction; @@ -107,7 +108,7 @@ public class TCommandHandler { * @param 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) { registerPluginCommand( plugin, @@ -129,8 +130,8 @@ public class TCommandHandler { */ public static void registerCommand(Plugin plugin) { for (Class pluginClass : Files.getClasses(plugin)) { - if (BaseMainCommand.class.isAssignableFrom(pluginClass) && pluginClass.isAnnotationPresent(TCommand.class)) { - TCommand tCommand = (TCommand) pluginClass.getAnnotation(TCommand.class); + if (BaseMainCommand.class.isAssignableFrom(pluginClass) && pluginClass.isAnnotationPresent(BaseCommand.class)) { + BaseCommand tCommand = (BaseCommand) pluginClass.getAnnotation(BaseCommand.class); try { registerCommand(tCommand, tCommand.name(), (BaseMainCommand) pluginClass.newInstance(), plugin); } catch (Exception e) { diff --git a/src/main/scala/io/izzel/taboolib/module/command/TCommand.java b/src/main/scala/io/izzel/taboolib/module/command/base/BaseCommand.java similarity index 85% rename from src/main/scala/io/izzel/taboolib/module/command/TCommand.java rename to src/main/scala/io/izzel/taboolib/module/command/base/BaseCommand.java index df9bd6d..cbc8db3 100644 --- a/src/main/scala/io/izzel/taboolib/module/command/TCommand.java +++ b/src/main/scala/io/izzel/taboolib/module/command/base/BaseCommand.java @@ -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.Retention; @@ -11,7 +11,7 @@ import java.lang.annotation.Target; */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) -public @interface TCommand { +public @interface BaseCommand { String name(); diff --git a/src/main/scala/io/izzel/taboolib/module/command/lite/SimpleCommandBuilder.java b/src/main/scala/io/izzel/taboolib/module/command/lite/CommandBuilder.java similarity index 81% rename from src/main/scala/io/izzel/taboolib/module/command/lite/SimpleCommandBuilder.java rename to src/main/scala/io/izzel/taboolib/module/command/lite/CommandBuilder.java index 8bc7bc4..7192200 100644 --- a/src/main/scala/io/izzel/taboolib/module/command/lite/SimpleCommandBuilder.java +++ b/src/main/scala/io/izzel/taboolib/module/command/lite/CommandBuilder.java @@ -13,7 +13,7 @@ import java.util.List; * @Since 2018-08-27 8:42 * @BuilderLevel 1.0 */ -public class SimpleCommandBuilder { +public class CommandBuilder { public static final CompleterTab EMPTY_COMPLETER_TAB = ((sender, args) -> new ArrayList<>()); public static final CompleterCommand EMPTY_COMPLETER_COMMAND = ((sender, args) -> {}); @@ -30,7 +30,7 @@ public class SimpleCommandBuilder { private boolean forceRegister; private boolean build; - SimpleCommandBuilder(String command, Plugin plugin) { + CommandBuilder(String command, Plugin plugin) { this.command = command; this.plugin = plugin; this.description = ""; @@ -39,61 +39,61 @@ public class SimpleCommandBuilder { this.build = false; } - public static SimpleCommandBuilder create(String command, Plugin plugin) { - return new SimpleCommandBuilder(command.toLowerCase(), plugin); + public static CommandBuilder create(String command, Plugin plugin) { + return new CommandBuilder(command.toLowerCase(), plugin); } - public SimpleCommandBuilder command(String command) { + public CommandBuilder command(String command) { this.command = command; return this; } - public SimpleCommandBuilder plugin(Plugin plugin) { + public CommandBuilder plugin(Plugin plugin) { this.plugin = plugin; return this; } - public SimpleCommandBuilder description(String description) { + public CommandBuilder description(String description) { this.description = description; return this; } - public SimpleCommandBuilder usage(String usage) { + public CommandBuilder usage(String usage) { this.usage = usage; return this; } - public SimpleCommandBuilder aliases(String... aliases) { + public CommandBuilder aliases(String... aliases) { this.aliases = ArrayUtil.asList(aliases); return this; } - public SimpleCommandBuilder permission(String permission) { + public CommandBuilder permission(String permission) { this.permission = permission; return this; } - public SimpleCommandBuilder permissionMessage(String permissionMessage) { + public CommandBuilder permissionMessage(String permissionMessage) { this.permissionMessage = permissionMessage; return this; } - public SimpleCommandBuilder execute(CompleterCommand completerCommand) { + public CommandBuilder execute(CompleterCommand completerCommand) { this.completerCommand = completerCommand; return this; } - public SimpleCommandBuilder tab(CompleterTab completerTab) { + public CommandBuilder tab(CompleterTab completerTab) { this.completerTab = completerTab; return this; } - public SimpleCommandBuilder forceRegister() { + public CommandBuilder forceRegister() { this.forceRegister = true; return this; } - public SimpleCommandBuilder build() { + public CommandBuilder build() { Preconditions.checkNotNull(plugin, "缺少 \"plugin\" 部分"); Preconditions.checkNotNull(command, "缺少 \"command\" 部分"); Preconditions.checkNotNull(completerCommand, "缺少 \"CompleterCommand\" 部分"); diff --git a/src/main/scala/io/izzel/taboolib/module/config/TConfig.java b/src/main/scala/io/izzel/taboolib/module/config/TConfig.java index 136134f..db84d0d 100644 --- a/src/main/scala/io/izzel/taboolib/module/config/TConfig.java +++ b/src/main/scala/io/izzel/taboolib/module/config/TConfig.java @@ -4,7 +4,7 @@ import com.google.common.collect.Maps; import io.izzel.taboolib.TabooLib; import io.izzel.taboolib.TabooLibAPI; 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.Ref; import org.bukkit.configuration.InvalidConfigurationException; diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/IColumn.java b/src/main/scala/io/izzel/taboolib/module/db/IColumn.java similarity index 77% rename from src/main/scala/io/izzel/taboolib/module/mysql/IColumn.java rename to src/main/scala/io/izzel/taboolib/module/db/IColumn.java index c0b2746..8653ff7 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/IColumn.java +++ b/src/main/scala/io/izzel/taboolib/module/db/IColumn.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.mysql; +package io.izzel.taboolib.module.db; /** * @Author 坏黑 diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/IHost.java b/src/main/scala/io/izzel/taboolib/module/db/IHost.java similarity index 95% rename from src/main/scala/io/izzel/taboolib/module/mysql/IHost.java rename to src/main/scala/io/izzel/taboolib/module/db/IHost.java index def7b61..2b5ee64 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/IHost.java +++ b/src/main/scala/io/izzel/taboolib/module/db/IHost.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.mysql; +package io.izzel.taboolib.module.db; import org.bukkit.plugin.Plugin; diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/hikari/HikariHandler.java b/src/main/scala/io/izzel/taboolib/module/db/source/HikariHandler.java similarity index 95% rename from src/main/scala/io/izzel/taboolib/module/mysql/hikari/HikariHandler.java rename to src/main/scala/io/izzel/taboolib/module/db/source/HikariHandler.java index 791ecd5..362c002 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/hikari/HikariHandler.java +++ b/src/main/scala/io/izzel/taboolib/module/db/source/HikariHandler.java @@ -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.HikariDataSource; import io.izzel.taboolib.module.locale.TLocale; import io.izzel.taboolib.module.config.TConfig; import io.izzel.taboolib.module.inject.TInject; -import io.izzel.taboolib.module.mysql.IHost; -import io.izzel.taboolib.module.mysql.builder.SQLHost; -import io.izzel.taboolib.module.mysql.lite.SQLiteHost; +import io.izzel.taboolib.module.db.IHost; +import io.izzel.taboolib.module.db.sql.SQLHost; +import io.izzel.taboolib.module.db.sqlite.SQLiteHost; import org.bukkit.configuration.file.FileConfiguration; import javax.sql.DataSource; diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/hikari/MapDataSource.java b/src/main/scala/io/izzel/taboolib/module/db/source/MapDataSource.java similarity index 88% rename from src/main/scala/io/izzel/taboolib/module/mysql/hikari/MapDataSource.java rename to src/main/scala/io/izzel/taboolib/module/db/source/MapDataSource.java index 51f4832..38cb738 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/hikari/MapDataSource.java +++ b/src/main/scala/io/izzel/taboolib/module/db/source/MapDataSource.java @@ -1,7 +1,7 @@ -package io.izzel.taboolib.module.mysql.hikari; +package io.izzel.taboolib.module.db.source; 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; diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLColumn.java b/src/main/scala/io/izzel/taboolib/module/db/sql/SQLColumn.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLColumn.java rename to src/main/scala/io/izzel/taboolib/module/db/sql/SQLColumn.java index 109c5c5..1945262 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLColumn.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sql/SQLColumn.java @@ -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.module.mysql.IColumn; +import io.izzel.taboolib.module.db.IColumn; import java.util.Arrays; diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLColumnOption.java b/src/main/scala/io/izzel/taboolib/module/db/sql/SQLColumnOption.java similarity index 90% rename from src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLColumnOption.java rename to src/main/scala/io/izzel/taboolib/module/db/sql/SQLColumnOption.java index b451e23..93711bd 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLColumnOption.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sql/SQLColumnOption.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.mysql.builder; +package io.izzel.taboolib.module.db.sql; /** * @Author sky diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLColumnType.java b/src/main/scala/io/izzel/taboolib/module/db/sql/SQLColumnType.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLColumnType.java rename to src/main/scala/io/izzel/taboolib/module/db/sql/SQLColumnType.java index ab41432..36098a2 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLColumnType.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sql/SQLColumnType.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.mysql.builder; +package io.izzel.taboolib.module.db.sql; /** * @Author sky diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLExecutor.java b/src/main/scala/io/izzel/taboolib/module/db/sql/SQLExecutor.java similarity index 94% rename from src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLExecutor.java rename to src/main/scala/io/izzel/taboolib/module/db/sql/SQLExecutor.java index 61618a1..5eb0dee 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLExecutor.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sql/SQLExecutor.java @@ -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.PreparedStatement; diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLHost.java b/src/main/scala/io/izzel/taboolib/module/db/sql/SQLHost.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLHost.java rename to src/main/scala/io/izzel/taboolib/module/db/sql/SQLHost.java index 0f000ac..5e3e87d 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLHost.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sql/SQLHost.java @@ -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 org.bukkit.configuration.ConfigurationSection; import org.bukkit.plugin.Plugin; diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLTable.java b/src/main/scala/io/izzel/taboolib/module/db/sql/SQLTable.java similarity index 92% rename from src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLTable.java rename to src/main/scala/io/izzel/taboolib/module/db/sql/SQLTable.java index 12250fc..cd09876 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/builder/SQLTable.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sql/SQLTable.java @@ -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.mysql.builder.query.RunnableQuery; -import io.izzel.taboolib.module.mysql.builder.query.RunnableUpdate; +import io.izzel.taboolib.module.db.IColumn; +import io.izzel.taboolib.module.db.sql.query.RunnableQuery; +import io.izzel.taboolib.module.db.sql.query.RunnableUpdate; import io.izzel.taboolib.util.ArrayUtil; import io.izzel.taboolib.util.Strings; diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/builder/query/RunnableQuery.java b/src/main/scala/io/izzel/taboolib/module/db/sql/query/RunnableQuery.java similarity index 96% rename from src/main/scala/io/izzel/taboolib/module/mysql/builder/query/RunnableQuery.java rename to src/main/scala/io/izzel/taboolib/module/db/sql/query/RunnableQuery.java index 4928e52..7d4fecc 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/builder/query/RunnableQuery.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sql/query/RunnableQuery.java @@ -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.mysql.builder.SQLExecutor; +import io.izzel.taboolib.module.locale.logger.TLogger; +import io.izzel.taboolib.module.db.sql.SQLExecutor; import javax.sql.DataSource; import java.sql.Connection; diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/builder/query/RunnableUpdate.java b/src/main/scala/io/izzel/taboolib/module/db/sql/query/RunnableUpdate.java similarity index 93% rename from src/main/scala/io/izzel/taboolib/module/mysql/builder/query/RunnableUpdate.java rename to src/main/scala/io/izzel/taboolib/module/db/sql/query/RunnableUpdate.java index 51a2867..ba3e3a3 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/builder/query/RunnableUpdate.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sql/query/RunnableUpdate.java @@ -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.mysql.builder.SQLExecutor; +import io.izzel.taboolib.module.locale.logger.TLogger; +import io.izzel.taboolib.module.db.sql.SQLExecutor; import javax.sql.DataSource; import java.sql.Connection; diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/builder/query/TaskResult.java b/src/main/scala/io/izzel/taboolib/module/db/sql/query/TaskResult.java similarity index 79% rename from src/main/scala/io/izzel/taboolib/module/mysql/builder/query/TaskResult.java rename to src/main/scala/io/izzel/taboolib/module/db/sql/query/TaskResult.java index 1923e94..c41b358 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/builder/query/TaskResult.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sql/query/TaskResult.java @@ -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.SQLException; diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/builder/query/TaskStatement.java b/src/main/scala/io/izzel/taboolib/module/db/sql/query/TaskStatement.java similarity index 80% rename from src/main/scala/io/izzel/taboolib/module/mysql/builder/query/TaskStatement.java rename to src/main/scala/io/izzel/taboolib/module/db/sql/query/TaskStatement.java index 09d41bd..5cc031b 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/builder/query/TaskStatement.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sql/query/TaskStatement.java @@ -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.SQLException; diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/lite/SQLiteColumn.java b/src/main/scala/io/izzel/taboolib/module/db/sqlite/SQLiteColumn.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/module/mysql/lite/SQLiteColumn.java rename to src/main/scala/io/izzel/taboolib/module/db/sqlite/SQLiteColumn.java index 1598293..2014f7d 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/lite/SQLiteColumn.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sqlite/SQLiteColumn.java @@ -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.module.mysql.IColumn; +import io.izzel.taboolib.module.db.IColumn; import java.util.Arrays; diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/lite/SQLiteColumnOption.java b/src/main/scala/io/izzel/taboolib/module/db/sqlite/SQLiteColumnOption.java similarity index 91% rename from src/main/scala/io/izzel/taboolib/module/mysql/lite/SQLiteColumnOption.java rename to src/main/scala/io/izzel/taboolib/module/db/sqlite/SQLiteColumnOption.java index 835729f..b2c4f39 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/lite/SQLiteColumnOption.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sqlite/SQLiteColumnOption.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.mysql.lite; +package io.izzel.taboolib.module.db.sqlite; /** * @Author sky diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/lite/SQLiteColumnType.java b/src/main/scala/io/izzel/taboolib/module/db/sqlite/SQLiteColumnType.java similarity index 92% rename from src/main/scala/io/izzel/taboolib/module/mysql/lite/SQLiteColumnType.java rename to src/main/scala/io/izzel/taboolib/module/db/sqlite/SQLiteColumnType.java index 870dc41..f156166 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/lite/SQLiteColumnType.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sqlite/SQLiteColumnType.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.mysql.lite; +package io.izzel.taboolib.module.db.sqlite; /** * @Author 坏黑 diff --git a/src/main/scala/io/izzel/taboolib/module/mysql/lite/SQLiteHost.java b/src/main/scala/io/izzel/taboolib/module/db/sqlite/SQLiteHost.java similarity index 93% rename from src/main/scala/io/izzel/taboolib/module/mysql/lite/SQLiteHost.java rename to src/main/scala/io/izzel/taboolib/module/db/sqlite/SQLiteHost.java index 7649558..47df378 100644 --- a/src/main/scala/io/izzel/taboolib/module/mysql/lite/SQLiteHost.java +++ b/src/main/scala/io/izzel/taboolib/module/db/sqlite/SQLiteHost.java @@ -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 java.io.File; diff --git a/src/main/scala/io/izzel/taboolib/origin/database/PlayerDataManager.java b/src/main/scala/io/izzel/taboolib/module/db/yaml/PlayerDataManager.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/origin/database/PlayerDataManager.java rename to src/main/scala/io/izzel/taboolib/module/db/yaml/PlayerDataManager.java index a3c7742..8779240 100644 --- a/src/main/scala/io/izzel/taboolib/origin/database/PlayerDataManager.java +++ b/src/main/scala/io/izzel/taboolib/module/db/yaml/PlayerDataManager.java @@ -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.module.inject.TListener; -import io.izzel.taboolib.origin.event.PlayerLoadedEvent; +import io.izzel.taboolib.common.event.PlayerLoadedEvent; import io.izzel.taboolib.util.Files; import org.bukkit.Bukkit; import org.bukkit.configuration.file.FileConfiguration; diff --git a/src/main/scala/io/izzel/taboolib/origin/database/PluginDataManager.java b/src/main/scala/io/izzel/taboolib/module/db/yaml/PluginDataManager.java similarity index 93% rename from src/main/scala/io/izzel/taboolib/origin/database/PluginDataManager.java rename to src/main/scala/io/izzel/taboolib/module/db/yaml/PluginDataManager.java index ef56402..d199bcc 100644 --- a/src/main/scala/io/izzel/taboolib/origin/database/PluginDataManager.java +++ b/src/main/scala/io/izzel/taboolib/module/db/yaml/PluginDataManager.java @@ -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.module.locale.TLocale; @@ -38,10 +38,7 @@ public class PluginDataManager { } public static void saveAllCaches(boolean remove) { - long time = System.currentTimeMillis(); - for (String plugin : CACHE_DATA_PLUGIN.keySet()) { - saveAllCaches(getFixedPlugin(plugin), remove); - } + CACHE_DATA_PLUGIN.keySet().forEach(plugin -> saveAllCaches(getFixedPlugin(plugin), remove)); } public static void saveConfiguration(FileConfiguration conf, File file) { diff --git a/src/main/scala/io/izzel/taboolib/module/inject/PlayerContainerLoader.java b/src/main/scala/io/izzel/taboolib/module/inject/PlayerContainerLoader.java index b0547d2..7fff410 100644 --- a/src/main/scala/io/izzel/taboolib/module/inject/PlayerContainerLoader.java +++ b/src/main/scala/io/izzel/taboolib/module/inject/PlayerContainerLoader.java @@ -1,7 +1,7 @@ package io.izzel.taboolib.module.inject; 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.EventPriority; import org.bukkit.event.Listener; diff --git a/src/main/scala/io/izzel/taboolib/module/inject/TFunctionLoader.java b/src/main/scala/io/izzel/taboolib/module/inject/TFunctionLoader.java index af4b066..115dc33 100644 --- a/src/main/scala/io/izzel/taboolib/module/inject/TFunctionLoader.java +++ b/src/main/scala/io/izzel/taboolib/module/inject/TFunctionLoader.java @@ -2,7 +2,7 @@ package io.izzel.taboolib.module.inject; import io.izzel.taboolib.TabooLibAPI; 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 java.lang.reflect.Method; diff --git a/src/main/scala/io/izzel/taboolib/module/inject/TInjectLoader.java b/src/main/scala/io/izzel/taboolib/module/inject/TInjectLoader.java index fc244e0..1c62ee1 100644 --- a/src/main/scala/io/izzel/taboolib/module/inject/TInjectLoader.java +++ b/src/main/scala/io/izzel/taboolib/module/inject/TInjectLoader.java @@ -3,13 +3,13 @@ package io.izzel.taboolib.module.inject; import com.google.common.collect.Maps; import io.izzel.taboolib.TabooLibAPI; 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.logger.TLogger; +import io.izzel.taboolib.module.locale.logger.TLogger; import io.izzel.taboolib.module.packet.TPacketHandler; import io.izzel.taboolib.module.packet.TPacketListener; -import io.izzel.taboolib.origin.lite.cooldown.Cooldown; -import io.izzel.taboolib.origin.lite.cooldown.Cooldowns; +import io.izzel.taboolib.util.lite.cooldown.Cooldown; +import io.izzel.taboolib.util.lite.cooldown.Cooldowns; import org.bukkit.plugin.Plugin; import java.lang.reflect.Field; @@ -58,9 +58,9 @@ public class TInjectLoader implements TabooLibLoader.Loader { } }); // SimpleCommandBuilder Inject - injectTypes.put(SimpleCommandBuilder.class, (plugin, field, args, instance) -> { + injectTypes.put(CommandBuilder.class, (plugin, field, args, instance) -> { try { - SimpleCommandBuilder builder = (SimpleCommandBuilder) field.get(instance); + CommandBuilder builder = (CommandBuilder) field.get(instance); if (builder.isBuild()) { TLogger.getGlobalLogger().error("Command was registered. (" + field.getType().getName() + ")"); } else { diff --git a/src/main/scala/io/izzel/taboolib/module/inject/TListenerHandler.java b/src/main/scala/io/izzel/taboolib/module/inject/TListenerHandler.java index 68f4240..2d2bd62 100644 --- a/src/main/scala/io/izzel/taboolib/module/inject/TListenerHandler.java +++ b/src/main/scala/io/izzel/taboolib/module/inject/TListenerHandler.java @@ -3,8 +3,8 @@ package io.izzel.taboolib.module.inject; import io.izzel.taboolib.TabooLibAPI; import io.izzel.taboolib.TabooLibLoader; import io.izzel.taboolib.Version; -import io.izzel.taboolib.module.logger.TLogger; -import io.izzel.taboolib.origin.cronus.util.StringExpression; +import io.izzel.taboolib.module.locale.logger.TLogger; +import io.izzel.taboolib.cronus.util.StringExpression; import io.izzel.taboolib.util.Strings; import io.izzel.taboolib.util.Reflection; import org.bukkit.Bukkit; diff --git a/src/main/scala/io/izzel/taboolib/module/inject/TScheduleLoader.java b/src/main/scala/io/izzel/taboolib/module/inject/TScheduleLoader.java index 1209113..c567e93 100644 --- a/src/main/scala/io/izzel/taboolib/module/inject/TScheduleLoader.java +++ b/src/main/scala/io/izzel/taboolib/module/inject/TScheduleLoader.java @@ -4,7 +4,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import io.izzel.taboolib.TabooLib; 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.scheduler.BukkitRunnable; diff --git a/src/main/scala/io/izzel/taboolib/module/locale/TLocale.java b/src/main/scala/io/izzel/taboolib/module/locale/TLocale.java index 89770a5..92ab8b1 100644 --- a/src/main/scala/io/izzel/taboolib/module/locale/TLocale.java +++ b/src/main/scala/io/izzel/taboolib/module/locale/TLocale.java @@ -1,7 +1,7 @@ package io.izzel.taboolib.module.locale; 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.tellraw.TellrawCreator; import io.izzel.taboolib.util.Ref; diff --git a/src/main/scala/io/izzel/taboolib/module/locale/TLocaleLoader.java b/src/main/scala/io/izzel/taboolib/module/locale/TLocaleLoader.java index c597f0e..e6cd9b3 100644 --- a/src/main/scala/io/izzel/taboolib/module/locale/TLocaleLoader.java +++ b/src/main/scala/io/izzel/taboolib/module/locale/TLocaleLoader.java @@ -4,7 +4,7 @@ import io.izzel.taboolib.TabooLib; import io.izzel.taboolib.TabooLibAPI; import io.izzel.taboolib.module.locale.type.*; 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.IO; import io.izzel.taboolib.util.Strings; diff --git a/src/main/scala/io/izzel/taboolib/module/logger/TLogger.java b/src/main/scala/io/izzel/taboolib/module/locale/logger/TLogger.java similarity index 99% rename from src/main/scala/io/izzel/taboolib/module/logger/TLogger.java rename to src/main/scala/io/izzel/taboolib/module/locale/logger/TLogger.java index 711f0c7..f74b152 100644 --- a/src/main/scala/io/izzel/taboolib/module/logger/TLogger.java +++ b/src/main/scala/io/izzel/taboolib/module/locale/logger/TLogger.java @@ -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.module.locale.TLocale; diff --git a/src/main/scala/io/izzel/taboolib/module/logger/TLoggerManager.java b/src/main/scala/io/izzel/taboolib/module/locale/logger/TLoggerManager.java similarity index 92% rename from src/main/scala/io/izzel/taboolib/module/logger/TLoggerManager.java rename to src/main/scala/io/izzel/taboolib/module/locale/logger/TLoggerManager.java index bf2503f..0522804 100644 --- a/src/main/scala/io/izzel/taboolib/module/logger/TLoggerManager.java +++ b/src/main/scala/io/izzel/taboolib/module/locale/logger/TLoggerManager.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.logger; +package io.izzel.taboolib.module.locale.logger; import org.bukkit.plugin.Plugin; diff --git a/src/main/scala/io/izzel/taboolib/module/locale/type/TLocaleBook.java b/src/main/scala/io/izzel/taboolib/module/locale/type/TLocaleBook.java index c398ea5..66251c6 100644 --- a/src/main/scala/io/izzel/taboolib/module/locale/type/TLocaleBook.java +++ b/src/main/scala/io/izzel/taboolib/module/locale/type/TLocaleBook.java @@ -5,8 +5,8 @@ import io.izzel.taboolib.TabooLib; import io.izzel.taboolib.module.locale.TLocale; import io.izzel.taboolib.module.locale.TLocaleSerialize; import io.izzel.taboolib.module.tellraw.TellrawJson; -import io.izzel.taboolib.origin.book.BookFormatter; -import io.izzel.taboolib.origin.book.builder.BookBuilder; +import io.izzel.taboolib.util.book.BookFormatter; +import io.izzel.taboolib.util.book.builder.BookBuilder; import io.izzel.taboolib.util.Strings; import io.izzel.taboolib.util.chat.ComponentSerializer; import org.bukkit.command.CommandSender; diff --git a/src/main/scala/io/izzel/taboolib/module/locale/type/TLocaleSound.java b/src/main/scala/io/izzel/taboolib/module/locale/type/TLocaleSound.java index 06defee..aeb2310 100644 --- a/src/main/scala/io/izzel/taboolib/module/locale/type/TLocaleSound.java +++ b/src/main/scala/io/izzel/taboolib/module/locale/type/TLocaleSound.java @@ -2,7 +2,7 @@ package io.izzel.taboolib.module.locale.type; import com.google.common.collect.Maps; 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.configuration.serialization.SerializableAs; import org.bukkit.entity.Player; @@ -21,19 +21,19 @@ import java.util.stream.Collectors; @SerializableAs("ACTION") public class TLocaleSound extends TLocaleSerialize { - private final List soundPacks; + private final List soundPacks; - public TLocaleSound(List soundPacks) { + public TLocaleSound(List soundPacks) { this.soundPacks = soundPacks; } public static TLocaleSound valueOf(Map map) { - List soundPacks = new ArrayList<>(); + List soundPacks = new ArrayList<>(); Object sounds = map.containsKey("sounds") ? map.get("sounds") : map.getOrDefault("sound", ""); if (sounds instanceof List) { - soundPacks = ((List) sounds).stream().map(Sounds::new).collect(Collectors.toList()); + soundPacks = ((List) sounds).stream().map(SoundPack::new).collect(Collectors.toList()); } else { - soundPacks.add(new Sounds(sounds.toString())); + soundPacks.add(new SoundPack(sounds.toString())); } return new TLocaleSound(soundPacks); } @@ -61,7 +61,7 @@ public class TLocaleSound extends TLocaleSerialize { if (soundPacks.size() == 1) { map.put("sounds", soundPacks.get(0).toString()); } 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; } diff --git a/src/main/scala/io/izzel/taboolib/module/packet/channel/InternalChannelExecutor.java b/src/main/scala/io/izzel/taboolib/module/packet/channel/InternalChannelExecutor.java index e85dda1..3b59a64 100644 --- a/src/main/scala/io/izzel/taboolib/module/packet/channel/InternalChannelExecutor.java +++ b/src/main/scala/io/izzel/taboolib/module/packet/channel/InternalChannelExecutor.java @@ -1,6 +1,6 @@ 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 net.minecraft.server.v1_8_R3.Packet; import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer; diff --git a/src/main/scala/io/izzel/taboolib/module/tellraw/internal/InternalTellraw.java b/src/main/scala/io/izzel/taboolib/module/tellraw/internal/InternalTellraw.java index fd056fb..0cecd9d 100644 --- a/src/main/scala/io/izzel/taboolib/module/tellraw/internal/InternalTellraw.java +++ b/src/main/scala/io/izzel/taboolib/module/tellraw/internal/InternalTellraw.java @@ -1,7 +1,7 @@ package io.izzel.taboolib.module.tellraw.internal; 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.packet.TPacketHandler; import io.izzel.taboolib.module.tellraw.TellrawVersion; diff --git a/src/main/scala/io/izzel/taboolib/util/Files.java b/src/main/scala/io/izzel/taboolib/util/Files.java index fb7ca05..b980a23 100644 --- a/src/main/scala/io/izzel/taboolib/util/Files.java +++ b/src/main/scala/io/izzel/taboolib/util/Files.java @@ -2,7 +2,7 @@ package io.izzel.taboolib.util; import io.izzel.taboolib.TabooLib; 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.ProgressEvent; import org.bukkit.configuration.file.FileConfiguration; diff --git a/src/main/scala/io/izzel/taboolib/origin/book/BookAchievement.java b/src/main/scala/io/izzel/taboolib/util/book/BookAchievement.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/origin/book/BookAchievement.java rename to src/main/scala/io/izzel/taboolib/util/book/BookAchievement.java index 4d289b5..352aee0 100644 --- a/src/main/scala/io/izzel/taboolib/origin/book/BookAchievement.java +++ b/src/main/scala/io/izzel/taboolib/util/book/BookAchievement.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.book; +package io.izzel.taboolib.util.book; import org.bukkit.Achievement; diff --git a/src/main/scala/io/izzel/taboolib/origin/book/BookFormatter.java b/src/main/scala/io/izzel/taboolib/util/book/BookFormatter.java similarity index 92% rename from src/main/scala/io/izzel/taboolib/origin/book/BookFormatter.java rename to src/main/scala/io/izzel/taboolib/util/book/BookFormatter.java index 137c649..37cf2c4 100644 --- a/src/main/scala/io/izzel/taboolib/origin/book/BookFormatter.java +++ b/src/main/scala/io/izzel/taboolib/util/book/BookFormatter.java @@ -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.entity.Player; import org.bukkit.inventory.ItemStack; diff --git a/src/main/scala/io/izzel/taboolib/origin/book/BookReflection.java b/src/main/scala/io/izzel/taboolib/util/book/BookReflection.java similarity index 99% rename from src/main/scala/io/izzel/taboolib/origin/book/BookReflection.java rename to src/main/scala/io/izzel/taboolib/util/book/BookReflection.java index 298f121..d3ed8a6 100644 --- a/src/main/scala/io/izzel/taboolib/origin/book/BookReflection.java +++ b/src/main/scala/io/izzel/taboolib/util/book/BookReflection.java @@ -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.TextComponent; 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.entity.Player; import org.bukkit.inventory.ItemStack; diff --git a/src/main/scala/io/izzel/taboolib/origin/book/action/ClickAction.java b/src/main/scala/io/izzel/taboolib/util/book/action/ClickAction.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/origin/book/action/ClickAction.java rename to src/main/scala/io/izzel/taboolib/util/book/action/ClickAction.java index 79b1b88..ec68a81 100644 --- a/src/main/scala/io/izzel/taboolib/origin/book/action/ClickAction.java +++ b/src/main/scala/io/izzel/taboolib/util/book/action/ClickAction.java @@ -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; diff --git a/src/main/scala/io/izzel/taboolib/origin/book/action/HoverAction.java b/src/main/scala/io/izzel/taboolib/util/book/action/HoverAction.java similarity index 95% rename from src/main/scala/io/izzel/taboolib/origin/book/action/HoverAction.java rename to src/main/scala/io/izzel/taboolib/util/book/action/HoverAction.java index a7605de..3f8c53a 100644 --- a/src/main/scala/io/izzel/taboolib/origin/book/action/HoverAction.java +++ b/src/main/scala/io/izzel/taboolib/util/book/action/HoverAction.java @@ -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.HoverEvent; import io.izzel.taboolib.util.chat.TextComponent; -import io.izzel.taboolib.origin.book.BookAchievement; -import io.izzel.taboolib.origin.book.BookReflection; +import io.izzel.taboolib.util.book.BookAchievement; +import io.izzel.taboolib.util.book.BookReflection; import org.bukkit.Achievement; import org.bukkit.entity.Entity; import org.bukkit.inventory.ItemStack; @@ -55,7 +55,7 @@ public interface HoverAction { * @return a new HoverAction instance */ 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)); } /** diff --git a/src/main/scala/io/izzel/taboolib/origin/book/builder/BookBuilder.java b/src/main/scala/io/izzel/taboolib/util/book/builder/BookBuilder.java similarity index 92% rename from src/main/scala/io/izzel/taboolib/origin/book/builder/BookBuilder.java rename to src/main/scala/io/izzel/taboolib/util/book/builder/BookBuilder.java index 154daff..239d2f6 100644 --- a/src/main/scala/io/izzel/taboolib/origin/book/builder/BookBuilder.java +++ b/src/main/scala/io/izzel/taboolib/util/book/builder/BookBuilder.java @@ -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.origin.book.BookReflection; +import io.izzel.taboolib.util.book.BookReflection; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.BookMeta; @@ -93,7 +93,7 @@ public class BookBuilder { * @return the BookBuilder's calling instance */ 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; } @@ -103,7 +103,7 @@ public class BookBuilder { * @return the BookBuilder's calling instance */ public BookBuilder pages(List 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; } diff --git a/src/main/scala/io/izzel/taboolib/origin/book/builder/PageBuilder.java b/src/main/scala/io/izzel/taboolib/util/book/builder/PageBuilder.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/origin/book/builder/PageBuilder.java rename to src/main/scala/io/izzel/taboolib/util/book/builder/PageBuilder.java index 9f3f0bc..3675af2 100644 --- a/src/main/scala/io/izzel/taboolib/origin/book/builder/PageBuilder.java +++ b/src/main/scala/io/izzel/taboolib/util/book/builder/PageBuilder.java @@ -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.chat.BaseComponent; diff --git a/src/main/scala/io/izzel/taboolib/origin/book/builder/TextBuilder.java b/src/main/scala/io/izzel/taboolib/util/book/builder/TextBuilder.java similarity index 91% rename from src/main/scala/io/izzel/taboolib/origin/book/builder/TextBuilder.java rename to src/main/scala/io/izzel/taboolib/util/book/builder/TextBuilder.java index bd39936..a587ac7 100644 --- a/src/main/scala/io/izzel/taboolib/origin/book/builder/TextBuilder.java +++ b/src/main/scala/io/izzel/taboolib/util/book/builder/TextBuilder.java @@ -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.ClickEvent; import io.izzel.taboolib.util.chat.HoverEvent; import io.izzel.taboolib.util.chat.TextComponent; -import io.izzel.taboolib.origin.book.action.ClickAction; -import io.izzel.taboolib.origin.book.action.HoverAction; +import io.izzel.taboolib.util.book.action.ClickAction; +import io.izzel.taboolib.util.book.action.HoverAction; /** * @author sky diff --git a/src/main/scala/io/izzel/taboolib/module/item/ItemBuilder.java b/src/main/scala/io/izzel/taboolib/util/item/ItemBuilder.java similarity index 99% rename from src/main/scala/io/izzel/taboolib/module/item/ItemBuilder.java rename to src/main/scala/io/izzel/taboolib/util/item/ItemBuilder.java index 036f29d..6de7988 100644 --- a/src/main/scala/io/izzel/taboolib/module/item/ItemBuilder.java +++ b/src/main/scala/io/izzel/taboolib/util/item/ItemBuilder.java @@ -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.module.locale.TLocale; diff --git a/src/main/scala/io/izzel/taboolib/module/item/Items.java b/src/main/scala/io/izzel/taboolib/util/item/Items.java similarity index 99% rename from src/main/scala/io/izzel/taboolib/module/item/Items.java rename to src/main/scala/io/izzel/taboolib/util/item/Items.java index f1483b7..b0d5362 100644 --- a/src/main/scala/io/izzel/taboolib/module/item/Items.java +++ b/src/main/scala/io/izzel/taboolib/util/item/Items.java @@ -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.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.NBTCompound; 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.Material; import org.bukkit.configuration.ConfigurationSection; diff --git a/src/main/scala/io/izzel/taboolib/module/item/inventory/ClickEvent.java b/src/main/scala/io/izzel/taboolib/util/item/inventory/ClickEvent.java similarity index 95% rename from src/main/scala/io/izzel/taboolib/module/item/inventory/ClickEvent.java rename to src/main/scala/io/izzel/taboolib/util/item/inventory/ClickEvent.java index 9903a57..6d50c32 100644 --- a/src/main/scala/io/izzel/taboolib/module/item/inventory/ClickEvent.java +++ b/src/main/scala/io/izzel/taboolib/util/item/inventory/ClickEvent.java @@ -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.event.Event; diff --git a/src/main/scala/io/izzel/taboolib/module/item/inventory/ClickListener.java b/src/main/scala/io/izzel/taboolib/util/item/inventory/ClickListener.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/module/item/inventory/ClickListener.java rename to src/main/scala/io/izzel/taboolib/util/item/inventory/ClickListener.java index 916ddb3..3aab994 100644 --- a/src/main/scala/io/izzel/taboolib/module/item/inventory/ClickListener.java +++ b/src/main/scala/io/izzel/taboolib/util/item/inventory/ClickListener.java @@ -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 org.bukkit.Bukkit; diff --git a/src/main/scala/io/izzel/taboolib/module/item/inventory/ClickListenerOffhand.java b/src/main/scala/io/izzel/taboolib/util/item/inventory/ClickListenerOffhand.java similarity index 92% rename from src/main/scala/io/izzel/taboolib/module/item/inventory/ClickListenerOffhand.java rename to src/main/scala/io/izzel/taboolib/util/item/inventory/ClickListenerOffhand.java index 181a3d1..4296c2e 100644 --- a/src/main/scala/io/izzel/taboolib/module/item/inventory/ClickListenerOffhand.java +++ b/src/main/scala/io/izzel/taboolib/util/item/inventory/ClickListenerOffhand.java @@ -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 org.bukkit.event.EventHandler; diff --git a/src/main/scala/io/izzel/taboolib/module/item/inventory/ClickTask.java b/src/main/scala/io/izzel/taboolib/util/item/inventory/ClickTask.java similarity index 70% rename from src/main/scala/io/izzel/taboolib/module/item/inventory/ClickTask.java rename to src/main/scala/io/izzel/taboolib/util/item/inventory/ClickTask.java index 41b673c..c474756 100644 --- a/src/main/scala/io/izzel/taboolib/module/item/inventory/ClickTask.java +++ b/src/main/scala/io/izzel/taboolib/util/item/inventory/ClickTask.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.item.inventory; +package io.izzel.taboolib.util.item.inventory; /** * @Author 坏黑 diff --git a/src/main/scala/io/izzel/taboolib/module/item/inventory/ClickType.java b/src/main/scala/io/izzel/taboolib/util/item/inventory/ClickType.java similarity index 66% rename from src/main/scala/io/izzel/taboolib/module/item/inventory/ClickType.java rename to src/main/scala/io/izzel/taboolib/util/item/inventory/ClickType.java index d68aba8..cb16edc 100644 --- a/src/main/scala/io/izzel/taboolib/module/item/inventory/ClickType.java +++ b/src/main/scala/io/izzel/taboolib/util/item/inventory/ClickType.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.item.inventory; +package io.izzel.taboolib.util.item.inventory; /** * @Author 坏黑 diff --git a/src/main/scala/io/izzel/taboolib/module/item/inventory/CloseTask.java b/src/main/scala/io/izzel/taboolib/util/item/inventory/CloseTask.java similarity index 78% rename from src/main/scala/io/izzel/taboolib/module/item/inventory/CloseTask.java rename to src/main/scala/io/izzel/taboolib/util/item/inventory/CloseTask.java index 298e5f2..587aedc 100644 --- a/src/main/scala/io/izzel/taboolib/module/item/inventory/CloseTask.java +++ b/src/main/scala/io/izzel/taboolib/util/item/inventory/CloseTask.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.item.inventory; +package io.izzel.taboolib.util.item.inventory; import org.bukkit.event.inventory.InventoryCloseEvent; diff --git a/src/main/scala/io/izzel/taboolib/module/item/inventory/MenuBuilder.java b/src/main/scala/io/izzel/taboolib/util/item/inventory/MenuBuilder.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/module/item/inventory/MenuBuilder.java rename to src/main/scala/io/izzel/taboolib/util/item/inventory/MenuBuilder.java index f8bf3e1..8921eee 100644 --- a/src/main/scala/io/izzel/taboolib/module/item/inventory/MenuBuilder.java +++ b/src/main/scala/io/izzel/taboolib/util/item/inventory/MenuBuilder.java @@ -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 io.izzel.taboolib.TabooLib; diff --git a/src/main/scala/io/izzel/taboolib/module/item/inventory/MenuHolder.java b/src/main/scala/io/izzel/taboolib/util/item/inventory/MenuHolder.java similarity index 90% rename from src/main/scala/io/izzel/taboolib/module/item/inventory/MenuHolder.java rename to src/main/scala/io/izzel/taboolib/util/item/inventory/MenuHolder.java index bfb466d..44ee84f 100644 --- a/src/main/scala/io/izzel/taboolib/module/item/inventory/MenuHolder.java +++ b/src/main/scala/io/izzel/taboolib/util/item/inventory/MenuHolder.java @@ -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.InventoryHolder; diff --git a/src/main/scala/io/izzel/taboolib/origin/lite/Catchers.java b/src/main/scala/io/izzel/taboolib/util/lite/Catchers.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/origin/lite/Catchers.java rename to src/main/scala/io/izzel/taboolib/util/lite/Catchers.java index cf3f700..ff04a86 100644 --- a/src/main/scala/io/izzel/taboolib/origin/lite/Catchers.java +++ b/src/main/scala/io/izzel/taboolib/util/lite/Catchers.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.lite; +package io.izzel.taboolib.util.lite; import io.izzel.taboolib.TabooLib; import org.bukkit.Bukkit; diff --git a/src/main/scala/io/izzel/taboolib/origin/lite/Logs.java b/src/main/scala/io/izzel/taboolib/util/lite/Logs.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/origin/lite/Logs.java rename to src/main/scala/io/izzel/taboolib/util/lite/Logs.java index 0657a98..900fcff 100644 --- a/src/main/scala/io/izzel/taboolib/origin/lite/Logs.java +++ b/src/main/scala/io/izzel/taboolib/util/lite/Logs.java @@ -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.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.BaseSubCommand; import io.izzel.taboolib.module.command.base.CommandArgument; @@ -21,7 +21,7 @@ import java.text.SimpleDateFormat; /** * @author sky */ -@TCommand( +@BaseCommand( name = "tabooliblogs", aliases = {"tlog", "tlogs"}, permission = "taboolib.admin" diff --git a/src/main/scala/io/izzel/taboolib/origin/lite/Numbers.java b/src/main/scala/io/izzel/taboolib/util/lite/Numbers.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/origin/lite/Numbers.java rename to src/main/scala/io/izzel/taboolib/util/lite/Numbers.java index 352817b..caec533 100644 --- a/src/main/scala/io/izzel/taboolib/origin/lite/Numbers.java +++ b/src/main/scala/io/izzel/taboolib/util/lite/Numbers.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.lite; +package io.izzel.taboolib.util.lite; import java.text.DecimalFormat; import java.util.Random; diff --git a/src/main/scala/io/izzel/taboolib/origin/lite/Effects.java b/src/main/scala/io/izzel/taboolib/util/lite/Particles.java similarity index 95% rename from src/main/scala/io/izzel/taboolib/origin/lite/Effects.java rename to src/main/scala/io/izzel/taboolib/util/lite/Particles.java index 8f7fd63..3871dfd 100644 --- a/src/main/scala/io/izzel/taboolib/origin/lite/Effects.java +++ b/src/main/scala/io/izzel/taboolib/util/lite/Particles.java @@ -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.module.nms.NMSHandler; @@ -46,7 +46,7 @@ import java.util.Random; * @author DarkBlade12 * @version 1.8 */ -public enum Effects { +public enum Particles { BARRIER, BLOCK_CRACK(ParticleProperty.REQUIRES_DATA), @@ -110,15 +110,15 @@ public enum Effects { private final List properties; private int min, max; - Effects(ParticleProperty... properties) { + Particles(ParticleProperty... properties) { this(0, 0, properties); } - Effects(int min, ParticleProperty... properties) { + Particles(int min, ParticleProperty... 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.min = min; this.max = max; @@ -173,8 +173,8 @@ public enum Effects { * @param name Name of the particle effect * @return The particle effect */ - public static Effects fromName(String name) { - for (Effects effect : values()) { + public static Particles fromName(String name) { + for (Particles effect : values()) { if (effect.name().equalsIgnoreCase(name)) { if (!effect.isSupported()) { throw new ParticleVersionException(); @@ -213,7 +213,7 @@ public enum Effects { * @param data Particle data * @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); } @@ -224,7 +224,7 @@ public enum Effects { * @param color Particle color * @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); } @@ -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} *

* This class is part of the ParticleEffect Library 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} *

* This class is part of the ParticleEffect Library 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 *

* This class is part of the ParticleEffect Library and follows the same usage conditions * @@ -599,18 +599,18 @@ public enum Effects { public static class Particle { private static Random random = new Random(); - private Effects effect; + private Particles effect; private ParticleShape shape; private OrdinaryColor color; private byte typeCode; - public Particle(Effects effect, ParticleShape shape, OrdinaryColor color) { + public Particle(Particles effect, ParticleShape shape, OrdinaryColor color) { this.effect = effect; this.shape = shape; 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() { @@ -649,7 +649,7 @@ public enum Effects { effect.display(color, offX, offY, offZ, amount, lc, p); break; 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; case 0: effect.display(offX, offY, offZ, 0.001, amount, lc, p); @@ -658,7 +658,7 @@ public enum Effects { } public static Particle deserialize(Map 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 String ver; private static String pack;*/ - private final Effects effect; + private final Particles effect; private float offsetX; private float offsetY; private float offsetZ; @@ -762,7 +762,7 @@ public enum Effects { * @param data Data of the effect * @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(); if (speed < 0) { throw new IllegalArgumentException("The speed is lower than 0"); diff --git a/src/main/scala/io/izzel/taboolib/origin/lite/Boards.java b/src/main/scala/io/izzel/taboolib/util/lite/Scoreboards.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/origin/lite/Boards.java rename to src/main/scala/io/izzel/taboolib/util/lite/Scoreboards.java index 2a0c2ad..c9d6649 100644 --- a/src/main/scala/io/izzel/taboolib/origin/lite/Boards.java +++ b/src/main/scala/io/izzel/taboolib/util/lite/Scoreboards.java @@ -1,14 +1,13 @@ -package io.izzel.taboolib.origin.lite; +package io.izzel.taboolib.util.lite; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.scoreboard.DisplaySlot; -import org.bukkit.scoreboard.Scoreboard; import java.util.*; import java.util.stream.IntStream; -public class Boards { +public class Scoreboards { static String fixTitle(String title) { if (title == null) { diff --git a/src/main/scala/io/izzel/taboolib/origin/lite/Scripts.java b/src/main/scala/io/izzel/taboolib/util/lite/Scripts.java similarity index 94% rename from src/main/scala/io/izzel/taboolib/origin/lite/Scripts.java rename to src/main/scala/io/izzel/taboolib/util/lite/Scripts.java index da572e0..2a7bb68 100644 --- a/src/main/scala/io/izzel/taboolib/origin/lite/Scripts.java +++ b/src/main/scala/io/izzel/taboolib/util/lite/Scripts.java @@ -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 io.izzel.taboolib.module.inject.TFunction; diff --git a/src/main/scala/io/izzel/taboolib/origin/lite/Servers.java b/src/main/scala/io/izzel/taboolib/util/lite/Servers.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/origin/lite/Servers.java rename to src/main/scala/io/izzel/taboolib/util/lite/Servers.java index 1be7ded..2e13e99 100644 --- a/src/main/scala/io/izzel/taboolib/origin/lite/Servers.java +++ b/src/main/scala/io/izzel/taboolib/util/lite/Servers.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.lite; +package io.izzel.taboolib.util.lite; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.LivingEntity; diff --git a/src/main/scala/io/izzel/taboolib/origin/lite/Sounds.java b/src/main/scala/io/izzel/taboolib/util/lite/SoundPack.java similarity index 93% rename from src/main/scala/io/izzel/taboolib/origin/lite/Sounds.java rename to src/main/scala/io/izzel/taboolib/util/lite/SoundPack.java index c3c1501..58de17f 100644 --- a/src/main/scala/io/izzel/taboolib/origin/lite/Sounds.java +++ b/src/main/scala/io/izzel/taboolib/util/lite/SoundPack.java @@ -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.Version; @@ -7,31 +7,31 @@ import org.bukkit.Location; import org.bukkit.Sound; import org.bukkit.entity.Player; -public class Sounds { +public class SoundPack { private Sound sound; private Float a; private Float b; private int delay; - public Sounds() { + public SoundPack() { this.sound = Sound.valueOf(getModifiedSound("ENTITY_VILLAGER_NO")); this.a = 1.0F; this.b = 1.0F; } - public Sounds(Sound sound, float a, float b) { + public SoundPack(Sound sound, float a, float b) { this(sound, a, b, 0); } - public Sounds(Sound sound, float a, float b, int delay) { + public SoundPack(Sound sound, float a, float b, int delay) { this.sound = sound; this.a = a; this.b = b; this.delay = delay; } - public Sounds(String s) { + public SoundPack(String s) { parse(s); } diff --git a/src/main/scala/io/izzel/taboolib/origin/lite/Weights.java b/src/main/scala/io/izzel/taboolib/util/lite/Weights.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/origin/lite/Weights.java rename to src/main/scala/io/izzel/taboolib/util/lite/Weights.java index ea37e57..e168fa7 100644 --- a/src/main/scala/io/izzel/taboolib/origin/lite/Weights.java +++ b/src/main/scala/io/izzel/taboolib/util/lite/Weights.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.lite; +package io.izzel.taboolib.util.lite; import javax.annotation.Nullable; import javax.annotation.concurrent.ThreadSafe; diff --git a/src/main/scala/io/izzel/taboolib/origin/lite/cooldown/Cooldown.java b/src/main/scala/io/izzel/taboolib/util/lite/cooldown/Cooldown.java similarity index 96% rename from src/main/scala/io/izzel/taboolib/origin/lite/cooldown/Cooldown.java rename to src/main/scala/io/izzel/taboolib/util/lite/cooldown/Cooldown.java index f15fea8..6879292 100644 --- a/src/main/scala/io/izzel/taboolib/origin/lite/cooldown/Cooldown.java +++ b/src/main/scala/io/izzel/taboolib/util/lite/cooldown/Cooldown.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.lite.cooldown; +package io.izzel.taboolib.util.lite.cooldown; import java.util.HashMap; diff --git a/src/main/scala/io/izzel/taboolib/origin/lite/cooldown/Cooldowns.java b/src/main/scala/io/izzel/taboolib/util/lite/cooldown/Cooldowns.java similarity index 96% rename from src/main/scala/io/izzel/taboolib/origin/lite/cooldown/Cooldowns.java rename to src/main/scala/io/izzel/taboolib/util/lite/cooldown/Cooldowns.java index 6792d36..ade2c6b 100644 --- a/src/main/scala/io/izzel/taboolib/origin/lite/cooldown/Cooldowns.java +++ b/src/main/scala/io/izzel/taboolib/util/lite/cooldown/Cooldowns.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.lite.cooldown; +package io.izzel.taboolib.util.lite.cooldown; import io.izzel.taboolib.module.inject.TListener; import org.bukkit.event.EventHandler; diff --git a/src/main/scala/io/izzel/taboolib/origin/plugin/PluginLoadState.java b/src/main/scala/io/izzel/taboolib/util/plugin/PluginLoadState.java similarity index 91% rename from src/main/scala/io/izzel/taboolib/origin/plugin/PluginLoadState.java rename to src/main/scala/io/izzel/taboolib/util/plugin/PluginLoadState.java index 62b023c..23bf8e0 100644 --- a/src/main/scala/io/izzel/taboolib/origin/plugin/PluginLoadState.java +++ b/src/main/scala/io/izzel/taboolib/util/plugin/PluginLoadState.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.plugin; +package io.izzel.taboolib.util.plugin; /** * @Author sky diff --git a/src/main/scala/io/izzel/taboolib/origin/plugin/PluginLoadStateType.java b/src/main/scala/io/izzel/taboolib/util/plugin/PluginLoadStateType.java similarity index 90% rename from src/main/scala/io/izzel/taboolib/origin/plugin/PluginLoadStateType.java rename to src/main/scala/io/izzel/taboolib/util/plugin/PluginLoadStateType.java index 1d33633..640acd9 100644 --- a/src/main/scala/io/izzel/taboolib/origin/plugin/PluginLoadStateType.java +++ b/src/main/scala/io/izzel/taboolib/util/plugin/PluginLoadStateType.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.plugin; +package io.izzel.taboolib.util.plugin; /** * @Author sky diff --git a/src/main/scala/io/izzel/taboolib/origin/plugin/PluginUnloadState.java b/src/main/scala/io/izzel/taboolib/util/plugin/PluginUnloadState.java similarity index 90% rename from src/main/scala/io/izzel/taboolib/origin/plugin/PluginUnloadState.java rename to src/main/scala/io/izzel/taboolib/util/plugin/PluginUnloadState.java index 226cdc4..6c38687 100644 --- a/src/main/scala/io/izzel/taboolib/origin/plugin/PluginUnloadState.java +++ b/src/main/scala/io/izzel/taboolib/util/plugin/PluginUnloadState.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.plugin; +package io.izzel.taboolib.util.plugin; /** * @Author sky diff --git a/src/main/scala/io/izzel/taboolib/origin/plugin/PluginUtils.java b/src/main/scala/io/izzel/taboolib/util/plugin/PluginUtils.java similarity index 99% rename from src/main/scala/io/izzel/taboolib/origin/plugin/PluginUtils.java rename to src/main/scala/io/izzel/taboolib/util/plugin/PluginUtils.java index 8914b3e..6b562d1 100644 --- a/src/main/scala/io/izzel/taboolib/origin/plugin/PluginUtils.java +++ b/src/main/scala/io/izzel/taboolib/util/plugin/PluginUtils.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.plugin; +package io.izzel.taboolib.util.plugin; import com.google.common.base.Joiner; import io.izzel.taboolib.TabooLib; diff --git a/src/main/scala/io/izzel/taboolib/module/serialize/DoNotSerialize.java b/src/main/scala/io/izzel/taboolib/util/serialize/DoNotSerialize.java similarity index 89% rename from src/main/scala/io/izzel/taboolib/module/serialize/DoNotSerialize.java rename to src/main/scala/io/izzel/taboolib/util/serialize/DoNotSerialize.java index a922783..44fc677 100644 --- a/src/main/scala/io/izzel/taboolib/module/serialize/DoNotSerialize.java +++ b/src/main/scala/io/izzel/taboolib/util/serialize/DoNotSerialize.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.serialize; +package io.izzel.taboolib.util.serialize; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializable.java b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializable.java similarity index 94% rename from src/main/scala/io/izzel/taboolib/module/serialize/TSerializable.java rename to src/main/scala/io/izzel/taboolib/util/serialize/TSerializable.java index 4e27daf..02f8fc4 100644 --- a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializable.java +++ b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializable.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.serialize; +package io.izzel.taboolib.util.serialize; import java.nio.charset.StandardCharsets; import java.util.Base64; diff --git a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializeCollection.java b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializeCollection.java similarity index 89% rename from src/main/scala/io/izzel/taboolib/module/serialize/TSerializeCollection.java rename to src/main/scala/io/izzel/taboolib/util/serialize/TSerializeCollection.java index c03f65d..2793e95 100644 --- a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializeCollection.java +++ b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializeCollection.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.serialize; +package io.izzel.taboolib.util.serialize; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializeCustom.java b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializeCustom.java similarity index 89% rename from src/main/scala/io/izzel/taboolib/module/serialize/TSerializeCustom.java rename to src/main/scala/io/izzel/taboolib/util/serialize/TSerializeCustom.java index 55e5523..d84ef6e 100644 --- a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializeCustom.java +++ b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializeCustom.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.serialize; +package io.izzel.taboolib.util.serialize; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializeMap.java b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializeMap.java similarity index 88% rename from src/main/scala/io/izzel/taboolib/module/serialize/TSerializeMap.java rename to src/main/scala/io/izzel/taboolib/util/serialize/TSerializeMap.java index caded52..cb923b0 100644 --- a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializeMap.java +++ b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializeMap.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.serialize; +package io.izzel.taboolib.util.serialize; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializer.java b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializer.java similarity index 99% rename from src/main/scala/io/izzel/taboolib/module/serialize/TSerializer.java rename to src/main/scala/io/izzel/taboolib/util/serialize/TSerializer.java index 3cf05d9..6db8e60 100644 --- a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializer.java +++ b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializer.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.serialize; +package io.izzel.taboolib.util.serialize; import com.google.common.collect.Maps; import com.google.gson.*; diff --git a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializerElement.java b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializerElement.java similarity index 81% rename from src/main/scala/io/izzel/taboolib/module/serialize/TSerializerElement.java rename to src/main/scala/io/izzel/taboolib/util/serialize/TSerializerElement.java index 67a60ce..5f4a7e5 100644 --- a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializerElement.java +++ b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializerElement.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.serialize; +package io.izzel.taboolib.util.serialize; /** * @Author 坏黑 diff --git a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializerElementGeneral.java b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializerElementGeneral.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/module/serialize/TSerializerElementGeneral.java rename to src/main/scala/io/izzel/taboolib/util/serialize/TSerializerElementGeneral.java index a2168e9..452a250 100644 --- a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializerElementGeneral.java +++ b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializerElementGeneral.java @@ -1,6 +1,6 @@ -package io.izzel.taboolib.module.serialize; +package io.izzel.taboolib.util.serialize; -import io.izzel.taboolib.origin.lite.Numbers; +import io.izzel.taboolib.util.lite.Numbers; import org.bukkit.Location; import org.bukkit.inventory.ItemStack; diff --git a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializerExample.java b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializerExample.java similarity index 97% rename from src/main/scala/io/izzel/taboolib/module/serialize/TSerializerExample.java rename to src/main/scala/io/izzel/taboolib/util/serialize/TSerializerExample.java index a560814..4c9910d 100644 --- a/src/main/scala/io/izzel/taboolib/module/serialize/TSerializerExample.java +++ b/src/main/scala/io/izzel/taboolib/util/serialize/TSerializerExample.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.module.serialize; +package io.izzel.taboolib.util.serialize; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; diff --git a/src/main/scala/io/izzel/taboolib/origin/tag/TagDataHandler.java b/src/main/scala/io/izzel/taboolib/util/tag/TagDataHandler.java similarity index 99% rename from src/main/scala/io/izzel/taboolib/origin/tag/TagDataHandler.java rename to src/main/scala/io/izzel/taboolib/util/tag/TagDataHandler.java index 2d100c6..f9ea860 100644 --- a/src/main/scala/io/izzel/taboolib/origin/tag/TagDataHandler.java +++ b/src/main/scala/io/izzel/taboolib/util/tag/TagDataHandler.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.tag; +package io.izzel.taboolib.util.tag; import io.izzel.taboolib.TabooLib; import io.izzel.taboolib.module.inject.TFunction; diff --git a/src/main/scala/io/izzel/taboolib/origin/tag/TagPlayerData.java b/src/main/scala/io/izzel/taboolib/util/tag/TagPlayerData.java similarity index 98% rename from src/main/scala/io/izzel/taboolib/origin/tag/TagPlayerData.java rename to src/main/scala/io/izzel/taboolib/util/tag/TagPlayerData.java index 0b861d0..d533ed1 100644 --- a/src/main/scala/io/izzel/taboolib/origin/tag/TagPlayerData.java +++ b/src/main/scala/io/izzel/taboolib/util/tag/TagPlayerData.java @@ -1,4 +1,4 @@ -package io.izzel.taboolib.origin.tag; +package io.izzel.taboolib.util.tag; import io.izzel.taboolib.TabooLib; import io.izzel.taboolib.util.Strings; diff --git a/src/main/scala/io/izzel/taboolib/origin/tag/TagUtils.java b/src/main/scala/io/izzel/taboolib/util/tag/TagUtils.java similarity index 95% rename from src/main/scala/io/izzel/taboolib/origin/tag/TagUtils.java rename to src/main/scala/io/izzel/taboolib/util/tag/TagUtils.java index 8c25d54..31a9afa 100644 --- a/src/main/scala/io/izzel/taboolib/origin/tag/TagUtils.java +++ b/src/main/scala/io/izzel/taboolib/util/tag/TagUtils.java @@ -1,6 +1,6 @@ -package io.izzel.taboolib.origin.tag; +package io.izzel.taboolib.util.tag; -import io.izzel.taboolib.module.logger.TLogger; +import io.izzel.taboolib.module.locale.logger.TLogger; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.scoreboard.Scoreboard; diff --git a/src/main/scala/io/lzzel/tlibscala/runtime/RichOfflinePlayer.scala b/src/main/scala/io/lzzel/tlibscala/runtime/RichOfflinePlayer.scala index 2f17104..49aac50 100644 --- a/src/main/scala/io/lzzel/tlibscala/runtime/RichOfflinePlayer.scala +++ b/src/main/scala/io/lzzel/tlibscala/runtime/RichOfflinePlayer.scala @@ -1,7 +1,7 @@ package io.lzzel.tlibscala.runtime import io.izzel.taboolib.module.compat.EconomyHook -import io.izzel.taboolib.module.item.ItemBuilder +import io.izzel.taboolib.util.item.ItemBuilder import org.bukkit.OfflinePlayer import org.bukkit.inventory.ItemStack diff --git a/src/main/scala/io/lzzel/tlibscala/runtime/RichPlayer.scala b/src/main/scala/io/lzzel/tlibscala/runtime/RichPlayer.scala index 1263ae1..38688c7 100644 --- a/src/main/scala/io/lzzel/tlibscala/runtime/RichPlayer.scala +++ b/src/main/scala/io/lzzel/tlibscala/runtime/RichPlayer.scala @@ -2,18 +2,18 @@ package io.lzzel.tlibscala.runtime import io.izzel.taboolib.module.locale.TLocale import io.izzel.taboolib.module.compat.PermissionHook -import io.izzel.taboolib.origin.lite.Boards +import io.izzel.taboolib.util.lite.Scoreboards import org.bukkit.entity.Player class RichPlayer(private val player: Player) extends RichOfflinePlayer(player) { def sendActionBar(x: String): Unit = TLocale.Display.sendActionBar(player, x) - def displaySidebarUnranked(title: String, elements: Array[String]): Unit = Boards.display(player, elements: _*) + def displaySidebarUnranked(title: String, elements: Array[String]): Unit = Scoreboards.display(player, elements: _*) - def displaySidebarUnranked(title: String, elements: List[String]): Unit = Boards.display(player, elements: _*) + def displaySidebarUnranked(title: String, elements: List[String]): Unit = Scoreboards.display(player, elements: _*) - def displaySidebarUnranked(title: String, elements: String*): Unit = Boards.display(player, elements: _*) + def displaySidebarUnranked(title: String, elements: String*): Unit = Scoreboards.display(player, elements: _*) def addPermission(perm: String): Unit = PermissionHook.addPermission(player, perm)