Class Packets.Sync
java.lang.Object
me.remigio07.chatplugin.api.common.util.packet.Packets.Sync
- Enclosing class:
Packets
Contains packets used to synchronize servers with the proxy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PacketSerializeraddPlayerViolation(String server, UUID playerUUID, String playerName, IntegrationType<AnticheatIntegration> anticheat, String cheatID, String component, int amount, int ping, double tps, int versionProtocol, boolean versionPreNettyRewrite, boolean bedrockEdition) Adds a violation to the specified player's violations using a packet of typeViolationPacketType.ADD.static PacketSerializerclearPlayerViolation(String server, UUID playerUUID, String playerName) Clears all violations for the specified player using a packet of typeViolationPacketType.CLEAR.static PacketSerializeripLookupRequest(String server, InetAddress ipAddress, String requesterName) Makes an IP lookup request to the proxy.static PacketSerializeripLookupResponse(String server, InetAddress ipAddress, boolean valid, String isp, String json) Deprecated.Internal use only.static PacketSerializermotdRequest(String server, InetAddress ipAddress, int versionProtocol, boolean versionPreNettyRewrite) Makes a MoTD request to the proxy for the specified IP address.static PacketSerializermotdResponse(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.static PacketSerializerproxyPluginLoad(String server, long time) Deprecated.Internal use only.static PacketSerializerremovePlayerViolation(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 typeViolationPacketType.REMOVE.
-
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 serveripAddress- IP address to lookuprequesterName- Requester's name- Returns:
IPLookupRequestpacket
-
ipLookupResponse
@Deprecated public static PacketSerializer ipLookupResponse(String server, InetAddress ipAddress, boolean valid, String isp, String json) Deprecated.Internal use only.Responds to aipLookupRequest(String, InetAddress, String).- Parameters:
server- Target serveripAddress- IP lookup's IP addressvalid- Whether this IP lookup is validisp- IP lookup' ISPjson- IP lookup's JSON representation- Returns:
IPLookupResponsepacket
-
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 serveripAddress- Player's IP addressversionProtocol- Player's version's protocolversionPreNettyRewrite- Whether the player is using a pre-Netty rewrite version- Returns:
MoTDRequestpacket
-
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.Responds to amotdRequest(String, InetAddress, int, boolean).- Parameters:
server- Target serveripAddress- MoTD's IP addressdescription- MoTD's descriptionhover- MoTD's hoverversionName- MoTD's version namecustomIconURL- MoTD's custom icon's URLhoverDisplayed- Whether the hover is visibleversionNameDisplayed- Whether the version name is visiblecustomIconDisplayed- Whether the custom icon is visibleonlinePlayers- MoTD's online playersmaxPlayers- MoTD's max players- Returns:
MoTDResponsepacket
-
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, boolean bedrockEdition) Adds a violation to the specified player's violations using a packet of typeViolationPacketType.ADD.- Parameters:
server- Target serverplayerUUID- Player's UUIDplayerName- Player's nameanticheat- Anticheat that flagged the playercheatID- Cheat's IDcomponent- Cheat's componentamount- Amount of times the player got flaggedping- Player's ping, in millisecondstps- Server's ticks per secondversionProtocol- Player's version's protocolversionPreNettyRewrite- Whether the player is using a pre-Netty rewrite versionbedrockEdition- Whether the player is playing on Bedrock Edition- Returns:
PlayerViolationpacket
-
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 typeViolationPacketType.REMOVE.- Parameters:
server- Target serverplayerUUID- Player's UUIDplayerName- Player's nameanticheat- Anticheat that detected the violationscheatID- Cheat's ID- Returns:
PlayerViolationpacket
-
clearPlayerViolation
public static PacketSerializer clearPlayerViolation(String server, UUID playerUUID, String playerName) Clears all violations for the specified player using a packet of typeViolationPacketType.CLEAR.- Parameters:
server- Target serverplayerUUID- Player's UUIDplayerName- Player's name- Returns:
PlayerViolationpacket
-
proxyPluginLoad
Deprecated.Internal use only.Makes the target server reload certain managers.- Parameters:
server- Target servertime- Reload's time, in milliseconds- Returns:
ProxyPluginLoadpacket
-