mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-27 22:38:11 +01:00
[Bleeding] Return correct player SlotType. Fixes BUKKIT-3188
Previously, the SlotType for the last 4 slots in a player's inventory returned QUICKBAR when it should have returned SlotType.CONTAINER. This updates the code for determining slot type to return the proper value.
This commit is contained in:
parent
9c251595d4
commit
a4fe7cd3c4
1 changed files with 6 additions and 2 deletions
|
@ -127,8 +127,12 @@ public class CraftInventoryView extends InventoryView {
|
||||||
} else {
|
} else {
|
||||||
if (slot == -999) {
|
if (slot == -999) {
|
||||||
type = SlotType.OUTSIDE;
|
type = SlotType.OUTSIDE;
|
||||||
} else if (inventory.getType() == InventoryType.CRAFTING && slot < 9) {
|
} else if (inventory.getType() == InventoryType.CRAFTING) {
|
||||||
type = SlotType.ARMOR;
|
if (slot < 9) {
|
||||||
|
type = SlotType.ARMOR;
|
||||||
|
} else if (slot > 35) {
|
||||||
|
type = SlotType.QUICKBAR;
|
||||||
|
}
|
||||||
} else if (slot >= (inventory.countSlots() - 9)) {
|
} else if (slot >= (inventory.countSlots() - 9)) {
|
||||||
type = SlotType.QUICKBAR;
|
type = SlotType.QUICKBAR;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue