Fixed NullPointerException when breaking/placing a spawner (#380)
* fix: Make Util#getEntityId parameter nullable * Removed JetBrains Nullable * Updated to follow contribution guidelines --------- Co-authored-by: Intelli <6790859+Intelli@users.noreply.github.com>
This commit is contained in:
parent
d64ec8d911
commit
814ae4d9d5
|
@ -859,6 +859,10 @@ public class Util extends Queue {
|
|||
}
|
||||
|
||||
public static int getEntityId(EntityType type) {
|
||||
if (type == null) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return getEntityId(type.name(), true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue