Use black panes for the particle menu bottom bar
Unused bottom bar columns are black glass panes, empty places above it are gray, including the free entry places of the slot editor.
This commit is contained in:
@@ -52,7 +52,7 @@ class BottomBar {
|
||||
for (int column = listMenu ? 1 : 0; column < (listMenu ? 8 : 9); column++) {
|
||||
int position = position(inventorySize, column);
|
||||
if (!inventory.hasItem(position)) {
|
||||
inventory.setItem(position, new SWItem(Material.GRAY_STAINED_GLASS_PANE, " ", clickType -> {
|
||||
inventory.setItem(position, new SWItem(Material.BLACK_STAINED_GLASS_PANE, " ", clickType -> {
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@ public class SlotEditor {
|
||||
}));
|
||||
inventory.setItem(COST, costItem(player, user, slot));
|
||||
BottomBar.fillUnused(inventory, SIZE, false);
|
||||
fill(inventory, 0, SIZE);
|
||||
inventory.open();
|
||||
return;
|
||||
}
|
||||
@@ -132,6 +133,7 @@ public class SlotEditor {
|
||||
ParticleMenu.open(player);
|
||||
}));
|
||||
BottomBar.fillUnused(inventory, SIZE, false);
|
||||
fill(inventory, 0, SIZE);
|
||||
inventory.open();
|
||||
}
|
||||
|
||||
@@ -148,11 +150,11 @@ public class SlotEditor {
|
||||
LobbyPlayer.getLobbyPlayer(player).setSlot(index, slot);
|
||||
}
|
||||
|
||||
// Puts filler panes on the empty positions in the given range
|
||||
// Puts gray filler panes on the empty positions in the given range; the bottom bar uses black ones
|
||||
void fill(SWInventory inventory, int from, int to) {
|
||||
for (int position = from; position < to; position++) {
|
||||
if (!inventory.hasItem(position)) {
|
||||
inventory.setItem(position, new SWItem(Material.BLACK_STAINED_GLASS_PANE, " ", clickType -> {
|
||||
inventory.setItem(position, new SWItem(Material.GRAY_STAINED_GLASS_PANE, " ", clickType -> {
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user