mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-20 07:01:22 +01:00
Correct way in checking if entity alive
This commit is contained in:
parent
ac31db0927
commit
fe9d6960c7
@ -589,14 +589,11 @@ public class ItemManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAlive() {
|
public boolean isAlive() {
|
||||||
if (version.isLower(Version.v1_9_R1))
|
return getType() == null ? false : getType().isAlive();
|
||||||
return true; // TODO: Fixing NullPointerException
|
|
||||||
|
|
||||||
return getType().isAlive();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSpawnable() {
|
public boolean isSpawnable() {
|
||||||
return getType().isSpawnable();
|
return getType() == null ? false : getType().isSpawnable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getRealNameByType(EntityType type) {
|
public static String getRealNameByType(EntityType type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user