Commit ec24887
authored
fix: ensure that the npc inventory size does not exceed 54 (#1306)
### Motivation
The npc inventory has a dynamic size feature that scales the inventory
based on the amount of services to display but that feature misses a
upper bound of 54 (which is needed as minecraft inventories cant be
bigger)
### Modification
Extracted the inventory size calculation into a separate method and set
a upper bound of 54.
### Result
The inventory is created with a maximum of 54 slots.1 parent fe1e270 commit ec24887
File tree
1 file changed
+17
-8
lines changed- modules/npcs/src/main/java/eu/cloudnetservice/modules/npc/platform/bukkit/entity
1 file changed
+17
-8
lines changedLines changed: 17 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
432 | 436 | | |
433 | 437 | | |
434 | 438 | | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
| 439 | + | |
443 | 440 | | |
444 | 441 | | |
445 | 442 | | |
| |||
470 | 467 | | |
471 | 468 | | |
472 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
473 | 482 | | |
474 | 483 | | |
475 | 484 | | |
| |||
0 commit comments