diff --git a/pom.xml b/pom.xml
index 6b2c0bf..68e0aea 100755
--- a/pom.xml
+++ b/pom.xml
@@ -260,7 +260,37 @@
shade
+
+
+
+
+
+
+ org.bstats:*
+
+ META-INF/MANIFEST.MF
+
+
+
+ com.zaxxer:HikariCP
+
+ META-INF/MANIFEST.MF
+
+
+
+ com.clickhouse:clickhouse-jdbc
+
+ META-INF/MANIFEST.MF
+
+
+
+ *:*
+
+ module-info.class
+ META-INF/versions/**/module-info.class
+
+
*:*:*:*
diff --git a/src/main/java/net/tfminecraft/coreprotect/bukkit/BukkitAdapter.java b/src/main/java/net/tfminecraft/coreprotect/bukkit/BukkitAdapter.java
index ffed5af..670c80f 100644
--- a/src/main/java/net/tfminecraft/coreprotect/bukkit/BukkitAdapter.java
+++ b/src/main/java/net/tfminecraft/coreprotect/bukkit/BukkitAdapter.java
@@ -271,6 +271,8 @@ public ItemStack adjustIngredient(MerchantRecipe recipe, ItemStack itemStack) {
return null;
}
+ // Pre-1.20.2 fallback; newer adapters use the base potion type API.
+ @SuppressWarnings("removal")
@Override
public ItemStack getArrowMeta(Arrow arrow, ItemStack itemStack) {
PotionData data = arrow.getBasePotionData();
@@ -418,6 +420,8 @@ public ItemStack getChiseledBookshelfBook(BlockState blockState, PlayerInteractE
// -------------------- Sign handling methods --------------------
+ // Legacy Bukkit sign API for servers without sign sides or Adventure components.
+ @SuppressWarnings("deprecation")
@Override
public String getLine(Sign sign, int line) {
if (line < 4) {
@@ -428,6 +432,8 @@ public String getLine(Sign sign, int line) {
}
}
+ // Legacy Bukkit sign API preserves stored text on older servers.
+ @SuppressWarnings("deprecation")
@Override
public void setLine(Sign sign, int line, String string) {
if (string == null) {
@@ -470,6 +476,8 @@ public void setGlowing(Sign sign, boolean isFront, boolean isGlowing) {
// Base implementation does nothing
}
+ // Legacy Bukkit sign API for servers without sign sides.
+ @SuppressWarnings("deprecation")
@Override
public void setColor(Sign sign, boolean isFront, int color) {
if (!isFront) {
@@ -484,6 +492,8 @@ public void setWaxed(Sign sign, boolean isWaxed) {
// Base implementation does nothing
}
+ // Legacy Bukkit sign API for servers without sign sides.
+ @SuppressWarnings("deprecation")
@Override
public int getColor(Sign sign, boolean isFront) {
if (isFront) {
@@ -505,6 +515,8 @@ public Object getRegistryValue(String key, Object tClass) {
return null;
}
+ // Legacy enum naming fallback; newer adapters use the art registry.
+ @SuppressWarnings("removal")
@Override
public String getPaintingArtKey(Painting painting) {
try {
@@ -515,6 +527,8 @@ public String getPaintingArtKey(Painting painting) {
}
}
+ // Legacy art lookup fallback; newer adapters use the art registry.
+ @SuppressWarnings("deprecation")
@Override
public Art getPaintingArt(String name) {
if (name == null || name.isBlank()) {
diff --git a/src/main/java/net/tfminecraft/coreprotect/bukkit/Bukkit_v1_17.java b/src/main/java/net/tfminecraft/coreprotect/bukkit/Bukkit_v1_17.java
index 243b3f2..a12d746 100644
--- a/src/main/java/net/tfminecraft/coreprotect/bukkit/Bukkit_v1_17.java
+++ b/src/main/java/net/tfminecraft/coreprotect/bukkit/Bukkit_v1_17.java
@@ -232,6 +232,8 @@ public Class> getFrameClass(Material material) {
return (material == Material.GLOW_ITEM_FRAME) ? GlowItemFrame.class : ItemFrame.class;
}
+ // Version-specific adapter: retain the API available on the older servers handled here.
+ @SuppressWarnings("deprecation")
@Override
public boolean isGlowing(Sign sign, boolean isFront) {
if (!isFront) {
@@ -241,6 +243,8 @@ public boolean isGlowing(Sign sign, boolean isFront) {
return sign.isGlowingText();
}
+ // Version-specific adapter: retain the API available on the older servers handled here.
+ @SuppressWarnings("deprecation")
@Override
public void setGlowing(Sign sign, boolean isFront, boolean isGlowing) {
if (!isFront) {
diff --git a/src/main/java/net/tfminecraft/coreprotect/bukkit/Bukkit_v1_20.java b/src/main/java/net/tfminecraft/coreprotect/bukkit/Bukkit_v1_20.java
index 99f3bd9..be262f6 100644
--- a/src/main/java/net/tfminecraft/coreprotect/bukkit/Bukkit_v1_20.java
+++ b/src/main/java/net/tfminecraft/coreprotect/bukkit/Bukkit_v1_20.java
@@ -213,6 +213,8 @@ public boolean isBookshelfBook(Material material) {
return Tag.ITEMS_BOOKSHELF_BOOKS.isTagged(material);
}
+ // Capability-checked Bukkit 1.20.1 API retained for older servers.
+ @SuppressWarnings("deprecation")
@Override
public ItemStack getChiseledBookshelfBook(BlockState blockState, PlayerInteractEvent event) {
try {
@@ -237,6 +239,8 @@ else if (Boolean.FALSE.equals(hasClickedPosition)) {
}
}
+ // Bukkit 1.20 compatibility boundary preserves legacy sign text without Paper components.
+ @SuppressWarnings("deprecation")
@Override
public String getLine(Sign sign, int line) {
if (line < 4) {
@@ -247,6 +251,8 @@ public String getLine(Sign sign, int line) {
}
}
+ // Bukkit 1.20 compatibility boundary restores legacy sign text without Paper components.
+ @SuppressWarnings("deprecation")
@Override
public void setLine(Sign sign, int line, String string) {
string = string == null ? "" : string;
diff --git a/src/main/java/net/tfminecraft/coreprotect/bukkit/Bukkit_v1_21.java b/src/main/java/net/tfminecraft/coreprotect/bukkit/Bukkit_v1_21.java
index e44fd39..e6486c0 100644
--- a/src/main/java/net/tfminecraft/coreprotect/bukkit/Bukkit_v1_21.java
+++ b/src/main/java/net/tfminecraft/coreprotect/bukkit/Bukkit_v1_21.java
@@ -198,7 +198,7 @@ public Object getRegistryKey(Object value) {
* The class of the registry
* @return The registry value
*/
- @SuppressWarnings({ "unchecked", "rawtypes" })
+ @SuppressWarnings({"deprecation", "rawtypes", "unchecked"})
@Override
public Object getRegistryValue(String key, Object tClass) {
NamespacedKey namespacedKey = NamespacedKey.fromString(key);
@@ -206,6 +206,8 @@ public Object getRegistryValue(String key, Object tClass) {
return Bukkit.getRegistry((Class) tClass).get(namespacedKey);
}
+ // Version-specific adapter: retain the API available on the older servers handled here.
+ @SuppressWarnings("deprecation")
@Override
public String getPaintingArtKey(Painting painting) {
try {
@@ -220,6 +222,8 @@ public String getPaintingArtKey(Painting painting) {
return normalizePaintingArtKey(super.getPaintingArtKey(painting));
}
+ // Version-specific adapter: retain the API available on the older servers handled here.
+ @SuppressWarnings("deprecation")
@Override
public Art getPaintingArt(String name) {
NamespacedKey key = NamespacedKey.fromString(normalizePaintingArtLookupKey(name));
diff --git a/src/main/java/net/tfminecraft/coreprotect/command/StatusCommand.java b/src/main/java/net/tfminecraft/coreprotect/command/StatusCommand.java
index 37a5183..b14e292 100755
--- a/src/main/java/net/tfminecraft/coreprotect/command/StatusCommand.java
+++ b/src/main/java/net/tfminecraft/coreprotect/command/StatusCommand.java
@@ -31,6 +31,8 @@ protected static void runCommand(CommandSender player, boolean permission, Strin
}
class BasicThread implements Runnable {
+ // Plugin description access also supports older Bukkit and third-party Plugin implementations.
+ @SuppressWarnings("deprecation")
@Override
public void run() {
try {
diff --git a/src/main/java/net/tfminecraft/coreprotect/command/WorldEditHandler.java b/src/main/java/net/tfminecraft/coreprotect/command/WorldEditHandler.java
index 83b28c3..669a0e1 100755
--- a/src/main/java/net/tfminecraft/coreprotect/command/WorldEditHandler.java
+++ b/src/main/java/net/tfminecraft/coreprotect/command/WorldEditHandler.java
@@ -25,9 +25,9 @@ protected static Integer[] runWorldEditCommand(CommandSender user) {
Region region = session.getSelection(world);
if (region != null && world.getName().equals(((Player) user).getWorld().getName())) {
BlockVector3 block = region.getMinimumPoint();
- int x = block.getBlockX();
- int y = block.getBlockY();
- int z = block.getBlockZ();
+ int x = block.x();
+ int y = block.y();
+ int z = block.z();
int width = region.getWidth();
int height = region.getHeight();
int length = region.getLength();
diff --git a/src/main/java/net/tfminecraft/coreprotect/config/Config.java b/src/main/java/net/tfminecraft/coreprotect/config/Config.java
index 53be081..86e5957 100644
--- a/src/main/java/net/tfminecraft/coreprotect/config/Config.java
+++ b/src/main/java/net/tfminecraft/coreprotect/config/Config.java
@@ -447,6 +447,8 @@ private static Map loadFiles(String fileName) throws IOException
}
// this should only be called on the main thread
+ // Preserve fatal ThreadDeath propagation while reporting ordinary configuration errors.
+ @SuppressWarnings({"deprecation", "removal"})
private static void parseConfig(final Map data) {
if (!Bukkit.isPrimaryThread()) {
// we call reloads asynchronously
diff --git a/src/main/java/net/tfminecraft/coreprotect/consumer/Queue.java b/src/main/java/net/tfminecraft/coreprotect/consumer/Queue.java
index e50bacd..06f2719 100755
--- a/src/main/java/net/tfminecraft/coreprotect/consumer/Queue.java
+++ b/src/main/java/net/tfminecraft/coreprotect/consumer/Queue.java
@@ -327,10 +327,14 @@ protected static void queueBlockPlaceValidate(final String user, final BlockStat
}, blockLocation.getLocation(), ticks);
}
+ // These auxiliary queues still hold distinct legacy payloads consumed by the matching processors.
+ @SuppressWarnings("deprecation")
protected static void queueContainerBreak(String user, Location location, Material type, ItemStack[] oldInventory) {
queueStandardData(new Object[] { null, Process.CONTAINER_BREAK, type, 0, null, 0, 0, null }, new String[] { user, null }, location, false, Consumer.consumerContainers, oldInventory, Consumer.reserveConsumer());
}
+ // These auxiliary queues still hold distinct legacy payloads consumed by the matching processors.
+ @SuppressWarnings("deprecation")
protected static synchronized void queueContainerTransaction(String user, Location location, Material type, Object inventory, int chestId) {
queueStandardData(new Object[] { null, Process.CONTAINER_TRANSACTION, type, 0, null, 0, chestId, null }, new String[] { user, null }, location, false, Consumer.consumerInventories, inventory, Consumer.reserveConsumer());
}
@@ -402,6 +406,8 @@ protected static void queueEntityInsert(int id, String name) {
queueStandardData(new Object[] { null, Process.ENTITY_INSERT, null, 0, null, 0, id, null }, new String[] { null, null }, name, false, Consumer.reserveConsumer());
}
+ // These auxiliary queues still hold distinct legacy payloads consumed by the matching processors.
+ @SuppressWarnings("deprecation")
protected static void queueEntityKill(String user, Location location, List