Changes the vehicle check to prevent players in boats from leaving their boat to teleport
This commit is contained in:
parent
f8fae1fbf1
commit
2e4d545955
@ -109,11 +109,10 @@ public class PlayerEventListener implements Listener {
|
|||||||
|
|
||||||
//Teleport the vehicle to the player
|
//Teleport the vehicle to the player
|
||||||
Entity playerVehicle = player.getVehicle();
|
Entity playerVehicle = player.getVehicle();
|
||||||
if (playerVehicle != null && !(playerVehicle instanceof Boat) && !(playerVehicle instanceof RideableMinecart)) {
|
if (playerVehicle != null && !Stargate.handleVehicles) {
|
||||||
if (!Stargate.handleVehicles) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (playerVehicle != null && !(playerVehicle instanceof Boat) && !(playerVehicle instanceof RideableMinecart)) {
|
||||||
//Make sure the horse can be sat on
|
//Make sure the horse can be sat on
|
||||||
if (playerVehicle instanceof AbstractHorse horse) {
|
if (playerVehicle instanceof AbstractHorse horse) {
|
||||||
//Make sure the horse is properly tamed
|
//Make sure the horse is properly tamed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user