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
1 changed files with 4 additions and 0 deletions
|
|
@ -859,6 +859,10 @@ public class Util extends Queue {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getEntityId(EntityType type) {
|
public static int getEntityId(EntityType type) {
|
||||||
|
if (type == null) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
return getEntityId(type.name(), true);
|
return getEntityId(type.name(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue