Forces a teleported horse to become tamed

This commit is contained in:
Kristian Knarvik 2021-10-09 18:48:59 +02:00
parent ba3304a716
commit be8de83bcc

View File

@ -114,7 +114,9 @@ public class PlayerEventListener implements Listener {
//Make sure the horse can be sat on
if (playerVehicle instanceof AbstractHorse) {
AbstractHorse horse = ((AbstractHorse) playerVehicle);
//Make sure the horse is properly tamed
if (!horse.isTamed()) {
horse.setTamed(true);
horse.setOwner(player);
}
}