/acb will now work with player UUIDs.
In addition to player names.
This commit is contained in:
parent
7aed255fb8
commit
d062f627c2
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user