Phpcraft
|
Public Member Functions | |
__construct (?UUID $uuid=null, float $health=1.0) | |
send (Connection $con) | |
__toString () | |
Public Member Functions inherited from Phpcraft\Packet\BossBar\BossBarPacket | |
__construct (?UUID $uuid=null) | |
Public Attributes | |
$health = 1.0 | |
Public Attributes inherited from Phpcraft\Packet\BossBar\BossBarPacket | |
const | COLOR_PINK = 0 |
const | COLOR_BLUE = 1 |
const | COLOR_RED = 2 |
const | COLOR_GREEN = 3 |
const | COLOR_YELLOW = 4 |
const | COLOR_PURPLE = 5 |
const | COLOR_WHITE = 6 |
const | DIVISION_0 = 0 |
const | DIVISION_6 = 1 |
const | DIVISION_10 = 2 |
const | DIVISION_12 = 3 |
const | DIVISION_20 = 4 |
$uuid | |
Additional Inherited Members | |
Static Public Member Functions inherited from Phpcraft\Packet\BossBar\BossBarPacket | |
static | read (Connection $con) |
Phpcraft\Packet\BossBar\UpdateBossBarHealthPacket::__construct | ( | ?UUID | $uuid = null , |
float | $health = 1.0 |
||
) |
UUID | null | $uuid | The UUID of the boss bar. |
float | $health | The percentage the boss bar is filled, aka. the health of the boss. |
Phpcraft\Packet\BossBar\UpdateBossBarHealthPacket::__toString | ( | ) |
Reimplemented from Phpcraft\Packet\Packet.
Phpcraft\Packet\BossBar\UpdateBossBarHealthPacket::send | ( | Connection | $con | ) |
Adds the packet's ID and payload to the Connection's write buffer and sends it over the wire if the connection has a stream. Note that in some cases this will produce multiple Minecraft packets, therefore you should only use this on connections without a stream if you know what you're doing.
Connection | $con |
IOException |
Reimplemented from Phpcraft\Packet\Packet.
float Phpcraft\Packet\BossBar\UpdateBossBarHealthPacket::$health = 1.0 |
The percentage the boss bar is filled, aka. the health of the boss. This should be between 0 and 1. And whilst values below 0 disconnect the client, values above 1 render additional boss bars to the right.