Class PermissionsMessage.Permission

java.lang.Object
com.minecolonies.core.network.messages.PermissionsMessage.Permission
All Implemented Interfaces:
IMessage
Enclosing class:
PermissionsMessage

public static class PermissionsMessage.Permission extends Object implements IMessage
Permission message class.
  • Constructor Details

    • Permission

      public Permission()
      Empty public constructor.
    • Permission

      public Permission(@NotNull @NotNull IColonyView colony, boolean enable, Rank rank, Action action)
      Parameters:
      colony - Colony the permission is set in
      enable - Whether the permission gets enabled or disabled
      rank - Rank of the permission Rank
      action - Action of the permission Action
  • Method Details

    • getExecutionSide

      @Nullable public @Nullable net.minecraftforge.fml.LogicalSide getExecutionSide()
      Description copied from interface: IMessage
      Which sides is message able to be executed at.
      Specified by:
      getExecutionSide in interface IMessage
      Returns:
      CLIENT or SERVER or null (for both)
    • onExecute

      public void onExecute(net.minecraftforge.network.NetworkEvent.Context ctxIn, boolean isLogicalServer)
      Description copied from interface: IMessage
      Executes message action.
      Specified by:
      onExecute in interface IMessage
      Parameters:
      ctxIn - network context of incoming message
      isLogicalServer - whether message arrived at logical server side
    • toBytes

      public void toBytes(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf)
      Description copied from interface: IMessage
      Writes message data to buffer.
      Specified by:
      toBytes in interface IMessage
      Parameters:
      buf - network data byte buffer
    • fromBytes

      public void fromBytes(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf)
      Description copied from interface: IMessage
      Reads message data from buffer.
      Specified by:
      fromBytes in interface IMessage
      Parameters:
      buf - network data byte buffer