mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-02 21:22:05 -07:00
Show incorrect size passed into createInventory
This commit is contained in:
@@ -1506,13 +1506,13 @@ public final class CraftServer implements Server {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Inventory createInventory(InventoryHolder owner, int size) throws IllegalArgumentException {
|
public Inventory createInventory(InventoryHolder owner, int size) throws IllegalArgumentException {
|
||||||
Validate.isTrue(9 <= size && size <= 54 && size % 9 == 0, "Size for custom inventory must be a multiple of 9 between 9 and 54 slots");
|
Validate.isTrue(9 <= size && size <= 54 && size % 9 == 0, "Size for custom inventory must be a multiple of 9 between 9 and 54 slots (got " + size + ")");
|
||||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
|
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Inventory createInventory(InventoryHolder owner, int size, String title) throws IllegalArgumentException {
|
public Inventory createInventory(InventoryHolder owner, int size, String title) throws IllegalArgumentException {
|
||||||
Validate.isTrue(9 <= size && size <= 54 && size % 9 == 0, "Size for custom inventory must be a multiple of 9 between 9 and 54 slots");
|
Validate.isTrue(9 <= size && size <= 54 && size % 9 == 0, "Size for custom inventory must be a multiple of 9 between 9 and 54 slots (got " + size + ")");
|
||||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, size, title);
|
return CraftInventoryCreator.INSTANCE.createInventory(owner, size, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user