diff --git a/common/build.gradle.kts b/common/build.gradle.kts index fd4e23b2..23dcc315 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -57,7 +57,7 @@ tasks { compileJava { options.encoding = Charsets.UTF_8.name() - options.release.set(16) + options.release.set(17) } shadowJar { @@ -88,7 +88,7 @@ tasks { } java { - toolchain.languageVersion.set(JavaLanguageVersion.of(16)) + toolchain.languageVersion.set(JavaLanguageVersion.of(17)) } bukkit { diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/command/CosmeticsCommand.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/command/CosmeticsCommand.class index cd0b012d..43a266c1 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/command/CosmeticsCommand.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/command/CosmeticsCommand.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/ActionSerializer.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/ActionSerializer.class index 3e7e9098..07c1288a 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/ActionSerializer.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/ActionSerializer.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/DyeGuiSerializer.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/DyeGuiSerializer.class index 5dd3d8ba..139980e9 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/DyeGuiSerializer.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/DyeGuiSerializer.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/GuiSerializer.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/GuiSerializer.class index 742ee5e5..587d05c8 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/GuiSerializer.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/GuiSerializer.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/ItemSerializer.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/ItemSerializer.class index 65d0142b..d6a5468d 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/ItemSerializer.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/ItemSerializer.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/Settings.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/Settings.class index 840878a4..755f476f 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/Settings.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/Settings.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/WardrobeSettings.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/WardrobeSettings.class index 33bb3a99..507bdbd6 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/WardrobeSettings.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/config/WardrobeSettings.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/Database.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/Database.class index 6dd04d7e..f97ec9c3 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/Database.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/Database.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/DatabaseConverter.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/DatabaseConverter.class index dbd441a0..94aa9e22 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/DatabaseConverter.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/DatabaseConverter.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/DatabaseFactory.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/DatabaseFactory.class index 95946b5f..5605140e 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/DatabaseFactory.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/DatabaseFactory.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/DatabaseType.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/DatabaseType.class index ade6778d..aa4f4b95 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/DatabaseType.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/DatabaseType.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/dao/ArmorItemDAO.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/dao/ArmorItemDAO.class index ebba4363..f327a2a9 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/dao/ArmorItemDAO.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/dao/ArmorItemDAO.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/dao/UserDAO.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/dao/UserDAO.class index eeedbae9..402b45d7 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/dao/UserDAO.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/database/dao/UserDAO.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/gui/CosmeticGui.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/gui/CosmeticGui.class index 7eb2cbdd..ace32e88 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/gui/CosmeticGui.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/gui/CosmeticGui.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/gui/CosmeticsMenu.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/gui/CosmeticsMenu.class index b5a87388..6f898b56 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/gui/CosmeticsMenu.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/gui/CosmeticsMenu.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/gui/DyeSelectorGui.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/gui/DyeSelectorGui.class index 9842b91c..e4862d3b 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/gui/DyeSelectorGui.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/gui/DyeSelectorGui.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/HookManager.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/HookManager.class index 748c5137..9c3bdb33 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/HookManager.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/HookManager.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/ItemHook.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/ItemHook.class index ff897d81..9a5c3b7b 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/ItemHook.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/ItemHook.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/ItemHooks.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/ItemHooks.class index 0ef9c7f1..81a99629 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/ItemHooks.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/ItemHooks.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/ItemsAdderHook.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/ItemsAdderHook.class index 14dda77a..a7175907 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/ItemsAdderHook.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/ItemsAdderHook.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/OraxenHook.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/OraxenHook.class index 30984fd5..125a30ab 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/OraxenHook.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/hook/item/OraxenHook.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/ClickListener.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/ClickListener.class index cad356de..208fb82d 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/ClickListener.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/ClickListener.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/CosmeticFixListener.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/CosmeticFixListener.class index de732438..0ad49ed2 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/CosmeticFixListener.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/CosmeticFixListener.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/JoinListener.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/JoinListener.class index 570376c3..e55ee3a6 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/JoinListener.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/JoinListener.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/MoveListener.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/MoveListener.class index 1636abeb..a379ebb0 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/MoveListener.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/MoveListener.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/PlayerShiftListener.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/PlayerShiftListener.class index 36329e34..89ce09d4 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/PlayerShiftListener.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/PlayerShiftListener.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/RespawnListener.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/RespawnListener.class index 073903b7..54844db4 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/RespawnListener.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/RespawnListener.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/TeleportListener.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/TeleportListener.class index 05ba0c0a..52d75c80 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/TeleportListener.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/TeleportListener.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/WardrobeClickListener.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/WardrobeClickListener.class index 02f2a730..07ae0364 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/WardrobeClickListener.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/listener/WardrobeClickListener.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Adventure.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Adventure.class index 45977acf..32e5a14b 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Adventure.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Adventure.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/ErrorMessages.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/ErrorMessages.class index cdb69637..e4a7d3b3 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/ErrorMessages.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/ErrorMessages.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/MessageHandler$1.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/MessageHandler$1.class index 9066d110..2179535b 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/MessageHandler$1.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/MessageHandler$1.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/MessageHandler.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/MessageHandler.class index 8d1a1ea5..0e9eb100 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/MessageHandler.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/MessageHandler.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Messages$1.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Messages$1.class index 758ef937..1b32efb6 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Messages$1.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Messages$1.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Messages.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Messages.class index 29757ab7..f0236895 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Messages.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Messages.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Permission.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Permission.class index 0c51fb3f..6c691cd0 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Permission.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Permission.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Placeholder.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Placeholder.class index ebd70062..7647a3e2 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Placeholder.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Placeholder.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/TitleMessage.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/TitleMessage.class index 8bab2275..95f2f25d 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/TitleMessage.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/TitleMessage.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Translation.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Translation.class index 66ad6429..69d65035 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Translation.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/message/Translation.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/packet/PacketManager.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/packet/PacketManager.class index 9d973eb0..c56309cb 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/packet/PacketManager.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/packet/PacketManager.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/DataTask.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/DataTask.class index e1fc155e..90060503 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/DataTask.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/DataTask.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/ImmediateTask.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/ImmediateTask.class index b278c84b..a404981b 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/ImmediateTask.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/ImmediateTask.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/InfiniteTask.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/InfiniteTask.class index 09fe338b..ca7b43d0 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/InfiniteTask.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/InfiniteTask.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/SupplierTask.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/SupplierTask.class index 2ae2b1e9..394a2f25 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/SupplierTask.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/SupplierTask.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/SyncedTask.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/SyncedTask.class index ff2102ab..f1927d9a 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/SyncedTask.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/SyncedTask.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/TaskChain.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/TaskChain.class index cf31ce30..8a0c43f7 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/TaskChain.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/TaskChain.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/TaskManager.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/TaskManager.class index e77fdb73..b6a99a2b 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/TaskManager.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/task/TaskManager.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/User.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/User.class index c274515f..1aecd704 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/User.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/User.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/UserManager$1.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/UserManager$1.class index 579a70d4..b77d0e6f 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/UserManager$1.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/UserManager$1.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/UserManager.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/UserManager.class index 6e8353c7..05933501 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/UserManager.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/UserManager.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/Wardrobe.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/Wardrobe.class index 4b0a4d99..95d70261 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/Wardrobe.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/user/Wardrobe.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/Keys.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/Keys.class index 86b5d6c2..62efa8af 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/Keys.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/Keys.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/StringUtils.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/StringUtils.class index bad4a7b6..e9404180 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/StringUtils.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/StringUtils.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/Utils.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/Utils.class index 9d33361f..df876e8b 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/Utils.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/Utils.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/builder/ColorBuilder.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/builder/ColorBuilder.class index 158c7422..2de33c83 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/builder/ColorBuilder.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/builder/ColorBuilder.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/builder/ItemBuilder.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/builder/ItemBuilder.class index 5bb78deb..35f6ceb7 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/builder/ItemBuilder.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/builder/ItemBuilder.class differ diff --git a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/builder/SkullBuilder.class b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/builder/SkullBuilder.class index c9b3f863..01bdde4d 100644 Binary files a/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/builder/SkullBuilder.class and b/common/build/classes/java/main/io/github/fisher2911/hmccosmetics/util/builder/SkullBuilder.class differ diff --git a/common/build/resources/main/config.yml b/common/build/resources/main/config.yml index 294a5992..1a3fb2d0 100644 --- a/common/build/resources/main/config.yml +++ b/common/build/resources/main/config.yml @@ -35,6 +35,8 @@ wardrobe: spawn-delay: 40 # how long in ticks until the wardrobe should be despawned despawn-delay: 40 + # if cosmetics that the user have permissions for should be applied on close of wardrobe + apply-cosmetcics-on-close: true open-sound: sound: # Play a sound name: "minecraft:block.chain.break" diff --git a/common/build/resources/main/messages.yml b/common/build/resources/main/messages.yml index 2501b279..3d88d8b1 100644 --- a/common/build/resources/main/messages.yml +++ b/common/build/resources/main/messages.yml @@ -38,6 +38,10 @@ wardrobe-already-open: "%prefix% The wardrobe is not-near-wardrobe: "%prefix% You are not near the wardrobe!" cannot-use-portable-wardrobe: "%prefix% You cannot use the portable wardrobe!" opened-other-wardrobe: "%prefix% Opening %player%'s wardrobe." +gave-token: "%prefix% You gave %player% a %id% token" +received-token: "%prefix% You were given a %id% token" +traded-token: "%prefix% You have received the cosmetic: %id%" +already-unlockedYou have already unlocked the cosmetic: " + %id%); help-command: "<#6D9DC5> %prefix% HMCCosmetics - Help %prefix% <#6D9DC5> diff --git a/common/build/tmp/compileJava/previous-compilation-data.bin b/common/build/tmp/compileJava/previous-compilation-data.bin index da81514c..e9170cdb 100644 Binary files a/common/build/tmp/compileJava/previous-compilation-data.bin and b/common/build/tmp/compileJava/previous-compilation-data.bin differ diff --git a/common/src/main/java/io/github/fisher2911/hmccosmetics/command/CosmeticsCommand.java b/common/src/main/java/io/github/fisher2911/hmccosmetics/command/CosmeticsCommand.java index f916d9a3..7d054dbd 100644 --- a/common/src/main/java/io/github/fisher2911/hmccosmetics/command/CosmeticsCommand.java +++ b/common/src/main/java/io/github/fisher2911/hmccosmetics/command/CosmeticsCommand.java @@ -72,7 +72,7 @@ public class CosmeticsCommand extends CommandBase { if (wardrobe.isActive() && !this.settings.getWardrobeSettings().inDistanceOfWardrobe(wardrobe.getCurrentLocation(), player.getLocation())) { wardrobe.setActive(false); - wardrobe.despawnFakePlayer(player); + wardrobe.despawnFakePlayer(player, userManager); this.messageHandler.sendMessage( player, Messages.CLOSED_WARDROBE diff --git a/common/src/main/java/io/github/fisher2911/hmccosmetics/config/WardrobeSettings.java b/common/src/main/java/io/github/fisher2911/hmccosmetics/config/WardrobeSettings.java index 13047603..7fa171fc 100644 --- a/common/src/main/java/io/github/fisher2911/hmccosmetics/config/WardrobeSettings.java +++ b/common/src/main/java/io/github/fisher2911/hmccosmetics/config/WardrobeSettings.java @@ -32,17 +32,12 @@ public class WardrobeSettings { private static final String ROTATION_SPEED_PATH = "rotation-speed"; private static final String SPAWN_DELAY_PATH = "spawn-delay"; private static final String DESPAWN_DELAY_PATH = "despawn-delay"; + private static final String APPLY_COSMETICS_ON_CLOSE = "apply-cosmetcics-on-close"; private static final String OPEN_SOUND = "open-sound"; private static final String CLOSE_SOUND = "close-sound"; private static final String STATIC_LOCATION_PATH = "wardrobe-location"; private static final String VIEWER_LOCATION_PATH = "viewer-location"; private static final String LEAVE_LOCATION_PATH = "leave-location"; - private static final String WORLD_PATH = "world"; - private static final String X_PATH = "x"; - private static final String Y_PATH = "y"; - private static final String Z_PATH = "z"; - private static final String YAW_PATH = "yaw"; - private static final String PITCH_PATH = "pitch"; private final HMCCosmetics plugin; @@ -54,6 +49,7 @@ public class WardrobeSettings { private int rotationSpeed; private int spawnDelay; private int despawnDelay; + private boolean applyCosmeticsOnClose; private SoundData openSound; private SoundData closeSound; private Location wardrobeLocation; @@ -85,6 +81,7 @@ public class WardrobeSettings { this.rotationSpeed = source.node(ROTATION_SPEED_PATH).getInt(); this.spawnDelay = source.node(SPAWN_DELAY_PATH).getInt(); this.despawnDelay = source.node(DESPAWN_DELAY_PATH).getInt(); + this.applyCosmeticsOnClose = source.node(APPLY_COSMETICS_ON_CLOSE).getBoolean(); this.openSound = source.node(OPEN_SOUND).get(SoundData.class); this.closeSound = source.node(CLOSE_SOUND).get(SoundData.class); this.wardrobeLocation = source.node(STATIC_LOCATION_PATH).get(Location.class); @@ -127,6 +124,10 @@ public class WardrobeSettings { return despawnDelay; } + public boolean isApplyCosmeticsOnClose() { + return applyCosmeticsOnClose; + } + public Location getWardrobeLocation() { return this.wardrobeLocation.clone(); } diff --git a/common/src/main/java/io/github/fisher2911/hmccosmetics/database/Database.java b/common/src/main/java/io/github/fisher2911/hmccosmetics/database/Database.java index 02f802b1..78f58fc7 100644 --- a/common/src/main/java/io/github/fisher2911/hmccosmetics/database/Database.java +++ b/common/src/main/java/io/github/fisher2911/hmccosmetics/database/Database.java @@ -20,7 +20,10 @@ import org.bukkit.entity.Entity; import java.sql.SQLException; import java.util.List; +import java.util.Random; +import java.util.SplittableRandom; import java.util.UUID; +import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; @@ -32,7 +35,7 @@ public class Database { private final Dao armorItemDao; private final ConnectionSource dataSource; private final DatabaseType databaseType; - AtomicInteger FAKE_ENTITY_ID = new AtomicInteger(Integer.MAX_VALUE); + private static final SplittableRandom RANDOM = new SplittableRandom(); public Database( final HMCCosmetics plugin, @@ -62,8 +65,8 @@ public class Database { public void loadUser(final Entity entity, final Consumer onComplete) { final UUID uuid = entity.getUniqueId(); - final int armorStandId = FAKE_ENTITY_ID.getAndDecrement(); - final int balloonId = FAKE_ENTITY_ID.getAndDecrement(); + final int armorStandId = getNextEntityId(); + final int balloonId = getNextEntityId(); final Wardrobe wardrobe = this.createNewWardrobe(uuid); Threads.getInstance().execute( () -> { @@ -103,8 +106,8 @@ public class Database { } public void loadNPCUser(final int id, final Entity entity, final Consumer onComplete) { - final int armorStandId = FAKE_ENTITY_ID.getAndDecrement(); - final int balloonId = FAKE_ENTITY_ID.getAndDecrement(); + final int armorStandId = getNextEntityId(); + final int balloonId = getNextEntityId(); Threads.getInstance().execute( () -> { try { @@ -214,11 +217,15 @@ public class Database { ownerUUID, PlayerArmor.empty(), new EntityIds( - FAKE_ENTITY_ID.getAndDecrement(), - FAKE_ENTITY_ID.getAndDecrement(), - FAKE_ENTITY_ID.getAndDecrement() + getNextEntityId(), + getNextEntityId(), + getNextEntityId() ), false ); } + + public static int getNextEntityId() { + return RANDOM.nextInt(50_000, 100_000); + } } diff --git a/common/src/main/java/io/github/fisher2911/hmccosmetics/database/DatabaseConverter.java b/common/src/main/java/io/github/fisher2911/hmccosmetics/database/DatabaseConverter.java index 44eeeada..d976fd95 100644 --- a/common/src/main/java/io/github/fisher2911/hmccosmetics/database/DatabaseConverter.java +++ b/common/src/main/java/io/github/fisher2911/hmccosmetics/database/DatabaseConverter.java @@ -93,8 +93,8 @@ public class DatabaseConverter { this.database.createNewWardrobe(uuid), new EntityIds( -1, - this.database.FAKE_ENTITY_ID.getAndDecrement(), - this.database.FAKE_ENTITY_ID.getAndDecrement() + Database.getNextEntityId(), + Database.getNextEntityId() ) ); final String backpackId = results.getString(2); diff --git a/common/src/main/java/io/github/fisher2911/hmccosmetics/database/dao/ArmorItemDAO.java b/common/src/main/java/io/github/fisher2911/hmccosmetics/database/dao/ArmorItemDAO.java index 33252910..8f0155ae 100644 --- a/common/src/main/java/io/github/fisher2911/hmccosmetics/database/dao/ArmorItemDAO.java +++ b/common/src/main/java/io/github/fisher2911/hmccosmetics/database/dao/ArmorItemDAO.java @@ -36,8 +36,7 @@ public class ArmorItemDAO { } public static ArmorItemDAO fromArmorItem(final ArmorItem armorItem) { - return new ArmorItemDAO(armorItem.getId(), armorItem.getType().toString(), - armorItem.getDye()); + return new ArmorItemDAO(armorItem.getId(), armorItem.getType().toString(), armorItem.getDye()); } @Nullable diff --git a/common/src/main/java/io/github/fisher2911/hmccosmetics/listener/JoinListener.java b/common/src/main/java/io/github/fisher2911/hmccosmetics/listener/JoinListener.java index e0313d92..27380f0c 100644 --- a/common/src/main/java/io/github/fisher2911/hmccosmetics/listener/JoinListener.java +++ b/common/src/main/java/io/github/fisher2911/hmccosmetics/listener/JoinListener.java @@ -59,7 +59,7 @@ public class JoinListener implements Listener { if (wardrobe.isActive()) { Bukkit.getScheduler().runTaskAsynchronously( this.plugin, - () -> wardrobe.despawnFakePlayer(player) + () -> wardrobe.despawnFakePlayer(player, userManager) ); } }); diff --git a/common/src/main/java/io/github/fisher2911/hmccosmetics/listener/PlayerShiftListener.java b/common/src/main/java/io/github/fisher2911/hmccosmetics/listener/PlayerShiftListener.java index bbe1f6d3..fcd8084e 100644 --- a/common/src/main/java/io/github/fisher2911/hmccosmetics/listener/PlayerShiftListener.java +++ b/common/src/main/java/io/github/fisher2911/hmccosmetics/listener/PlayerShiftListener.java @@ -36,7 +36,7 @@ public class PlayerShiftListener implements Listener { if (!wardrobe.isActive()) return; - wardrobe.despawnFakePlayer(player); + wardrobe.despawnFakePlayer(player, userManager); this.plugin.getSettings().getWardrobeSettings().playCloseSound(player); this.plugin.getMessageHandler().sendMessage( player, diff --git a/common/src/main/java/io/github/fisher2911/hmccosmetics/message/Messages.java b/common/src/main/java/io/github/fisher2911/hmccosmetics/message/Messages.java index f9caad8c..a8cd2db1 100644 --- a/common/src/main/java/io/github/fisher2911/hmccosmetics/message/Messages.java +++ b/common/src/main/java/io/github/fisher2911/hmccosmetics/message/Messages.java @@ -95,7 +95,7 @@ public class Messages { public static final Message TRADED_TOKEN = new Message("traded-token", "You have received the cosmetic: " + Placeholder.ID); public static final Message ALREADY_UNLOCKED = - new Message("alread-unlocked", "You have already unlocked the cosmetic: " + Placeholder.ID); + new Message("already-unlocked", "You have already unlocked the cosmetic: " + Placeholder.ID); public static final Message SET_OTHER_BACKPACK = new Message( "set-other-backpack", "You have set the backpack of " + Placeholder.PLAYER + " to " + Placeholder.TYPE + "." diff --git a/common/src/main/java/io/github/fisher2911/hmccosmetics/packet/PacketManager.java b/common/src/main/java/io/github/fisher2911/hmccosmetics/packet/PacketManager.java index 3bb5078b..0938228f 100644 --- a/common/src/main/java/io/github/fisher2911/hmccosmetics/packet/PacketManager.java +++ b/common/src/main/java/io/github/fisher2911/hmccosmetics/packet/PacketManager.java @@ -124,7 +124,11 @@ public class PacketManager { final PacketContainer armorPacket = new PacketContainer( PacketType.Play.Server.ENTITY_EQUIPMENT); armorPacket.getIntegers().write(0, entityId); - armorPacket.getSlotStackPairLists().write(0, equipmentList); + + try { + armorPacket.getSlotStackPairLists().write(0, equipmentList); + // for some reason ProtocolLib throws an error the first time this is called + } catch (final NullPointerException ignored) {} return armorPacket; } diff --git a/common/src/main/java/io/github/fisher2911/hmccosmetics/user/User.java b/common/src/main/java/io/github/fisher2911/hmccosmetics/user/User.java index c1c469df..1c5d0cea 100644 --- a/common/src/main/java/io/github/fisher2911/hmccosmetics/user/User.java +++ b/common/src/main/java/io/github/fisher2911/hmccosmetics/user/User.java @@ -6,7 +6,11 @@ import io.github.fisher2911.hmccosmetics.inventory.PlayerArmor; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.potion.PotionEffectType; import org.jetbrains.annotations.Nullable; @@ -39,6 +43,13 @@ public class User extends BaseUser { final Player player = this.getPlayer(); if (player == null) return false; if (player.getUniqueId().equals(other.getUniqueId()) && this.hidden) return false; + final ItemStack itemStack = player.getInventory().getItemInMainHand(); + if (itemStack != null && itemStack.getType() == Material.TRIDENT) { + final ItemMeta itemMeta = itemStack.getItemMeta(); + if (itemMeta != null && itemMeta.hasEnchant(Enchantment.RIPTIDE)) { + return false; + } + } return player.getGameMode() != GameMode.SPECTATOR && (!player.hasPotionEffect(PotionEffectType.INVISIBILITY) && other.canSee(player) && diff --git a/common/src/main/java/io/github/fisher2911/hmccosmetics/user/Wardrobe.java b/common/src/main/java/io/github/fisher2911/hmccosmetics/user/Wardrobe.java index dba09f2d..fa56c268 100644 --- a/common/src/main/java/io/github/fisher2911/hmccosmetics/user/Wardrobe.java +++ b/common/src/main/java/io/github/fisher2911/hmccosmetics/user/Wardrobe.java @@ -14,6 +14,9 @@ import org.bukkit.Location; import org.bukkit.entity.Player; import org.jetbrains.annotations.Nullable; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; import java.util.Optional; import java.util.UUID; import java.util.concurrent.atomic.AtomicInteger; @@ -116,7 +119,7 @@ public class Wardrobe extends User { this.startSpinTask(viewer); } - public void despawnFakePlayer(final Player viewer) { + public void despawnFakePlayer(final Player viewer, final UserManager userManager) { this.active = false; final WardrobeSettings settings = this.plugin.getSettings().getWardrobeSettings(); Bukkit.getScheduler().runTaskLaterAsynchronously( @@ -135,6 +138,19 @@ public class Wardrobe extends User { this.spawned = false; this.cameraLocked = false; this.currentLocation = null; + final Collection armorItems = new ArrayList<>(this.getPlayerArmor().getArmorItems()); + if (settings.isApplyCosmeticsOnClose()) { + final Optional optionalUser = userManager.get(this.ownerUUID); + optionalUser.ifPresent(user -> Bukkit.getScheduler().runTask( + plugin, + () -> { + for (final ArmorItem armorItem : armorItems) { + if (!user.hasPermissionToUse(armorItem)) continue; + userManager.setItem(user, armorItem); + } + } + )); + } this.getPlayerArmor().clear(); Bukkit.getScheduler().runTask(this.plugin, () -> { if (viewer == null || !viewer.isOnline()) return; diff --git a/common/src/main/resources/config.yml b/common/src/main/resources/config.yml index 294a5992..1a3fb2d0 100644 --- a/common/src/main/resources/config.yml +++ b/common/src/main/resources/config.yml @@ -35,6 +35,8 @@ wardrobe: spawn-delay: 40 # how long in ticks until the wardrobe should be despawned despawn-delay: 40 + # if cosmetics that the user have permissions for should be applied on close of wardrobe + apply-cosmetcics-on-close: true open-sound: sound: # Play a sound name: "minecraft:block.chain.break" diff --git a/common/src/main/resources/messages.yml b/common/src/main/resources/messages.yml index 2501b279..a09a611c 100644 --- a/common/src/main/resources/messages.yml +++ b/common/src/main/resources/messages.yml @@ -38,6 +38,10 @@ wardrobe-already-open: "%prefix% The wardrobe is not-near-wardrobe: "%prefix% You are not near the wardrobe!" cannot-use-portable-wardrobe: "%prefix% You cannot use the portable wardrobe!" opened-other-wardrobe: "%prefix% Opening %player%'s wardrobe." +gave-token: "%prefix% You gave %player% a %id% token" +received-token: "%prefix% You were given a %id% token" +traded-token: "%prefix% You have received the cosmetic: %id%" +already-unlocked: "%prefix% You have already unlocked the cosmetic: %id%" help-command: "<#6D9DC5> %prefix% HMCCosmetics - Help %prefix% <#6D9DC5>