Class HireFireMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage<IBuilding>
com.minecolonies.core.network.messages.server.colony.building.HireFireMessage
- All Implemented Interfaces:
IMessage
Message class which manages the messages hiring or firing of citizens.
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty public constructor.HireFireMessage(@NotNull IBuildingView building, boolean hire, int citizenID, int moduleId) Creates object for the player to hire or fire a citizen. -
Method Summary
Modifier and TypeMethodDescriptionvoidfromBytesOverride(@NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation from a byteStream to the variables.protected voidonExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, IBuilding building) voidtoBytesOverride(@NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation to a byteStream.Methods inherited from class com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage
errorIfCastFails, fromBytesAbstractOverride, onExecute, toBytesAbstractOverrideMethods inherited from class com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
fromBytes, getExecutionSide, onExecute, ownerOnly, permissionNeeded, toBytes
-
Constructor Details
-
HireFireMessage
public HireFireMessage()Empty public constructor. -
HireFireMessage
public HireFireMessage(@NotNull @NotNull IBuildingView building, boolean hire, int citizenID, int moduleId) Creates object for the player to hire or fire a citizen.- Parameters:
building- view of the building to read data fromhire- hire or fire the citizenscitizenID- the id of the citizen to fill the job.
-
-
Method Details
-
fromBytesOverride
public void fromBytesOverride(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation from a byteStream to the variables.- Specified by:
fromBytesOverridein classAbstractColonyServerMessage- Parameters:
buf- the used byteBuffer.
-
toBytesOverride
public void toBytesOverride(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation to a byteStream.- Specified by:
toBytesOverridein classAbstractColonyServerMessage- Parameters:
buf- the used byteBuffer.
-
onExecute
protected void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, IBuilding building) - Specified by:
onExecutein classAbstractBuildingServerMessage<IBuilding>
-