Added the ability to set a skyblock worlds difficulty.

This commit is contained in:
Brianna 2020-06-07 09:30:47 -05:00
parent df87a4aa7f
commit f28ce8be5f
2 changed files with 13 additions and 0 deletions

View File

@ -63,6 +63,15 @@ public class WorldManager {
Bukkit.getServer().getScheduler().runTask(skyblock, () -> registerMultiverse(endWorldName, endWorldEnvironment));
}
if (normalWorld != null)
normalWorld.setDifficulty(Difficulty.valueOf(configLoad.getString("Island.World.Normal.Difficulty")));
if (netherWorld != null)
netherWorld.setDifficulty(Difficulty.valueOf(configLoad.getString("Island.World.Nether.Difficulty")));
if (endWorld != null)
endWorld.setDifficulty(Difficulty.valueOf(configLoad.getString("Island.World.End.Difficulty")));
}
public void registerMultiverse(String worldName, World.Environment environment) {

View File

@ -41,10 +41,12 @@ Island:
# If lava disabled, the world will be a water world.
# -1 to disable Nether and End unlock prices.
# Valid Environments: NORMAL, NETHER, THE_END
# Valid Difficulties: PEACEFUL, EASY, NORMAL, HARD
Normal:
Name: "island_normal_world"
IslandSpawnHeight: 72
Environment: NORMAL
Difficulty: NORMAL
Liquid:
Enable: false
Lava: false
@ -55,6 +57,7 @@ Island:
Environment: NETHER
UnlockPrice: 10000
Enable: true
Difficulty: NORMAL
Liquid:
Enable: false
Lava: true
@ -65,6 +68,7 @@ Island:
Environment: THE_END
UnlockPrice: 50000
Enable: true
Difficulty: NORMAL
Liquid:
Enable: false
Lava: false