-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathAntiGrief.php
109 lines (104 loc) · 3.45 KB
/
AntiGrief.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
/*
__PocketMine Plugin__
name=AntiGrief
description=AntiGrief
version=0.1
author=DemonKingz
class=AntiGrief
apiversion=9
*/
class AntiGrief implements Plugin
{
private $api;
public function __construct(ServerAPI $api, $server = false)
{
$this->api = $api;
}
public function init()
{
$this->api->addHandler("player.block.place", array($this, "playerBlockPlaceHandle"));
}
public function __destruct()
{
}
public function playerBlockPlaceHandle(&$data)
{
if (
$data['item']->getID() === 4 or
$data['item']->getID() === 98 or
$data['item']->getID() === 48 or
$data['item']->getID() === 5 or
$data['item']->getID() === 45 or
$data['item']->getID() === 1 or
$data['item']->getID() === 3 or
$data['item']->getID() === 2 or
$data['item']->getID() === 82 or
$data['item']->getID() === 24 or
$data['item']->getID() === 12 or
$data['item']->getID() === 13 or
$data['item']->getID() === 17 or
$data['item']->getID() === 112 or
$data['item']->getID() === 87 or
$data['item']->getID() === 67 or
$data['item']->getID() === 53 or
$data['item']->getID() === 108 or
$data['item']->getID() === 128 or
$data['item']->getID() === 109 or
$data['item']->getID() === 114 or
$data['item']->getID() === 156 or
$data['item']->getID() === 44 or
$data['item']->getID() === 155 or
$data['item']->getID() === 16 or
$data['item']->getID() === 15 or
$data['item']->getID() === 14 or
$data['item']->getID() === 56 or
$data['item']->getID() === 21 or
$data['item']->getID() === 73 or
$data['item']->getID() === 41 or
$data['item']->getID() === 42 or
$data['item']->getID() === 57 or
$data['item']->getID() === 22 or
$data['item']->getID() === 49 or
$data['item']->getID() === 80 or
$data['item']->getID() === 20 or
$data['item']->getID() === 89 or
$data['item']->getID() === 247 or
$data['item']->getID() === 35 or
$data['item']->getID() === 65 or
$data['item']->getID() === 50 or
$data['item']->getID() === 102 or
$data['item']->getID() === 324 or
$data['item']->getID() === 96 or
$data['item']->getID() === 85 or
$data['item']->getID() === 107 or
$data['item']->getID() === 355 or
$data['item']->getID() === 47 or
$data['item']->getID() === 321 or
$data['item']->getID() === 58 or
$data['item']->getID() === 245 or
$data['item']->getID() === 54 or
$data['item']->getID() === 61 or
$data['item']->getID() === 46 or
$data['item']->getID() === 37 or
$data['item']->getID() === 38 or
$data['item']->getID() === 39 or
$data['item']->getID() === 40 or
$data['item']->getID() === 81 or
$data['item']->getID() === 103 or
$data['item']->getID() === 338 or
$data['item']->getID() === 6 or
$data['item']->getID() === 18 or
$data['item']->getID() === 295 or
$data['item']->getID() === 362 or
$data['item']->getID() === 351 or
$data['item']->getID() === 292 or
$data['item']->getID() === 267 or
$data['item']->getID() === 261 or
$data['item']->getID() === 323
) {
return true;
}
return false;
}
}