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
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 typeViolationPacketType.ADD
.static PacketSerializer
clearPlayerViolation
(String server, UUID playerUUID, String playerName) Clears all violations for the specified player using a packet of typeViolationPacketType.CLEAR
.static PacketSerializer
ipLookupRequest
(String server, InetAddress ipAddress, String requesterName) Makes an IP lookup request to the proxy.static PacketSerializer
ipLookupResponse
(String server, InetAddress ipAddress, String isp, String json) Deprecated.Internal use only.static PacketSerializer
motdRequest
(String server, InetAddress ipAddress, int versionProtocol, boolean versionPreNettyRewrite) Makes a MoTD request to the proxy for the specified IP address.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.static PacketSerializer
proxyPluginLoad
(String server, long time) Deprecated.Internal use only.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
.
-
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:
IPLookupRequest
packet
-
ipLookupResponse
@Deprecated public static PacketSerializer ipLookupResponse(String server, InetAddress ipAddress, String isp, String json) Deprecated.Internal use only.Responds to aipLookupRequest(String, InetAddress, String)
.- Parameters:
server
- Target serveripAddress
- IP lookup's IP addressisp
- IP lookup' ISPjson
- 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 serveripAddress
- Player's IP addressversionProtocol
- Player's version's protocolversionPreNettyRewrite
- 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.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:
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 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 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 typeViolationPacketType.REMOVE
.- Parameters:
server
- Target serverplayerUUID
- Player's UUIDplayerName
- Player's nameanticheat
- Anticheat that detected the violationscheatID
- 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 typeViolationPacketType.CLEAR
.- Parameters:
server
- Target serverplayerUUID
- Player's UUIDplayerName
- Player's name- Returns:
PlayerViolation
packet
-
proxyPluginLoad
Deprecated.Internal use only.Makes the target server reload certain managers.- Parameters:
server
- Target servertime
- Reload's time, in milliseconds- Returns:
ProxyPluginLoad
packet
-