org.gbanga.api
Class Event

java.lang.Object
  extended by org.gbanga.api.Event
Direct Known Subclasses:
Challenge, Conversation, Trade, Visit

public class Event
extends java.lang.Object

An event occurs after an in-game activity.

Details about JSON serialization

For the JSON object serialization, the field names are used. Eg.

 {
   id: 701,
   type: 5,
   t: 1142982000000
 }
 

Fields annotated with PrimaryKey are used, if not the whole object is sent. HideIfNull indicates that the field is not sent at all, if the value is not set.

Author:
Matthias

Field Summary
 boolean[] booleanParameters
          Parameters of type boolean
 Cell cell
          The Cell affected by the event
static byte CELL_DISCOVERED
          Event type when a new Cell has been discovered by a Player
static byte CHALLENGE
          A Challenge.
static byte CHAT_MESSAGE_RECEIVED
          Event type when a Gbangoo receives a Message
static byte CONVERSATION
          A Conversation.
static byte CONVERSATION_MESSAGE_RECEIVED
          Event type when a Player receives a Message from another Player
static byte FRIEND_BROKE
          Event type when a Player breaks its friendship with another Player
 Gbangoo gbangoo
          The Gbangoo affected by the event
static byte GBANGOO_DROPPED
          Event type when a Gbangoo has been dropped into a Cell by a Player
static byte GBANGOO_LIFTED
          Event type when a Gbangoo has been picked up into a Pocket of a Player
static byte GIFT_IN_POCKET_RECEIVED
          Event type when an Entity has been given to a Player
 long id
          The unique id of this event.
 Player partner
          The partner Player affected by the event
 Player player
          Either Player who triggered the event, or the single player affected by the event
static byte PLAYER_ARRIVED
          Event type when a Player arrives at a Cell
static byte PLAYER_LEFT
          Event type when a Player left a Cell
static byte POCKET_ITEM_LOST
          Event type when an Entity has been given away from a Player
static byte PUZZLE_COMPLETED
          Event type when a Puzzle has been completed
 Resource resource
          The Resource affected by the event
static byte SHOUT_MESSAGE_RECEIVED
          Event type when a Message has been shout into a Cell by a Player
 java.lang.String[] stringParameters
          Parameters of type String
 long t
          The time the event occured.
 Tag tag
          The Tag affected by the event
static byte TAG_CODE_ENTERED
          Event type when a specific Tag code has been entered by a Player
 Tile tile
          The Tile affected by the event
static byte TRADE
          A Trade.
static byte TRADE_OFFER_RECEIVED
          Event type when a Player received a message from another Player
 int type
          The type of this event.
static byte UNKNOWN
          Unknown type of event.
static byte VISIT
          A Visit.
 
Constructor Summary
Event()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

booleanParameters

@HideIfNull
public boolean[] booleanParameters
Parameters of type boolean


cell

@HideIfNull
public Cell cell
The Cell affected by the event


CELL_DISCOVERED

public static final byte CELL_DISCOVERED
Event type when a new Cell has been discovered by a Player

See Also:
Constant Field Values

CHALLENGE

public static final byte CHALLENGE
A Challenge.

See Also:
Constant Field Values

CHAT_MESSAGE_RECEIVED

public static final byte CHAT_MESSAGE_RECEIVED
Event type when a Gbangoo receives a Message

See Also:
Constant Field Values

CONVERSATION

public static final byte CONVERSATION
A Conversation.

See Also:
Constant Field Values

CONVERSATION_MESSAGE_RECEIVED

public static final byte CONVERSATION_MESSAGE_RECEIVED
Event type when a Player receives a Message from another Player

See Also:
Constant Field Values

FRIEND_BROKE

public static final byte FRIEND_BROKE
Event type when a Player breaks its friendship with another Player

See Also:
Constant Field Values

gbangoo

@HideIfNull
public Gbangoo gbangoo
The Gbangoo affected by the event


GBANGOO_DROPPED

public static final byte GBANGOO_DROPPED
Event type when a Gbangoo has been dropped into a Cell by a Player

See Also:
Constant Field Values

GBANGOO_LIFTED

public static final byte GBANGOO_LIFTED
Event type when a Gbangoo has been picked up into a Pocket of a Player

See Also:
Constant Field Values

GIFT_IN_POCKET_RECEIVED

public static final byte GIFT_IN_POCKET_RECEIVED
Event type when an Entity has been given to a Player

See Also:
Constant Field Values

id

@PrimaryKey
public long id
The unique id of this event.


partner

@HideIfNull
public Player partner
The partner Player affected by the event


player

@HideIfNull
public Player player
Either Player who triggered the event, or the single player affected by the event


PLAYER_ARRIVED

public static final byte PLAYER_ARRIVED
Event type when a Player arrives at a Cell

See Also:
Constant Field Values

PLAYER_LEFT

public static final byte PLAYER_LEFT
Event type when a Player left a Cell

See Also:
Constant Field Values

POCKET_ITEM_LOST

public static final byte POCKET_ITEM_LOST
Event type when an Entity has been given away from a Player

See Also:
Constant Field Values

PUZZLE_COMPLETED

public static final byte PUZZLE_COMPLETED
Event type when a Puzzle has been completed

See Also:
Constant Field Values

resource

@HideIfNull
public Resource resource
The Resource affected by the event


SHOUT_MESSAGE_RECEIVED

public static final byte SHOUT_MESSAGE_RECEIVED
Event type when a Message has been shout into a Cell by a Player

See Also:
Constant Field Values

stringParameters

@HideIfNull
public java.lang.String[] stringParameters
Parameters of type String


t

public long t
The time the event occured.


tag

@HideIfNull
public Tag tag
The Tag affected by the event


TAG_CODE_ENTERED

public static final byte TAG_CODE_ENTERED
Event type when a specific Tag code has been entered by a Player

See Also:
Constant Field Values

tile

@HideIfNull
public Tile tile
The Tile affected by the event


TRADE

public static final byte TRADE
A Trade.

See Also:
Constant Field Values

TRADE_OFFER_RECEIVED

public static final byte TRADE_OFFER_RECEIVED
Event type when a Player received a message from another Player

See Also:
Constant Field Values

type

public int type
The type of this event.


UNKNOWN

public static final byte UNKNOWN
Unknown type of event.

See Also:
Constant Field Values

VISIT

public static final byte VISIT
A Visit.

See Also:
Constant Field Values
Constructor Detail

Event

public Event()