13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
20 public const NETWORK_ID = ProtocolInfo::PLAYER_START_ITEM_COOLDOWN_PACKET;
22 private string $itemCategory;
23 private int $cooldownTicks;
28 public static function create(
string $itemCategory,
int $cooldownTicks) : self{
30 $result->itemCategory = $itemCategory;
31 $result->cooldownTicks = $cooldownTicks;
35 public function getItemCategory() : string{ return $this->itemCategory; }
37 public function getCooldownTicks() : int{ return $this->cooldownTicks; }
40 $this->itemCategory = $in->getString();
45 $out->putString($this->itemCategory);
50 return $handler->handlePlayerStartItemCooldown($this);
static create(string $itemCategory, int $cooldownTicks)
handle(PacketHandlerInterface $handler)
decodePayload(PacketSerializer $in)
encodePayload(PacketSerializer $out)