Makes sure to ignore mounted players if handleVehicles is disabled

This commit is contained in:
Kristian Knarvik 2021-10-10 23:11:52 +02:00
parent 964eb0f898
commit f8fae1fbf1

View File

@ -110,6 +110,9 @@ public class PlayerEventListener implements Listener {
//Teleport the vehicle to the player
Entity playerVehicle = player.getVehicle();
if (playerVehicle != null && !(playerVehicle instanceof Boat) && !(playerVehicle instanceof RideableMinecart)) {
if (!Stargate.handleVehicles) {
return;
}
//Make sure the horse can be sat on
if (playerVehicle instanceof AbstractHorse horse) {