mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-12-29 04:07:35 +01:00
Fix console error on invalid icon
This commit is contained in:
parent
95d2a26f4f
commit
49d6930389
@ -166,9 +166,9 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
|
||||
@Override
|
||||
public void setItemStackNMS(org.bukkit.inventory.ItemStack stack) {
|
||||
ItemStack newItem = CraftItemStack.asNMSCopy(stack);
|
||||
ItemStack newItem = CraftItemStack.asNMSCopy(stack); // ItemStack.a is returned if the stack is null, invalid or the material is not an Item
|
||||
|
||||
if (newItem == null) {
|
||||
if (newItem == null || newItem == ItemStack.a) {
|
||||
newItem = new ItemStack(Blocks.BEDROCK);
|
||||
}
|
||||
|
||||
|
@ -166,9 +166,9 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
|
||||
@Override
|
||||
public void setItemStackNMS(org.bukkit.inventory.ItemStack stack) {
|
||||
ItemStack newItem = CraftItemStack.asNMSCopy(stack);
|
||||
ItemStack newItem = CraftItemStack.asNMSCopy(stack); // ItemStack.a is returned if the stack is null, invalid or the material is not an Item
|
||||
|
||||
if (newItem == null) {
|
||||
if (newItem == null || newItem == ItemStack.a) {
|
||||
newItem = new ItemStack(Blocks.BEDROCK);
|
||||
}
|
||||
|
||||
|
@ -166,9 +166,9 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
|
||||
@Override
|
||||
public void setItemStackNMS(org.bukkit.inventory.ItemStack stack) {
|
||||
ItemStack newItem = CraftItemStack.asNMSCopy(stack);
|
||||
ItemStack newItem = CraftItemStack.asNMSCopy(stack); // ItemStack.a is returned if the stack is null, invalid or the material is not an Item
|
||||
|
||||
if (newItem == null) {
|
||||
if (newItem == null || newItem == ItemStack.a) {
|
||||
newItem = new ItemStack(Blocks.BEDROCK);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user