mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-12 19:30:50 +01:00
Minecraft's getVehicle method can return the same entity if no vehicle is present - convert this case to null
This commit is contained in:
parent
ae43427e51
commit
cfbdb42360
@ -486,7 +486,8 @@ public class NMS {
|
||||
}
|
||||
|
||||
public static Entity getVehicle(org.bukkit.entity.Entity entity) {
|
||||
return getHandle(entity).getVehicle();
|
||||
Entity e = getHandle(entity).getVehicle();
|
||||
return e == getHandle(entity) ? null : e;
|
||||
}
|
||||
|
||||
public static void initNetworkManager(NetworkManager network) {
|
||||
|
Loading…
Reference in New Issue
Block a user