mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-02-17 04:02:04 +01:00
Only even numbers in island size
This commit is contained in:
parent
7cff7893b8
commit
122aea1bba
@ -65,6 +65,10 @@ public class Island {
|
||||
if (this.size > 1000) {
|
||||
this.size = 50;
|
||||
}
|
||||
|
||||
if(this.size % 2 != 0) {
|
||||
this.size += 1;
|
||||
}
|
||||
|
||||
if (player.isOnline()) {
|
||||
int customSize = PlayerUtils.getNumberFromPermission(player.getPlayer(), "fabledskyblock.size", 0);
|
||||
@ -77,8 +81,17 @@ public class Island {
|
||||
|
||||
if (minimumSize < 0 || minimumSize > 1000)
|
||||
minimumSize = 50;
|
||||
|
||||
if(minimumSize % 2 != 0) {
|
||||
minimumSize += 1;
|
||||
}
|
||||
|
||||
if (maximumSize < 0 || maximumSize > 1000)
|
||||
maximumSize = 100;
|
||||
|
||||
if(maximumSize % 2 != 0) {
|
||||
maximumSize += 1;
|
||||
}
|
||||
|
||||
size = Math.max(minimumSize, Math.min(customSize, maximumSize));
|
||||
}
|
||||
|
@ -15,9 +15,10 @@ Island:
|
||||
# You should increase this only if you have an SSD
|
||||
ChunkPerTick: 15
|
||||
Size:
|
||||
# [!] Do not go over 1000 for both of these options.
|
||||
# The size of an Island when created.
|
||||
# [!] Do not go over the maximum.
|
||||
# Warning: The maximum is capped at 1000
|
||||
# Warning: Only even numbers are accepted
|
||||
# Warning: Do not go over the maximum
|
||||
# The size of an Island when created
|
||||
Minimum: 100
|
||||
# The maximum size of an Island based on the permission node 'fabledskyblock.size.<size>'.
|
||||
Maximum: 200
|
||||
|
Loading…
Reference in New Issue
Block a user