Class CitizenRemovedModEvent
java.lang.Object
com.minecolonies.api.eventbus.events.AbstractModEvent
com.minecolonies.api.eventbus.events.colony.AbstractColonyModEvent
com.minecolonies.api.eventbus.events.colony.citizens.CitizenRemovedModEvent
- All Implemented Interfaces:
IModEvent
Event for when a citizen was removed from the colony.
-
Constructor Summary
ConstructorsConstructorDescriptionCitizenRemovedModEvent(@NotNull IColony colony, int citizenId, net.minecraft.world.entity.Entity.RemovalReason reason) Citizen removed event. -
Method Summary
Modifier and TypeMethodDescriptionintThe id of the citizen.net.minecraft.world.entity.Entity.RemovalReasonThe damage source that caused the citizen to die.Methods inherited from class com.minecolonies.api.eventbus.events.colony.AbstractColonyModEvent
getColonyMethods inherited from class com.minecolonies.api.eventbus.events.AbstractModEvent
getEventId
-
Constructor Details
-
CitizenRemovedModEvent
public CitizenRemovedModEvent(@NotNull @NotNull IColony colony, int citizenId, @NotNull net.minecraft.world.entity.Entity.RemovalReason reason) Citizen removed event.- Parameters:
colony- the colony related to the event.citizenId- the id of the citizen.reason- the reason the citizen was removed.
-
-
Method Details
-
getCitizenId
public int getCitizenId()The id of the citizen.- Returns:
- the id.
-
getRemovalReason
@NotNull public net.minecraft.world.entity.Entity.RemovalReason getRemovalReason()The damage source that caused the citizen to die.- Returns:
- the damage source.
-