mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-12 11:48:34 +00:00
Make getNonNullPlayer work with UUIDs too
This commit is contained in:
@ -566,6 +566,13 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
|
|||||||
|
|
||||||
protected Player getNonNullPlayer(String name)
|
protected Player getNonNullPlayer(String name)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
|
UUID uuid = UUID.fromString(name);
|
||||||
|
return Bukkit.getPlayer(uuid);
|
||||||
|
} catch (IllegalArgumentException ignored) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Player player = Bukkit.getPlayer(name);
|
Player player = Bukkit.getPlayer(name);
|
||||||
if (player == null)
|
if (player == null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user