mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-09 20:06:50 +00:00
Don't set last location if it's invalid
This commit is contained in:
parent
d4c7ea1cd1
commit
5ea512817a
|
@ -249,7 +249,8 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||
|
||||
}
|
||||
|
||||
public void clearAllPowertools() {
|
||||
public void clearAllPowertools()
|
||||
{
|
||||
powertools.clear();
|
||||
config.setProperty("powertools", powertools);
|
||||
config.save();
|
||||
|
@ -278,7 +279,6 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||
{
|
||||
return powertools.size() > 0;
|
||||
}
|
||||
|
||||
private Location lastLocation;
|
||||
|
||||
private Location _getLastLocation()
|
||||
|
@ -300,6 +300,10 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||
|
||||
public void setLastLocation(Location loc)
|
||||
{
|
||||
if (loc == null || loc.getWorld() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
lastLocation = loc;
|
||||
config.setProperty("lastlocation", loc);
|
||||
config.save();
|
||||
|
@ -787,7 +791,6 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||
config.setProperty("npc", set);
|
||||
config.save();
|
||||
}
|
||||
|
||||
private boolean arePowerToolsEnabled;
|
||||
|
||||
public boolean arePowerToolsEnabled()
|
||||
|
@ -813,7 +816,6 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||
{
|
||||
return config.getBoolean("powertoolsenabled", true);
|
||||
}
|
||||
|
||||
private Map<String, Object> kitTimestamps;
|
||||
|
||||
private Map<String, Object> _getKitTimestamps()
|
||||
|
@ -842,5 +844,4 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||
config.setProperty("timestamps.kits", kitTimestamps);
|
||||
config.save();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue