Fix issue not allowing use of multiworld wild
This commit is contained in:
parent
0ea56fe5d2
commit
2a01682fbe
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user