mirror of
https://github.com/songoda/EpicBosses.git
synced 2025-02-08 07:01:23 +01:00
Auto tame tameable mounts.
This commit is contained in:
parent
6b707436ef
commit
2fe1d506b7
@ -8,7 +8,9 @@ import com.songoda.epicbosses.holder.ActiveBossHolder;
|
||||
import com.songoda.epicbosses.mechanics.IBossMechanic;
|
||||
import com.songoda.epicbosses.utils.Debug;
|
||||
import com.songoda.epicbosses.utils.EntityFinder;
|
||||
import org.bukkit.entity.AnimalTamer;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Tameable;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
@ -45,6 +47,10 @@ public class EntityTypeMechanic implements IBossMechanic {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (lowerLivingEntity instanceof Tameable) {
|
||||
((Tameable) lowerLivingEntity).setTamed(true);
|
||||
}
|
||||
|
||||
lowerLivingEntity.setPassenger(livingEntity);
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,9 @@ import com.songoda.epicbosses.holder.ActiveMinionHolder;
|
||||
import com.songoda.epicbosses.mechanics.IMinionMechanic;
|
||||
import com.songoda.epicbosses.utils.Debug;
|
||||
import com.songoda.epicbosses.utils.EntityFinder;
|
||||
import org.bukkit.entity.AnimalTamer;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Tameable;
|
||||
|
||||
/**
|
||||
* @author Charles Cullen
|
||||
@ -46,6 +48,10 @@ public class EntityTypeMechanic implements IMinionMechanic {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (lowerLivingEntity instanceof Tameable) {
|
||||
((Tameable) lowerLivingEntity).setTamed(true);
|
||||
}
|
||||
|
||||
lowerLivingEntity.setPassenger(livingEntity);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user