Class UpdateMapGeneratorOptionsMessage


  • public class UpdateMapGeneratorOptionsMessage
    extends ObjectMessage
    The message sent to update the map generator options.
    • Constructor Detail

      • UpdateMapGeneratorOptionsMessage

        public UpdateMapGeneratorOptionsMessage​(OptionGroup mapGeneratorOptions)
        Create a new UpdateMapGeneratorOptionsMessage with the supplied name.
        Parameters:
        mapGeneratorOptions - The map generator OptionGroup.
      • UpdateMapGeneratorOptionsMessage

        public UpdateMapGeneratorOptionsMessage​(Game game,
                                                FreeColXMLReader xr)
                                         throws javax.xml.stream.XMLStreamException
        Create a new UpdateMapGeneratorOptionsMessage from a stream.
        Parameters:
        game - The Game this message belongs to.
        xr - The FreeColXMLReader to read from.
        Throws:
        javax.xml.stream.XMLStreamException - if there is a problem reading the stream.
    • Method Detail

      • getMapGeneratorOptions

        private OptionGroup getMapGeneratorOptions()
        Get the associated option group.
        Returns:
        The options.
      • 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.