SPIGOT-3272: Fix duplicate creative inventory

This change properly identifies the creative inventory as one with 5 crafting slots (as that's the default set in ContainerPlayer, and handled properly in other containers), instead of having the same inventory twice (which breaks slot identification).

By: Pokechu22 <Pokechu022@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2017-05-26 20:20:59 -07:00
parent 07fc30bf6d
commit a6491eb83e
2 changed files with 16 additions and 17 deletions

View File

@@ -127,7 +127,7 @@ public class CraftInventoryView extends InventoryView {
} else {
if (slot == -999 || slot == -1) {
type = SlotType.OUTSIDE;
} else if (inventory.getType() == InventoryType.CRAFTING) {
} else if (inventory.getType() == InventoryType.CRAFTING) { // Also includes creative inventory
if (slot < 9) {
type = SlotType.ARMOR;
} else if (slot > 35) {