Fix to nbt placeholder and new nbt return value of "" instead of null

This commit is contained in:
TinyTank800 2024-02-03 13:15:51 -08:00
parent d842ddff30
commit 7525db4bf2

View File

@ -147,7 +147,7 @@ public class Placeholders {
String slot_key = identifier.replace("nbt-", ""); String slot_key = identifier.replace("nbt-", "");
String value; String value;
value = plugin.nbt.getNBT(p.getOpenInventory().getTopInventory().getItem((int)Double.parseDouble(slot_key.split(":")[0])),slot_key.split(":")[1]); value = plugin.nbt.getNBT(p.getOpenInventory().getTopInventory().getItem((int)Double.parseDouble(slot_key.split(":")[0])),slot_key.split(":")[1]);
if(value == null){ if(value.isEmpty()){
value = "empty"; value = "empty";
} }
return value; return value;