mirror of
https://github.com/songoda/EpicBosses.git
synced 2024-09-30 14:27:37 +02: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.mechanics.IBossMechanic;
|
||||||
import com.songoda.epicbosses.utils.Debug;
|
import com.songoda.epicbosses.utils.Debug;
|
||||||
import com.songoda.epicbosses.utils.EntityFinder;
|
import com.songoda.epicbosses.utils.EntityFinder;
|
||||||
|
import org.bukkit.entity.AnimalTamer;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
import org.bukkit.entity.Tameable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Charles Cullen
|
* @author Charles Cullen
|
||||||
@ -45,6 +47,10 @@ public class EntityTypeMechanic implements IBossMechanic {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lowerLivingEntity instanceof Tameable) {
|
||||||
|
((Tameable) lowerLivingEntity).setTamed(true);
|
||||||
|
}
|
||||||
|
|
||||||
lowerLivingEntity.setPassenger(livingEntity);
|
lowerLivingEntity.setPassenger(livingEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,9 @@ import com.songoda.epicbosses.holder.ActiveMinionHolder;
|
|||||||
import com.songoda.epicbosses.mechanics.IMinionMechanic;
|
import com.songoda.epicbosses.mechanics.IMinionMechanic;
|
||||||
import com.songoda.epicbosses.utils.Debug;
|
import com.songoda.epicbosses.utils.Debug;
|
||||||
import com.songoda.epicbosses.utils.EntityFinder;
|
import com.songoda.epicbosses.utils.EntityFinder;
|
||||||
|
import org.bukkit.entity.AnimalTamer;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
import org.bukkit.entity.Tameable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Charles Cullen
|
* @author Charles Cullen
|
||||||
@ -46,6 +48,10 @@ public class EntityTypeMechanic implements IMinionMechanic {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lowerLivingEntity instanceof Tameable) {
|
||||||
|
((Tameable) lowerLivingEntity).setTamed(true);
|
||||||
|
}
|
||||||
|
|
||||||
lowerLivingEntity.setPassenger(livingEntity);
|
lowerLivingEntity.setPassenger(livingEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user