From afa4cee4d2b66fbf10bac36b87e12c1617d93120 Mon Sep 17 00:00:00 2001 From: Ryan Barlow <7389646+ryanbarlow97@users.noreply.github.com> Date: Tue, 22 Sep 2026 23:56:38 +0000 Subject: [PATCH] fix: resolve Paper API build warnings --- pom.xml | 1 + .../net/tfminecraft/goldsmithing/InventoryManager.java | 2 ++ .../net/tfminecraft/goldsmithing/SmithingEvents.java | 10 ++++++++++ 3 files changed, 13 insertions(+) diff --git a/pom.xml b/pom.xml index 3d17c7c..4c1dd5b 100644 --- a/pom.xml +++ b/pom.xml @@ -11,6 +11,7 @@ 21 UTF-8 + full diff --git a/src/main/java/net/tfminecraft/goldsmithing/InventoryManager.java b/src/main/java/net/tfminecraft/goldsmithing/InventoryManager.java index 74458c1..e5adb42 100644 --- a/src/main/java/net/tfminecraft/goldsmithing/InventoryManager.java +++ b/src/main/java/net/tfminecraft/goldsmithing/InventoryManager.java @@ -15,6 +15,8 @@ public class InventoryManager { + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") public void MenuInventory(Player player) { Inventory i = Goldsmithing.plugin.getServer().createInventory(null, 27, ChatColor.GOLD + "Goldsmithing Menu"); Integer slot = 0; diff --git a/src/main/java/net/tfminecraft/goldsmithing/SmithingEvents.java b/src/main/java/net/tfminecraft/goldsmithing/SmithingEvents.java index c87735c..b3f57a4 100644 --- a/src/main/java/net/tfminecraft/goldsmithing/SmithingEvents.java +++ b/src/main/java/net/tfminecraft/goldsmithing/SmithingEvents.java @@ -42,6 +42,8 @@ public class SmithingEvents implements Listener{ public HashMap currentStation = new HashMap<>(); InventoryManager invManager = new InventoryManager(); + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") @EventHandler public void openMenuEvent(PlayerInteractEvent e) { if(!e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return; @@ -69,6 +71,8 @@ public void openMenuEvent(PlayerInteractEvent e) { invManager.MenuInventory(e.getPlayer()); } } + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") @EventHandler public void smithHitEvent(PlayerInteractEvent e) { if(e.getAction().equals(Action.LEFT_CLICK_BLOCK) && e.getPlayer().isSneaking() == true) { @@ -189,6 +193,8 @@ public void smithHitEvent(PlayerInteractEvent e) { } } } + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") @EventHandler public void addItemEvent(PlayerInteractEvent e) { if(!e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return; @@ -248,6 +254,8 @@ public void addItemEvent(PlayerInteractEvent e) { } } + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") @EventHandler public void invenClick(InventoryClickEvent e) { if(e.getClickedInventory() == null) return; @@ -306,6 +314,8 @@ public Integer calculateNeededJewels(JewelryType t) { } return i; } + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") public void createJewelryItem(Player p, JewelryType t, Integer lvl) { for(Jewelry j : t.getTiers()) { if(j.getLvl().equals(lvl)) {