mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-24 19:55:17 +01:00
Fixed bug where panel size was incorrectly set.
Slot position is not the same as size. Size is slot + 1.
This commit is contained in:
parent
d0ddf3d9bc
commit
0da7c0bb3c
@ -94,6 +94,7 @@ public class PanelBuilder {
|
|||||||
* @return Panel
|
* @return Panel
|
||||||
*/
|
*/
|
||||||
public Panel build() {
|
public Panel build() {
|
||||||
return new Panel(name, items, Math.max(size, items.isEmpty() ? size : items.lastKey()), user, listener);
|
// items.lastKey() is a slot position, so the panel size is this value + 1
|
||||||
|
return new Panel(name, items, Math.max(size, items.isEmpty() ? size : items.lastKey() + 1), user, listener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user