Option to load chunk before /f wild teleport.

This commit is contained in:
DroppingAnvil 2020-04-11 14:51:57 -05:00 committed by droppinganvil
parent 861f88a916
commit f8421c09cf
2 changed files with 4 additions and 4 deletions

View File

@ -423,6 +423,8 @@ public class Conf {
public static HashMap<String, DefaultPermissions> defaultFactionPermissions = new HashMap<>();
public static HashSet<PermissableAction> lockedPermissions = new HashSet<>();
public static boolean wildLoadChunkBeforeTeleport = true;
private static transient Conf i = new Conf();
static {

View File

@ -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;
}