Dodge ProtocolLib UOE
This commit is contained in:
parent
bdfc3d3dcf
commit
6caa385eb5
@ -354,8 +354,18 @@ public class MUtil
|
|||||||
{
|
{
|
||||||
if ( ! (object instanceof Metadatable)) return false;
|
if ( ! (object instanceof Metadatable)) return false;
|
||||||
Metadatable metadatable = (Metadatable)object;
|
Metadatable metadatable = (Metadatable)object;
|
||||||
|
try
|
||||||
|
{
|
||||||
return metadatable.hasMetadata("NPC");
|
return metadatable.hasMetadata("NPC");
|
||||||
}
|
}
|
||||||
|
catch (UnsupportedOperationException e)
|
||||||
|
{
|
||||||
|
// ProtocolLib
|
||||||
|
// UnsupportedOperationException: The method hasMetadata is not supported for temporary players.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
public static boolean isntNpc(Object object)
|
public static boolean isntNpc(Object object)
|
||||||
{
|
{
|
||||||
return !isNpc(object);
|
return !isNpc(object);
|
||||||
|
Loading…
Reference in New Issue
Block a user