Another minor performance improvement.
This commit is contained in:
parent
8dac1eeece
commit
b857df8763
@ -57,12 +57,8 @@ public class SenderColl<E extends SenderEntity<E>> extends Coll<E> implements Se
|
||||
|
||||
if (ret == null)
|
||||
{
|
||||
ret = IdUtil.getId(oid);
|
||||
}
|
||||
|
||||
if (ret == null)
|
||||
{
|
||||
return null;
|
||||
// Always lower case.
|
||||
return IdUtil.getId(oid);
|
||||
}
|
||||
|
||||
if (this.isLowercasing())
|
||||
|
@ -598,6 +598,7 @@ public class IdUtil implements Listener, Runnable
|
||||
return null;
|
||||
}
|
||||
|
||||
// This method always returns null or a lower case String.
|
||||
public static String getId(Object senderObject)
|
||||
{
|
||||
// Null Return
|
||||
@ -623,7 +624,7 @@ public class IdUtil implements Listener, Runnable
|
||||
if (senderObject instanceof Player) return ((Player)senderObject).getUniqueId().toString();
|
||||
|
||||
// CommandSender
|
||||
if (senderObject instanceof CommandSender) return ((CommandSender)senderObject).getName();
|
||||
if (senderObject instanceof CommandSender) return ((CommandSender)senderObject).getName().toLowerCase();
|
||||
|
||||
// UUID
|
||||
if (senderObject instanceof UUID) return ((UUID)senderObject).toString();
|
||||
|
Loading…
Reference in New Issue
Block a user