Added configurable island spawn height

This commit is contained in:
Esophose 2019-05-11 01:41:18 -06:00
parent 6f00e98292
commit 96b6e89bd1
2 changed files with 10 additions and 3 deletions

View File

@ -128,7 +128,12 @@ public class IslandManager {
islandPositionList.setZ(z);
}
return new org.bukkit.Location(skyblock.getWorldManager().getWorld(world), x, 72, z);
Config config = skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "config.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
int islandHeight = configLoad.getInt("Island.World." + world.getEnvironment() + ".IslandSpawnHeight", 72);
return new org.bukkit.Location(skyblock.getWorldManager().getWorld(world), x, islandHeight, z);
}
}

View File

@ -35,18 +35,19 @@ Island:
# Time until player can create another island.
Time: 60
World:
# [!] The Island height is 72 blocks.
# Delete the Island world when changing the liquid option.
# Delete the Island world when changing the liquid option.
# If lava disabled, the world will be a water world.
# -1 to disable Nether and End unlock prices.
Normal:
Name: "island_normal_world"
IslandSpawnHeight: 72
Liquid:
Enable: false
Lava: false
Height: 60
Nether:
Name: "island_nether_world"
IslandSpawnHeight: 72
UnlockPrice: 10000
Enable: true
Liquid:
@ -55,6 +56,7 @@ Island:
Height: 60
End:
Name: "island_end_world"
IslandSpawnHeight: 72
UnlockPrice: 50000
Enable: true
Liquid: