mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-01-31 14:49:35 +01:00
fix: grow music inventory dynamically (#4583)
This commit is contained in:
parent
11b806bd4d
commit
974c639a51
@ -60,6 +60,9 @@ public class Music extends SubCommand {
|
|||||||
"music_disc_creator_music_box", "music_disc_precipice"
|
"music_disc_creator_music_box", "music_disc_precipice"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// make sure all discs and the bedrock ("cancel") fit into the inventory
|
||||||
|
private static final int INVENTORY_ROWS = (int) Math.ceil((DISCS.size() + 1) / 9.0);
|
||||||
|
|
||||||
private final InventoryUtil inventoryUtil;
|
private final InventoryUtil inventoryUtil;
|
||||||
private final EventDispatcher eventDispatcher;
|
private final EventDispatcher eventDispatcher;
|
||||||
|
|
||||||
@ -94,7 +97,7 @@ public class Music extends SubCommand {
|
|||||||
PlotInventory inv = new PlotInventory(
|
PlotInventory inv = new PlotInventory(
|
||||||
this.inventoryUtil,
|
this.inventoryUtil,
|
||||||
player,
|
player,
|
||||||
2,
|
INVENTORY_ROWS,
|
||||||
TranslatableCaption.of("plotjukebox.jukebox_header").getComponent(player)
|
TranslatableCaption.of("plotjukebox.jukebox_header").getComponent(player)
|
||||||
) {
|
) {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user