Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<properties>
<maven.compiler.release>21</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.proc>full</maven.compiler.proc>
<cooking.version>0.2.1</cooking.version>
<denareconomy.version>0.2.0</denareconomy.version>
<tlibs.version>2.0.0</tlibs.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import net.tfminecraft.marketblock.trade.Category;

public class CategoryView {
// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
public void categoryView(Inventory inv, Player p) {
boolean open = false;
if(inv == null) {
Expand All @@ -47,6 +49,8 @@ public void categoryView(Inventory inv, Player p) {
if(open) p.openInventory(inv);
}

// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
public ItemStack createCategoryItem(Category cat) {
ItemStack i = cat.getItem();
ItemMeta m = i.getItemMeta();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import net.tfminecraft.marketblock.util.PriceCalculator;

public class TradeView {
// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
public void tradeView(Inventory inv, Player p, Category cat) {
boolean open = false;
if(inv == null) {
Expand Down Expand Up @@ -52,6 +54,8 @@ public void tradeView(Inventory inv, Player p, Category cat) {
if(open) p.openInventory(inv);
}

// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
private ItemStack createTradeItem(Trade trade, Category cat) {
ItemStack i = trade.getIconItem();
if (i == null || i.getItemMeta() == null) {
Expand Down Expand Up @@ -80,6 +84,8 @@ private ItemStack createTradeItem(Trade trade, Category cat) {
return i;
}

// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
private ItemStack getBackButton() {
ItemStack i = new ItemStack(Material.BARRIER, 1);
ItemMeta m = i.getItemMeta();
Expand All @@ -88,6 +94,8 @@ private ItemStack getBackButton() {
return i;
}

// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
private String getPlainName(ItemStack item) {
ItemMeta m = item.getItemMeta();
if (m.hasDisplayName()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

public class ChatListener implements Listener {

// Retain Bukkit chat-event ordering and String message semantics for existing integrations.
@SuppressWarnings("deprecation")
@EventHandler
public void onPlayerChat(AsyncPlayerChatEvent event) {
Player player = event.getPlayer();
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/net/tfminecraft/marketblock/trade/Category.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public String getColorHex() {
return colorHex;
}

// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
public String getTradesTitle() {
return StringFormatter.formatHex(colorHex + ChatColor.stripColor(name) + " Trades");
}
Expand Down