From 47cf4aeb6ceb7f734665ed5bb497fcef23d800da Mon Sep 17 00:00:00 2001 From: MelonHell Date: Sat, 2 Dec 2023 21:05:49 +0300 Subject: [PATCH] add methods to Player --- .../java/net/minestom/server/entity/Player.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/java/net/minestom/server/entity/Player.java b/src/main/java/net/minestom/server/entity/Player.java index 1ba750c9334..00f118bdf9a 100644 --- a/src/main/java/net/minestom/server/entity/Player.java +++ b/src/main/java/net/minestom/server/entity/Player.java @@ -1397,6 +1397,21 @@ public void sendPackets(@NotNull Collection packets) { this.playerConnection.sendPackets(packets); } + @ApiStatus.Experimental + public void sendPacketAsync(@NotNull SendablePacket packet) { + this.playerConnection.sendPacketAsync(packet); + } + + @ApiStatus.Experimental + public void sendPacketsAsync(@NotNull SendablePacket... packets) { + this.playerConnection.sendPacketsAsync(packets); + } + + @ApiStatus.Experimental + public void sendPacketsAsync(@NotNull Collection packets) { + this.playerConnection.sendPacketsAsync(packets); + } + /** * Gets if the player is online or not. *