use of com.minecolonies.api.colony.colonyEvents.IColonyEntitySpawnEvent in project minecolonies by Minecolonies.
the class EventManager method registerEntity.
/**
* Registers an entity with the given event.
*
* @param entity the entity to register.
* @param eventID the event id to register it to.
*/
@Override
public void registerEntity(@NotNull final Entity entity, final int eventID) {
final IColonyEvent event = events.get(eventID);
if (!(event instanceof IColonyEntitySpawnEvent)) {
entity.remove();
return;
}
((IColonyEntitySpawnEvent) event).registerEntity(entity);
}
use of com.minecolonies.api.colony.colonyEvents.IColonyEntitySpawnEvent in project minecolonies by ldtteam.
the class EventManager method registerEntity.
/**
* Registers an entity with the given event.
*
* @param entity the entity to register.
* @param eventID the event id to register it to.
*/
@Override
public void registerEntity(@NotNull final Entity entity, final int eventID) {
final IColonyEvent event = events.get(eventID);
if (!(event instanceof IColonyEntitySpawnEvent)) {
entity.remove();
return;
}
((IColonyEntitySpawnEvent) event).registerEntity(entity);
}
Aggregations