T
- The player type for the specific platform, for bukkit it's ViaAPI<Player>
public interface ViaAPI<T>
Modifier and Type | Method and Description |
---|---|
BossBar |
createBossBar(String title,
BossColor color,
BossStyle style)
Create a new bossbar instance
|
BossBar |
createBossBar(String title,
float health,
BossColor color,
BossStyle style)
Create a new bossbar instance
|
int |
getPlayerVersion(T player)
Get protocol number from a player
Will also retrieve version from ProtocolSupport if it's being used.
|
int |
getPlayerVersion(UUID uuid)
Get protocol number from a player
|
SortedSet<Integer> |
getSupportedVersions()
Get the supported protocol versions
This method removes any blocked protocol versions.
|
String |
getVersion()
Get the version of the plugin
|
boolean |
isInjected(UUID playerUUID)
Returns if Via injected into this player connection
|
default boolean |
isPorted(UUID playerUUID)
Deprecated.
use
isInjected(UUID) |
void |
sendRawPacket(T player,
io.netty.buffer.ByteBuf packet)
Send a raw packet to the player (Use new IDs)
|
void |
sendRawPacket(UUID uuid,
io.netty.buffer.ByteBuf packet)
Send a raw packet to the player (Use new IDs)
|
int getPlayerVersion(T player)
player
- Platform player object, eg. Bukkit this is Playerint getPlayerVersion(UUID uuid)
uuid
- UUID of a player@Deprecated default boolean isPorted(UUID playerUUID)
isInjected(UUID)
playerUUID
- UUID of a playerisInjected(UUID)
boolean isInjected(UUID playerUUID)
playerUUID
- UUID of a playerString getVersion()
void sendRawPacket(T player, io.netty.buffer.ByteBuf packet)
player
- Platform player object, eg. Bukkit this is Playerpacket
- The packet, you need a VarInt ID then the packet contents.IllegalArgumentException
- if the player is not injected by Viavoid sendRawPacket(UUID uuid, io.netty.buffer.ByteBuf packet)
uuid
- The uuid from the player to send packetpacket
- The packet, you need a VarInt ID then the packet contents.IllegalArgumentException
- if the player is not injected by ViaBossBar createBossBar(String title, BossColor color, BossStyle style)
title
- The titlecolor
- The colorstyle
- The styleBossBar createBossBar(String title, float health, BossColor color, BossStyle style)
title
- The titlehealth
- Number between 0 and 1color
- The colorstyle
- The styleSortedSet<Integer> getSupportedVersions()
for full list.
Copyright © 2016–2021. All rights reserved.