Class AssignUnassignMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage<DefaultBuildingInstance>
com.minecolonies.core.network.messages.server.colony.building.home.AssignUnassignMessage
- All Implemented Interfaces:
IMessage
Message class which manages the messages assigning or unassigning of citizens.
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty public constructor.AssignUnassignMessage(@NotNull IBuildingView building, boolean assign, int citizenID, JobEntry entry) Creates object for the player to assigning or unassigning a citizen. -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidfromBytesOverride(@NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation from a byteStream to the variables.voidonExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, DefaultBuildingInstance building) voidtoBytesOverride(@NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation to a byteStream.Methods inherited from class com.minecolonies.core.network.messages.server.AbstractBuildingServerMessage
fromBytesAbstractOverride, onExecute, toBytesAbstractOverrideMethods inherited from class com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
fromBytes, getExecutionSide, onExecute, ownerOnly, permissionNeeded, toBytes
-
Constructor Details
-
AssignUnassignMessage
public AssignUnassignMessage()Empty public constructor. -
AssignUnassignMessage
public AssignUnassignMessage(@NotNull @NotNull IBuildingView building, boolean assign, int citizenID, JobEntry entry) Creates object for the player to assigning or unassigning a citizen.- Parameters:
building- view of the building to read data fromassign- assign or unassigning the citizenscitizenID- the id of the citizen to fill the job.entry- the job entry.
-
-
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.
-
errorIfCastFails
public boolean errorIfCastFails()- Overrides:
errorIfCastFailsin classAbstractBuildingServerMessage<DefaultBuildingInstance>
-
onExecute
public void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony, DefaultBuildingInstance building) - Specified by:
onExecutein classAbstractBuildingServerMessage<DefaultBuildingInstance>
-