/acb will now work with player UUIDs.

In addition to player names.
This commit is contained in:
ryanhamshire 2015-04-24 18:05:20 -07:00
parent 7aed255fb8
commit d062f627c2

View File

@ -1720,7 +1720,18 @@ public class GriefPrevention extends JavaPlugin
} }
//otherwise, find the specified player //otherwise, find the specified player
OfflinePlayer targetPlayer = this.resolvePlayerByName(args[0]); OfflinePlayer targetPlayer;
try
{
UUID playerID = UUID.fromString(args[0]);
targetPlayer = this.getServer().getOfflinePlayer(playerID);
}
catch(IllegalArgumentException e)
{
targetPlayer = this.resolvePlayerByName(args[0]);
}
if(targetPlayer == null) if(targetPlayer == null)
{ {
GriefPrevention.sendMessage(player, TextMode.Err, Messages.PlayerNotFound2); GriefPrevention.sendMessage(player, TextMode.Err, Messages.PlayerNotFound2);