PocketMine-MP 5.39.3 git-400eb2dddf91a9c112aa09f3b498ffc8c85e98ed
Loading...
Searching...
No Matches
ScriptDebugShapeType.php
1<?php
2
3/*
4 * This file is part of BedrockProtocol.
5 * Copyright (C) 2014-2022 PocketMine Team <https://github.com/pmmp/BedrockProtocol>
6 *
7 * BedrockProtocol is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 */
12
13declare(strict_types=1);
14
15namespace pocketmine\network\mcpe\protocol\types;
16
17enum ScriptDebugShapeType : int{
18 use PacketIntEnumTrait;
19
20 case LINE = 0;
21 case BOX = 1;
22 case SPHERE = 2;
23 case CIRCLE = 3;
24 case TEXT = 4;
25 case ARROW = 5;
26
28 const TEST = self::TEXT;
29
30 public const PAYLOAD_TYPE_NONE = 0;
31 public const PAYLOAD_TYPE_ARROW = 1;
32 public const PAYLOAD_TYPE_TEXT = 2;
33 public const PAYLOAD_TYPE_BOX = 3;
34 public const PAYLOAD_TYPE_LINE = 4;
35 public const PAYLOAD_TYPE_CIRCLE_OR_SPHERE = 5;
36
40 public function getPayloadType() : int{
41 return match($this){
42 self::ARROW => self::PAYLOAD_TYPE_ARROW,
43 self::TEXT => self::PAYLOAD_TYPE_TEXT,
44 self::BOX => self::PAYLOAD_TYPE_BOX,
45 self::LINE => self::PAYLOAD_TYPE_LINE,
46 self::CIRCLE, self::SPHERE => self::PAYLOAD_TYPE_CIRCLE_OR_SPHERE
47 };
48 }
49}