diff --git a/FabledSkyBlock/Core/src/main/java/me/goodandevil/skyblock/island/IslandManager.java b/FabledSkyBlock/Core/src/main/java/me/goodandevil/skyblock/island/IslandManager.java index 61cf28cb..a4d29f7f 100644 --- a/FabledSkyBlock/Core/src/main/java/me/goodandevil/skyblock/island/IslandManager.java +++ b/FabledSkyBlock/Core/src/main/java/me/goodandevil/skyblock/island/IslandManager.java @@ -219,19 +219,16 @@ public class IslandManager { skyblock.getPlayerDataManager().getPlayerData(player).setIsland(player.getUniqueId()); - config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml")); - configLoad = config.getFileConfiguration(); - if (scoreboardManager != null) { Scoreboard scoreboard = scoreboardManager.getScoreboard(player); scoreboard.cancel(); scoreboard.setDisplayName(ChatColor.translateAlternateColorCodes('&', - configLoad.getString("Scoreboard.Island.Solo.Displayname"))); + fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml")).getFileConfiguration().getString("Scoreboard.Island.Solo.Displayname"))); scoreboard.setDisplayList(configLoad.getStringList("Scoreboard.Island.Solo.Empty.Displaylines")); scoreboard.run(); } - Bukkit.getServer().getScheduler().runTask(skyblock, () -> { + Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(skyblock, () -> { if (structure.getCommands() != null) { for (String commandList : structure.getCommands()) { Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), @@ -241,7 +238,7 @@ public class IslandManager { player.teleport(island.getLocation(IslandWorld.Normal, IslandEnvironment.Main)); player.setFallDistance(0.0F); - }); + }, configLoad.getInt("Island.Creation.TeleportTimeout") * 20); String biomeName = fileManager .getConfig(new File(skyblock.getDataFolder(), "config.yml")).getFileConfiguration() diff --git a/FabledSkyBlock/Core/src/main/resources/config.yml b/FabledSkyBlock/Core/src/main/resources/config.yml index 5a0581ab..abce839a 100644 --- a/FabledSkyBlock/Core/src/main/resources/config.yml +++ b/FabledSkyBlock/Core/src/main/resources/config.yml @@ -34,6 +34,8 @@ Island: Enable: true # Time until player can create another island. Time: 60 + # [!] How many seconds to wait before teleporting to a newly created island + TeleportTimeout: 1 World: # Delete the Island world when changing the liquid option. # If lava disabled, the world will be a water world.