diff --git a/pom.xml b/pom.xml index 198b9db..0a58995 100644 --- a/pom.xml +++ b/pom.xml @@ -11,6 +11,7 @@ 21 UTF-8 + full 0.2.0 2.0.1 3.0.1 diff --git a/src/main/java/net/tfminecraft/games/display/WorldAnchors.java b/src/main/java/net/tfminecraft/games/display/WorldAnchors.java index 05b342a..17c34fb 100644 --- a/src/main/java/net/tfminecraft/games/display/WorldAnchors.java +++ b/src/main/java/net/tfminecraft/games/display/WorldAnchors.java @@ -44,6 +44,8 @@ public static Interaction spawnInteraction(Location location, float width, float }); } + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") public static TextDisplay spawnLabel(Location location, String text) { if (location == null || location.getWorld() == null) { return null; @@ -77,6 +79,8 @@ public static String tableId(Entity entity) { return entity.getPersistentDataContainer().get(Keys.tableId(), PersistentDataType.STRING); } + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") public static void setText(UUID entityId, String text) { if (entityId == null) { return; diff --git a/src/main/java/net/tfminecraft/games/gui/GameSelectGui.java b/src/main/java/net/tfminecraft/games/gui/GameSelectGui.java index 672077e..5165e86 100644 --- a/src/main/java/net/tfminecraft/games/gui/GameSelectGui.java +++ b/src/main/java/net/tfminecraft/games/gui/GameSelectGui.java @@ -31,6 +31,8 @@ private GameSelectGui() {} public static final GameSelectGui INSTANCE = new GameSelectGui(); + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") public static void open(Player player, boolean requireDeck, Location pending) { GameSelectHolder holder = new GameSelectHolder(requireDeck, pending); Inventory inventory = Bukkit.createInventory(holder, SIZE, Messages.get("place.gui_title")); @@ -42,6 +44,8 @@ public static void open(Player player, boolean requireDeck, Location pending) { player.openInventory(inventory); } + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") private static ItemStack gameIcon(String gameId, String nameKey) { ItemStack item = TLibs.getItemAPI().getCreator().getItemFromPath(Cache.iconOf(gameId)); if (item == null) { diff --git a/src/main/java/net/tfminecraft/games/gui/TableOptionsGui.java b/src/main/java/net/tfminecraft/games/gui/TableOptionsGui.java index 142cb19..a235711 100644 --- a/src/main/java/net/tfminecraft/games/gui/TableOptionsGui.java +++ b/src/main/java/net/tfminecraft/games/gui/TableOptionsGui.java @@ -69,6 +69,8 @@ public static void openEdit(Player player, Table table) { open(player, false, null, table.getId(), table.getGameId(), TableHouse.from(table)); } + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") private static void open(Player player, boolean requireDeck, Location pending, UUID editId, String gameId, TableHouse house) { if (player == null || house == null) { @@ -132,6 +134,8 @@ private static String boxesLabel(int n) { return n < 1 ? Messages.get("place.options_boxes_open") : String.valueOf(n); } + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") private static ItemStack toggle(Material material, String action, boolean on, String name, String lore) { ItemStack item = named(material, action, name); ItemMeta meta = item.getItemMeta(); @@ -142,6 +146,8 @@ private static ItemStack toggle(Material material, String action, boolean on, St return item; } + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") private static ItemStack valueItem(Material material, String action, String name) { ItemStack item = named(material, action, name); ItemMeta meta = item.getItemMeta(); @@ -152,6 +158,8 @@ private static ItemStack valueItem(Material material, String action, String name return item; } + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") private static ItemStack named(Material material, String action, String name) { ItemStack item = new ItemStack(material); ItemMeta meta = item.getItemMeta(); @@ -253,6 +261,8 @@ private static void startChat(Player player, TableOptionsHolder holder, ChatFiel }, CHAT_TICKS); } + // Retain Bukkit chat-event ordering and String message semantics for existing integrations. + @SuppressWarnings("deprecation") @EventHandler(priority = EventPriority.LOWEST) public void onChat(AsyncPlayerChatEvent event) { ChatPrompt prompt = prompts.get(event.getPlayer().getUniqueId()); diff --git a/src/main/java/net/tfminecraft/games/help/HelpBook.java b/src/main/java/net/tfminecraft/games/help/HelpBook.java index 2a12a97..f038e51 100644 --- a/src/main/java/net/tfminecraft/games/help/HelpBook.java +++ b/src/main/java/net/tfminecraft/games/help/HelpBook.java @@ -28,6 +28,8 @@ public boolean isEmpty() { /** * Show the book without giving one away. The player is left holding whatever they had. */ + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") public void openFor(Player player) { if (player == null || isEmpty()) { return; diff --git a/src/main/java/net/tfminecraft/games/loader/ConfigLoader.java b/src/main/java/net/tfminecraft/games/loader/ConfigLoader.java index da12477..1eab588 100644 --- a/src/main/java/net/tfminecraft/games/loader/ConfigLoader.java +++ b/src/main/java/net/tfminecraft/games/loader/ConfigLoader.java @@ -198,7 +198,7 @@ private static WagerItemOverride readOverride(ConfigurationSection section, Stri } // Existing configuration accepts legacy enum names and aliases; registry keys are not equivalent. - @SuppressWarnings("deprecation") + @SuppressWarnings({"deprecation", "removal"}) public static Sound parseSound(String raw, String path, Sound unknownFallback) { if (raw == null || raw.isBlank()) { return null; diff --git a/src/main/java/net/tfminecraft/games/table/TableManager.java b/src/main/java/net/tfminecraft/games/table/TableManager.java index a8fd090..b9482c4 100644 --- a/src/main/java/net/tfminecraft/games/table/TableManager.java +++ b/src/main/java/net/tfminecraft/games/table/TableManager.java @@ -651,6 +651,8 @@ public void onInteractAtEntity(PlayerInteractAtEntityEvent event) { tryDraw(player, table); } + // Retain Bukkit chat-event ordering and String message semantics for existing integrations. + @SuppressWarnings("deprecation") @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onPlayChat(AsyncPlayerChatEvent event) { String action = playWord(event.getMessage()); @@ -4957,6 +4959,8 @@ private static void readStakeData(Table table, StakeData data) { data.streetId, data.anchorX, data.anchorZ, data.x, data.z); } + // Preserve the existing serialized item format so previously saved graves remain readable. + @SuppressWarnings("deprecation") private static String encodeItem(ItemStack item) { if (item == null) { return null; @@ -4972,6 +4976,8 @@ private static String encodeItem(ItemStack item) { } } + // Preserve the existing serialized item format so previously saved graves remain readable. + @SuppressWarnings("deprecation") private static ItemStack decodeItem(String raw) { if (raw == null || raw.isBlank()) { return null; diff --git a/src/main/java/net/tfminecraft/games/wager/WagerChat.java b/src/main/java/net/tfminecraft/games/wager/WagerChat.java index 01e8a7f..167ec60 100644 --- a/src/main/java/net/tfminecraft/games/wager/WagerChat.java +++ b/src/main/java/net/tfminecraft/games/wager/WagerChat.java @@ -41,6 +41,8 @@ public static void sendProposed(Player viewer, String playerName, ItemStack item Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "tellraw " + viewer.getName() + " " + root); } + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") public static String itemTitle(ItemStack item) { if (item == null) { return "item"; @@ -56,6 +58,8 @@ public static String itemTitle(ItemStack item) { return Character.toUpperCase(raw.charAt(0)) + raw.substring(1); } + // Keep the existing legacy text representation, formatting, and exact-string comparisons. + @SuppressWarnings("deprecation") private static String hoverBody(ItemStack item, String title) { StringBuilder body = new StringBuilder(title); ItemMeta meta = item != null ? item.getItemMeta() : null;