mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-06-28 08:50:57 +00:00
Extend getUser(Object) to match uuid and offline players.
This commit is contained in:
parent
b00f458e67
commit
bffea1d7c8
|
@ -628,6 +628,14 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
|
|||
{
|
||||
return getUser((Player)base);
|
||||
}
|
||||
if (base instanceof org.bukkit.OfflinePlayer)
|
||||
{
|
||||
return getUser(((org.bukkit.OfflinePlayer)base).getUniqueId());
|
||||
}
|
||||
if (base instanceof UUID)
|
||||
{
|
||||
return getUser((UUID)base);
|
||||
}
|
||||
if (base instanceof String)
|
||||
{
|
||||
return getOfflineUser((String)base);
|
||||
|
|
|
@ -349,11 +349,14 @@ public class Commandessentials extends EssentialsCommand
|
|||
String name = args[1];
|
||||
sender.sendMessage("Looking up UUID for " + name);
|
||||
|
||||
UUID onlineUUID = null;
|
||||
|
||||
for (Player player : server.getOnlinePlayers())
|
||||
{
|
||||
if (player.getName().equalsIgnoreCase(name))
|
||||
{
|
||||
sender.sendMessage("Online player: " + player.getUniqueId().toString());
|
||||
onlineUUID = player.getUniqueId();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue