| Constructor and Description |
|---|
VelocityViaAPI() |
| 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(com.velocitypowered.api.proxy.Player 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
|
void |
sendRawPacket(com.velocitypowered.api.proxy.Player 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)
|
public int getPlayerVersion(com.velocitypowered.api.proxy.Player player)
ViaAPIgetPlayerVersion in interface ViaAPI<com.velocitypowered.api.proxy.Player>player - Platform player object, eg. Bukkit this is Playerpublic int getPlayerVersion(UUID uuid)
ViaAPIgetPlayerVersion in interface ViaAPI<com.velocitypowered.api.proxy.Player>uuid - UUID of a playerpublic boolean isInjected(UUID playerUUID)
ViaAPIisInjected in interface ViaAPI<com.velocitypowered.api.proxy.Player>playerUUID - UUID of a playerpublic String getVersion()
ViaAPIgetVersion in interface ViaAPI<com.velocitypowered.api.proxy.Player>public void sendRawPacket(UUID uuid, io.netty.buffer.ByteBuf packet) throws IllegalArgumentException
ViaAPIsendRawPacket in interface ViaAPI<com.velocitypowered.api.proxy.Player>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 Viapublic void sendRawPacket(com.velocitypowered.api.proxy.Player player,
io.netty.buffer.ByteBuf packet)
throws IllegalArgumentException
ViaAPIsendRawPacket in interface ViaAPI<com.velocitypowered.api.proxy.Player>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 Viapublic BossBar createBossBar(String title, BossColor color, BossStyle style)
ViaAPIcreateBossBar in interface ViaAPI<com.velocitypowered.api.proxy.Player>title - The titlecolor - The colorstyle - The stylepublic BossBar createBossBar(String title, float health, BossColor color, BossStyle style)
ViaAPIcreateBossBar in interface ViaAPI<com.velocitypowered.api.proxy.Player>title - The titlehealth - Number between 0 and 1color - The colorstyle - The stylepublic SortedSet<Integer> getSupportedVersions()
ViaAPIgetSupportedVersions in interface ViaAPI<com.velocitypowered.api.proxy.Player>for full list.Copyright © 2016–2021. All rights reserved.