java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.colony.citizen.RestartCitizenMessage
All Implemented Interfaces:
IMessage

public class RestartCitizenMessage extends AbstractColonyServerMessage
Message class which manages the messages hiring or firing of citizens.
  • Constructor Details

    • RestartCitizenMessage

      public RestartCitizenMessage()
      Empty public constructor.
    • RestartCitizenMessage

      public RestartCitizenMessage(@NotNull @NotNull AbstractBuildingView building, int citizenID)
      Creates object for the player to restart a citizen (instead of the fire/hire solution).
      Parameters:
      building - view of the building to read data from
      citizenID - 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:
      fromBytesOverride in class AbstractColonyServerMessage
      Parameters:
      buf - the used byteBuffer.
    • toBytesOverride

      public void toBytesOverride(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf)
      Transformation to a byteStream.
      Specified by:
      toBytesOverride in class AbstractColonyServerMessage
      Parameters:
      buf - the used byteBuffer.
    • onExecute

      protected void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer, IColony colony)
      Specified by:
      onExecute in class AbstractColonyServerMessage