mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-01 21:11:44 +01:00
Fix /seen command
This commit is contained in:
parent
5b975672e8
commit
3f31dc179b
@ -50,4 +50,6 @@ public interface IUser extends Player
|
|||||||
void setAfk(final boolean set);
|
void setAfk(final boolean set);
|
||||||
|
|
||||||
void setLogoutLocation();
|
void setLogoutLocation();
|
||||||
|
|
||||||
|
Location getLogoutLocation();
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,7 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||||||
kitTimestamps = _getKitTimestamps();
|
kitTimestamps = _getKitTimestamps();
|
||||||
nickname = _getNickname();
|
nickname = _getNickname();
|
||||||
setIgnoredPlayers(_getIgnoredPlayers());
|
setIgnoredPlayers(_getIgnoredPlayers());
|
||||||
|
logoutLocation = _getLogoutLocation();
|
||||||
}
|
}
|
||||||
private double money;
|
private double money;
|
||||||
|
|
||||||
@ -319,12 +320,32 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||||||
config.save();
|
config.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Location logoutLocation;
|
||||||
|
|
||||||
|
private Location _getLogoutLocation()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return config.getLocation("logoutlocation", getServer());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Location getLogoutLocation()
|
||||||
|
{
|
||||||
|
return logoutLocation;
|
||||||
|
}
|
||||||
|
|
||||||
public void setLogoutLocation(Location loc)
|
public void setLogoutLocation(Location loc)
|
||||||
{
|
{
|
||||||
if (loc == null || loc.getWorld() == null)
|
if (loc == null || loc.getWorld() == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
logoutLocation = loc;
|
||||||
config.setProperty("logoutlocation", loc);
|
config.setProperty("logoutlocation", loc);
|
||||||
config.save();
|
config.save();
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ public class Commandseen extends EssentialsCommand
|
|||||||
if (extra)
|
if (extra)
|
||||||
{
|
{
|
||||||
sender.sendMessage(_("whoisIPAddress", player.getLastLoginAddress()));
|
sender.sendMessage(_("whoisIPAddress", player.getLastLoginAddress()));
|
||||||
final Location loc = player.getLastLocation();
|
final Location loc = player.getLogoutLocation();
|
||||||
if (loc != null)
|
if (loc != null)
|
||||||
{
|
{
|
||||||
sender.sendMessage(_("whoisLocation", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
|
sender.sendMessage(_("whoisLocation", loc.getWorld().getName(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
|
||||||
|
Loading…
Reference in New Issue
Block a user