Class Action
- java.lang.Object
-
- page.codeberg.terratactician_expandoria.bots.actions.Action
-
- Direct Known Subclasses:
CollectRewardAction,ConfigureChameleonTileAction,ConfigureMarketplaceTileAction,ConfigureRgbTileAction,ConfigureSoundTileAction,CreativeSettingsAction,GetTileStatusAction,PlaceAction,RedrawAction,RegisterEventAction,SendNotificationAction,SetCamAction,SetInvAction,TakeAction,UnRegisterAllEventsAction,UnRegisterEventAction
public abstract class Action extends java.lang.ObjectAn Action is Package Send from bot to the game. An Action will modify the game in some way. A common action is used play the game like a human player would do. In challenge Mode this actions are abstracted away.
-
-
Constructor Summary
Constructors Constructor Description Action()Empty default constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.StringgetName()Name of the action in the json package.abstract booleanisLimited()Returns true if the action is limited in challenge mode, by the action cap.org.json.JSONObjectserialize()Serialize a sendable Action package.abstract java.lang.ObjectserializeData()Serializes the data of the Action.
-
-
-
Method Detail
-
getName
public abstract java.lang.String getName()
Name of the action in the json package.- Returns:
- API name of this Action
-
isLimited
public abstract boolean isLimited()
Returns true if the action is limited in challenge mode, by the action cap.- Returns:
- if is limited
-
serializeData
public abstract java.lang.Object serializeData()
Serializes the data of the Action. This may returns a JSONObject or String or an other supported datatype.- Returns:
- JSONObject or String
-
serialize
public final org.json.JSONObject serialize()
Serialize a sendable Action package.- Returns:
- JSONObject
-
-