mirror of
https://github.com/dmulloy2/ProtocolLib.git
synced 2025-01-17 05:41:27 +01:00
Check entityID whether is negative or not. (#1362)
This commit is contained in:
parent
5dda8c8ab1
commit
dbedab0c14
@ -717,7 +717,7 @@ public class BukkitConverters {
|
|||||||
ProtocolManager manager = managerRef.get();
|
ProtocolManager manager = managerRef.get();
|
||||||
|
|
||||||
// Use the entity ID to get a reference to the entity
|
// Use the entity ID to get a reference to the entity
|
||||||
if (id != null && manager != null) {
|
if (id != null && id >= 0 && manager != null) {
|
||||||
return manager.getEntityFromID(world, id);
|
return manager.getEntityFromID(world, id);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user