mirror of
https://github.com/BentoBoxWorld/Boxed.git
synced 2025-02-07 23:51:29 +01:00
Fixes issue where players lost a box size increment.
All boxes start with a minimum size of 1. This was not being included in the box size calculation, so players were erroneously losing one box size when they logged in or teleported.
This commit is contained in:
parent
eb361a8579
commit
92d3a57362
@ -150,7 +150,8 @@ public class AdvancementsManager {
|
||||
* @return value of island size change. Negative values means the island range shrank.
|
||||
*/
|
||||
public int checkIslandSize(Island island) {
|
||||
int shouldSize = getIsland(island).getAdvancements().stream().mapToInt(this::getScore).sum();
|
||||
// Island is always a minimum of 1 for free.
|
||||
int shouldSize = getIsland(island).getAdvancements().stream().mapToInt(this::getScore).sum() + 1;
|
||||
if (shouldSize < 1) {
|
||||
// Boxes can never be less than 1 in protection size
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user