mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-28 12:07:42 +01:00
Deprecate packet listening API
This commit is contained in:
parent
4ab35fbbc0
commit
19e22d03ce
@ -188,8 +188,12 @@ public final class ConnectionManager {
|
||||
* Gets all the listeners which are called for each packet received.
|
||||
*
|
||||
* @return a list of packet's consumers
|
||||
* @deprecated all packet listening methods will ultimately be removed.
|
||||
* May or may not work depending on the packet.
|
||||
* It is instead recommended to use a proxy, improving scalability and increasing server performance
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
public List<ClientPacketConsumer> getReceivePacketConsumers() {
|
||||
return receiveClientPacketConsumers;
|
||||
}
|
||||
@ -198,7 +202,11 @@ public final class ConnectionManager {
|
||||
* Adds a consumer to call once a packet is received.
|
||||
*
|
||||
* @param clientPacketConsumer the packet consumer
|
||||
* @deprecated all packet listening methods will ultimately be removed.
|
||||
* May or may not work depending on the packet.
|
||||
* It is instead recommended to use a proxy, improving scalability and increasing server performance
|
||||
*/
|
||||
@Deprecated
|
||||
public void onPacketReceive(@NotNull ClientPacketConsumer clientPacketConsumer) {
|
||||
this.receiveClientPacketConsumers.add(clientPacketConsumer);
|
||||
}
|
||||
@ -207,8 +215,12 @@ public final class ConnectionManager {
|
||||
* Gets all the listeners which are called for each packet sent.
|
||||
*
|
||||
* @return a list of packet's consumers
|
||||
* @deprecated all packet listening methods will ultimately be removed.
|
||||
* May or may not work depending on the packet.
|
||||
* It is instead recommended to use a proxy, improving scalability and increasing server performance
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
public List<ServerPacketConsumer> getSendPacketConsumers() {
|
||||
return sendClientPacketConsumers;
|
||||
}
|
||||
@ -217,7 +229,11 @@ public final class ConnectionManager {
|
||||
* Adds a consumer to call once a packet is sent.
|
||||
*
|
||||
* @param serverPacketConsumer the packet consumer
|
||||
* @deprecated all packet listening methods will ultimately be removed.
|
||||
* May or may not work depending on the packet.
|
||||
* It is instead recommended to use a proxy, improving scalability and increasing server performance
|
||||
*/
|
||||
@Deprecated
|
||||
public void onPacketSend(@NotNull ServerPacketConsumer serverPacketConsumer) {
|
||||
this.sendClientPacketConsumers.add(serverPacketConsumer);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user