Class TownHallRenameMessage
java.lang.Object
com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
com.minecolonies.core.network.messages.server.colony.TownHallRenameMessage
- All Implemented Interfaces:
IMessage
Message to execute the renaming of the townHall.
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty public constructor.TownHallRenameMessage(@NotNull IColonyView colony, String name) Object creation for the town hall rename -
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) voidtoBytesOverride(@NotNull net.minecraft.network.FriendlyByteBuf buf) Transformation to a byteStream.Methods inherited from class com.minecolonies.core.network.messages.server.AbstractColonyServerMessage
fromBytes, fromBytesAbstractOverride, getExecutionSide, onExecute, ownerOnly, permissionNeeded, toBytes, toBytesAbstractOverride
-
Constructor Details
-
TownHallRenameMessage
public TownHallRenameMessage()Empty public constructor. -
TownHallRenameMessage
Object creation for the town hall rename- Parameters:
colony- Colony the rename is going to occur in.name- New name of the town hall.
-
-
Method Details
-
fromBytesOverride
public void fromBytesOverride(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) Description copied from class:AbstractColonyServerMessageTransformation 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) Description copied from class:AbstractColonyServerMessageTransformation 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) - Specified by:
onExecutein classAbstractColonyServerMessage
-