Class InciteMessage


  • public class InciteMessage
    extends AttributeMessage
    The message sent when inciting a native settlement.
    • Constructor Detail

      • InciteMessage

        public InciteMessage​(Unit unit,
                             IndianSettlement is,
                             Player enemy,
                             int gold)
        Create a new InciteMessage with the supplied name.
        Parameters:
        unit - The inciting Unit.
        is - The IndianSettlement to incite.
        enemy - The enemy Player.
        gold - The amount of gold in the bribe (negative for the initial inquiry).
      • InciteMessage

        public InciteMessage​(Game game,
                             FreeColXMLReader xr)
                      throws javax.xml.stream.XMLStreamException
        Create a new InciteMessage from a stream.
        Parameters:
        game - The Game to read within.
        xr - The FreeColXMLReader to read from.
        Throws:
        javax.xml.stream.XMLStreamException - if the stream is corrupt.
    • Method Detail

      • currentPlayerMessage

        public boolean currentPlayerMessage()
        Should this message only be sent to a server by the current player?
        Overrides:
        currentPlayerMessage in class TrivialMessage
        Returns:
        True if this is a current-player-only message.
      • clientHandler

        public void clientHandler​(FreeColClient freeColClient)
        Client-side handler for this message. Client handlers always return null.
        Overrides:
        clientHandler in class TrivialMessage
        Parameters:
        freeColClient - The FreeColClient to handle this message.
      • serverHandler

        public ChangeSet serverHandler​(FreeColServer freeColServer,
                                       ServerPlayer serverPlayer)
        Server-side handler for this message.
        Overrides:
        serverHandler in class TrivialMessage
        Parameters:
        freeColServer - The FreeColServer handling the request.
        serverPlayer - The ServerPlayer that sent the request.
        Returns:
        A ChangeSet defining the response.
      • getUnit

        public Unit getUnit​(Player player)
      • getEnemy

        public Player getEnemy​(Game game)
      • getGold

        public int getGold()