Skip to content
This repository was archived by the owner on Sep 23, 2026. It is now read-only.
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>
</properties>

<dependencies>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/net/tfminecraft/advancedresearch/Database.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ public String getRawData(String key, HashMap<String, Object> defaults) {
: (defaults.containsKey(key) ? defaults.get(key).toString() : key);
}

// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
public String getString(String key, HashMap<String, Object> defaults) {
return ChatColor.translateAlternateColorCodes('&', getRawData(key, defaults));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

public class InventoryManager {
public List<Integer> elementSlots = Arrays.asList(10, 19, 28, 37);
// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
public void MenuInventory(Player player, RStation rs) {
Inventory i = ResearchMain.plugin.getServer().createInventory(null, 54, ChatColor.GRAY + "Research Station");
Integer counter = 0;
Expand Down Expand Up @@ -117,6 +119,8 @@ public void MenuInventory(Player player, RStation rs) {
return;
}
}
// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
public void confirmInventory(Player player, RStation rs) {
Inventory i = ResearchMain.plugin.getServer().createInventory(null, 9, ChatColor.GRAY + "Confirm Scrap");
ItemStack yesItem = new ItemStack(Material.GREEN_CONCRETE, 1);
Expand All @@ -142,6 +146,8 @@ public void confirmInventory(Player player, RStation rs) {
}
player.openInventory(i);
}
// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
public void UpdateInventory(Inventory i, Player p, RStation rs) {
Integer counter = 0;
Collections.sort(rs.getNeededElements());
Expand Down Expand Up @@ -182,6 +188,8 @@ public void UpdateInventory(Inventory i, Player p, RStation rs) {
p.updateInventory();
}

// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
public ItemStack getItemsAdderFiller(String path) {
CustomStack stack = CustomStack.getInstance(path);
if(stack != null) {
Expand All @@ -207,6 +215,8 @@ public ItemStack getMMOItem(String path) {
return item;
}

// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
public ItemStack getResearchNote(ResearchNote n) {
ItemStack i = new ItemStack(Material.PAPER, 1);
ItemMeta m = i.getItemMeta();
Expand All @@ -223,6 +233,8 @@ public ItemStack getResearchNote(ResearchNote n) {
i.setItemMeta(m);
return i;
}
// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
public void completeResearch(Inventory i, Player p, RStation rs, Boolean open) {
Integer counter = 0;
Collections.sort(rs.getNeededElements());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public void focusPotionEvent(PlayerInteractEvent e) {
rp.setMentalPoints(amount);
}
}
// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
@EventHandler
public void startResearchEvent(PlayerInteractEvent e) {
if(!e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return;
Expand Down Expand Up @@ -102,6 +104,8 @@ public void startResearchEvent(PlayerInteractEvent e) {
}
}
}
// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
@EventHandler
public void scrapEvent(InventoryClickEvent e) {
if(!(e.getWhoClicked() instanceof Player)) return;
Expand Down Expand Up @@ -129,6 +133,8 @@ public void scrapEvent(InventoryClickEvent e) {
inv.MenuInventory(p, rs);
}
}
// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
@EventHandler
public void onResearchEvent(InventoryClickEvent e) {
if(!(e.getWhoClicked() instanceof Player)) return;
Expand Down Expand Up @@ -180,6 +186,8 @@ public void onResearchEvent(InventoryClickEvent e) {
doResearch(i, rp, rs, rs.getBottomNote());
}
}
// Keep the existing legacy text representation, formatting, and exact-string comparisons.
@SuppressWarnings("deprecation")
private void giveResult(Player p, RStation rs) {
if(p.getInventory().firstEmpty() == -1) {
p.sendMessage(ChatColor.RED + "You need at least 1 empty slot in you inventory!");
Expand Down