diff --git a/src/main/java/org/bukkit/craftbukkit/v1_19_R3/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/v1_19_R3/inventory/CraftInventory.java index 3968ed347..94951cea4 100644 --- a/src/main/java/org/bukkit/craftbukkit/v1_19_R3/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/v1_19_R3/inventory/CraftInventory.java @@ -3,7 +3,6 @@ import java.util.HashMap; import java.util.List; import java.util.ListIterator; -import java.util.Optional; import com.mohistmc.banner.bukkit.BannerLecternInventory; import net.minecraft.world.Container; @@ -11,7 +10,6 @@ import net.minecraft.world.inventory.MerchantContainer; import net.minecraft.world.inventory.PlayerEnderChestContainer; import net.minecraft.world.level.block.ComposterBlock; -import net.minecraft.world.level.block.JukeboxBlock; import net.minecraft.world.level.block.entity.*; import org.apache.commons.lang3.Validate; import org.bukkit.Location; @@ -500,7 +498,7 @@ public InventoryType getType() { return InventoryType.STONECUTTER; } else if (inventory instanceof ComposterBlock.EmptyContainer || inventory instanceof ComposterBlock.InputContainer || inventory instanceof ComposterBlock.OutputContainer) { return InventoryType.COMPOSTER; - } else if (inventory instanceof JukeboxBlock) { + } else if (inventory instanceof JukeboxBlockEntity) { return InventoryType.JUKEBOX; } else if (this instanceof CraftInventorySmithingNew) { return InventoryType.SMITHING_NEW; diff --git a/src/main/java/org/bukkit/craftbukkit/v1_19_R3/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/v1_19_R3/inventory/CraftItemFactory.java index ebaa21b3d..f3cd09d68 100644 --- a/src/main/java/org/bukkit/craftbukkit/v1_19_R3/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/v1_19_R3/inventory/CraftItemFactory.java @@ -101,10 +101,11 @@ private ItemMeta getItemMeta(Material material, CraftMetaItem meta) { case TURTLE_HELMET: return meta != null && meta.getClass().equals(CraftMetaArmor.class) ? meta : new CraftMetaArmor(meta); case LEATHER_HELMET: - case LEATHER_HORSE_ARMOR: case LEATHER_CHESTPLATE: case LEATHER_LEGGINGS: case LEATHER_BOOTS: + return meta instanceof CraftMetaColorableArmor ? meta : new CraftMetaColorableArmor(meta); + case LEATHER_HORSE_ARMOR: return meta instanceof CraftMetaLeatherArmor ? meta : new CraftMetaLeatherArmor(meta); case POTION: case SPLASH_POTION: