java.lang.Object
me.remigio07.chatplugin.api.common.util.packet.Packets.Sync
Enclosing class:
Packets

public static class Packets.Sync extends Object
Contains packets used to synchronize servers with the proxy.
  • Constructor Details

    • Sync

      public Sync()
  • Method Details

    • ipLookupRequest

      public static PacketSerializer ipLookupRequest(String server, InetAddress ipAddress, String requesterName)
      Makes an IP lookup request to the proxy.
      Parameters:
      server - Target server
      ipAddress - IP address to lookup
      requesterName - Requester's name
      Returns:
      IPLookupRequest packet
    • ipLookupResponse

      @Deprecated public static PacketSerializer ipLookupResponse(String server, InetAddress ipAddress, String isp, String json)
      Deprecated.
      Internal use only.
      Parameters:
      server - Target server
      ipAddress - IP lookup's IP address
      isp - IP lookup' ISP
      json - IP lookup's JSON representation
      Returns:
      IPLookupResponse packet
    • motdRequest

      public static PacketSerializer motdRequest(String server, InetAddress ipAddress, int versionProtocol, boolean versionPreNettyRewrite)
      Makes a MoTD request to the proxy for the specified IP address.
      Parameters:
      server - Target server
      ipAddress - Player's IP address
      versionProtocol - Player's version's protocol
      versionPreNettyRewrite - Whether the player is using a pre-Netty rewrite version
      Returns:
      MoTDRequest packet
    • motdResponse

      @Deprecated public static PacketSerializer motdResponse(String server, InetAddress ipAddress, String description, String hover, String versionName, URL customIconURL, boolean hoverDisplayed, boolean versionNameDisplayed, boolean customIconDisplayed, ValueContainer<Integer> onlinePlayers, ValueContainer<Integer> maxPlayers)
      Deprecated.
      Internal use only.
      Parameters:
      server - Target server
      ipAddress - MoTD's IP address
      description - MoTD's description
      hover - MoTD's hover
      versionName - MoTD's version name
      customIconURL - MoTD's custom icon's URL
      hoverDisplayed - Whether the hover is visible
      versionNameDisplayed - Whether the version name is visible
      customIconDisplayed - Whether the custom icon is visible
      onlinePlayers - MoTD's online players
      maxPlayers - MoTD's max players
      Returns:
      MoTDResponse packet
    • addPlayerViolation

      public static PacketSerializer addPlayerViolation(String server, UUID playerUUID, String playerName, IntegrationType<AnticheatIntegration> anticheat, String cheatID, String component, int amount, int ping, double tps, int versionProtocol, boolean versionPreNettyRewrite)
      Adds a violation to the specified player's violations using a packet of type ViolationPacketType.ADD.
      Parameters:
      server - Target server
      playerUUID - Player's UUID
      playerName - Player's name
      anticheat - Anticheat that flagged the player
      cheatID - Cheat's ID
      component - Cheat's component
      amount - Amount of times the player got flagged
      ping - Player's ping, in milliseconds
      tps - Server's ticks per second
      versionProtocol - Player's version's protocol
      versionPreNettyRewrite - Whether the player is using a pre-Netty rewrite version
      Returns:
      PlayerViolation packet
    • removePlayerViolation

      public static PacketSerializer removePlayerViolation(String server, UUID playerUUID, String playerName, IntegrationType<AnticheatIntegration> anticheat, String cheatID)
      Removes violations of a certain type for the specified player using a packet of type ViolationPacketType.REMOVE.
      Parameters:
      server - Target server
      playerUUID - Player's UUID
      playerName - Player's name
      anticheat - Anticheat that detected the violations
      cheatID - Cheat's ID
      Returns:
      PlayerViolation packet
    • clearPlayerViolation

      public static PacketSerializer clearPlayerViolation(String server, UUID playerUUID, String playerName)
      Clears all violations for the specified player using a packet of type ViolationPacketType.CLEAR.
      Parameters:
      server - Target server
      playerUUID - Player's UUID
      playerName - Player's name
      Returns:
      PlayerViolation packet
    • proxyPluginLoad

      @Deprecated public static PacketSerializer proxyPluginLoad(String server, long time)
      Deprecated.
      Internal use only.
      Makes the target server reload certain managers.
      Parameters:
      server - Target server
      time - Reload's time, in milliseconds
      Returns:
      ProxyPluginLoad packet