mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-12-24 01:27:51 +01:00
Should finally completely fix problem where player location world changes in the middle of the /f home smoke effect, triggering an error from trying to calculate distance between worlds
also updated Spout API lib
This commit is contained in:
parent
1ffa3b952c
commit
67fce0b6ca
BIN
lib/SpoutAPI.jar
BIN
lib/SpoutAPI.jar
Binary file not shown.
@ -76,6 +76,7 @@ public class CmdHome extends FCommand
|
||||
}
|
||||
|
||||
Faction faction = Board.getFactionAt(new FLocation(me.getLocation()));
|
||||
Location loc = me.getLocation().clone();
|
||||
|
||||
// if player is not in a safe zone or their own faction territory, only allow teleport if no enemies are nearby
|
||||
if
|
||||
@ -95,7 +96,6 @@ public class CmdHome extends FCommand
|
||||
)
|
||||
)
|
||||
{
|
||||
Location loc = me.getLocation();
|
||||
World w = loc.getWorld();
|
||||
double x = loc.getX();
|
||||
double y = loc.getY();
|
||||
@ -135,8 +135,8 @@ public class CmdHome extends FCommand
|
||||
if (Conf.homesTeleportCommandSmokeEffectEnabled)
|
||||
{
|
||||
List<Location> smokeLocations = new ArrayList<Location>();
|
||||
smokeLocations.add(me.getLocation());
|
||||
smokeLocations.add(me.getLocation().clone().add(0, 1, 0));
|
||||
smokeLocations.add(loc);
|
||||
smokeLocations.add(loc.add(0, 1, 0));
|
||||
smokeLocations.add(myFaction.getHome());
|
||||
smokeLocations.add(myFaction.getHome().clone().add(0, 1, 0));
|
||||
SmokeUtil.spawnCloudRandom(smokeLocations, Conf.homesTeleportCommandSmokeEffectThickness);
|
||||
|
Loading…
Reference in New Issue
Block a user