PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
Loading...
Searching...
No Matches
PlayerAction.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
17final class PlayerAction{
18 private function __construct(){
19 //NOOP
20 }
21
22 public const START_BREAK = 0;
23 public const ABORT_BREAK = 1;
24 public const STOP_BREAK = 2;
25 public const GET_UPDATED_BLOCK = 3;
26 public const DROP_ITEM = 4;
27 public const START_SLEEPING = 5;
28 public const STOP_SLEEPING = 6;
29 public const RESPAWN = 7;
30 public const JUMP = 8;
31 public const START_SPRINT = 9;
32 public const STOP_SPRINT = 10;
33 public const START_SNEAK = 11;
34 public const STOP_SNEAK = 12;
35 public const CREATIVE_PLAYER_DESTROY_BLOCK = 13;
36 public const DIMENSION_CHANGE_ACK = 14; //sent when spawning in a different dimension to tell the server we spawned
37 public const START_GLIDE = 15;
38 public const STOP_GLIDE = 16;
39 public const BUILD_DENIED = 17;
40 public const CRACK_BLOCK = 18;
41 public const CHANGE_SKIN = 19;
42 public const SET_ENCHANTMENT_SEED = 20; //no longer used
43 public const START_SWIMMING = 21;
44 public const STOP_SWIMMING = 22;
45 public const START_SPIN_ATTACK = 23;
46 public const STOP_SPIN_ATTACK = 24;
47 public const INTERACT_BLOCK = 25;
48 public const PREDICT_DESTROY_BLOCK = 26;
49 public const CONTINUE_DESTROY_BLOCK = 27;
50 public const START_ITEM_USE_ON = 28;
51 public const STOP_ITEM_USE_ON = 29;
52 public const HANDLED_TELEPORT = 30;
53 public const MISSED_SWING = 31;
54 public const START_CRAWLING = 32;
55 public const STOP_CRAWLING = 33;
56 public const START_FLYING = 34;
57 public const STOP_FLYING = 35;
58 public const ACK_ACTOR_DATA = 36;
59 public const START_USING_ITEM = 37;
60
61 //Backwards compatibility (blame @dktapps)
62 public const CRACK_BREAK = 18;
63}