1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 20:16:13 +01:00

Lets check for NPE

This commit is contained in:
Zrips 2019-10-30 09:55:31 +02:00
parent a64482cb53
commit 7a0295b410

View File

@ -234,6 +234,8 @@ public class Reflections {
return null; return null;
try { try {
Object nmsStack = asNMSCopy(item); Object nmsStack = asNMSCopy(item);
if (nmsStack == null)
return item;
Method methTag = nmsStack.getClass().getMethod("getTag"); Method methTag = nmsStack.getClass().getMethod("getTag");
Object tag = methTag.invoke(nmsStack); Object tag = methTag.invoke(nmsStack);
if (tag == null) if (tag == null)