mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-07 07:51:38 +01:00
Add fancy Player#sendPacket shortcut
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
fd027ecfd7
commit
e6db47ec6e
@ -1251,11 +1251,20 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
||||
*
|
||||
* @return the player connection
|
||||
*/
|
||||
@NotNull
|
||||
public PlayerConnection getPlayerConnection() {
|
||||
public @NotNull PlayerConnection getPlayerConnection() {
|
||||
return playerConnection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcut for {@link PlayerConnection#sendPacket(ServerPacket)}.
|
||||
*
|
||||
* @param packet the packet to send
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public void sendPacket(@NotNull ServerPacket packet) {
|
||||
this.playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets if the player is online or not.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user