From d4b3cfe9470bb00228ea63fbe0e2734abe7f9168 Mon Sep 17 00:00:00 2001 From: Christian Koop Date: Sat, 13 Jan 2024 22:18:27 +0100 Subject: [PATCH] Upgrade Craftaro Core (+dynamic library loading; +MC 1.20.4 support) Notable changes: * Spigot 1.20.3/3 compatibility * dynamic library/dependency loading * Smaller plugin jar size --- pom.xml | 12 +++++++++++- .../ultimatemoderation/UltimateModeration.java | 2 +- .../ultimatemoderation/commands/CommandVanish.java | 2 +- .../com/craftaro/ultimatemoderation/gui/MainGui.java | 2 +- .../craftaro/ultimatemoderation/gui/ModerateGui.java | 2 +- .../ultimatemoderation/gui/NotesManagerGui.java | 2 +- .../craftaro/ultimatemoderation/gui/PlayerGui.java | 2 +- .../craftaro/ultimatemoderation/gui/PunishGui.java | 2 +- .../ultimatemoderation/gui/PunishmentsGui.java | 2 +- .../ultimatemoderation/gui/TemplateManagerGui.java | 2 +- .../ultimatemoderation/gui/TemplateSelectorGui.java | 2 +- .../craftaro/ultimatemoderation/gui/TicketGui.java | 2 +- .../ultimatemoderation/gui/TicketManagerGui.java | 2 +- .../ultimatemoderation/gui/TicketTypeGui.java | 2 +- .../moderate/AbstractModeration.java | 2 +- .../moderate/moderations/FreezeModeration.java | 2 +- .../moderate/moderations/InvSeeModeration.java | 2 +- .../moderate/moderations/ReviveModeration.java | 2 +- .../moderate/moderations/SpyModeration.java | 2 +- .../moderations/ViewEnderChestModeration.java | 2 +- 20 files changed, 30 insertions(+), 20 deletions(-) diff --git a/pom.xml b/pom.xml index 7dceaf8..eb16b45 100644 --- a/pom.xml +++ b/pom.xml @@ -74,8 +74,18 @@ false **/nms/v*/** - **/third_party/** + + **/third_party/org/apache/** + **/third_party/net/kyori/** + **/third_party/com/zaxxer/** + **/third_party/org/jooq/** + **/third_party/org/mariadb/** + **/third_party/com/h2database/** + **/third_party/org/h2/** + **/third_party/com/cryptomorin/** + **/third_party/org/reactivestreams/** + diff --git a/src/main/java/com/craftaro/ultimatemoderation/UltimateModeration.java b/src/main/java/com/craftaro/ultimatemoderation/UltimateModeration.java index 89f01c8..63e65cf 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/UltimateModeration.java +++ b/src/main/java/com/craftaro/ultimatemoderation/UltimateModeration.java @@ -6,7 +6,7 @@ import com.craftaro.core.commands.CommandManager; import com.craftaro.core.compatibility.ServerVersion; import com.craftaro.core.configuration.Config; import com.craftaro.core.gui.GuiManager; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.commands.CommandBan; import com.craftaro.ultimatemoderation.commands.CommandClearChat; import com.craftaro.ultimatemoderation.commands.CommandHelp; diff --git a/src/main/java/com/craftaro/ultimatemoderation/commands/CommandVanish.java b/src/main/java/com/craftaro/ultimatemoderation/commands/CommandVanish.java index bd061ed..a7ab6b4 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/commands/CommandVanish.java +++ b/src/main/java/com/craftaro/ultimatemoderation/commands/CommandVanish.java @@ -2,7 +2,7 @@ package com.craftaro.ultimatemoderation.commands; import com.craftaro.core.commands.AbstractCommand; import com.craftaro.core.compatibility.ServerVersion; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound; +import com.craftaro.third_party.com.cryptomorin.xseries.XSound; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.settings.Settings; import org.bukkit.Bukkit; diff --git a/src/main/java/com/craftaro/ultimatemoderation/gui/MainGui.java b/src/main/java/com/craftaro/ultimatemoderation/gui/MainGui.java index d5f6a6f..0d9c425 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/gui/MainGui.java +++ b/src/main/java/com/craftaro/ultimatemoderation/gui/MainGui.java @@ -3,9 +3,9 @@ package com.craftaro.ultimatemoderation.gui; import com.craftaro.core.gui.AnvilGui; import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.utils.ItemUtils; import com.craftaro.core.utils.TextUtils; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.punish.PunishmentType; import com.craftaro.ultimatemoderation.punish.player.PlayerPunishData; diff --git a/src/main/java/com/craftaro/ultimatemoderation/gui/ModerateGui.java b/src/main/java/com/craftaro/ultimatemoderation/gui/ModerateGui.java index 65dde30..f6d4694 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/gui/ModerateGui.java +++ b/src/main/java/com/craftaro/ultimatemoderation/gui/ModerateGui.java @@ -2,8 +2,8 @@ package com.craftaro.ultimatemoderation.gui; import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.utils.TextUtils; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.moderate.AbstractModeration; import com.craftaro.ultimatemoderation.settings.Settings; diff --git a/src/main/java/com/craftaro/ultimatemoderation/gui/NotesManagerGui.java b/src/main/java/com/craftaro/ultimatemoderation/gui/NotesManagerGui.java index f021a57..25450ff 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/gui/NotesManagerGui.java +++ b/src/main/java/com/craftaro/ultimatemoderation/gui/NotesManagerGui.java @@ -3,8 +3,8 @@ package com.craftaro.ultimatemoderation.gui; import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; import com.craftaro.core.input.ChatPrompt; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.utils.TextUtils; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.punish.PunishmentNote; import com.craftaro.ultimatemoderation.settings.Settings; diff --git a/src/main/java/com/craftaro/ultimatemoderation/gui/PlayerGui.java b/src/main/java/com/craftaro/ultimatemoderation/gui/PlayerGui.java index b5655d7..376355f 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/gui/PlayerGui.java +++ b/src/main/java/com/craftaro/ultimatemoderation/gui/PlayerGui.java @@ -2,9 +2,9 @@ package com.craftaro.ultimatemoderation.gui; import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.utils.ItemUtils; import com.craftaro.core.utils.TextUtils; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.settings.Settings; import org.bukkit.OfflinePlayer; diff --git a/src/main/java/com/craftaro/ultimatemoderation/gui/PunishGui.java b/src/main/java/com/craftaro/ultimatemoderation/gui/PunishGui.java index cd75834..85e5816 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/gui/PunishGui.java +++ b/src/main/java/com/craftaro/ultimatemoderation/gui/PunishGui.java @@ -3,10 +3,10 @@ package com.craftaro.ultimatemoderation.gui; import com.craftaro.core.gui.AnvilGui; import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.utils.ItemUtils; import com.craftaro.core.utils.TextUtils; import com.craftaro.core.utils.TimeUtils; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.punish.Punishment; import com.craftaro.ultimatemoderation.punish.PunishmentType; diff --git a/src/main/java/com/craftaro/ultimatemoderation/gui/PunishmentsGui.java b/src/main/java/com/craftaro/ultimatemoderation/gui/PunishmentsGui.java index ab30c57..f8b8e0c 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/gui/PunishmentsGui.java +++ b/src/main/java/com/craftaro/ultimatemoderation/gui/PunishmentsGui.java @@ -2,9 +2,9 @@ package com.craftaro.ultimatemoderation.gui; import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.utils.TextUtils; import com.craftaro.core.utils.TimeUtils; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.punish.AppliedPunishment; import com.craftaro.ultimatemoderation.punish.PunishmentType; diff --git a/src/main/java/com/craftaro/ultimatemoderation/gui/TemplateManagerGui.java b/src/main/java/com/craftaro/ultimatemoderation/gui/TemplateManagerGui.java index 5c953ac..0e32d7d 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/gui/TemplateManagerGui.java +++ b/src/main/java/com/craftaro/ultimatemoderation/gui/TemplateManagerGui.java @@ -2,8 +2,8 @@ package com.craftaro.ultimatemoderation.gui; import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.utils.TextUtils; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.punish.PunishmentType; import com.craftaro.ultimatemoderation.punish.template.Template; diff --git a/src/main/java/com/craftaro/ultimatemoderation/gui/TemplateSelectorGui.java b/src/main/java/com/craftaro/ultimatemoderation/gui/TemplateSelectorGui.java index c7bfeca..b6f25e2 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/gui/TemplateSelectorGui.java +++ b/src/main/java/com/craftaro/ultimatemoderation/gui/TemplateSelectorGui.java @@ -2,8 +2,8 @@ package com.craftaro.ultimatemoderation.gui; import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.utils.TextUtils; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.punish.template.Template; import org.bukkit.entity.Player; diff --git a/src/main/java/com/craftaro/ultimatemoderation/gui/TicketGui.java b/src/main/java/com/craftaro/ultimatemoderation/gui/TicketGui.java index c4b200a..4fcc560 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/gui/TicketGui.java +++ b/src/main/java/com/craftaro/ultimatemoderation/gui/TicketGui.java @@ -3,8 +3,8 @@ package com.craftaro.ultimatemoderation.gui; import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; import com.craftaro.core.input.ChatPrompt; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.utils.TextUtils; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.settings.Settings; import com.craftaro.ultimatemoderation.staffchat.StaffChatManager; diff --git a/src/main/java/com/craftaro/ultimatemoderation/gui/TicketManagerGui.java b/src/main/java/com/craftaro/ultimatemoderation/gui/TicketManagerGui.java index c0b32ae..e7d32ef 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/gui/TicketManagerGui.java +++ b/src/main/java/com/craftaro/ultimatemoderation/gui/TicketManagerGui.java @@ -3,8 +3,8 @@ package com.craftaro.ultimatemoderation.gui; import com.craftaro.core.gui.AnvilGui; import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.utils.TextUtils; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.settings.Settings; import com.craftaro.ultimatemoderation.tickets.Ticket; diff --git a/src/main/java/com/craftaro/ultimatemoderation/gui/TicketTypeGui.java b/src/main/java/com/craftaro/ultimatemoderation/gui/TicketTypeGui.java index 4deda62..43c2a07 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/gui/TicketTypeGui.java +++ b/src/main/java/com/craftaro/ultimatemoderation/gui/TicketTypeGui.java @@ -3,7 +3,7 @@ package com.craftaro.ultimatemoderation.gui; import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; import com.craftaro.core.input.ChatPrompt; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.settings.Settings; import com.craftaro.ultimatemoderation.staffchat.StaffChatManager; diff --git a/src/main/java/com/craftaro/ultimatemoderation/moderate/AbstractModeration.java b/src/main/java/com/craftaro/ultimatemoderation/moderate/AbstractModeration.java index 893337e..f698767 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/moderate/AbstractModeration.java +++ b/src/main/java/com/craftaro/ultimatemoderation/moderate/AbstractModeration.java @@ -1,6 +1,6 @@ package com.craftaro.ultimatemoderation.moderate; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.utils.VaultPermissions; import org.bukkit.OfflinePlayer; diff --git a/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/FreezeModeration.java b/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/FreezeModeration.java index 27bb2bd..97da52b 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/FreezeModeration.java +++ b/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/FreezeModeration.java @@ -1,6 +1,6 @@ package com.craftaro.ultimatemoderation.moderate.moderations; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.moderate.AbstractModeration; import com.craftaro.ultimatemoderation.moderate.ModerationType; diff --git a/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/InvSeeModeration.java b/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/InvSeeModeration.java index 1c767cd..341bc1d 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/InvSeeModeration.java +++ b/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/InvSeeModeration.java @@ -1,6 +1,6 @@ package com.craftaro.ultimatemoderation.moderate.moderations; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.moderate.AbstractModeration; import com.craftaro.ultimatemoderation.moderate.ModerationType; diff --git a/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/ReviveModeration.java b/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/ReviveModeration.java index f599019..7c2615c 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/ReviveModeration.java +++ b/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/ReviveModeration.java @@ -1,7 +1,7 @@ package com.craftaro.ultimatemoderation.moderate.moderations; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.utils.PlayerUtils; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.listeners.DeathListener; import com.craftaro.ultimatemoderation.moderate.AbstractModeration; diff --git a/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/SpyModeration.java b/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/SpyModeration.java index b8669c0..70ebd22 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/SpyModeration.java +++ b/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/SpyModeration.java @@ -1,7 +1,7 @@ package com.craftaro.ultimatemoderation.moderate.moderations; import com.craftaro.core.compatibility.ServerVersion; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.commands.CommandVanish; import com.craftaro.ultimatemoderation.listeners.SpyingDismountListener; diff --git a/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/ViewEnderChestModeration.java b/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/ViewEnderChestModeration.java index 146dbfa..1a341a5 100644 --- a/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/ViewEnderChestModeration.java +++ b/src/main/java/com/craftaro/ultimatemoderation/moderate/moderations/ViewEnderChestModeration.java @@ -1,6 +1,6 @@ package com.craftaro.ultimatemoderation.moderate.moderations; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimatemoderation.UltimateModeration; import com.craftaro.ultimatemoderation.moderate.ModerationType; import com.craftaro.ultimatemoderation.moderate.AbstractModeration;