Fix issue not allowing use of multiworld wild

This commit is contained in:
DroppingAnvil 2020-05-23 13:35:51 -05:00 committed by droppinganvil
parent 0ea56fe5d2
commit 2a01682fbe

View File

@ -81,9 +81,9 @@ public class CmdWild extends FCommand implements WaitedTask {
public void teleportPlayer(Player p, FLocation loc) { public void teleportPlayer(Player p, FLocation loc) {
Location finalLoc; Location finalLoc;
if (FactionsPlugin.getInstance().getConfig().getBoolean("Wild.Arrival.SpawnAbove")) { if (FactionsPlugin.getInstance().getConfig().getBoolean("Wild.Arrival.SpawnAbove")) {
finalLoc = new Location(p.getWorld(), loc.getX(), p.getWorld().getHighestBlockYAt(Math.round(loc.getX()), Math.round(loc.getZ())) + FactionsPlugin.getInstance().getConfig().getInt("Wild.Arrival.SpawnAboveBlocks", 1), loc.getZ()); finalLoc = new Location(loc.getWorld(), loc.getX(), loc.getWorld().getHighestBlockYAt(Math.round(loc.getX()), Math.round(loc.getZ())) + FactionsPlugin.getInstance().getConfig().getInt("Wild.Arrival.SpawnAboveBlocks", 1), loc.getZ());
} else { } else {
finalLoc = new Location(p.getWorld(), loc.getX(), p.getWorld().getHighestBlockYAt(Math.round(loc.getX()), Math.round(loc.getZ())), loc.getZ()); finalLoc = new Location(loc.getWorld(), loc.getX(), loc.getWorld().getHighestBlockYAt(Math.round(loc.getX()), Math.round(loc.getZ())), loc.getZ());
} }
p.teleport(finalLoc, PlayerTeleportEvent.TeleportCause.PLUGIN); p.teleport(finalLoc, PlayerTeleportEvent.TeleportCause.PLUGIN);
setTeleporting(p); setTeleporting(p);