diff --git a/src/main/java/com/massivecraft/factions/Conf.java b/src/main/java/com/massivecraft/factions/Conf.java index ae457a7e..9f84fe17 100644 --- a/src/main/java/com/massivecraft/factions/Conf.java +++ b/src/main/java/com/massivecraft/factions/Conf.java @@ -423,6 +423,8 @@ public class Conf { public static HashMap defaultFactionPermissions = new HashMap<>(); public static HashSet lockedPermissions = new HashSet<>(); + public static boolean wildLoadChunkBeforeTeleport = true; + private static transient Conf i = new Conf(); static { diff --git a/src/main/java/com/massivecraft/factions/cmd/wild/CmdWild.java b/src/main/java/com/massivecraft/factions/cmd/wild/CmdWild.java index 5d982b87..c5d06140 100644 --- a/src/main/java/com/massivecraft/factions/cmd/wild/CmdWild.java +++ b/src/main/java/com/massivecraft/factions/cmd/wild/CmdWild.java @@ -1,10 +1,7 @@ package com.massivecraft.factions.cmd.wild; -import com.massivecraft.factions.Board; -import com.massivecraft.factions.FLocation; -import com.massivecraft.factions.FPlayers; -import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.*; import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; @@ -65,6 +62,7 @@ public class CmdWild extends FCommand implements WaitedTask { p.sendMessage(TL.GENERIC_NOTENOUGHMONEY.toString()); return; } + if (Conf.wildLoadChunkBeforeTeleport && !loc.getChunk().isLoaded()) loc.getChunk().load(); teleportPlayer(p, loc); break; } diff --git a/src/main/java/com/massivecraft/factions/cmd/wild/WildGUI.java b/src/main/java/com/massivecraft/factions/cmd/wild/WildGUI.java index 05cb405f..0bb1b842 100644 --- a/src/main/java/com/massivecraft/factions/cmd/wild/WildGUI.java +++ b/src/main/java/com/massivecraft/factions/cmd/wild/WildGUI.java @@ -37,7 +37,7 @@ public class WildGUI implements FactionGUI { if (map.containsKey(slot)) { String zone = map.get(slot); if (fplayer.hasMoney(FactionsPlugin.getInstance().getConfig().getInt("Wild.Zones." + zone + ".Cost"))) { - WaitExecutor.taskMap.put(player, new WaitTask(FactionsPlugin.getInstance().getConfig().getInt("Wild.Wait"), TL.COMMAND_WILD_INPROGRESS, player, CmdWild.instance)); + WaitExecutor.taskMap.put(player, new WaitTask(FactionsPlugin.getInstance().getConfig().getInt("Wild.Wait"), TL.COMMAND_WILD_WAIT, player, CmdWild.instance)); CmdWild.teleportRange.put(player, zone); fplayer.msg(TL.COMMAND_WILD_WAIT, FactionsPlugin.getInstance().getConfig().getInt("Wild.Wait") + " Seconds"); player.closeInventory();