Class LuxPacket

java.lang.Object
app.qwertz.luxxit.packet.LuxPacket
Direct Known Subclasses:
ChatPacket, CInfoPacket, ClientCommandPacket, ExplosionPacket, GameTurnPacket, GivePlayerCardPacket, HeartEmotePacket, IdPacket, IdTwoPacket, InfoPacket, KillPacket, LuxConnectPacket, OptionsPacket, PlayerListPacket, QuoteEmotePacket, RemoteVersionPacket, ReverseBlueEmotePacket, SelectCountryPacket, SetCountryArmiesPacket, SetCountryOwnerPacket, SetGamePhasePacket, SetGameRoundPacket, SingEmotePacket, StarInfoPacket, UserKeyPacket, UserListEndPacket, UserListStartPacket

public abstract class LuxPacket extends Object
  • Constructor Details

    • LuxPacket

      public LuxPacket()
  • Method Details

    • getPrefix

      public abstract String getPrefix()
      Returns the string prefix identifying this packet type, e.g. "chat: "
    • formatData

      public abstract String formatData()
      Returns the string representation of the packet data (excluding prefix)
    • stringify

      public String stringify()
      Returns the full stringified packet (prefix + data)
    • fromString

      public static LuxPacket fromString(String input)
      Factory method to parse a raw string into the correct LuxPacket subclass
    • parseData

      protected abstract void parseData(String dataPart)