Class SetInvAction


  • public class SetInvAction
    extends Action
    Action to set the content and amount of user inventory slots. Empty slots can be creates with a null value. The maximum slot count is 5.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.List<Tile.TileType> slots
      The slots of the creative inventory.
    • Constructor Summary

      Constructors 
      Constructor Description
      SetInvAction​(java.util.List<Tile.TileType> slots)
      Crates action that changes the inventory content of the creative inventory.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Name of the action in the json package.
      boolean isLimited()
      Returns true if the action is limited in challenge mode, by the action cap.
      java.lang.Object serializeData()
      Serializes the data of the Action.
      • Methods inherited from class page.codeberg.terratactician_expandoria.bots.actions.Action

        serialize
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • slots

        public java.util.List<Tile.TileType> slots
        The slots of the creative inventory. Insert null to create empty slots. The maximum slot count is 5.
    • Constructor Detail

      • SetInvAction

        public SetInvAction​(java.util.List<Tile.TileType> slots)
        Crates action that changes the inventory content of the creative inventory. Empty slots can be created with null. The maximum slot count is 5.
        Parameters:
        slots - slots filled with TileTypes or null for empty slots. max 5.
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from class: Action
        Name of the action in the json package.
        Specified by:
        getName in class Action
        Returns:
        API name of this Action
      • isLimited

        public boolean isLimited()
        Description copied from class: Action
        Returns true if the action is limited in challenge mode, by the action cap.
        Specified by:
        isLimited in class Action
        Returns:
        if is limited
      • serializeData

        public java.lang.Object serializeData()
        Description copied from class: Action
        Serializes the data of the Action. This may returns a JSONObject or String or an other supported datatype.
        Specified by:
        serializeData in class Action
        Returns:
        JSONObject or String