Compare commits
691
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4714cfa695 | ||
|
|
e8374371e6 | ||
|
|
7fe34e9508 | ||
|
|
b9cf1ac580 | ||
|
|
f7c8d79667 | ||
|
|
de2d2d4d94 | ||
|
|
6b26cfcd31 | ||
|
|
b097a241c0 | ||
|
|
57555b8c6a | ||
|
|
c389b1c408 | ||
|
|
77a50b95da | ||
|
|
60c973e461 | ||
|
|
bcb4220b5f | ||
|
|
ff67f1fa18 | ||
|
|
9d63b070a1 | ||
|
|
ad3d35751a | ||
|
|
15e1748fd5 | ||
|
|
011caa4d8e | ||
|
|
616db7118d | ||
|
|
928bcc8d3a | ||
|
|
ec3cfa9b7f | ||
|
|
ec76e36a4e | ||
|
|
6d1409316e | ||
|
|
e9618f8780 | ||
|
|
2534e5cbbf | ||
|
|
f5fa69173c | ||
|
|
14c32bc43d | ||
|
|
c6d737528d | ||
|
|
8d69cfc6ce | ||
|
|
7d3a882670 | ||
|
|
8a7dd61348 | ||
|
|
017af785ff | ||
|
|
21661a7557 | ||
|
|
79f2aa3eed | ||
|
|
bd496d0e0d | ||
|
|
1bbd273bbd | ||
|
|
f7d16f656a | ||
|
|
b58c0cf14a | ||
|
|
01a13871de | ||
|
|
abe53a7eb4 | ||
|
|
6d630052fd | ||
|
|
b4c025b92c | ||
|
|
62680d5f83 | ||
|
|
4d52f1d247 | ||
|
|
6736f390a2 | ||
|
|
d3326235f0 | ||
|
|
3996e6ef29 | ||
|
|
f528f53e81 | ||
|
|
ec0c550482 | ||
|
|
8681503d10 | ||
|
|
980c1d1f90 | ||
|
|
339e85d491 | ||
|
|
9e614e6f9a | ||
|
|
8db45c4312 | ||
|
|
ad3dffe715 | ||
|
|
f7e68091a0 | ||
|
|
f8742e26cc | ||
|
|
dbc2d60ce0 | ||
|
|
470c6388d2 | ||
|
|
ea777c345b | ||
|
|
63cb7472ac | ||
|
|
dbda887457 | ||
|
|
34777cdcbe | ||
|
|
b826065a4b | ||
|
|
ef670ebafb | ||
|
|
05f6a5c005 | ||
|
|
f5f84ff476 | ||
|
|
751d092af3 | ||
|
|
36f0c1b3cc | ||
|
|
267dd180b6 | ||
|
|
178f035aa7 | ||
|
|
ef0e5a642d | ||
|
|
51183af967 | ||
|
|
e51401e764 | ||
|
|
36a5f150c5 | ||
|
|
09904fd780 | ||
|
|
e8c2c3bfda | ||
|
|
046466f3ba | ||
|
|
eff22eb054 | ||
|
|
aabf676721 | ||
|
|
0bf8790c9c | ||
|
|
a76998d235 | ||
|
|
2da891fcfa | ||
|
|
4ba43fe02a | ||
|
|
4516aedb43 | ||
|
|
5bf259115c | ||
|
|
db17048325 | ||
|
|
9592da1f84 | ||
|
|
0ddd20c6f7 | ||
|
|
3f0415b453 | ||
|
|
7e11afa426 | ||
|
|
2a74071bcb | ||
|
|
2cab6963a7 | ||
|
|
954b3fb7d5 | ||
|
|
22ad9eedec | ||
|
|
e6f8284125 | ||
|
|
c7e118b394 | ||
|
|
78b19f89a4 | ||
|
|
a47301e40f | ||
|
|
3624637a19 | ||
|
|
0118c0bd79 | ||
|
|
a15152e96a | ||
|
|
bef2c9d005 | ||
|
|
02831e3369 | ||
|
|
a311dcecb3 | ||
|
|
69950d5a6a | ||
|
|
18a0337d6e | ||
|
|
3af906befd | ||
|
|
ef42d2a575 | ||
|
|
a817697e8a | ||
|
|
4a00cee9cc | ||
|
|
7044a9c538 | ||
|
|
c032050ad8 | ||
|
|
e0486ae2cd | ||
|
|
ceef4b9c09 | ||
|
|
dd3e4e7bd6 | ||
|
|
d60497ebf2 | ||
|
|
babffb5a46 | ||
|
|
fd557b7d51 | ||
|
|
1f0d70743e | ||
|
|
fcb7b73847 | ||
|
|
307778fc70 | ||
|
|
532dc51d5f | ||
|
|
6ecdbc09c2 | ||
|
|
8a08b86f4b | ||
|
|
65f0b2e2e4 | ||
|
|
b74c4d4587 | ||
|
|
b72eafc04d | ||
|
|
e5bbb56ac6 | ||
|
|
3b895f36fd | ||
|
|
2acb479b41 | ||
|
|
4a4ee79cd6 | ||
|
|
71544ab01f | ||
|
|
c488d15359 | ||
|
|
2184cd2252 | ||
|
|
d41ecbe5c3 | ||
|
|
cb6f029de9 | ||
|
|
063e6b288c | ||
|
|
64cb313386 | ||
|
|
c8f3d9ee8c | ||
|
|
6b80b342d9 | ||
|
|
c7304035b6 | ||
|
|
aab40382a5 | ||
|
|
7a133678da | ||
|
|
50710fa684 | ||
|
|
08828fde02 | ||
|
|
afb9e818fc | ||
|
|
faafca851c | ||
|
|
734a43657a | ||
|
|
86f87ba400 | ||
|
|
345a6a6205 | ||
|
|
22ac7d6817 | ||
|
|
b327e17634 | ||
|
|
44b6869fd2 | ||
|
|
46a9d2a4ac | ||
|
|
1a8bea734a | ||
|
|
4952c04610 | ||
|
|
0193a9db5d | ||
|
|
5deafd1969 | ||
|
|
52a60ad946 | ||
|
|
d0e7fa4dc9 | ||
|
|
c6313e659c | ||
|
|
73dca00ba5 | ||
|
|
a76a1ab862 | ||
|
|
16ee379389 | ||
|
|
bebfc79708 | ||
|
|
10f09b938a | ||
|
|
b7faa655cb | ||
|
|
384d63918c | ||
|
|
90836d0da6 | ||
|
|
fdd910e0cf | ||
|
|
036a09c300 | ||
|
|
cd215af6eb | ||
|
|
e4f21e3178 | ||
|
|
b58063a949 | ||
|
|
e294802977 | ||
|
|
5ffeb70186 | ||
|
|
41238a4e24 | ||
|
|
95ac8745f0 | ||
|
|
c4782f50a3 | ||
|
|
6ea73e7d63 | ||
|
|
a05e69b9fc | ||
|
|
c879064bfe | ||
|
|
fbb11db9a5 | ||
|
|
385f313a8b | ||
|
|
1e5d1db2b7 | ||
|
|
d86fde5523 | ||
|
|
41647af74c | ||
|
|
ed79fc947a | ||
|
|
9d0650ed60 | ||
|
|
c029645443 | ||
|
|
a22eb678af | ||
|
|
281834752c | ||
|
|
1bd678c494 | ||
|
|
0d79b867e5 | ||
|
|
37afe987d9 | ||
|
|
11bd74bc56 | ||
|
|
e7036bb2d7 | ||
|
|
04d080ed82 | ||
|
|
5593f4edd3 | ||
|
|
bdb6816960 | ||
|
|
e52499e41d | ||
|
|
147a2b7f54 | ||
|
|
4c9317c9fb | ||
|
|
fb2c24b36d | ||
|
|
ed9cf5ca08 | ||
|
|
9797f081c2 | ||
|
|
b0eb4e0c74 | ||
|
|
7688112546 | ||
|
|
b77fe3a42b | ||
|
|
e269a0a00b | ||
|
|
81f2eece54 | ||
|
|
d1b1c6ffd9 | ||
|
|
dd613194ed | ||
|
|
f428887cc1 | ||
|
|
0ae78d381a | ||
|
|
0c1643c02c | ||
|
|
2dcfb2b11f | ||
|
|
94ef34cd0f | ||
|
|
17c1c6c3e7 | ||
|
|
4a48ed306d | ||
|
|
805423c90e | ||
|
|
e3042d2506 | ||
|
|
48f7a1a9ef | ||
|
|
cb410bb612 | ||
|
|
b844286f48 | ||
|
|
16541757f7 | ||
|
|
3d37b42a89 | ||
|
|
8bae82db21 | ||
|
|
bd097b4323 | ||
|
|
e4f5e1c9ab | ||
|
|
90050ffd54 | ||
|
|
3690440aaa | ||
|
|
4797e3a945 | ||
|
|
8b6f4dd482 | ||
|
|
ee4916df7d | ||
|
|
6c52b5e2c8 | ||
|
|
c044b14efd | ||
|
|
9ad94dcbc4 | ||
|
|
dfc10448bb | ||
|
|
46954ee75b | ||
|
|
55201f00e8 | ||
|
|
d7165b0d56 | ||
|
|
1ccff4f5d1 | ||
|
|
c80df849c2 | ||
|
|
f8beab5e5e | ||
|
|
ee7d16111d | ||
|
|
5a2973fd80 | ||
|
|
76f81aec25 | ||
|
|
99aa5f2fa5 | ||
|
|
698b3152cf | ||
|
|
8bca9190a4 | ||
|
|
a8a01bbb52 | ||
|
|
cf384f5269 | ||
|
|
9b6fb2fe71 | ||
|
|
07548192b1 | ||
|
|
9a75a79edd | ||
|
|
8141349df1 | ||
|
|
dd6a8e9394 | ||
|
|
02b5ec4c78 | ||
|
|
cfe3ad1b0f | ||
|
|
83e2a3582b | ||
|
|
4a51a54896 | ||
|
|
5ac29fcb93 | ||
|
|
d833c0c39a | ||
|
|
7c55e62abc | ||
|
|
ade44f39ce | ||
|
|
0a21166a8b | ||
|
|
181a8479b5 | ||
|
|
6249dd5ecb | ||
|
|
77de07a15d | ||
|
|
e5ed99a29a | ||
|
|
3f1c6a45da | ||
|
|
ad51c406d5 | ||
|
|
09c9215b85 | ||
|
|
5052a4515e | ||
|
|
c946526ab1 | ||
|
|
c34a306393 | ||
|
|
acd50c5287 | ||
|
|
f27aa33aba | ||
|
|
d9fcf39f65 | ||
|
|
2e68ecc289 | ||
|
|
e47848f112 | ||
|
|
84434e6ae9 | ||
|
|
a3a0390e3b | ||
|
|
d385af0e01 | ||
|
|
e1c2939c11 | ||
|
|
b26d590d0c | ||
|
|
7be0194157 | ||
|
|
ffddec55d0 | ||
|
|
d7cc306336 | ||
|
|
172d260d67 | ||
|
|
da8027352c | ||
|
|
467a16642a | ||
|
|
9107753202 | ||
|
|
cbb47cacdb | ||
|
|
11c2705ac2 | ||
|
|
86c16504d6 | ||
|
|
29e918948a | ||
|
|
a93aa05bf8 | ||
|
|
e24a25097a | ||
|
|
897cc27c8b | ||
|
|
d1e1217a01 | ||
|
|
44ccc15a30 | ||
|
|
4c1b338e0f | ||
|
|
bd134f856b | ||
|
|
222391f809 | ||
|
|
b3b63d3a02 | ||
|
|
57dfcdf4eb | ||
|
|
a02874e014 | ||
|
|
8399e10c43 | ||
|
|
02804a49a2 | ||
|
|
7a165c9c5d | ||
|
|
a6bc17b8bb | ||
|
|
913d2ae0b8 | ||
|
|
9ab6893183 | ||
|
|
d5216d8588 | ||
|
|
af4b5ee4f0 | ||
|
|
1d5b298c19 | ||
|
|
b561fd8b25 | ||
|
|
7ece9454f7 | ||
|
|
b1f5e70075 | ||
|
|
55d7f562b8 | ||
|
|
beab8a32c1 | ||
|
|
2259098789 | ||
|
|
301cf577c2 | ||
|
|
391e65f1af | ||
|
|
2f0b2b93df | ||
|
|
d28b20944b | ||
|
|
8d5407b16f | ||
|
|
82f712c096 | ||
|
|
f0e575f445 | ||
|
|
0e06c77264 | ||
|
|
b464e02ba4 | ||
|
|
cc7979a6e0 | ||
|
|
aabbfcdf8d | ||
|
|
a1d0432c2c | ||
|
|
89c3c31af9 | ||
|
|
feca8d248c | ||
|
|
2304bb3d6f | ||
|
|
0745f97bb5 | ||
|
|
dc12a6e9fe | ||
|
|
c3fc3de622 | ||
|
|
f04e64dfc6 | ||
|
|
f371b4e374 | ||
|
|
c5db5371bf | ||
|
|
7bbeef26ba | ||
|
|
d41a026555 | ||
|
|
515da2fb1b | ||
|
|
26ea0402d8 | ||
|
|
a27b508dea | ||
|
|
68b585fba7 | ||
|
|
a16970ac1b | ||
|
|
c515eb9a08 | ||
|
|
32c195bd4f | ||
|
|
87ca0fa790 | ||
|
|
3a0b9487d4 | ||
|
|
58133bdfdf | ||
|
|
4e13355af1 | ||
|
|
addf9c9155 | ||
|
|
7d7779a667 | ||
|
|
3773770230 | ||
|
|
aac58bb772 | ||
|
|
c321ca57db | ||
|
|
13fe88643e | ||
|
|
88f74d1bac | ||
|
|
cac4deb882 | ||
|
|
1669c6b097 | ||
|
|
2710efc693 | ||
|
|
a9c507310b | ||
|
|
028e2d9f00 | ||
|
|
56e64243ed | ||
|
|
cb05aa6b8b | ||
|
|
276d830d22 | ||
|
|
4b27254e6a | ||
|
|
d8ef841114 | ||
|
|
b3deb2589e | ||
|
|
5befb5586e | ||
|
|
5b6397af2c | ||
|
|
071a4a2444 | ||
|
|
4d83ed0ae1 | ||
|
|
bed5cb2b81 | ||
|
|
fd069dd5af | ||
|
|
8fc0999b09 | ||
|
|
a3ad720749 | ||
|
|
2033dba4fa | ||
|
|
80d5e71908 | ||
|
|
1d08ce8583 | ||
|
|
b1ac25fdb8 | ||
|
|
71fe3c64f0 | ||
|
|
c5caee307e | ||
|
|
2d17a50b8b | ||
|
|
7602dd2014 | ||
|
|
00c6ae8419 | ||
|
|
04e1b070ef | ||
|
|
78e6431008 | ||
|
|
3f7111d4e1 | ||
|
|
f210f67c4a | ||
|
|
6b035fd9a1 | ||
|
|
f7382f5f4b | ||
|
|
c123915afc | ||
|
|
9667181d1d | ||
|
|
af3b3778f6 | ||
|
|
3f7fbe316d | ||
|
|
b6a6544ad1 | ||
|
|
182a609b85 | ||
|
|
79e07f34ac | ||
|
|
a90092e758 | ||
|
|
31ccc579b5 | ||
|
|
d8108b5416 | ||
|
|
123cad5d3e | ||
|
|
fc1752ff15 | ||
|
|
ed4e9163ef | ||
|
|
9b492cff36 | ||
|
|
ca623865b0 | ||
|
|
7045f18469 | ||
|
|
73bd35d076 | ||
|
|
0116751101 | ||
|
|
8d1de8de8d | ||
|
|
9fd870db0b | ||
|
|
5928327f90 | ||
|
|
18f0f8d1ca | ||
|
|
268476bba3 | ||
|
|
e399754320 | ||
|
|
87d2eb2d3b | ||
|
|
1a17a83f8a | ||
|
|
7a6163b41d | ||
|
|
b831784aed | ||
|
|
8c9d98e100 | ||
|
|
2515bc4751 | ||
|
|
421938915c | ||
|
|
f3a8a0b953 | ||
|
|
a117da6b26 | ||
|
|
f6a69dedb9 | ||
|
|
2ab0258b5a | ||
|
|
e5da93a608 | ||
|
|
e564110f9e | ||
|
|
4166632333 | ||
|
|
608482d512 | ||
|
|
6f5e6c60d3 | ||
|
|
ce059b4f99 | ||
|
|
d70ac039e8 | ||
|
|
0bf7c95c8d | ||
|
|
4dc78ae8b9 | ||
|
|
5b85ee37e2 | ||
|
|
fbbc03a740 | ||
|
|
47f43da438 | ||
|
|
caf4a6f0d6 | ||
|
|
16f224a79a | ||
|
|
0f8aa4e6fd | ||
|
|
ef6a1a5f99 | ||
|
|
c449f6a1f7 | ||
|
|
567fce6c76 | ||
|
|
76ed156764 | ||
|
|
873bfa6000 | ||
|
|
4ecc338e09 | ||
|
|
c7d4c0188e | ||
|
|
c642d25f63 | ||
|
|
86fb3d201d | ||
|
|
c66b0f99f2 | ||
|
|
8bfb1d22f8 | ||
|
|
6b9f7a073e | ||
|
|
af943641e2 | ||
|
|
1cfd363d32 | ||
|
|
c6e631aacb | ||
|
|
b8fa41ecdf | ||
|
|
a9f252e56a | ||
|
|
d4a712d957 | ||
|
|
a9ee1046a5 | ||
|
|
e42d683d75 | ||
|
|
f8e8d6c3cd | ||
|
|
4322c05f02 | ||
|
|
2f16393ad9 | ||
|
|
11e0dcdf86 | ||
|
|
29144573e6 | ||
|
|
62dcff3e8d | ||
|
|
92426e39be | ||
|
|
820e9ca70b | ||
|
|
87e11bf7fd | ||
|
|
ea2c81e4b9 | ||
|
|
443c5062c1 | ||
|
|
04c7b16bde | ||
|
|
7bf9446d9e | ||
|
|
7f47b9b7f8 | ||
|
|
d3c102373f | ||
|
|
fa68bb1e81 | ||
|
|
7fa8870043 | ||
|
|
e2f743d914 | ||
|
|
e7d928a8e1 | ||
|
|
ab666a48ee | ||
|
|
a939d6e08e | ||
|
|
993f8288fa | ||
|
|
a686ff5670 | ||
|
|
7b46444bea | ||
|
|
5eb61dd432 | ||
|
|
855637f967 | ||
|
|
bc68ee09be | ||
|
|
319d5fa29f | ||
|
|
2eeca6f108 | ||
|
|
8897cea0b0 | ||
|
|
b8c90d2428 | ||
|
|
8788bf7441 | ||
|
|
f0d0078deb | ||
|
|
1c5f8b0fce | ||
|
|
f35a0ceb93 | ||
|
|
2d3e8f7729 | ||
|
|
0ca80c7ee8 | ||
|
|
a5be178ac3 | ||
|
|
c8e49cc53e | ||
|
|
1ce3555ada | ||
|
|
b65b48fd31 | ||
|
|
1358d1e914 | ||
|
|
ab03538fa1 | ||
|
|
87927e176c | ||
|
|
bfa33d955c | ||
|
|
dc96bba6de | ||
|
|
aab1f8a74e | ||
|
|
ea1efef116 | ||
|
|
1790528a61 | ||
|
|
d714682f8f | ||
|
|
657d163740 | ||
|
|
b55ba19ad3 | ||
|
|
4423e1221a | ||
|
|
7a21333019 | ||
|
|
718fab1f6b | ||
|
|
e0b3f3f8cb | ||
|
|
c34fb0942a | ||
|
|
d9bf5e740b | ||
|
|
7b9c30fb82 | ||
|
|
a36d7f6427 | ||
|
|
1e12cf8db6 | ||
|
|
196271de4e | ||
|
|
6564f70f4c | ||
|
|
935151388a | ||
|
|
f9b05cc3f1 | ||
|
|
1d7a6a0732 | ||
|
|
42a9c3789d | ||
|
|
6d4784392d | ||
|
|
b6616c8a18 | ||
|
|
0ee6ddaf33 | ||
|
|
63aa4d3319 | ||
|
|
b9f26bb1e9 | ||
|
|
719daa8bbf | ||
|
|
c09365aeac | ||
|
|
15b6b3db2c | ||
|
|
753bf2c103 | ||
|
|
d33cdcf2e6 | ||
|
|
90788a556c | ||
|
|
12d89fe5ae | ||
|
|
c6ea84c7fa | ||
|
|
d3caeeb6c2 | ||
|
|
b1afebbd52 | ||
|
|
178802ab94 | ||
|
|
14add2b049 | ||
|
|
0859f59469 | ||
|
|
ab8a139612 | ||
|
|
126ca7376e | ||
|
|
b9037a5c7d | ||
|
|
146ac7bcd6 | ||
|
|
cc45a355a4 | ||
|
|
5071d50207 | ||
|
|
fd7432601d | ||
|
|
3526f22211 | ||
|
|
fbe43d6a1d | ||
|
|
c6fc144ba0 | ||
|
|
37436ac61a | ||
|
|
9a73213f88 | ||
|
|
9da236fe6a | ||
|
|
490517d31e | ||
|
|
c98499113f | ||
|
|
02e2402161 | ||
|
|
706c98a603 | ||
|
|
f4eb08a477 | ||
|
|
19f9520b3a | ||
|
|
60af9b0cb3 | ||
|
|
12efc3fcf5 | ||
|
|
c2e2281f29 | ||
|
|
30cb7d0407 | ||
|
|
7f65b0b589 | ||
|
|
bfa50ad5b3 | ||
|
|
2a55e35124 | ||
|
|
b6dad9c903 | ||
|
|
04a337af59 | ||
|
|
501834e57a | ||
|
|
db811631ae | ||
|
|
854f3d35c1 | ||
|
|
cdb893bb9e | ||
|
|
9cab01ed1d | ||
|
|
b757019dc5 | ||
|
|
392acfdaa4 | ||
|
|
36a1650dbf | ||
|
|
7b8e0c3acf | ||
|
|
5bb4549f48 | ||
|
|
286bd1bfb5 | ||
|
|
b173c3ee2c | ||
|
|
f5b9e07a2a | ||
|
|
2a4aef3d97 | ||
|
|
c50fc3a026 | ||
|
|
a8f2d67491 | ||
|
|
e6898ff61e | ||
|
|
92c777d393 | ||
|
|
9567753460 | ||
|
|
3d91ecac51 | ||
|
|
2c4a5892ec | ||
|
|
2c8d48c555 | ||
|
|
4a745f9163 | ||
|
|
26734e83b0 | ||
|
|
00da0989f3 | ||
|
|
0cc2503b88 | ||
|
|
6df46412cf | ||
|
|
46ed080d3b | ||
|
|
9940bcabcc | ||
|
|
f23c03955b | ||
|
|
2ec04e0938 | ||
|
|
2121aed33d | ||
|
|
f79c0daece | ||
|
|
17eb8845f3 | ||
|
|
3109dd87ee | ||
|
|
41263d9231 | ||
|
|
2e99e5e677 | ||
|
|
ca523abbdd | ||
|
|
f7dbd062e7 | ||
|
|
b164899084 | ||
|
|
9490475b02 | ||
|
|
7978121c7c | ||
|
|
f6c7d536a8 | ||
|
|
a058ac05d8 | ||
|
|
9a1930867b | ||
|
|
0a9602c412 | ||
|
|
512995c2a5 | ||
|
|
60e46abb00 | ||
|
|
dcca6cb1be | ||
|
|
feb72b8ae1 | ||
|
|
2a306f513c | ||
|
|
128691a963 | ||
|
|
c904da6eab | ||
|
|
45338214b0 | ||
|
|
6b526f9645 | ||
|
|
7c3893c0c4 | ||
|
|
f1db23e47f | ||
|
|
919e59494c | ||
|
|
048e030914 | ||
|
|
17e1f65669 | ||
|
|
60b7d5ee0c | ||
|
|
6d67504ab5 | ||
|
|
99cf01f993 | ||
|
|
5c74af2efa | ||
|
|
36ce000793 | ||
|
|
78999b5778 | ||
|
|
6663747b89 | ||
|
|
0c64d401aa | ||
|
|
ebaca20edd | ||
|
|
cb198ff936 | ||
|
|
6f0762c012 | ||
|
|
31f01379ce | ||
|
|
3ea224d128 | ||
|
|
87d8ef9f24 | ||
|
|
2be9beb5dc | ||
|
|
a736c1a3c7 | ||
|
|
7d7ae7b881 | ||
|
|
d9fb602057 | ||
|
|
eb48ada00b | ||
|
|
5ccd3050ed | ||
|
|
c3d812d341 | ||
|
|
9a47cf1834 | ||
|
|
e64ac41fe2 | ||
|
|
55a1756ade | ||
|
|
20c131b96b | ||
|
|
5e30e19e20 | ||
|
|
00d6cca4df | ||
|
|
eb98398158 | ||
|
|
d0b8b1e972 | ||
|
|
79dd62ae62 | ||
|
|
19bc612483 | ||
|
|
d3f3429d03 | ||
|
|
503ac8f1cb | ||
|
|
cee7e0df01 | ||
|
|
fb4ff200f4 | ||
|
|
3c5284dae9 | ||
|
|
4bf2aef745 | ||
|
|
3a43821c38 | ||
|
|
8b1734123e | ||
|
|
fa438331e0 | ||
|
|
58c41d0f60 | ||
|
|
c40e04e9e7 | ||
|
|
64f9225c94 | ||
|
|
686bbd33d4 | ||
|
|
2d458ee14f | ||
|
|
721f14842f | ||
|
|
a99a33cdd9 | ||
|
|
7b833ca18f |
No files matched your search
@@ -10,3 +10,9 @@ indent_style=tab
|
||||
|
||||
[*.bat]
|
||||
end_of_line=crlf
|
||||
|
||||
[*.yml]
|
||||
indent_size=2
|
||||
|
||||
[*.patch]
|
||||
trim_trailing_whitespace=false
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
* @PaperMC/maintainers
|
||||
* @PaperMC/paper-maintainers
|
||||
/.github/CODEOWNERS @PaperMC/core-team
|
||||
@@ -41,4 +41,4 @@ body:
|
||||
attributes:
|
||||
value: |
|
||||
Before submitting this feature request, please search our issue tracker to ensure your feature has not
|
||||
alerady been requested.
|
||||
already been requested.
|
||||
@@ -35,7 +35,7 @@ body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Server config files
|
||||
description: We need bukkit.yml, spigot.yml, paper.yml, and server.properties. You can paste it below or use a paste site like https://paste.gg.
|
||||
description: We need bukkit.yml, spigot.yml, paper-global.yml, paper-world-defaults.yml and server.properties. If you use per-world Paper configs, make sure to include them. You can paste it below or use a paste site like https://paste.gg.
|
||||
value: |
|
||||
```
|
||||
Paste configs or paste.gg link here!
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
daysUntilStale: 60
|
||||
daysUntilClose: 7
|
||||
exemptLabels:
|
||||
- "for: future"
|
||||
- "type: bug"
|
||||
- "status: accepted"
|
||||
- "status: blocked"
|
||||
- "status: in progress"
|
||||
- "status: rebase required"
|
||||
staleLabel: "resolution: stale"
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
closeComment: >
|
||||
This issue has been automatically closed because it has not had activity in
|
||||
a long time. If the issue still applies to the most recent supported
|
||||
version, please open a new issue referencing this original issue.
|
||||
@@ -18,9 +18,9 @@ jobs:
|
||||
java: [17]
|
||||
fail-fast: true
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.5
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- name: JDK ${{ matrix.java }}
|
||||
uses: actions/setup-java@v2.3.1
|
||||
uses: actions/setup-java@v3.1.0
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
cache: 'gradle'
|
||||
|
||||
+46
-47
@@ -168,7 +168,7 @@ move it under the line of the patch you wish to modify;
|
||||
assist you too.
|
||||
- Alternatively, if you only know the name of the patch, you can do
|
||||
`git commit -a --fixup "Subject of Patch name"`.
|
||||
1. Rebase with autosquash: `git rebase --autosquash -i base`.
|
||||
1. Rebase with autosquash: `git rebase -i --autosquash base`.
|
||||
This will automatically move your fixup commit to the right place, and you just
|
||||
need to "save" the changes.
|
||||
1. Type `./gradlew rebuildPatches` in the root directory;
|
||||
@@ -309,56 +309,55 @@ what fits best in your situation.
|
||||
|
||||
## Configuration files
|
||||
|
||||
To use a configurable value in your patch, add a new entry in either the
|
||||
`PaperConfig` or `PaperWorldConfig` classes. Use `PaperConfig` if a value
|
||||
To use a configurable value in your patch, add a new field in either the
|
||||
`GlobalConfiguration` or `WorldConfiguration` classes (inside the
|
||||
`io.papermc.paper.configuration` package). Use `GlobalConfiguration` if a value
|
||||
must remain the same throughout all worlds, or the latter if it can change
|
||||
between worlds. World-specific configuration options are preferred whenever
|
||||
possible.
|
||||
|
||||
### PaperConfig example
|
||||
|
||||
### Example
|
||||
This is adding a new miscellaneous setting that doesn't seem to fit in other categories.
|
||||
Try to check and see if an existing category (inner class) exists that matches
|
||||
whatever configuration option you are adding.
|
||||
```java
|
||||
public static boolean saveEmptyScoreboardTeams = false;
|
||||
private static void saveEmptyScoreboardTeams() {
|
||||
// This is called automatically!
|
||||
// The name also doesn't matter.
|
||||
saveEmptyScoreboardTeams = getBoolean("settings.save-empty-scoreboard-teams", false);
|
||||
public class GlobalConfiguration {
|
||||
// other sections
|
||||
public class Misc extends ConfigurationPart {
|
||||
// other settings
|
||||
public boolean lagCompensateBlockBreaking = true;
|
||||
public boolean useDimensionTypeForCustomSpawners = false;
|
||||
public int maxNumOfPlayers = 20; // This is the new setting
|
||||
}
|
||||
}
|
||||
```
|
||||
You set the type of the setting as the field type, and the default value is the
|
||||
initial field value. The name of the setting defaults to the snake-case of the
|
||||
field name, so in this case it would be `misc.max-num-of-players`. You can use
|
||||
the `@Setting` annotation to override that, but generally just try to set the
|
||||
field name to what you want the setting to be called.
|
||||
|
||||
Notice that the field is always public, but the setter is always private. This
|
||||
is important to the way the configuration generation system works. To access
|
||||
this value, reference it as you would any other static value:
|
||||
|
||||
#### Accessing the value
|
||||
If you added a new global config value, you can access it in the code just by
|
||||
doing
|
||||
```java
|
||||
if (!PaperConfig.saveEmptyScoreboardTeams) {
|
||||
int maxPlayers = GlobalConfiguration.get().misc.maxNumOfPlayers;
|
||||
```
|
||||
Generally for global config values you will use the fully qualified class name,
|
||||
`io.papermc.paper.configuration.GlobalConfiguration` since it's not imported in
|
||||
most places.
|
||||
---
|
||||
If you are adding a new world config value, you must have access to an instance
|
||||
of the `net.minecraft.world.level.Level` which you can then access the config by doing
|
||||
```java
|
||||
int maxPlayers = level.paperConfig().misc.maxNumOfPlayers;
|
||||
```
|
||||
|
||||
It is often preferred that you use the fully qualified name for the
|
||||
configuration class when accessing it, like so:
|
||||
`com.destroystokyo.paper.PaperConfig.valueHere`.
|
||||
If this is not done, a developer for Paper might fix that for you before
|
||||
merging, but it's always nice if you make it a habit where you only need 1-2
|
||||
lines changed.
|
||||
|
||||
### PaperWorldConfig example
|
||||
|
||||
```java
|
||||
public boolean useInhabitedTime = true;
|
||||
private void useInhabitedTime() {
|
||||
// This is called automatically!
|
||||
// The name also doesn't matter.
|
||||
useInhabitedTime = getBoolean("use-chunk-inhabited-timer", true);
|
||||
}
|
||||
```
|
||||
|
||||
Again, notice that the field is always public, but the setter is always private.
|
||||
To access this value, you'll need an instance of the `net.minecraft.world.level.Level`
|
||||
object:
|
||||
|
||||
```java
|
||||
return this.level.paperConfig.useInhabitedTime ? this.inhabitedTime : 0;
|
||||
```
|
||||
#### Committing changes
|
||||
All changes to the `GlobalConfiguration` and `WorldConfiguration` files
|
||||
should be done in the commit that created them. So do an interactive rebase
|
||||
or fixup to apply just those changes to that commit, then add a new commit
|
||||
that includes the logic that uses that option in the server somewhere.
|
||||
|
||||
## Testing API changes
|
||||
|
||||
@@ -402,7 +401,7 @@ progress will be lost if you do not;
|
||||
1. Identify the name(s) of the file(s) you want to import.
|
||||
- A complete list of all possible file names can be found at
|
||||
`./Paper-Server/.gradle/caches/paperweight/mc-dev-sources/net/minecraft/`. You might find
|
||||
[MiniMappingViewer] useful if you need to translate between Mojang and Spigot mapped names.
|
||||
[MappingViewer] useful if you need to translate between Mojang and Spigot mapped names.
|
||||
1. Open the file at `./build-data/dev-imports.txt` and add the name of your file to
|
||||
the script. Follow the instructions there;
|
||||
1. Re-patch the server `./gradlew applyPatches`;
|
||||
@@ -427,16 +426,16 @@ file (`CONTRIBUTING.md`), the `LICENSE.md` file, and so forth.
|
||||
### Patching and building is *really* slow, what can I do?
|
||||
|
||||
This only applies if you're running Windows. If you're running a prior Windows
|
||||
release, either update to Windows 10 or move to macOS/Linux/BSD.
|
||||
release, either update to Windows 10/11 or move to macOS/Linux/BSD.
|
||||
|
||||
In order to speed up patching process on Windows, it's recommended you get WSL
|
||||
2. This is available in Windows 10 v2004, build 19041 or higher. (You can check
|
||||
your version by running `winver` in the run window (Windows key + R)). If you're
|
||||
out of date, update your system with the
|
||||
[Windows Update Assistant](https://www.microsoft.com/en-us/software-download/windows10).
|
||||
using an out of date version of Windows 10, update your system with the
|
||||
[Windows 10 Update Assistant](https://www.microsoft.com/en-us/software-download/windows10) or [Windows 11 Update Assistant](https://www.microsoft.com/en-us/software-download/windows11).
|
||||
|
||||
To set up WSL 2, follow the information here:
|
||||
<https://docs.microsoft.com/en-us/windows/wsl/install-win10>
|
||||
<https://docs.microsoft.com/en-us/windows/wsl/install>
|
||||
|
||||
You will most likely want to use the Ubuntu apps. Once it's set up, install the
|
||||
required tools with `sudo apt-get update && sudo apt-get install $TOOL_NAMES
|
||||
@@ -446,6 +445,6 @@ everything like usual.
|
||||
|
||||
> ❗ Do not use the `/mnt/` directory in WSL! Instead, mount the WSL directories
|
||||
> in Windows like described here:
|
||||
> <https://www.howtogeek.com/426749/how-to-access-your-linux-wsl-files-in-windows-10/>
|
||||
> <https://docs.microsoft.com/en-us/windows/wsl/filesystems#view-your-current-directory-in-windows-file-explorer>
|
||||
|
||||
[MiniMappingViewer]: https://minidigger.github.io/MiniMappingViewer/
|
||||
[MappingViewer]: https://nms.screamingsandals.org/
|
||||
+2
-1
@@ -40,7 +40,6 @@ rickyboy320 <rickw320@hotmail.com>
|
||||
DoNotSpamPls <7570108+DoNotSpamPls@users.noreply.github.com>
|
||||
JRoy <joshroy126@gmail.com>
|
||||
ysl3000 <yannicklamprecht@live.de>
|
||||
kennytv <jahnke.nassim@gmail.com>
|
||||
Machine_Maker <machine@machinemaker.me>
|
||||
Ivan Pekov <ivan@mrivanplays.com>
|
||||
Camotoy <20743703+Camotoy@users.noreply.github.com>
|
||||
@@ -49,4 +48,6 @@ MeFisto94 <MeFisto94@users.noreply.github.com>
|
||||
Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
||||
LemonCaramel <admin@caramel.moe>
|
||||
Noah van der Aa <ndvdaa@gmail.com>
|
||||
Doc <nachito94@msn.com>
|
||||
Nick Hensel <nickhensel25@icloud.com>
|
||||
```
|
||||
@@ -8,11 +8,6 @@ java {
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://libraries.minecraft.net")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":paper-api"))
|
||||
api("com.mojang:brigadier:1.0.18")
|
||||
@@ -30,3 +25,12 @@ configure<PublishingExtension> {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
|
||||
val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
|
||||
badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
|
||||
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
|
||||
classpath.from(configurations.compileClasspath)
|
||||
}
|
||||
tasks.check {
|
||||
dependsOn(scanJar)
|
||||
}
|
||||
+5
@@ -5,5 +5,10 @@ import com.mojang.brigadier.suggestion.SuggestionProvider;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* Brigadier {@link Command}, {@link SuggestionProvider}, and permission checker for Bukkit {@link Command}s.
|
||||
*
|
||||
* @param <S> command source type
|
||||
*/
|
||||
public interface BukkitBrigadierCommand <S extends BukkitBrigadierCommandSource> extends Command<S>, Predicate<S>, SuggestionProvider<S> {
|
||||
}
|
||||
+18
-14
@@ -3,33 +3,33 @@ package com.destroystokyo.paper.event.brigadier;
|
||||
import com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource;
|
||||
import com.mojang.brigadier.tree.RootCommandNode;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Warning;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.player.PlayerEvent;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Fired any time a Brigadier RootCommandNode is generated for a player to inform the client of commands.
|
||||
* You may manipulate this CommandNode to change what the client sees.
|
||||
*
|
||||
* This event may fire on login, world change, and permission rebuilds, by plugin request, and potentially future means.
|
||||
* <p>This event may fire on login, world change, and permission rebuilds, by plugin request, and potentially future means.</p>
|
||||
*
|
||||
* This event will fire before {@link org.bukkit.event.player.PlayerCommandSendEvent}, so no filtering has been done by
|
||||
* other plugins yet.
|
||||
* <p>This event will fire before {@link org.bukkit.event.player.PlayerCommandSendEvent}, so no filtering has been done by
|
||||
* other plugins yet.</p>
|
||||
*
|
||||
* WARNING: This event will potentially (and most likely) fire twice! Once for Async, and once again for Sync.
|
||||
* <p>WARNING: This event will potentially (and most likely) fire twice! Once for Async, and once again for Sync.
|
||||
* It is important that you check event.isAsynchronous() and event.hasFiredAsync() to ensure you only act once.
|
||||
* If for some reason we are unable to send this asynchronously in the future, only the sync method will fire.
|
||||
* If for some reason we are unable to send this asynchronously in the future, only the sync method will fire.</p>
|
||||
*
|
||||
* Your logic should look like this:
|
||||
* if (event.isAsynchronous() || !event.hasFiredAsync()) { do stuff }
|
||||
* <p>Your logic should look like this:
|
||||
* {@code if (event.isAsynchronous() || !event.hasFiredAsync()) { // do stuff }}</p>
|
||||
*
|
||||
* If your logic is not safe to run asynchronously, only react to the synchronous version.
|
||||
* @deprecated Draft API - Subject to change until confirmed solves desired use cases
|
||||
* <p>If your logic is not safe to run asynchronously, only react to the synchronous version.</p>
|
||||
*
|
||||
* <p>This is a draft/experimental API and is subject to change.</p>
|
||||
*/
|
||||
@Deprecated
|
||||
@Warning(false)
|
||||
@ApiStatus.Experimental
|
||||
public class AsyncPlayerSendCommandsEvent <S extends BukkitBrigadierCommandSource> extends PlayerEvent {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@@ -43,14 +43,18 @@ public class AsyncPlayerSendCommandsEvent <S extends BukkitBrigadierCommandSourc
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The full Root Command Node being sent to the client, which is mutable.
|
||||
* Gets the full Root Command Node being sent to the client, which is mutable.
|
||||
*
|
||||
* @return the root command node
|
||||
*/
|
||||
public RootCommandNode<S> getCommandNode() {
|
||||
return node;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return If this event has already fired asynchronously.
|
||||
* Gets if this event has already fired asynchronously.
|
||||
*
|
||||
* @return whether this event has already fired asynchronously
|
||||
*/
|
||||
public boolean hasFiredAsync() {
|
||||
return hasFiredAsync;
|
||||
|
||||
+13
-6
@@ -10,8 +10,9 @@ import org.bukkit.event.player.PlayerEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Called when sending Suggestions to the client. Will be called asynchronously if a plugin
|
||||
* marks the AsyncTabComplete event handled asynchronously, otherwise called synchronously.
|
||||
* Called when sending {@link Suggestions} to the client. Will be called asynchronously if a plugin
|
||||
* marks the {@link com.destroystokyo.paper.event.server.AsyncTabCompleteEvent} event handled asynchronously,
|
||||
* otherwise called synchronously.
|
||||
*/
|
||||
public class AsyncPlayerSendSuggestionsEvent extends PlayerEvent implements Cancellable {
|
||||
|
||||
@@ -28,21 +29,27 @@ public class AsyncPlayerSendSuggestionsEvent extends PlayerEvent implements Canc
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The input buffer sent to request these suggestions
|
||||
* Gets the input buffer sent to request these suggestions.
|
||||
*
|
||||
* @return the input buffer
|
||||
*/
|
||||
public String getBuffer() {
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The suggestions being sent to client
|
||||
* Gets the suggestions to be sent to client.
|
||||
*
|
||||
* @return the suggestions
|
||||
*/
|
||||
public Suggestions getSuggestions() {
|
||||
return suggestions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param suggestions The suggestions to be sent to client if need to change them
|
||||
* Sets the suggestions to be sent to client.
|
||||
*
|
||||
* @param suggestions suggestions
|
||||
*/
|
||||
public void setSuggestions(Suggestions suggestions) {
|
||||
this.suggestions = suggestions;
|
||||
@@ -57,7 +64,7 @@ public class AsyncPlayerSendSuggestionsEvent extends PlayerEvent implements Canc
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels sending suggestions to the client
|
||||
* Cancels sending suggestions to the client.
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
|
||||
+72
-29
@@ -5,26 +5,24 @@ import com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource;
|
||||
import com.mojang.brigadier.tree.ArgumentCommandNode;
|
||||
import com.mojang.brigadier.tree.LiteralCommandNode;
|
||||
import com.mojang.brigadier.tree.RootCommandNode;
|
||||
import org.bukkit.Warning;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.server.ServerEvent;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Fired anytime the server synchronizes Bukkit CommandMap to Brigadier.
|
||||
* Fired anytime the server synchronizes Bukkit commands to Brigadier.
|
||||
*
|
||||
* Allows a plugin to control the Literal and Argument nodes for this command to be
|
||||
* sent to the client.
|
||||
* This is done at Plugin Enable time after commands have been registered, but some
|
||||
* plugins may use reflection to retrigger this rebuild during runtime.
|
||||
* <p>Allows a plugin to control the command node structure for its commands.
|
||||
* This is done at Plugin Enable time after commands have been registered, but may also
|
||||
* run at a later point in the server lifetime due to plugins, a server reload, etc.</p>
|
||||
*
|
||||
* @deprecated Draft API - Subject to change until confirmed solves desired use cases
|
||||
* <p>This is a draft/experimental API and is subject to change.</p>
|
||||
*/
|
||||
@Deprecated
|
||||
@Warning(false)
|
||||
public class CommandRegisteredEvent <S extends BukkitBrigadierCommandSource> extends ServerEvent implements Cancellable {
|
||||
@ApiStatus.Experimental
|
||||
public class CommandRegisteredEvent<S extends BukkitBrigadierCommandSource> extends ServerEvent implements Cancellable {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final String commandLabel;
|
||||
@@ -33,6 +31,7 @@ public class CommandRegisteredEvent <S extends BukkitBrigadierCommandSource> ext
|
||||
private final RootCommandNode<S> root;
|
||||
private final ArgumentCommandNode<S, String> defaultArgs;
|
||||
private LiteralCommandNode<S> literal;
|
||||
private boolean rawCommand = false;
|
||||
private boolean cancelled = false;
|
||||
|
||||
public CommandRegisteredEvent(String commandLabel, BukkitBrigadierCommand<S> brigadierCommand, Command command, RootCommandNode<S> root, LiteralCommandNode<S> literal, ArgumentCommandNode<S, String> defaultArgs) {
|
||||
@@ -45,55 +44,99 @@ public class CommandRegisteredEvent <S extends BukkitBrigadierCommandSource> ext
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The command name being registered
|
||||
* Gets the command label of the {@link Command} being registered.
|
||||
*
|
||||
* @return the command label
|
||||
*/
|
||||
public String getCommandLabel() {
|
||||
return commandLabel;
|
||||
return this.commandLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The Bukkit API Brigadier Wrapped Command Object to handle executions and suggestions
|
||||
* Gets the {@link BukkitBrigadierCommand} for the {@link Command} being registered. This can be used
|
||||
* as the {@link com.mojang.brigadier.Command command executor} or
|
||||
* {@link com.mojang.brigadier.suggestion.SuggestionProvider} of a {@link com.mojang.brigadier.tree.CommandNode}
|
||||
* to delegate to the {@link Command} being registered.
|
||||
*
|
||||
* @return the {@link BukkitBrigadierCommand}
|
||||
*/
|
||||
public BukkitBrigadierCommand<S> getBrigadierCommand() {
|
||||
return brigadierCommand;
|
||||
}
|
||||
|
||||
public Command getCommand() {
|
||||
return command;
|
||||
return this.brigadierCommand;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Gets the root command node being used to register a command to.
|
||||
* Gets the {@link Command} being registered.
|
||||
*
|
||||
* @return the {@link Command}
|
||||
*/
|
||||
public Command getCommand() {
|
||||
return this.command;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the {@link RootCommandNode} which is being registered to.
|
||||
*
|
||||
* @return the {@link RootCommandNode}
|
||||
*/
|
||||
public RootCommandNode<S> getRoot() {
|
||||
return root;
|
||||
return this.root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Bukkit API's default handling of Arguments, if you wish to reuse it.
|
||||
* @return
|
||||
* Gets the Bukkit APIs default arguments node (greedy string), for if
|
||||
* you wish to reuse it.
|
||||
*
|
||||
* @return default arguments node
|
||||
*/
|
||||
public ArgumentCommandNode<S, String> getDefaultArgs() {
|
||||
return defaultArgs;
|
||||
return this.defaultArgs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Bukkit API's default literal for this command, including the {@link #getDefaultArgs()} as a child already.
|
||||
* @return
|
||||
* Gets the {@link LiteralCommandNode} to be registered for the {@link Command}.
|
||||
*
|
||||
* @return the {@link LiteralCommandNode}
|
||||
*/
|
||||
public LiteralCommandNode<S> getLiteral() {
|
||||
return literal;
|
||||
return this.literal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the literal used to register this command. The previous literable is mutable, so this is primarily if
|
||||
* you want to completely replace the object.
|
||||
* @param literal
|
||||
* Sets the {@link LiteralCommandNode} used to register this command. The default literal is mutable, so
|
||||
* this is primarily if you want to completely replace the object.
|
||||
*
|
||||
* @param literal new node
|
||||
*/
|
||||
public void setLiteral(LiteralCommandNode<S> literal) {
|
||||
this.literal = literal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether this command should is treated as "raw".
|
||||
*
|
||||
* @see #setRawCommand(boolean)
|
||||
* @return whether this command is treated as "raw"
|
||||
*/
|
||||
public boolean isRawCommand() {
|
||||
return this.rawCommand;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether this command should be treated as "raw".
|
||||
*
|
||||
* <p>A "raw" command will only use the node provided by this event for
|
||||
* sending the command tree to the client. For execution purposes, the default
|
||||
* greedy string execution of a standard Bukkit {@link Command} is used.</p>
|
||||
*
|
||||
* <p>On older versions of Paper, this was the default and only behavior of this
|
||||
* event.</p>
|
||||
*
|
||||
* @param rawCommand whether this command should be treated as "raw"
|
||||
*/
|
||||
public void setRawCommand(final boolean rawCommand) {
|
||||
this.rawCommand = rawCommand;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@ High performance Spigot fork that aims to fix gameplay and mechanics inconsisten
|
||||
|
||||
|
||||
**Support and Project Discussion:**
|
||||
- [IRC](https://webchat.esper.net/?channels=paper) or [Discord](https://discord.gg/papermc)
|
||||
- [Our forums](https://forums.papermc.io/), [Discord](https://discord.gg/papermc), or [IRC](https://webchat.esper.net/?channels=paper)
|
||||
|
||||
How To (Server Admins)
|
||||
------
|
||||
@@ -18,8 +18,8 @@ Download Paper from our [downloads page](https://papermc.io/downloads).
|
||||
|
||||
Run the Paperclip jar directly from your server. Just like old times
|
||||
|
||||
* Documentation on using Paper: [paper.readthedocs.io](https://paper.readthedocs.io/)
|
||||
* For a sneak peek on upcoming features, [see here](https://github.com/PaperMC/Paper/projects)
|
||||
* Documentation on using Paper: [docs.papermc.io](https://docs.papermc.io)
|
||||
* For a sneak peek at upcoming features, [see here](https://github.com/PaperMC/Paper/projects)
|
||||
|
||||
How To (Plugin Developers)
|
||||
------
|
||||
@@ -30,7 +30,7 @@ How To (Plugin Developers)
|
||||
```xml
|
||||
<repository>
|
||||
<id>papermc</id>
|
||||
<url>https://papermc.io/repo/repository/maven-public/</url>
|
||||
<url>https://repo.papermc.io/repository/maven-public/</url>
|
||||
</repository>
|
||||
```
|
||||
* Artifact Information:
|
||||
@@ -38,7 +38,7 @@ How To (Plugin Developers)
|
||||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.18.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.19.2-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
```
|
||||
@@ -49,12 +49,12 @@ How To (Plugin Developers)
|
||||
```kotlin
|
||||
repositories {
|
||||
maven {
|
||||
url = uri("https://papermc.io/repo/repository/maven-public/")
|
||||
url = uri("https://repo.papermc.io/repository/maven-public/")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("io.papermc.paper:paper-api:1.18.1-R0.1-SNAPSHOT")
|
||||
compileOnly("io.papermc.paper:paper-api:1.19.2-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
java {
|
||||
@@ -78,7 +78,7 @@ Support Us
|
||||
------
|
||||
First of all, thank you for considering helping out, we really appreciate that!
|
||||
|
||||
PaperMC has various recurring expenses, mostly related to infrastructure. Paper uses [Open Collective](https://opencollective.com/) via the [Open Source Collective fiscal host](https://opencollective.com/opensource) to manage expenses. Open Collective allows us to be extremely transparent, so you can always see how your donations are used. You can read more about finanically supporting PaperMC [on our website](https://papermc.io/sponsors).
|
||||
PaperMC has various recurring expenses, mostly related to infrastructure. Paper uses [Open Collective](https://opencollective.com/) via the [Open Source Collective fiscal host](https://opencollective.com/opensource) to manage expenses. Open Collective allows us to be extremely transparent, so you can always see how your donations are used. You can read more about financially supporting PaperMC [on our website](https://papermc.io/sponsors).
|
||||
|
||||
You can find our collective [here](https://opencollective.com/papermc), or you can donate via GitHub Sponsors [here](https://github.com/sponsors/PaperMC), which will also go towards the collective.
|
||||
|
||||
|
||||
+75
-10
@@ -54,9 +54,6 @@ public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
|
||||
# LivingEntity setkiller
|
||||
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
|
||||
|
||||
# SkeletonHorse Additions
|
||||
public net.minecraft.world.entity.animal.horse.SkeletonHorse trapTime
|
||||
|
||||
# Fix client rendering skulls
|
||||
public net.minecraft.world.item.ItemStack tag
|
||||
|
||||
@@ -75,8 +72,6 @@ public net.minecraft.server.level.ChunkMap getPoiManager()Lnet/minecraft/world/e
|
||||
# Improve death events
|
||||
public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sounds/SoundEvent;
|
||||
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
|
||||
public net.minecraft.world.entity.Mob handItems
|
||||
public net.minecraft.world.entity.Mob armorItems
|
||||
|
||||
# Add sun related api
|
||||
public net.minecraft.world.entity.Mob isSunBurnTick()Z
|
||||
@@ -189,8 +184,6 @@ public net.minecraft.server.level.ServerLevel players
|
||||
# Chunk priority urgency system
|
||||
public net.minecraft.server.level.ChunkMap$ChunkDistanceManager
|
||||
|
||||
# Here's Johnny
|
||||
public net.minecraft.world.entity.monster.Vindicator isJohnny
|
||||
|
||||
# Chunk debug command
|
||||
public net.minecraft.server.level.Ticket createdTick
|
||||
@@ -226,6 +219,28 @@ public net.minecraft.world.entity.animal.Fox isDefending()Z
|
||||
public net.minecraft.world.entity.animal.Fox setDefending(Z)V
|
||||
public net.minecraft.world.entity.animal.Fox isFaceplanted()Z
|
||||
public net.minecraft.world.entity.animal.Fox setFaceplanted(Z)V
|
||||
public net.minecraft.world.entity.animal.Panda getEatCounter()I
|
||||
public net.minecraft.world.entity.animal.Panda setEatCounter(I)V
|
||||
public net.minecraft.world.entity.animal.Bee isRolling()Z
|
||||
public net.minecraft.world.entity.animal.Bee setRolling(Z)V
|
||||
public net.minecraft.world.entity.animal.Bee numCropsGrownSincePollination
|
||||
public net.minecraft.world.entity.animal.Bee ticksWithoutNectarSinceExitingHive
|
||||
public net.minecraft.world.entity.monster.piglin.Piglin isChargingCrossbow()Z
|
||||
public net.minecraft.world.entity.monster.Vex hasLimitedLife
|
||||
public net.minecraft.world.entity.monster.Vex limitedLifeTicks
|
||||
public net.minecraft.world.entity.npc.WanderingTrader wanderTarget
|
||||
public net.minecraft.world.entity.animal.MushroomCow effect
|
||||
public net.minecraft.world.entity.animal.MushroomCow effectDuration
|
||||
public net.minecraft.world.entity.ambient.Bat targetPosition
|
||||
public net.minecraft.world.entity.monster.Ravager attackTick
|
||||
public net.minecraft.world.entity.monster.Ravager stunnedTick
|
||||
public net.minecraft.world.entity.monster.Ravager roarTick
|
||||
public net.minecraft.world.entity.vehicle.MinecartTNT fuse
|
||||
public net.minecraft.world.entity.monster.Endermite life
|
||||
public net.minecraft.world.entity.vehicle.MinecartHopper cooldownTime
|
||||
public net.minecraft.world.entity.projectile.AbstractArrow soundEvent
|
||||
public net.minecraft.world.entity.monster.Phantom anchorPoint
|
||||
|
||||
|
||||
# Cook speed multipler API
|
||||
public net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity recipeType
|
||||
@@ -270,17 +285,26 @@ public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
|
||||
# Optimize isValidLocation
|
||||
public net.minecraft.world.level.chunk.LevelChunkSection states
|
||||
|
||||
# Player.setPlayerProfile API
|
||||
# Player Profile API
|
||||
public-f net.minecraft.world.entity.player.Player gameProfile
|
||||
public org.bukkit.craftbukkit.profile.CraftProfileProperty
|
||||
public org.bukkit.craftbukkit.profile.CraftPlayerTextures
|
||||
public org.bukkit.craftbukkit.profile.CraftPlayerTextures copyFrom(Lorg/bukkit/profile/PlayerTextures;)V
|
||||
public org.bukkit.craftbukkit.profile.CraftPlayerTextures rebuildPropertyIfDirty()V
|
||||
public org.bukkit.craftbukkit.profile.CraftPlayerProfile getProperty(Ljava/lang/String;)Lcom/mojang/authlib/properties/Property;
|
||||
public org.bukkit.craftbukkit.profile.CraftPlayerProfile setProperty(Ljava/lang/String;Lcom/mojang/authlib/properties/Property;)V
|
||||
public org.bukkit.craftbukkit.profile.CraftPlayerProfile toString(Lcom/mojang/authlib/properties/PropertyMap;)Ljava/lang/String;
|
||||
public org.bukkit.craftbukkit.profile.CraftPlayerProfile equals(Lcom/mojang/authlib/properties/PropertyMap;Lcom/mojang/authlib/properties/PropertyMap;)Z
|
||||
public org.bukkit.craftbukkit.profile.CraftPlayerProfile hashCode(Lcom/mojang/authlib/properties/PropertyMap;)I
|
||||
|
||||
# Generator Settings
|
||||
# Flat bedrock generator settings
|
||||
public net.minecraft.world.level.levelgen.SurfaceRules$Condition
|
||||
public net.minecraft.world.level.levelgen.SurfaceRules$Context
|
||||
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockX
|
||||
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockY
|
||||
public net.minecraft.world.level.levelgen.SurfaceRules$Context blockZ
|
||||
public net.minecraft.world.level.levelgen.SurfaceRules$Context context
|
||||
public net.minecraft.world.level.levelgen.SurfaceRules$Context system
|
||||
public net.minecraft.world.level.levelgen.SurfaceRules$Context randomState
|
||||
public net.minecraft.world.level.levelgen.SurfaceRules$LazyYCondition
|
||||
public net.minecraft.world.level.levelgen.SurfaceRules$LazyCondition
|
||||
public net.minecraft.world.level.levelgen.SurfaceRules$VerticalGradientConditionSource
|
||||
@@ -295,3 +319,44 @@ public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime
|
||||
|
||||
# Add health methods for item entities
|
||||
public net.minecraft.world.entity.item.ItemEntity health
|
||||
|
||||
# Fix riding distance statistics
|
||||
public net.minecraft.world.entity.player.Player checkRidingStatistics(DDD)V
|
||||
|
||||
# Fix NotePlayEvent
|
||||
public org.bukkit.craftbukkit.block.data.CraftBlockData toNMS(Ljava/lang/Enum;Ljava/lang/Class;)Ljava/lang/Enum;
|
||||
|
||||
# Stronghold seed configuration
|
||||
public-f net.minecraft.world.level.chunk.ChunkGenerator strongholdSeed
|
||||
|
||||
# More Sculk Sensor API
|
||||
public-f net.minecraft.world.level.gameevent.vibrations.VibrationListener listenerRange
|
||||
|
||||
# Fix custom inventory holders
|
||||
public-f net.minecraft.world.inventory.AbstractContainerMenu dataSlots
|
||||
public-f net.minecraft.world.inventory.AbstractContainerMenu remoteDataSlots
|
||||
|
||||
# Fix falling block spawn methods
|
||||
public net.minecraft.world.entity.item.FallingBlockEntity <init>(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V
|
||||
|
||||
# Fix cancelling ProjectileHitEvent for piercing arrows
|
||||
protected net.minecraft.world.entity.projectile.Projectile hitCancelled
|
||||
|
||||
# Expose firework item directly + manually setting flight ticks
|
||||
public net.minecraft.world.entity.projectile.FireworkRocketEntity life
|
||||
|
||||
# More Projectile API
|
||||
public net.minecraft.world.entity.projectile.FishingHook timeUntilLured
|
||||
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaX
|
||||
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaY
|
||||
public net.minecraft.world.entity.projectile.ShulkerBullet targetDeltaZ
|
||||
public net.minecraft.world.entity.projectile.ShulkerBullet currentMoveDirection
|
||||
public net.minecraft.world.entity.projectile.ShulkerBullet flightSteps
|
||||
public net.minecraft.world.entity.projectile.AbstractArrow soundEvent
|
||||
public net.minecraft.world.entity.projectile.ThrownTrident dealtDamage
|
||||
public net.minecraft.world.entity.projectile.Projectile hasBeenShot
|
||||
public net.minecraft.world.entity.projectile.Projectile leftOwner
|
||||
|
||||
# Teleport API
|
||||
public net.minecraft.server.network.ServerGamePacketListenerImpl internalTeleport(DDDFFLjava/util/Set;Z)V
|
||||
|
||||
@@ -21,9 +21,8 @@ c net/minecraft/world/level/chunk/LevelChunk net/minecraft/world/level/chunk/Chu
|
||||
|
||||
# See mappings-patch.tiny
|
||||
c net/minecraft/server/level/ChunkMap net/minecraft/server/level/PlayerChunkMap
|
||||
f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager D
|
||||
f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager F
|
||||
|
||||
# 1.18 todo: verify paper still changes this
|
||||
# Paper changes type
|
||||
c net/minecraft/core/MappedRegistry net/minecraft/core/RegistryMaterials
|
||||
f Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap; toId bA
|
||||
f Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap; toId bT
|
||||
+43
-19
@@ -1,8 +1,11 @@
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
|
||||
plugins {
|
||||
java
|
||||
`maven-publish`
|
||||
id("com.github.johnrengelman.shadow") version "7.1.1" apply false
|
||||
id("io.papermc.paperweight.core") version "1.3.3"
|
||||
id("com.github.johnrengelman.shadow") version "7.1.2" apply false
|
||||
id("io.papermc.paperweight.core") version "1.3.8"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
@@ -16,6 +19,8 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
|
||||
|
||||
subprojects {
|
||||
tasks.withType<JavaCompile> {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
@@ -27,28 +32,39 @@ subprojects {
|
||||
tasks.withType<ProcessResources> {
|
||||
filteringCharset = Charsets.UTF_8.name()
|
||||
}
|
||||
|
||||
if (name == "Paper-MojangAPI") {
|
||||
return@subprojects
|
||||
tasks.withType<Test> {
|
||||
testLogging {
|
||||
showStackTraces = true
|
||||
exceptionFormat = TestExceptionFormat.FULL
|
||||
events(TestLogEvent.STANDARD_OUT)
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://papermc.io/repo/repository/maven-public/")
|
||||
maven(paperMavenPublicUrl)
|
||||
}
|
||||
}
|
||||
|
||||
val spigotDecompiler: Configuration by configurations.creating
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://papermc.io/repo/repository/maven-public/") {
|
||||
content { onlyForConfigurations("paperclip") }
|
||||
maven(paperMavenPublicUrl) {
|
||||
content {
|
||||
onlyForConfigurations(
|
||||
configurations.paperclip.name,
|
||||
spigotDecompiler.name,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
paramMappings("net.fabricmc:yarn:1.18.1+build.1:mergedv2")
|
||||
remapper("net.fabricmc:tiny-remapper:0.7.0:fat")
|
||||
decompiler("net.minecraftforge:forgeflower:1.5.498.22")
|
||||
paramMappings("net.fabricmc:yarn:1.19.2+build.1:mergedv2")
|
||||
remapper("net.fabricmc:tiny-remapper:0.8.2:fat")
|
||||
decompiler("net.minecraftforge:forgeflower:1.5.605.7")
|
||||
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.6")
|
||||
paperclip("io.papermc:paperclip:3.0.2")
|
||||
}
|
||||
|
||||
@@ -56,9 +72,13 @@ paperweight {
|
||||
minecraftVersion.set(providers.gradleProperty("mcVersion"))
|
||||
serverProject.set(project(":paper-server"))
|
||||
|
||||
paramMappingsRepo.set("https://maven.fabricmc.net/")
|
||||
remapRepo.set("https://maven.fabricmc.net/")
|
||||
decompileRepo.set("https://files.minecraftforge.net/maven/")
|
||||
paramMappingsRepo.set(paperMavenPublicUrl)
|
||||
remapRepo.set(paperMavenPublicUrl)
|
||||
decompileRepo.set(paperMavenPublicUrl)
|
||||
|
||||
craftBukkit {
|
||||
fernFlowerJar.set(layout.file(spigotDecompiler.elements.map { it.single().asFile }))
|
||||
}
|
||||
|
||||
paper {
|
||||
spigotApiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
||||
@@ -86,14 +106,12 @@ tasks.generateDevelopmentBundle {
|
||||
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
|
||||
libraryRepositories.addAll(
|
||||
"https://repo.maven.apache.org/maven2/",
|
||||
"https://libraries.minecraft.net/",
|
||||
"https://papermc.io/repo/repository/maven-public/",
|
||||
"https://maven.fabricmc.net/",
|
||||
paperMavenPublicUrl,
|
||||
)
|
||||
}
|
||||
|
||||
publishing {
|
||||
if (project.providers.gradleProperty("publishDevBundle").forUseAtConfigurationTime().isPresent) {
|
||||
if (project.providers.gradleProperty("publishDevBundle").isPresent) {
|
||||
publications.create<MavenPublication>("devBundle") {
|
||||
artifact(tasks.generateDevelopmentBundle) {
|
||||
artifactId = "dev-bundle"
|
||||
@@ -105,7 +123,7 @@ publishing {
|
||||
allprojects {
|
||||
publishing {
|
||||
repositories {
|
||||
maven("https://papermc.io/repo/repository/maven-snapshots/") {
|
||||
maven("https://repo.papermc.io/repository/maven-snapshots/") {
|
||||
name = "paperSnapshots"
|
||||
credentials(PasswordCredentials::class)
|
||||
}
|
||||
@@ -118,3 +136,9 @@ tasks.register("printMinecraftVersion") {
|
||||
println(providers.gradleProperty("mcVersion").get().trim())
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("printPaperVersion") {
|
||||
doLast {
|
||||
println(project.version)
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -1,7 +1,6 @@
|
||||
group=io.papermc.paper
|
||||
version=1.18.1-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion=1.18.1
|
||||
version=1.19.2-R0.1-SNAPSHOT
|
||||
mcVersion=1.19.2
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -8,7 +8,7 @@ apply if there are changes made to it from upstream - thus notifying us
|
||||
that changes were made.
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index e431e3435737e28394d81b56568a08b3c3148b9b..b23bde3b5e881f146539a307d0a59f2177b6a036 100644
|
||||
index 11038da2e071699d6561a331565db0c8d7850d0e..317acfec5894101294a55abff61819431e6a5e65 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -1,3 +1,5 @@
|
||||
@@ -17,7 +17,7 @@ index e431e3435737e28394d81b56568a08b3c3148b9b..b23bde3b5e881f146539a307d0a59f21
|
||||
# Eclipse stuff
|
||||
/.classpath
|
||||
/.project
|
||||
@@ -30,3 +32,7 @@
|
||||
@@ -31,3 +33,7 @@
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
@@ -27,10 +27,10 @@ index e431e3435737e28394d81b56568a08b3c3148b9b..b23bde3b5e881f146539a307d0a59f21
|
||||
+/.factorypath
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..c76bfbcfbe034700bdbd9396643cfca625273a14
|
||||
index 0000000000000000000000000000000000000000..e1e7c0ff7edcc5865e81d458795755649837d7fc
|
||||
--- /dev/null
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +1,66 @@
|
||||
@@ -0,0 +1,81 @@
|
||||
+plugins {
|
||||
+ `java-library`
|
||||
+ `maven-publish`
|
||||
@@ -43,23 +43,23 @@ index 0000000000000000000000000000000000000000..c76bfbcfbe034700bdbd9396643cfca6
|
||||
+
|
||||
+dependencies {
|
||||
+ // api dependencies are listed transitively to API consumers
|
||||
+ api("commons-lang:commons-lang:2.6")
|
||||
+ api("com.google.guava:guava:31.0.1-jre")
|
||||
+ api("com.google.code.gson:gson:2.8.8")
|
||||
+ api("com.google.code.gson:gson:2.8.9")
|
||||
+ api("net.md-5:bungeecord-chat:1.16-R0.4")
|
||||
+ api("org.yaml:snakeyaml:1.30")
|
||||
+ api("org.yaml:snakeyaml:1.33")
|
||||
+
|
||||
+ compileOnly("org.apache.maven:maven-resolver-provider:3.8.4")
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.2")
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.2")
|
||||
+ compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
||||
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
|
||||
+
|
||||
+ val annotations = "org.jetbrains:annotations-java5:23.0.0"
|
||||
+ compileOnly(annotations)
|
||||
+ testCompileOnly(annotations)
|
||||
+
|
||||
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
+ testImplementation("junit:junit:4.13.2")
|
||||
+ testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.2")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.3")
|
||||
+}
|
||||
+
|
||||
+configure<PublishingExtension> {
|
||||
@@ -90,19 +90,34 @@ index 0000000000000000000000000000000000000000..c76bfbcfbe034700bdbd9396643cfca6
|
||||
+}
|
||||
+
|
||||
+tasks.withType<Javadoc> {
|
||||
+ (options as StandardJavadocDocletOptions).links(
|
||||
+ val options = options as StandardJavadocDocletOptions
|
||||
+ options.overview = "src/main/javadoc/overview.html"
|
||||
+ options.use()
|
||||
+ options.isDocFilesSubDirs = true
|
||||
+ options.links(
|
||||
+ "https://guava.dev/releases/31.0.1-jre/api/docs/",
|
||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/1.30/",
|
||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
|
||||
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/",
|
||||
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
||||
+ )
|
||||
+
|
||||
+ // workaround for https://github.com/gradle/gradle/issues/4046
|
||||
+ inputs.dir("src/main/javadoc").withPropertyName("javadoc-sourceset")
|
||||
+ doLast {
|
||||
+ copy {
|
||||
+ from("src/main/javadoc") {
|
||||
+ include("**/doc-files/**")
|
||||
+ }
|
||||
+ into("build/docs/javadoc")
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
deleted file mode 100644
|
||||
index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..0000000000000000000000000000000000000000
|
||||
index becaae6cc840ee2ac49853e41d86087bc0e893a8..0000000000000000000000000000000000000000
|
||||
--- a/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -1,262 +0,0 @@
|
||||
@@ -1,252 +0,0 @@
|
||||
-
|
||||
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
@@ -110,7 +125,7 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
|
||||
-
|
||||
- <groupId>org.spigotmc</groupId>
|
||||
- <artifactId>spigot-api</artifactId>
|
||||
- <version>1.18.1-R0.1-SNAPSHOT</version>
|
||||
- <version>1.19.2-R0.1-SNAPSHOT</version>
|
||||
- <packaging>jar</packaging>
|
||||
-
|
||||
- <name>Spigot-API</name>
|
||||
@@ -136,12 +151,6 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
|
||||
- </distributionManagement>
|
||||
-
|
||||
- <dependencies>
|
||||
- <dependency>
|
||||
- <groupId>commons-lang</groupId>
|
||||
- <artifactId>commons-lang</artifactId>
|
||||
- <version>2.6</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- bundled with Minecraft, should be kept in sync -->
|
||||
- <dependency>
|
||||
- <groupId>com.google.guava</groupId>
|
||||
@@ -153,7 +162,7 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>com.google.code.gson</groupId>
|
||||
- <artifactId>gson</artifactId>
|
||||
- <version>2.8.8</version>
|
||||
- <version>2.8.9</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
@@ -166,26 +175,26 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>org.yaml</groupId>
|
||||
- <artifactId>snakeyaml</artifactId>
|
||||
- <version>1.30</version>
|
||||
- <version>1.33</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- not part of the API proper -->
|
||||
- <dependency>
|
||||
- <groupId>org.apache.maven</groupId>
|
||||
- <artifactId>maven-resolver-provider</artifactId>
|
||||
- <version>3.8.4</version>
|
||||
- <version>3.8.5</version>
|
||||
- <scope>provided</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.apache.maven.resolver</groupId>
|
||||
- <artifactId>maven-resolver-connector-basic</artifactId>
|
||||
- <version>1.7.2</version>
|
||||
- <version>1.7.3</version>
|
||||
- <scope>provided</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.apache.maven.resolver</groupId>
|
||||
- <artifactId>maven-resolver-transport-http</artifactId>
|
||||
- <version>1.7.2</version>
|
||||
- <version>1.7.3</version>
|
||||
- <scope>provided</scope>
|
||||
- </dependency>
|
||||
- <!-- annotations -->
|
||||
@@ -211,7 +220,7 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>org.ow2.asm</groupId>
|
||||
- <artifactId>asm-tree</artifactId>
|
||||
- <version>9.2</version>
|
||||
- <version>9.3</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
@@ -234,7 +243,7 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-compiler-plugin</artifactId>
|
||||
- <version>3.8.1</version>
|
||||
- <version>3.10.1</version>
|
||||
- <configuration>
|
||||
- <!-- we use the Eclipse compiler as it doesn't need a JDK -->
|
||||
- <compilerId>eclipse</compilerId>
|
||||
@@ -243,19 +252,14 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>org.codehaus.plexus</groupId>
|
||||
- <artifactId>plexus-compiler-eclipse</artifactId>
|
||||
- <version>2.8.8</version>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.eclipse.jdt</groupId>
|
||||
- <artifactId>ecj</artifactId>
|
||||
- <version>3.28.0</version>
|
||||
- <version>2.12.0</version>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
- </plugin>
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-jar-plugin</artifactId>
|
||||
- <version>3.2.0</version>
|
||||
- <version>3.2.2</version>
|
||||
- <configuration>
|
||||
- <archive>
|
||||
- <manifest>
|
||||
@@ -295,7 +299,7 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-javadoc-plugin</artifactId>
|
||||
- <version>3.3.1</version>
|
||||
- <version>3.4.0</version>
|
||||
- <configuration>
|
||||
- <links>
|
||||
- <link>https://guava.dev/releases/31.0.1-jre/api/docs/</link>
|
||||
@@ -330,6 +334,7 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
|
||||
- </executions>
|
||||
- <configuration>
|
||||
- <configLocation>checkstyle.xml</configLocation>
|
||||
- <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
|
||||
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||
- </configuration>
|
||||
- <dependencies>
|
||||
@@ -343,7 +348,7 @@ index 9c130bf7fe7ec4b6b5d4f4c30cdbe6dc75b0f9a0..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.codehaus.mojo</groupId>
|
||||
- <artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
- <version>1.20</version>
|
||||
- <version>1.21</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>process-classes</phase>
|
||||
|
||||
@@ -5,22 +5,22 @@ Subject: [PATCH] Build system changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index c76bfbcfbe034700bdbd9396643cfca625273a14..1f680baffba17265e8ce38b3516624bffd034075 100644
|
||||
index e1e7c0ff7edcc5865e81d458795755649837d7fc..fc6cd4fcab1b7430cb3d5c66e386bf4ea6e8f599 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -15,15 +15,27 @@ dependencies {
|
||||
api("com.google.code.gson:gson:2.8.8")
|
||||
@@ -14,15 +14,27 @@ dependencies {
|
||||
api("com.google.code.gson:gson:2.8.9")
|
||||
api("net.md-5:bungeecord-chat:1.16-R0.4")
|
||||
api("org.yaml:snakeyaml:1.30")
|
||||
api("org.yaml:snakeyaml:1.33")
|
||||
+ // Paper start
|
||||
+ api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
+ isTransitive = false // includes junit
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.4")
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.2")
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.2")
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
||||
compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
|
||||
+ compileOnly("com.google.code.findbugs:jsr305:1.3.9") // Paper
|
||||
|
||||
- val annotations = "org.jetbrains:annotations-java5:23.0.0"
|
||||
@@ -34,15 +34,54 @@ index c76bfbcfbe034700bdbd9396643cfca625273a14..1f680baffba17265e8ce38b3516624bf
|
||||
+ testCompileOnly(checkerQual)
|
||||
+ // Paper end
|
||||
+
|
||||
testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
testImplementation("org.ow2.asm:asm-tree:9.2")
|
||||
@@ -60,7 +72,7 @@ tasks.withType<Javadoc> {
|
||||
(options as StandardJavadocDocletOptions).links(
|
||||
@@ -64,7 +76,7 @@ tasks.withType<Javadoc> {
|
||||
options.links(
|
||||
"https://guava.dev/releases/31.0.1-jre/api/docs/",
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/1.30/",
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
|
||||
- "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/",
|
||||
+ "https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations
|
||||
"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
||||
)
|
||||
|
||||
@@ -79,3 +91,14 @@ tasks.withType<Javadoc> {
|
||||
}
|
||||
}
|
||||
}
|
||||
+
|
||||
+// Paper start
|
||||
+val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
|
||||
+ badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
|
||||
+ jarToScan.set(tasks.jar.flatMap { it.archiveFile })
|
||||
+ classpath.from(configurations.compileClasspath)
|
||||
+}
|
||||
+tasks.check {
|
||||
+ dependsOn(scanJar)
|
||||
+}
|
||||
+// Paper end
|
||||
diff --git a/src/main/java/io/papermc/paper/annotation/DoNotUse.java b/src/main/java/io/papermc/paper/annotation/DoNotUse.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..4766e49d819e75e5c2127c698b44078bf2fd6219
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/annotation/DoNotUse.java
|
||||
@@ -0,0 +1,18 @@
|
||||
+package io.papermc.paper.annotation;
|
||||
+
|
||||
+import java.lang.annotation.ElementType;
|
||||
+import java.lang.annotation.Retention;
|
||||
+import java.lang.annotation.RetentionPolicy;
|
||||
+import java.lang.annotation.Target;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+
|
||||
+/**
|
||||
+ * Annotation used to mark methods or constructors which should not be called.
|
||||
+ *
|
||||
+ * <p>Separate from {@link Deprecated} to differentiate from the large amount of deprecations.</p>
|
||||
+ */
|
||||
+@ApiStatus.Internal
|
||||
+@Retention(RetentionPolicy.RUNTIME)
|
||||
+@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
|
||||
+public @interface DoNotUse {
|
||||
+}
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] Annotation Test changes
|
||||
- Add excludes for classes which don't pass
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
index 0c7377247ad9251c9e498039511e7220370aba2d..c6a8a37a933cfc5a5885602a8a70fdda8fb6aa10 100644
|
||||
index 4ac3dd977e75cd8464163351d306e037ee32cb48..1a71bb8861150c1add6446aa2fad0f7035dd6873 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
@@ -40,7 +40,17 @@ public class AnnotationTest {
|
||||
@@ -57,7 +57,7 @@ index 0c7377247ad9251c9e498039511e7220370aba2d..c6a8a37a933cfc5a5885602a8a70fdda
|
||||
|
||||
+ dancing: // Paper
|
||||
for (int i = 0; i < paramTypes.length; i++) {
|
||||
if (mustBeAnnotated(paramTypes[i]) && !isWellAnnotated(method.invisibleParameterAnnotations == null ? null : method.invisibleParameterAnnotations[i])) {
|
||||
if (mustBeAnnotated(paramTypes[i]) ^ isWellAnnotated(method.invisibleParameterAnnotations == null ? null : method.invisibleParameterAnnotations[i])) {
|
||||
+ // Paper start
|
||||
+ if (method.invisibleTypeAnnotations != null) {
|
||||
+ for (final org.objectweb.asm.tree.TypeAnnotationNode invisibleTypeAnnotation : method.invisibleTypeAnnotations) {
|
||||
|
||||
@@ -6,14 +6,14 @@ Subject: [PATCH] Add FastUtil to Bukkit
|
||||
Doesn't expose to plugins, just allows Paper-API to use it for optimization
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 364b6215d2facb0273a67ff605ccb8e707e080b8..3777d12874ede329410a6bf1c0533deb44924d73 100644
|
||||
index 044b7c49b569e1170108c912e9307f7fec278762..f0423df165bf7d0f3fad21d26b64f31ba3e6aeee 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -19,6 +19,7 @@ dependencies {
|
||||
@@ -18,6 +18,7 @@ dependencies {
|
||||
api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
isTransitive = false // includes junit
|
||||
}
|
||||
+ api("it.unimi.dsi:fastutil:8.5.6")
|
||||
// Paper end
|
||||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.4")
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
File diff suppressed because it is too large.
Load diff
File renamed without changes.
File diff suppressed because it is too large.
Load diff
@@ -1,181 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
||||
Date: Tue, 18 May 2021 14:42:26 -0700
|
||||
Subject: [PATCH] Add command line option to load extra plugin jars not in the
|
||||
plugins folder
|
||||
|
||||
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index a238302f2a12194aa30a88867070705dc749b36b..cc42bfa74b41ef6d6374efa7b882f71677fb0824 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -73,6 +73,20 @@ public final class Bukkit {
|
||||
return server;
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Returns the de facto plugins directory, generally used for storing plugin jars to be loaded,
|
||||
+ * as well as their {@link org.bukkit.plugin.Plugin#getDataFolder() data folders}.
|
||||
+ *
|
||||
+ * <p>Plugins should use {@link org.bukkit.plugin.Plugin#getDataFolder()} rather than traversing this
|
||||
+ * directory manually when determining the location in which to store their data and configuration files.</p>
|
||||
+ *
|
||||
+ * @return plugins directory
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public static File getPluginsFolder() {
|
||||
+ return server.getPluginsFolder();
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Attempts to set the {@link Server} singleton.
|
||||
* <p>
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 3e91c4000c468fd8bdcb938e942a7bbf4988cab2..1fb1d4f32af8150711ca766fcd7d0a0c177df7c4 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -58,6 +58,18 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface Server extends PluginMessageRecipient {
|
||||
|
||||
+ /**
|
||||
+ * Returns the de facto plugins directory, generally used for storing plugin jars to be loaded,
|
||||
+ * as well as their {@link org.bukkit.plugin.Plugin#getDataFolder() data folders}.
|
||||
+ *
|
||||
+ * <p>Plugins should use {@link org.bukkit.plugin.Plugin#getDataFolder()} rather than traversing this
|
||||
+ * directory manually when determining the location in which to store their data and configuration files.</p>
|
||||
+ *
|
||||
+ * @return plugins directory
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ File getPluginsFolder();
|
||||
+
|
||||
/**
|
||||
* Used for all administrative messages, such as an operator using a
|
||||
* command.
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 7548e40af8043c1b5716f2d7d0122833466854c4..83d3ee09cc6f91b095f6b8519a431ef70f2b67ec 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -111,6 +111,12 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Override
|
||||
@NotNull
|
||||
public Plugin[] loadPlugins(@NotNull File directory) {
|
||||
+ // Paper start - extra jars
|
||||
+ return this.loadPlugins(directory, java.util.Collections.emptyList());
|
||||
+ }
|
||||
+ @NotNull
|
||||
+ public Plugin[] loadPlugins(final @NotNull File directory, final @NotNull List<File> extraPluginJars) {
|
||||
+ // Paper end
|
||||
Validate.notNull(directory, "Directory cannot be null");
|
||||
Validate.isTrue(directory.isDirectory(), "Directory must be a directory");
|
||||
|
||||
@@ -128,7 +134,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
Map<String, Collection<String>> softDependencies = new HashMap<String, Collection<String>>();
|
||||
|
||||
// This is where it figures out all possible plugins
|
||||
- for (File file : directory.listFiles()) {
|
||||
+ // Paper start - extra jars
|
||||
+ final List<File> pluginJars = new ArrayList<>(java.util.Arrays.asList(directory.listFiles()));
|
||||
+ pluginJars.addAll(extraPluginJars);
|
||||
+ for (File file : pluginJars) {
|
||||
+ // Paper end
|
||||
PluginLoader loader = null;
|
||||
for (Pattern filter : filters) {
|
||||
Matcher match = filter.matcher(file.getName());
|
||||
@@ -144,14 +154,14 @@ public final class SimplePluginManager implements PluginManager {
|
||||
description = loader.getPluginDescription(file);
|
||||
String name = description.getName();
|
||||
if (name.equalsIgnoreCase("bukkit") || name.equalsIgnoreCase("minecraft") || name.equalsIgnoreCase("mojang")) {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "': Restricted Name");
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "': Restricted Name"); // Paper
|
||||
continue;
|
||||
} else if (description.rawName.indexOf(' ') != -1) {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "': uses the space-character (0x20) in its name");
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "': uses the space-character (0x20) in its name"); // Paper
|
||||
continue;
|
||||
}
|
||||
} catch (InvalidDescriptionException ex) {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "'", ex);
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "'", ex); // Paper
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -162,7 +172,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
description.getName(),
|
||||
file.getPath(),
|
||||
replacedFile.getPath(),
|
||||
- directory.getPath()
|
||||
+ file.getParentFile().getPath() // Paper
|
||||
));
|
||||
}
|
||||
|
||||
@@ -183,7 +193,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
file.getPath(),
|
||||
provided,
|
||||
pluginFile.getPath(),
|
||||
- directory.getPath()
|
||||
+ file.getParentFile().getPath() // Paper
|
||||
));
|
||||
} else {
|
||||
String replacedPlugin = pluginsProvided.put(provided, description.getName());
|
||||
@@ -265,7 +275,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
server.getLogger().log(
|
||||
Level.SEVERE,
|
||||
- "Could not load '" + entry.getValue().getPath() + "' in folder '" + directory.getPath() + "'",
|
||||
+ "Could not load '" + entry.getValue().getPath() + "' in folder '" + entry.getValue().getParentFile().getPath() + "'", // Paper
|
||||
new UnknownDependencyException("Unknown dependency " + dependency + ". Please download and install " + dependency + " to run this plugin."));
|
||||
break;
|
||||
}
|
||||
@@ -304,11 +314,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
loadedPlugins.add(loadedPlugin.getName());
|
||||
loadedPlugins.addAll(loadedPlugin.getDescription().getProvides());
|
||||
} else {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "'");
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "'"); // Paper
|
||||
}
|
||||
continue;
|
||||
} catch (InvalidPluginException ex) {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "'", ex);
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "'", ex); // Paper
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -335,11 +345,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
loadedPlugins.add(loadedPlugin.getName());
|
||||
loadedPlugins.addAll(loadedPlugin.getDescription().getProvides());
|
||||
} else {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "'");
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "'"); // Paper
|
||||
}
|
||||
break;
|
||||
} catch (InvalidPluginException ex) {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "'", ex);
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "'", ex); // Paper
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -352,7 +362,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
while (failedPluginIterator.hasNext()) {
|
||||
File file = failedPluginIterator.next();
|
||||
failedPluginIterator.remove();
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "': circular dependency detected");
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "': circular dependency detected"); // Paper
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index cf2f517765d8f2a23cc4a17d9ee2dcd81f841b1b..9700ed558e65260264279b92dc661f39a0d0209c 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -91,7 +91,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
throw new InvalidPluginException(ex);
|
||||
}
|
||||
|
||||
- final File parentFile = file.getParentFile();
|
||||
+ final File parentFile = this.server.getPluginsFolder(); // Paper
|
||||
final File dataFolder = new File(parentFile, description.getName());
|
||||
@SuppressWarnings("deprecation")
|
||||
final File oldDataFolder = new File(parentFile, description.getRawName());
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,181 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
||||
Date: Tue, 18 May 2021 14:42:26 -0700
|
||||
Subject: [PATCH] Add command line option to load extra plugin jars not in the
|
||||
plugins folder
|
||||
|
||||
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 557cf1ff29e16fa942545ceca14696c2a50b2d4d..a5c02f744664248f46aa35452318b6a728cd4afd 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -76,6 +76,20 @@ public final class Bukkit {
|
||||
return server;
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Returns the de facto plugins directory, generally used for storing plugin jars to be loaded,
|
||||
+ * as well as their {@link org.bukkit.plugin.Plugin#getDataFolder() data folders}.
|
||||
+ *
|
||||
+ * <p>Plugins should use {@link org.bukkit.plugin.Plugin#getDataFolder()} rather than traversing this
|
||||
+ * directory manually when determining the location in which to store their data and configuration files.</p>
|
||||
+ *
|
||||
+ * @return plugins directory
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public static File getPluginsFolder() {
|
||||
+ return server.getPluginsFolder();
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Attempts to set the {@link Server} singleton.
|
||||
* <p>
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index a2ae6b84fe20e43292f1442401a472dcce1600ec..da13ae75ca1892c21a35aff02f92b91783a868bf 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -61,6 +61,18 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface Server extends PluginMessageRecipient, net.kyori.adventure.audience.ForwardingAudience { // Paper
|
||||
|
||||
+ /**
|
||||
+ * Returns the de facto plugins directory, generally used for storing plugin jars to be loaded,
|
||||
+ * as well as their {@link org.bukkit.plugin.Plugin#getDataFolder() data folders}.
|
||||
+ *
|
||||
+ * <p>Plugins should use {@link org.bukkit.plugin.Plugin#getDataFolder()} rather than traversing this
|
||||
+ * directory manually when determining the location in which to store their data and configuration files.</p>
|
||||
+ *
|
||||
+ * @return plugins directory
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ File getPluginsFolder();
|
||||
+
|
||||
/**
|
||||
* Used for all administrative messages, such as an operator using a
|
||||
* command.
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 763b3e9ea24b14c54abf94048931f29228c76df5..1bfa9fcb1b803eecfe33156f81ee88d2922ca88a 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -111,6 +111,12 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Override
|
||||
@NotNull
|
||||
public Plugin[] loadPlugins(@NotNull File directory) {
|
||||
+ // Paper start - extra jars
|
||||
+ return this.loadPlugins(directory, java.util.Collections.emptyList());
|
||||
+ }
|
||||
+ @NotNull
|
||||
+ public Plugin[] loadPlugins(final @NotNull File directory, final @NotNull List<File> extraPluginJars) {
|
||||
+ // Paper end
|
||||
Preconditions.checkArgument(directory != null, "Directory cannot be null");
|
||||
Preconditions.checkArgument(directory.isDirectory(), "Directory must be a directory");
|
||||
|
||||
@@ -128,7 +134,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
Map<String, Collection<String>> softDependencies = new HashMap<String, Collection<String>>();
|
||||
|
||||
// This is where it figures out all possible plugins
|
||||
- for (File file : directory.listFiles()) {
|
||||
+ // Paper start - extra jars
|
||||
+ final List<File> pluginJars = new ArrayList<>(java.util.Arrays.asList(directory.listFiles()));
|
||||
+ pluginJars.addAll(extraPluginJars);
|
||||
+ for (File file : pluginJars) {
|
||||
+ // Paper end
|
||||
PluginLoader loader = null;
|
||||
for (Pattern filter : filters) {
|
||||
Matcher match = filter.matcher(file.getName());
|
||||
@@ -144,14 +154,14 @@ public final class SimplePluginManager implements PluginManager {
|
||||
description = loader.getPluginDescription(file);
|
||||
String name = description.getName();
|
||||
if (name.equalsIgnoreCase("bukkit") || name.equalsIgnoreCase("minecraft") || name.equalsIgnoreCase("mojang")) {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "': Restricted Name");
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "': Restricted Name"); // Paper
|
||||
continue;
|
||||
} else if (description.rawName.indexOf(' ') != -1) {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "': uses the space-character (0x20) in its name");
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "': uses the space-character (0x20) in its name"); // Paper
|
||||
continue;
|
||||
}
|
||||
} catch (InvalidDescriptionException ex) {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "'", ex);
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "'", ex); // Paper
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -162,7 +172,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
description.getName(),
|
||||
file.getPath(),
|
||||
replacedFile.getPath(),
|
||||
- directory.getPath()
|
||||
+ file.getParentFile().getPath() // Paper
|
||||
));
|
||||
}
|
||||
|
||||
@@ -183,7 +193,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
file.getPath(),
|
||||
provided,
|
||||
pluginFile.getPath(),
|
||||
- directory.getPath()
|
||||
+ file.getParentFile().getPath() // Paper
|
||||
));
|
||||
} else {
|
||||
String replacedPlugin = pluginsProvided.put(provided, description.getName());
|
||||
@@ -265,7 +275,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
server.getLogger().log(
|
||||
Level.SEVERE,
|
||||
- "Could not load '" + entry.getValue().getPath() + "' in folder '" + directory.getPath() + "'",
|
||||
+ "Could not load '" + entry.getValue().getPath() + "' in folder '" + entry.getValue().getParentFile().getPath() + "'", // Paper
|
||||
new UnknownDependencyException("Unknown dependency " + dependency + ". Please download and install " + dependency + " to run this plugin."));
|
||||
break;
|
||||
}
|
||||
@@ -304,11 +314,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
loadedPlugins.add(loadedPlugin.getName());
|
||||
loadedPlugins.addAll(loadedPlugin.getDescription().getProvides());
|
||||
} else {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "'");
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "'"); // Paper
|
||||
}
|
||||
continue;
|
||||
} catch (InvalidPluginException ex) {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "'", ex);
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "'", ex); // Paper
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -335,11 +345,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
loadedPlugins.add(loadedPlugin.getName());
|
||||
loadedPlugins.addAll(loadedPlugin.getDescription().getProvides());
|
||||
} else {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "'");
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "'"); // Paper
|
||||
}
|
||||
break;
|
||||
} catch (InvalidPluginException ex) {
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "'", ex);
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "'", ex); // Paper
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -352,7 +362,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
while (failedPluginIterator.hasNext()) {
|
||||
File file = failedPluginIterator.next();
|
||||
failedPluginIterator.remove();
|
||||
- server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + directory.getPath() + "': circular dependency detected");
|
||||
+ server.getLogger().log(Level.SEVERE, "Could not load '" + file.getPath() + "' in folder '" + file.getParentFile().getPath() + "': circular dependency detected"); // Paper
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index 5c1b8b05d8a5408bb4830942c74ebfe400ab5a32..333c47a1f7e9d7ddf91aad5ec15163427f7b8039 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -91,7 +91,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
throw new InvalidPluginException(ex);
|
||||
}
|
||||
|
||||
- final File parentFile = file.getParentFile();
|
||||
+ final File parentFile = this.server.getPluginsFolder(); // Paper
|
||||
final File dataFolder = new File(parentFile, description.getName());
|
||||
@SuppressWarnings("deprecation")
|
||||
final File oldDataFolder = new File(parentFile, description.getRawName());
|
||||
File diff suppressed because it is too large.
Load diff
@@ -5,10 +5,10 @@ Subject: [PATCH] Player affects spawning API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index e3cc40a54b48e8a90ccc93c272c1a2dca1da9595..a6f6dea965eee2de2183f189580d1b7141a9308f 100644
|
||||
index 3f9236ce97adb4b724e18a5f05497681bed5d4d5..7c13de51561df662691a36ca1cc91ca7997d773a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1746,6 +1746,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1850,6 +1850,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Deprecated // Paper
|
||||
public String getLocale();
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add getTPS method
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 84a620bbbc24ded4075bce0209caed7fa03a92eb..bbee4e40917cca4e692c3d60c1c513b4c847160f 100644
|
||||
index a5c02f744664248f46aa35452318b6a728cd4afd..3603bcdadeea10f2babe8d6c609d7eaee3f0f89c 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1728,6 +1728,17 @@ public final class Bukkit {
|
||||
@@ -1889,6 +1889,17 @@ public final class Bukkit {
|
||||
return server.getEntity(uuid);
|
||||
}
|
||||
|
||||
@@ -27,10 +27,10 @@ index 84a620bbbc24ded4075bce0209caed7fa03a92eb..bbee4e40917cca4e692c3d60c1c513b4
|
||||
* Get the advancement specified by this key.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index ede5de4c310a93989608bf48b3e5116f380589dd..835041d2ab6545e52d963d96d558f9a7e52d279a 100644
|
||||
index da13ae75ca1892c21a35aff02f92b91783a868bf..36f5e47ffcdce23b0b5594881fdd49a3a3337578 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1461,6 +1461,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1603,6 +1603,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@Nullable
|
||||
Entity getEntity(@NotNull UUID uuid);
|
||||
|
||||
|
||||
@@ -56,10 +56,10 @@ index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c7
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index e464769f72bf7d8e0f0630fd4f03011f8ac80dc7..bfeec56e83229dbfc8625b3b90bd6c138c73bc1d 100644
|
||||
index c9ecd5b1908e05a1b39dadcded27241672adcddf..355c46f1c1f08072446f3cc92c0d22898933a7fc 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -85,5 +85,12 @@ public interface UnsafeValues {
|
||||
@@ -94,5 +94,12 @@ public interface UnsafeValues {
|
||||
* @return name
|
||||
*/
|
||||
String getTimingsServerName();
|
||||
@@ -73,7 +73,7 @@ index e464769f72bf7d8e0f0630fd4f03011f8ac80dc7..bfeec56e83229dbfc8625b3b90bd6c13
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
index 2305eb40832a82159cd89162934870cf57e1aa0e..4c2ddc722a9dc4011906ad9530b13fa9be1d3ff9 100644
|
||||
index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..b50f614806f4634960d383e8a33f094c2f46935f 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@@ -81,17 +81,9 @@ index 2305eb40832a82159cd89162934870cf57e1aa0e..4c2ddc722a9dc4011906ad9530b13fa9
|
||||
|
||||
+import com.destroystokyo.paper.util.VersionFetcher; // Paper - version supplier
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.io.Resources;
|
||||
@@ -16,6 +17,7 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
+import net.kyori.adventure.text.Component; // Paper
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
@@ -26,6 +28,15 @@ import org.bukkit.util.StringUtil;
|
||||
@@ -26,6 +27,15 @@ import org.bukkit.util.StringUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class VersionCommand extends BukkitCommand {
|
||||
@@ -107,7 +99,7 @@ index 2305eb40832a82159cd89162934870cf57e1aa0e..4c2ddc722a9dc4011906ad9530b13fa9
|
||||
public VersionCommand(@NotNull String name) {
|
||||
super(name);
|
||||
|
||||
@@ -40,7 +51,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -40,7 +50,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
if (!testPermission(sender)) return true;
|
||||
|
||||
if (args.length == 0) {
|
||||
@@ -116,12 +108,12 @@ index 2305eb40832a82159cd89162934870cf57e1aa0e..4c2ddc722a9dc4011906ad9530b13fa9
|
||||
sendVersion(sender);
|
||||
} else {
|
||||
StringBuilder name = new StringBuilder();
|
||||
@@ -146,14 +157,14 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -146,14 +156,14 @@ public class VersionCommand extends BukkitCommand {
|
||||
|
||||
private final ReentrantLock versionLock = new ReentrantLock();
|
||||
private boolean hasVersion = false;
|
||||
- private String versionMessage = null;
|
||||
+ private Component versionMessage = null; // Paper
|
||||
+ private net.kyori.adventure.text.Component versionMessage = null; // Paper
|
||||
private final Set<CommandSender> versionWaiters = new HashSet<CommandSender>();
|
||||
private boolean versionTaskStarted = false;
|
||||
private long lastCheck = 0;
|
||||
@@ -133,22 +125,22 @@ index 2305eb40832a82159cd89162934870cf57e1aa0e..4c2ddc722a9dc4011906ad9530b13fa9
|
||||
lastCheck = System.currentTimeMillis();
|
||||
hasVersion = false;
|
||||
} else {
|
||||
@@ -168,7 +179,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -168,7 +178,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
return;
|
||||
}
|
||||
versionWaiters.add(sender);
|
||||
- sender.sendMessage("Checking version, please wait...");
|
||||
+ sender.sendMessage(Component.text("Checking version, please wait...", net.kyori.adventure.text.format.NamedTextColor.WHITE, net.kyori.adventure.text.format.TextDecoration.ITALIC)); // Paper
|
||||
+ sender.sendMessage(net.kyori.adventure.text.Component.text("Checking version, please wait...", net.kyori.adventure.text.format.NamedTextColor.WHITE, net.kyori.adventure.text.format.TextDecoration.ITALIC)); // Paper
|
||||
if (!versionTaskStarted) {
|
||||
versionTaskStarted = true;
|
||||
new Thread(new Runnable() {
|
||||
@@ -186,6 +197,13 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -186,6 +196,13 @@ public class VersionCommand extends BukkitCommand {
|
||||
|
||||
private void obtainVersion() {
|
||||
String version = Bukkit.getVersion();
|
||||
+ // Paper start
|
||||
+ if (version.startsWith("null")) { // running from ide?
|
||||
+ setVersionMessage(Component.text("Unknown version, custom build?", net.kyori.adventure.text.format.NamedTextColor.YELLOW));
|
||||
+ setVersionMessage(net.kyori.adventure.text.Component.text("Unknown version, custom build?", net.kyori.adventure.text.format.NamedTextColor.YELLOW));
|
||||
+ return;
|
||||
+ }
|
||||
+ setVersionMessage(getVersionFetcher().getVersionMessage(version));
|
||||
@@ -156,7 +148,7 @@ index 2305eb40832a82159cd89162934870cf57e1aa0e..4c2ddc722a9dc4011906ad9530b13fa9
|
||||
if (version == null) version = "Custom";
|
||||
String[] parts = version.substring(0, version.indexOf(' ')).split("-");
|
||||
if (parts.length == 4) {
|
||||
@@ -215,11 +233,24 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -215,11 +232,24 @@ public class VersionCommand extends BukkitCommand {
|
||||
} else {
|
||||
setVersionMessage("Unknown version, custom build?");
|
||||
}
|
||||
@@ -166,17 +158,17 @@ index 2305eb40832a82159cd89162934870cf57e1aa0e..4c2ddc722a9dc4011906ad9530b13fa9
|
||||
|
||||
- private void setVersionMessage(@NotNull String msg) {
|
||||
+ // Paper start
|
||||
+ private void setVersionMessage(final @NotNull Component msg) {
|
||||
+ private void setVersionMessage(final @NotNull net.kyori.adventure.text.Component msg) {
|
||||
lastCheck = System.currentTimeMillis();
|
||||
- versionMessage = msg;
|
||||
+ final Component message = net.kyori.adventure.text.TextComponent.ofChildren(
|
||||
+ Component.text("This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")", net.kyori.adventure.text.format.NamedTextColor.WHITE),
|
||||
+ Component.newline(),
|
||||
+ final net.kyori.adventure.text.Component message = net.kyori.adventure.text.TextComponent.ofChildren(
|
||||
+ net.kyori.adventure.text.Component.text("This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")", net.kyori.adventure.text.format.NamedTextColor.WHITE),
|
||||
+ net.kyori.adventure.text.Component.newline(),
|
||||
+ msg
|
||||
+ );
|
||||
+ this.versionMessage = Component.text()
|
||||
+ this.versionMessage = net.kyori.adventure.text.Component.text()
|
||||
+ .append(message)
|
||||
+ .hoverEvent(Component.text("Click to copy to clipboard", net.kyori.adventure.text.format.NamedTextColor.WHITE))
|
||||
+ .hoverEvent(net.kyori.adventure.text.Component.text("Click to copy to clipboard", net.kyori.adventure.text.format.NamedTextColor.WHITE))
|
||||
+ .clickEvent(net.kyori.adventure.text.event.ClickEvent.copyToClipboard(net.kyori.adventure.text.serializer.plain.PlainComponentSerializer.plain().serialize(message)))
|
||||
+ .build();
|
||||
+ // Paper end
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 10cb6088c4618f228c757f4e592b44edab81c2dc..65088203d29798efe211612dfadb356f457ed466 100644
|
||||
index a829779ac56a271cad463806984991b4713a27be..20c529bdd94a6bac09d9f8222f33dfc9e8d53fa9 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -663,5 +663,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -698,5 +698,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
default net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowEntity> op) {
|
||||
return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.customName())));
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ Add per player no-tick, tick, and send view distances.
|
||||
Also add send/no-tick view distance to World.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index c58b1885662c6a234ffee75995051c9750c1a512..7b1fb280a86ab44756fc233b085f878d2a27ad66 100644
|
||||
index 425cad3b6c365560f6614767d763ad61a92e6722..75a87b221cc0f6334c5283130a7b2bfdf4eedd03 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2450,6 +2450,52 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2673,6 +2673,62 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
int getSimulationDistance();
|
||||
// Spigot end
|
||||
|
||||
@@ -23,13 +23,21 @@ index c58b1885662c6a234ffee75995051c9750c1a512..7b1fb280a86ab44756fc233b085f878d
|
||||
+ void setViewDistance(int viewDistance);
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the simulation distance for this world.
|
||||
+ * @param simulationDistance simulation distance in [2, 32]
|
||||
+ */
|
||||
+ void setSimulationDistance(int simulationDistance);
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the no-tick view distance for this world.
|
||||
+ * <p>
|
||||
+ * No-tick view distance is the view distance where chunks will load, however the chunks and their entities will not
|
||||
+ * be set to tick.
|
||||
+ * </p>
|
||||
+ * @return The no-tick view distance for this world.
|
||||
+ * @deprecated Use {@link #getViewDistance()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ int getNoTickViewDistance();
|
||||
+
|
||||
+ /**
|
||||
@@ -39,7 +47,9 @@ index c58b1885662c6a234ffee75995051c9750c1a512..7b1fb280a86ab44756fc233b085f878d
|
||||
+ * be set to tick.
|
||||
+ * </p>
|
||||
+ * @param viewDistance view distance in [2, 32]
|
||||
+ * @deprecated Use {@link #setViewDistance(int)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ void setNoTickViewDistance(int viewDistance);
|
||||
+
|
||||
+ /**
|
||||
@@ -49,7 +59,7 @@ index c58b1885662c6a234ffee75995051c9750c1a512..7b1fb280a86ab44756fc233b085f878d
|
||||
+ * </p>
|
||||
+ * @return The sending view distance for this world.
|
||||
+ */
|
||||
+ public int getSendViewDistance();
|
||||
+ int getSendViewDistance();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the sending view distance for this world.
|
||||
@@ -58,17 +68,17 @@ index c58b1885662c6a234ffee75995051c9750c1a512..7b1fb280a86ab44756fc233b085f878d
|
||||
+ * </p>
|
||||
+ * @param viewDistance view distance in [2, 32] or -1
|
||||
+ */
|
||||
+ public void setSendViewDistance(int viewDistance);
|
||||
+ void setSendViewDistance(int viewDistance);
|
||||
+ // Paper end - view distance api
|
||||
+
|
||||
// Spigot start
|
||||
public class Spigot {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index a6f6dea965eee2de2183f189580d1b7141a9308f..bf60cc1beed41f6dc30b0df0bae9b937ddfa5553 100644
|
||||
index 7c13de51561df662691a36ca1cc91ca7997d773a..292f7827df666c10d7b82aa9b1688bf3f0da5c7b 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1760,6 +1760,62 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1864,6 +1864,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param affects Whether the player can affect mob spawning
|
||||
*/
|
||||
public void setAffectsSpawning(boolean affects);
|
||||
@@ -78,7 +88,6 @@ index a6f6dea965eee2de2183f189580d1b7141a9308f..bf60cc1beed41f6dc30b0df0bae9b937
|
||||
+ *
|
||||
+ * @return the player's view distance
|
||||
+ * @see org.bukkit.World#getViewDistance()
|
||||
+ * @see org.bukkit.World#getNoTickViewDistance()
|
||||
+ */
|
||||
+ public int getViewDistance();
|
||||
+
|
||||
@@ -87,9 +96,22 @@ index a6f6dea965eee2de2183f189580d1b7141a9308f..bf60cc1beed41f6dc30b0df0bae9b937
|
||||
+ *
|
||||
+ * @param viewDistance the player's view distance
|
||||
+ * @see org.bukkit.World#setViewDistance(int)
|
||||
+ * @see org.bukkit.World#setNoTickViewDistance(int)
|
||||
+ */
|
||||
+ public void setViewDistance(int viewDistance);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the simulation distance for this player
|
||||
+ *
|
||||
+ * @return the player's simulation distance
|
||||
+ */
|
||||
+ public int getSimulationDistance();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the simulation distance for this player
|
||||
+ *
|
||||
+ * @param simulationDistance the player's new simulation distance
|
||||
+ */
|
||||
+ public void setSimulationDistance(int simulationDistance);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the no-ticking view distance for this player.
|
||||
@@ -98,7 +120,9 @@ index a6f6dea965eee2de2183f189580d1b7141a9308f..bf60cc1beed41f6dc30b0df0bae9b937
|
||||
+ * be set to tick.
|
||||
+ * </p>
|
||||
+ * @return The no-tick view distance for this player.
|
||||
+ * @deprecated Use {@link #getViewDistance()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public int getNoTickViewDistance();
|
||||
+
|
||||
+ /**
|
||||
@@ -108,7 +132,9 @@ index a6f6dea965eee2de2183f189580d1b7141a9308f..bf60cc1beed41f6dc30b0df0bae9b937
|
||||
+ * be set to tick.
|
||||
+ * </p>
|
||||
+ * @param viewDistance view distance in [2, 32] or -1
|
||||
+ * @deprecated Use {@link #setViewDistance(int)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public void setNoTickViewDistance(int viewDistance);
|
||||
+
|
||||
+ /**
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Automatically disable plugins that fail to load
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index 9700ed558e65260264279b92dc661f39a0d0209c..451fce7223834169751679ce6dc22de3df24eae9 100644
|
||||
index 333c47a1f7e9d7ddf91aad5ec15163427f7b8039..5eb24f38f158d43fb42836b83c108f808c89512e 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -335,6 +335,10 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index bbee4e40917cca4e692c3d60c1c513b4c847160f..259c15ada05115b9fc86f1de06649d5cec2ef137 100644
|
||||
index 3603bcdadeea10f2babe8d6c609d7eaee3f0f89c..5475f7df443a31e839d353e251b0d9d55e53a84f 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1912,6 +1912,19 @@ public final class Bukkit {
|
||||
@@ -2090,6 +2090,19 @@ public final class Bukkit {
|
||||
return server.getUnsafe();
|
||||
}
|
||||
|
||||
@@ -29,10 +29,10 @@ index bbee4e40917cca4e692c3d60c1c513b4c847160f..259c15ada05115b9fc86f1de06649d5c
|
||||
public static Server.Spigot spigot() {
|
||||
return server.spigot();
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 835041d2ab6545e52d963d96d558f9a7e52d279a..66211ef974b9e091983bfda108f6e420c01a9d78 100644
|
||||
index 36f5e47ffcdce23b0b5594881fdd49a3a3337578..2dac2c6e01b4f230750605ab1f49317927705c6b 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1471,6 +1471,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1613,6 +1613,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
public double[] getTPS();
|
||||
// Paper end
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses
|
||||
Change Javadoc to be accurate
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 259c15ada05115b9fc86f1de06649d5cec2ef137..5fc71e24f1562ff0d448b964f29fd109d4d9bb4d 100644
|
||||
index 5475f7df443a31e839d353e251b0d9d55e53a84f..7a8eaf46ecd37163dbe34beb2cf8754bddae302f 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -376,6 +376,30 @@ public final class Bukkit {
|
||||
@@ -379,6 +379,30 @@ public final class Bukkit {
|
||||
return server.broadcastMessage(message);
|
||||
}
|
||||
|
||||
@@ -41,10 +41,10 @@ index 259c15ada05115b9fc86f1de06649d5cec2ef137..5fc71e24f1562ff0d448b964f29fd109
|
||||
* Gets the name of the update folder. The update folder is used to safely
|
||||
* update plugins at the right moment on a plugin load.
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 66211ef974b9e091983bfda108f6e420c01a9d78..8fb6545406ab6029d82c903856bda6c6d6fa0636 100644
|
||||
index 2dac2c6e01b4f230750605ab1f49317927705c6b..1aed052ea337f2875b581064bd8e79d8a5a1a9ec 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -309,6 +309,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -312,6 +312,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@Deprecated // Paper
|
||||
public int broadcastMessage(@NotNull String message);
|
||||
|
||||
@@ -76,10 +76,10 @@ index 66211ef974b9e091983bfda108f6e420c01a9d78..8fb6545406ab6029d82c903856bda6c6
|
||||
* Gets the name of the update folder. The update folder is used to safely
|
||||
* update plugins at the right moment on a plugin load.
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 152f848d2f93a52999f093bd83b4732af9aab8d8..771682aa1c5e1bfb9670cc98ce99439014d0d31c 100644
|
||||
index 292f7827df666c10d7b82aa9b1688bf3f0da5c7b..b91c12089ba0723356ef2d3d1b8b0c66ca8850bf 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -708,6 +708,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -778,6 +778,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void sendMap(@NotNull MapView map);
|
||||
|
||||
|
||||
@@ -6,14 +6,13 @@ Subject: [PATCH] Add exception reporting event
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java b/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..2f573299a9a817a98372817a1de8bf641aaca956
|
||||
index 0000000000000000000000000000000000000000..306dbd975e9380c22dae0dad526725cc47a36f16
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java
|
||||
@@ -0,0 +1,43 @@
|
||||
@@ -0,0 +1,42 @@
|
||||
+package com.destroystokyo.paper.event.server;
|
||||
+
|
||||
+import com.google.common.base.Preconditions;
|
||||
+import org.apache.commons.lang.Validate;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
@@ -280,17 +279,15 @@ index 0000000000000000000000000000000000000000..f016ba3b1b62e554a9bacbb9635f2dbe
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerPluginException.java b/src/main/java/com/destroystokyo/paper/exception/ServerPluginException.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..6defac287d0214fdf99418d979144050cc1e53bc
|
||||
index 0000000000000000000000000000000000000000..be3f92e3c6bcefe8b78da701b75121275001882e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerPluginException.java
|
||||
@@ -0,0 +1,38 @@
|
||||
@@ -0,0 +1,36 @@
|
||||
+package com.destroystokyo.paper.exception;
|
||||
+
|
||||
+import com.google.common.base.Preconditions;
|
||||
+import org.apache.commons.lang.Validate;
|
||||
+import org.bukkit.plugin.Plugin;
|
||||
+
|
||||
+import static com.google.common.base.Preconditions.*;
|
||||
+import static com.google.common.base.Preconditions.checkNotNull;
|
||||
+
|
||||
+/**
|
||||
+ * Wrapper exception for all cases to which a plugin can be immediately blamed for
|
||||
@@ -464,63 +461,41 @@ index 0000000000000000000000000000000000000000..5582999fe94c7a3dac655044ccc6d078
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index f020cb04eba27a2e70fc7cf799ebbfb434b9d974..adfc7aae2c0f49bbcdd358e83b04a0cf078a7d52 100644
|
||||
index f99d71301ceaa3af07ff0525f7d657ac6253d0e6..2e23c124311b38aaea64dd274c33afcd52edcf43 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -8,6 +8,10 @@ import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
+
|
||||
+import com.destroystokyo.paper.event.server.ServerExceptionEvent;
|
||||
+import com.destroystokyo.paper.exception.ServerCommandException;
|
||||
+import com.destroystokyo.paper.exception.ServerTabCompleteException;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Server;
|
||||
@@ -155,11 +159,14 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -155,11 +155,14 @@ public class SimpleCommandMap implements CommandMap {
|
||||
target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length));
|
||||
} // target.timings.stopTiming(); // Spigot // Paper
|
||||
} catch (CommandException ex) {
|
||||
+ server.getPluginManager().callEvent(new ServerExceptionEvent(new ServerCommandException(ex, target, sender, args))); // Paper
|
||||
+ server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper
|
||||
//target.timings.stopTiming(); // Spigot // Paper
|
||||
throw ex;
|
||||
} catch (Throwable ex) {
|
||||
//target.timings.stopTiming(); // Spigot // Paper
|
||||
- throw new CommandException("Unhandled exception executing '" + commandLine + "' in " + target, ex);
|
||||
+ String msg = "Unhandled exception executing '" + commandLine + "' in " + target;
|
||||
+ server.getPluginManager().callEvent(new ServerExceptionEvent(new ServerCommandException(ex, target, sender, args))); // Paper
|
||||
+ server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper
|
||||
+ throw new CommandException(msg, ex);
|
||||
}
|
||||
|
||||
// return true as command was handled
|
||||
@@ -238,7 +245,9 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -238,7 +241,9 @@ public class SimpleCommandMap implements CommandMap {
|
||||
} catch (CommandException ex) {
|
||||
throw ex;
|
||||
} catch (Throwable ex) {
|
||||
- throw new CommandException("Unhandled exception executing tab-completer for '" + cmdLine + "' in " + target, ex);
|
||||
+ String msg = "Unhandled exception executing tab-completer for '" + cmdLine + "' in " + target;
|
||||
+ server.getPluginManager().callEvent(new ServerExceptionEvent(new ServerTabCompleteException(msg, ex, target, sender, args))); // Paper
|
||||
+ server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerTabCompleteException(msg, ex, target, sender, args))); // Paper
|
||||
+ throw new CommandException(msg, ex);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 83d3ee09cc6f91b095f6b8519a431ef70f2b67ec..1fbf690403eefe017b146c141c6d47d9b8d9d4bb 100644
|
||||
index 1bfa9fcb1b803eecfe33156f81ee88d2922ca88a..b535ab89b5a04371bac41720d28b4af8b18f1c20 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -23,6 +23,10 @@ import java.util.WeakHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
+
|
||||
+import com.destroystokyo.paper.event.server.ServerExceptionEvent;
|
||||
+import com.destroystokyo.paper.exception.ServerEventException;
|
||||
+import com.destroystokyo.paper.exception.ServerPluginEnableDisableException;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.World;
|
||||
@@ -488,7 +492,8 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -488,7 +488,8 @@ public final class SimplePluginManager implements PluginManager {
|
||||
try {
|
||||
plugin.getPluginLoader().enablePlugin(plugin);
|
||||
} catch (Throwable ex) {
|
||||
@@ -530,7 +505,7 @@ index 83d3ee09cc6f91b095f6b8519a431ef70f2b67ec..1fbf690403eefe017b146c141c6d47d9
|
||||
}
|
||||
|
||||
HandlerList.bakeAll();
|
||||
@@ -509,32 +514,37 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -509,32 +510,37 @@ public final class SimplePluginManager implements PluginManager {
|
||||
try {
|
||||
plugin.getPluginLoader().disablePlugin(plugin);
|
||||
} catch (Throwable ex) {
|
||||
@@ -573,21 +548,21 @@ index 83d3ee09cc6f91b095f6b8519a431ef70f2b67ec..1fbf690403eefe017b146c141c6d47d9
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -547,6 +557,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -547,6 +553,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ private void handlePluginException(String msg, Throwable ex, Plugin plugin) {
|
||||
+ server.getLogger().log(Level.SEVERE, msg, ex);
|
||||
+ callEvent(new ServerExceptionEvent(new ServerPluginEnableDisableException(msg, ex, plugin)));
|
||||
+ callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerPluginEnableDisableException(msg, ex, plugin)));
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public void clearPlugins() {
|
||||
synchronized (this) {
|
||||
@@ -610,7 +627,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -610,7 +623,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
));
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
@@ -595,8 +570,8 @@ index 83d3ee09cc6f91b095f6b8519a431ef70f2b67ec..1fbf690403eefe017b146c141c6d47d9
|
||||
+ // Paper start - error reporting
|
||||
+ String msg = "Could not pass event " + event.getEventName() + " to " + registration.getPlugin().getDescription().getFullName();
|
||||
+ server.getLogger().log(Level.SEVERE, msg, ex);
|
||||
+ if (!(event instanceof ServerExceptionEvent)) { // We don't want to cause an endless event loop
|
||||
+ callEvent(new ServerExceptionEvent(new ServerEventException(msg, ex, registration.getPlugin(), registration.getListener(), event)));
|
||||
+ if (!(event instanceof com.destroystokyo.paper.event.server.ServerExceptionEvent)) { // We don't want to cause an endless event loop
|
||||
+ callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerEventException(msg, ex, registration.getPlugin(), registration.getListener(), event)));
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add BaseComponent sendMessage methods to CommandSender
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/CommandSender.java b/src/main/java/org/bukkit/command/CommandSender.java
|
||||
index f98d46fa45bb7c842d791b09f082a0968ae537fb..e330a0d2be7a73ff84ec18499de6aecbceb5166c 100644
|
||||
index ec97093a4410322ad44e111d894a3b1a5c5f7b88..f3cf27e075ea01d9d825aead3782db66cd4f2c3b 100644
|
||||
--- a/src/main/java/org/bukkit/command/CommandSender.java
|
||||
+++ b/src/main/java/org/bukkit/command/CommandSender.java
|
||||
@@ -1,6 +1,9 @@
|
||||
@@ -18,9 +18,9 @@ index f98d46fa45bb7c842d791b09f082a0968ae537fb..e330a0d2be7a73ff84ec18499de6aecb
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.permissions.Permissible;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -124,5 +127,33 @@ public interface CommandSender extends net.kyori.adventure.audience.Audience, Pe
|
||||
default void sendMessage(final @NotNull net.kyori.adventure.identity.Identity identity, final @NotNull net.kyori.adventure.text.Component message, final @NotNull net.kyori.adventure.audience.MessageType type) {
|
||||
this.sendMessage(org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(message));
|
||||
@@ -145,5 +148,33 @@ public interface CommandSender extends net.kyori.adventure.audience.Audience, Pe
|
||||
default void sendPlainMessage(final @NotNull String message) {
|
||||
this.sendMessage(net.kyori.adventure.text.Component.text(message));
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
|
||||
@@ -432,18 +432,18 @@ index 0000000000000000000000000000000000000000..9e90c3df567a65b48a0b9341f784eb90
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index b6a848261f7c136cbcb4a4f40223d2f248d546c2..1df2ff828aee7dac50d63fe1d51104e9fb2ed264 100644
|
||||
index b91c12089ba0723356ef2d3d1b8b0c66ca8850bf..74a3abef2ff1be11427558293e81f3b7fe9fff16 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2,6 +2,7 @@ package org.bukkit.entity;
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.entity;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
+import com.destroystokyo.paper.Title; // Paper
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.GameMode;
|
||||
@@ -742,6 +743,131 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -812,6 +813,131 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
spigot().sendMessage(position, components);
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add methods for working with arrows stuck in living entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 5077ec367a5cba88957c6115be27742974f7deec..b41133f23d25f90fc0993499056c4eeaf003a701 100644
|
||||
index 2b816f0e6bdb912ceeff82c0043272b3970fe243..f00502b59f15c3a92ce18e7d1aa4e546fd45b16a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -612,4 +612,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -689,4 +689,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
* @return Whether the entity is invisible
|
||||
*/
|
||||
public boolean isInvisible();
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index cd2c4ff23cdbcc3e4e9ae94477a372d25ad31e39..422f322b9623dcb33472744ddfd91d7dba817471 100644
|
||||
index 74a3abef2ff1be11427558293e81f3b7fe9fff16..bc3fc130b38bb9e102ab6a95e6ca75d815ba4902 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1251,7 +1251,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1329,7 +1329,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException Thrown if the URL is null.
|
||||
* @throws IllegalArgumentException Thrown if the URL is too long. The
|
||||
* length restriction is an implementation specific arbitrary value.
|
||||
@@ -18,7 +18,7 @@ index cd2c4ff23cdbcc3e4e9ae94477a372d25ad31e39..422f322b9623dcb33472744ddfd91d7d
|
||||
public void setResourcePack(@NotNull String url);
|
||||
|
||||
/**
|
||||
@@ -2025,6 +2027,124 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2145,6 +2147,124 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
default net.kyori.adventure.text.event.HoverEvent<net.kyori.adventure.text.event.HoverEvent.ShowEntity> asHoverEvent(final @NotNull java.util.function.UnaryOperator<net.kyori.adventure.text.event.HoverEvent.ShowEntity> op) {
|
||||
return net.kyori.adventure.text.event.HoverEvent.showEntity(op.apply(net.kyori.adventure.text.event.HoverEvent.ShowEntity.of(this.getType().getKey(), this.getUniqueId(), this.displayName())));
|
||||
}
|
||||
|
||||
@@ -6,19 +6,19 @@ Subject: [PATCH] Use ASM for event executors.
|
||||
Uses method handles for private or static methods.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 0e8e827b5a05ac9423386eaea4188d132cc7f954..70d6503745942ea8637146369aeab8f9357c42d5 100644
|
||||
index 7b8196db1fd1e283dc9ef71e3fe5137cc5920ba9..f0f8047cb3a43b447dc50b730dab3d0bc471b25a 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -38,6 +38,9 @@ dependencies {
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-gson")
|
||||
@@ -39,6 +39,9 @@ dependencies {
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-legacy")
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-plain")
|
||||
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
||||
+
|
||||
+ implementation("org.ow2.asm:asm:9.2")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.2")
|
||||
// Paper end
|
||||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.4")
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5b28e9b1daba7834af67dbc193dd656bedd9a994
|
||||
@@ -118,10 +118,10 @@ index 0000000000000000000000000000000000000000..c83672427324bd068ed52916f700b684
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..b6e7d8ee8d903ebf975d60bec0e08603d9a49fdb
|
||||
index 0000000000000000000000000000000000000000..b8d5c13980858dc27fb5383726b7ebcaf14adcb8
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java
|
||||
@@ -0,0 +1,47 @@
|
||||
@@ -0,0 +1,51 @@
|
||||
+package com.destroystokyo.paper.event.executor.asm;
|
||||
+
|
||||
+import java.lang.reflect.Method;
|
||||
@@ -147,14 +147,18 @@ index 0000000000000000000000000000000000000000..b6e7d8ee8d903ebf975d60bec0e08603
|
||||
+ methodGenerator.returnValue();
|
||||
+ methodGenerator.endMethod();
|
||||
+ // Generate the execute method
|
||||
+ methodGenerator = new GeneratorAdapter(writer.visitMethod(ACC_PUBLIC, "execute", "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Event;)V", null, null), ACC_PUBLIC, "execute", "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Listener;)V");;
|
||||
+ methodGenerator = new GeneratorAdapter(writer.visitMethod(ACC_PUBLIC, "execute", "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Event;)V", null, null), ACC_PUBLIC, "execute", "(Lorg/bukkit/event/Listener;Lorg/bukkit/event/Listener;)V");
|
||||
+ methodGenerator.loadArg(0);
|
||||
+ methodGenerator.checkCast(Type.getType(m.getDeclaringClass()));
|
||||
+ methodGenerator.loadArg(1);
|
||||
+ methodGenerator.checkCast(Type.getType(m.getParameterTypes()[0]));
|
||||
+ methodGenerator.visitMethodInsn(m.getDeclaringClass().isInterface() ? INVOKEINTERFACE : INVOKEVIRTUAL, Type.getInternalName(m.getDeclaringClass()), m.getName(), Type.getMethodDescriptor(m), m.getDeclaringClass().isInterface());
|
||||
+ if (m.getReturnType() != void.class) {
|
||||
+ methodGenerator.pop();
|
||||
+ // The only purpose of this switch statement is to generate the correct pop instruction, should the event handler method return something other than void.
|
||||
+ // Non-void event handlers will be unsupported in a future release.
|
||||
+ switch (Type.getType(m.getReturnType()).getSize()) {
|
||||
+ // case 0 is omitted because the only type that has size 0 is void - no pop instruction needed.
|
||||
+ case 1 -> methodGenerator.pop(); // handles reference types and most primitives
|
||||
+ case 2 -> methodGenerator.pop2(); // handles long and double
|
||||
+ }
|
||||
+ methodGenerator.returnValue();
|
||||
+ methodGenerator.endMethod();
|
||||
@@ -362,7 +366,7 @@ index a850f0780de05463fc0d3f9e15ff7f19d88b2aed..9026e108ccd3a88aee1267ee275137be
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index 451fce7223834169751679ce6dc22de3df24eae9..0cbac77e16fc36d805b79dd44837a38a79618c0b 100644
|
||||
index 5eb24f38f158d43fb42836b83c108f808c89512e..5d74fab03a15d7099e5dacb780eade4cdc185797 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -291,21 +291,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Add command to reload permissions.yml and require confirm to
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 5fc71e24f1562ff0d448b964f29fd109d4d9bb4d..191e9985fc17ffbdb9b6bdadbea46da54f5f7599 100644
|
||||
index 7a8eaf46ecd37163dbe34beb2cf8754bddae302f..9463169bdb45a53ad774a0e3a5ec07704508685f 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1947,6 +1947,13 @@ public final class Bukkit {
|
||||
@@ -2125,6 +2125,13 @@ public final class Bukkit {
|
||||
public static org.bukkit.command.CommandMap getCommandMap() {
|
||||
return server.getCommandMap();
|
||||
}
|
||||
@@ -24,10 +24,10 @@ index 5fc71e24f1562ff0d448b964f29fd109d4d9bb4d..191e9985fc17ffbdb9b6bdadbea46da5
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 8fb6545406ab6029d82c903856bda6c6d6fa0636..731679a0893635f5cb71a19fd9ee8562795230b8 100644
|
||||
index 1aed052ea337f2875b581064bd8e79d8a5a1a9ec..cd51a1a9a59cfa868237ab750d98d9df8464152f 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1717,4 +1717,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1874,4 +1874,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@NotNull
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
@@ -35,7 +35,7 @@ index 8fb6545406ab6029d82c903856bda6c6d6fa0636..731679a0893635f5cb71a19fd9ee8562
|
||||
+ void reloadPermissions(); // Paper
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||
index 50cc311be7904cc8fc6070a21c8e4de3a489fd20..c62da4131b17e66892678e8b618fb9ba3de93b56 100644
|
||||
index 50cc311be7904cc8fc6070a21c8e4de3a489fd20..5fa9d648bc780e874f658597f1a24715bccac5cb 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||
@@ -13,15 +13,35 @@ public class ReloadCommand extends BukkitCommand {
|
||||
@@ -58,17 +58,17 @@ index 50cc311be7904cc8fc6070a21c8e4de3a489fd20..c62da4131b17e66892678e8b618fb9ba
|
||||
+ if (args.length == 1) {
|
||||
+ if (args[0].equalsIgnoreCase("permissions")) {
|
||||
+ Bukkit.getServer().reloadPermissions();
|
||||
+ Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Permissions successfully reloaded.");
|
||||
+ Command.broadcastCommandMessage(sender, net.kyori.adventure.text.Component.text("Permissions successfully reloaded.", net.kyori.adventure.text.format.NamedTextColor.GREEN));
|
||||
+ return true;
|
||||
+ } else if ("confirm".equalsIgnoreCase(args[0])) {
|
||||
+ confirmed = true;
|
||||
+ } else {
|
||||
+ Command.broadcastCommandMessage(sender, ChatColor.RED + "Usage: " + usageMessage);
|
||||
+ Command.broadcastCommandMessage(sender, net.kyori.adventure.text.Component.text("Usage: " + usageMessage, net.kyori.adventure.text.format.NamedTextColor.RED));
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ if (!confirmed) {
|
||||
+ Command.broadcastCommandMessage(sender, ChatColor.RED + "Are you sure you wish to reload your server? Doing so may cause bugs and memory leaks. It is recommended to restart instead of using /reload. To confirm, please type " + ChatColor.YELLOW + "/reload confirm");
|
||||
+ Command.broadcastCommandMessage(sender, net.kyori.adventure.text.Component.text("Are you sure you wish to reload your server? Doing so may cause bugs and memory leaks. It is recommended to restart instead of using /reload. To confirm, please type ", net.kyori.adventure.text.format.NamedTextColor.RED).append(net.kyori.adventure.text.Component.text("/reload confirm", net.kyori.adventure.text.format.NamedTextColor.YELLOW)));
|
||||
+ return true;
|
||||
+ }
|
||||
+ // Paper end
|
||||
@@ -85,10 +85,10 @@ index 50cc311be7904cc8fc6070a21c8e4de3a489fd20..c62da4131b17e66892678e8b618fb9ba
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 1fbf690403eefe017b146c141c6d47d9b8d9d4bb..3ffe519b759f440f56f3054b0d3e4120b59f8c62 100644
|
||||
index b535ab89b5a04371bac41720d28b4af8b18f1c20..77caec9f974077ed6580d3cbbc20feb1199feb11 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -905,4 +905,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -906,4 +906,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
public void useTimings(boolean use) {
|
||||
co.aikar.timings.Timings.setTimingsEnabled(use); // Paper
|
||||
}
|
||||
|
||||
@@ -5,19 +5,19 @@ Subject: [PATCH] Custom replacement for eaten items
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
|
||||
index c2793f3ef01c1246c130971c17e1c2bf8f551435..373f4b5b5185aa81ff728da89c9cc4e0ccf87889 100644
|
||||
index 5c054eb531e3caf17c179aff6a712fb8c33d8f77..6110d0417340710333b44312d82c7bd5165a8954 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java
|
||||
@@ -22,6 +22,7 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@@ -24,6 +24,7 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
|
||||
private boolean isCancelled = false;
|
||||
private ItemStack item;
|
||||
private final EquipmentSlot hand;
|
||||
+ @Nullable private ItemStack replacement; // Paper
|
||||
|
||||
/**
|
||||
* @param player the player consuming
|
||||
@@ -58,6 +59,29 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
|
||||
}
|
||||
@@ -82,6 +83,29 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
|
||||
return hand;
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
|
||||
@@ -8,7 +8,7 @@ limited synchronized portions to allow much higher concurrency in
|
||||
MetadataStore as well as far less locking, especially on reads
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
|
||||
index baf850226aed8545a5794deba6dff9603953b4b2..d363d517c05b3335101d829ce4ec22d049059c24 100644
|
||||
index 6886a7003fb76d07e0fa9c1c352c56480f08a0db..a0698522f01619c9d37474f4bd55a17de58fff89 100644
|
||||
--- a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
|
||||
+++ b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
|
||||
@@ -12,7 +12,7 @@ import org.bukkit.plugin.Plugin;
|
||||
@@ -61,7 +61,7 @@ index baf850226aed8545a5794deba6dff9603953b4b2..d363d517c05b3335101d829ce4ec22d0
|
||||
*/
|
||||
- public synchronized void removeMetadata(@NotNull T subject, @NotNull String metadataKey, @NotNull Plugin owningPlugin) {
|
||||
+ public void removeMetadata(@NotNull T subject, @NotNull String metadataKey, @NotNull Plugin owningPlugin) { // Paper
|
||||
Validate.notNull(owningPlugin, "Plugin cannot be null");
|
||||
Preconditions.checkArgument(owningPlugin != null, "Plugin cannot be null");
|
||||
String key = disambiguate(subject, metadataKey);
|
||||
Map<Plugin, MetadataValue> entry = metadataMap.get(key);
|
||||
if (entry == null) {
|
||||
@@ -85,6 +85,6 @@ index baf850226aed8545a5794deba6dff9603953b4b2..d363d517c05b3335101d829ce4ec22d0
|
||||
*/
|
||||
- public synchronized void invalidateAll(@NotNull Plugin owningPlugin) {
|
||||
+ public void invalidateAll(@NotNull Plugin owningPlugin) { // Paper
|
||||
Validate.notNull(owningPlugin, "Plugin cannot be null");
|
||||
Preconditions.checkArgument(owningPlugin != null, "Plugin cannot be null");
|
||||
for (Map<Plugin, MetadataValue> values : metadataMap.values()) {
|
||||
if (values.containsKey(owningPlugin)) {
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Add MetadataStoreBase.removeAll(Plugin)
|
||||
So that on reload, metadata will be cleared
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
|
||||
index d363d517c05b3335101d829ce4ec22d049059c24..abbe545af572687a0399c2387434863cd2b70f68 100644
|
||||
index a0698522f01619c9d37474f4bd55a17de58fff89..a298baaa7a126515bb2802dd311f8487f3e5533f 100644
|
||||
--- a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
|
||||
+++ b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
|
||||
@@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
@@ -5,6 +5,7 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
@@ -29,7 +29,7 @@ index d363d517c05b3335101d829ce4ec22d049059c24..abbe545af572687a0399c2387434863c
|
||||
+ * @throws IllegalArgumentException If plugin is null
|
||||
+ */
|
||||
+ public void removeAll(@NotNull Plugin owningPlugin) {
|
||||
+ Validate.notNull(owningPlugin, "Plugin cannot be null");
|
||||
+ Preconditions.checkNotNull(owningPlugin, "Plugin cannot be null");
|
||||
+ for (Iterator<Map<Plugin, MetadataValue>> iterator = metadataMap.values().iterator(); iterator.hasNext(); ) {
|
||||
+ Map<Plugin, MetadataValue> values = iterator.next();
|
||||
+ if (values.containsKey(owningPlugin)) {
|
||||
|
||||
@@ -7,24 +7,24 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..a077962fa786a3291849abfa823c7f0ec4664fce
|
||||
index 0000000000000000000000000000000000000000..59ae7bc3a0a2079fe4b3a92d777aca682a58e4e3
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerHandshakeEvent.java
|
||||
@@ -0,0 +1,277 @@
|
||||
+package com.destroystokyo.paper.event.player;
|
||||
+
|
||||
+import com.google.common.base.Preconditions;
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+import net.kyori.adventure.text.format.NamedTextColor;
|
||||
+import org.apache.commons.lang.Validate;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+
|
||||
+import java.util.UUID;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+import java.util.UUID;
|
||||
+
|
||||
+/**
|
||||
+ * This event is fired during a player handshake.
|
||||
+ *
|
||||
@@ -262,7 +262,7 @@ index 0000000000000000000000000000000000000000..a077962fa786a3291849abfa823c7f0e
|
||||
+ @NotNull
|
||||
+ @Deprecated
|
||||
+ public String getFailMessage() {
|
||||
+ return Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.failMessage());
|
||||
+ return LegacyComponentSerializer.legacySection().serialize(this.failMessage());
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -273,8 +273,8 @@ index 0000000000000000000000000000000000000000..a077962fa786a3291849abfa823c7f0e
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public void setFailMessage(@NotNull String failMessage) {
|
||||
+ Validate.notEmpty(failMessage, "fail message cannot be null or empty");
|
||||
+ this.failMessage(Bukkit.getUnsafe().legacyComponentSerializer().deserialize(failMessage));
|
||||
+ Preconditions.checkArgument(failMessage != null && !failMessage.isEmpty(), "fail message cannot be null or empty");
|
||||
+ this.failMessage(LegacyComponentSerializer.legacySection().deserialize(failMessage));
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
|
||||
@@ -323,6 +323,17 @@ index 387b2892886e1ccb2bd928e5111fb9bd41d777ab..5dc5318b0a451937228a8a059dfec1cd
|
||||
|
||||
/**
|
||||
* Get the {@link DyeColor} corresponding to this ShulkerBox
|
||||
diff --git a/src/main/java/org/bukkit/entity/ChestBoat.java b/src/main/java/org/bukkit/entity/ChestBoat.java
|
||||
index 5b5c3be107fdaa6c55ceb1bca2c223ebc6ab7f43..4ebe1033c55dbd58d0794809435c935236fabcc2 100644
|
||||
--- a/src/main/java/org/bukkit/entity/ChestBoat.java
|
||||
+++ b/src/main/java/org/bukkit/entity/ChestBoat.java
|
||||
@@ -6,5 +6,5 @@ import org.bukkit.loot.Lootable;
|
||||
/**
|
||||
* A {@link Boat} with a chest.
|
||||
*/
|
||||
-public interface ChestBoat extends Boat, InventoryHolder, Lootable {
|
||||
+public interface ChestBoat extends Boat, InventoryHolder, com.destroystokyo.paper.loottable.LootableEntityInventory { // Paper
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java b/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java
|
||||
index 937b99f8734d71b2ad33af142afbc251b81d9745..db69687a7ad4b18d17ab1677cae5d8dd4dcd3678 100644
|
||||
--- a/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java
|
||||
|
||||
@@ -6,18 +6,17 @@ Subject: [PATCH] Add EntityZapEvent
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityZapEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityZapEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..3b725a489008d333630af166d2be5fc48168a6b9
|
||||
index 0000000000000000000000000000000000000000..1c5fa066c9e5e1b1a06df30842a4c7acc4742df8
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityZapEvent.java
|
||||
@@ -0,0 +1,65 @@
|
||||
@@ -0,0 +1,64 @@
|
||||
+package com.destroystokyo.paper.event.entity;
|
||||
+
|
||||
+import org.apache.commons.lang.Validate;
|
||||
+import com.google.common.base.Preconditions;
|
||||
+import org.bukkit.entity.Entity;
|
||||
+import org.bukkit.entity.LightningStrike;
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.entity.EntityEvent;
|
||||
+import org.bukkit.event.entity.EntityTransformEvent;
|
||||
+
|
||||
+import java.util.Collections;
|
||||
@@ -33,8 +32,8 @@ index 0000000000000000000000000000000000000000..3b725a489008d333630af166d2be5fc4
|
||||
+
|
||||
+ public EntityZapEvent(@NotNull final Entity entity, @NotNull final LightningStrike bolt, @NotNull final Entity replacementEntity) {
|
||||
+ super(entity, Collections.singletonList(replacementEntity), TransformReason.LIGHTNING);
|
||||
+ Validate.notNull(bolt);
|
||||
+ Validate.notNull(replacementEntity);
|
||||
+ Preconditions.checkNotNull(bolt);
|
||||
+ Preconditions.checkNotNull(replacementEntity);
|
||||
+ this.bolt = bolt;
|
||||
+ }
|
||||
+
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
||||
Reload the aliases stored in commands.yml
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 191e9985fc17ffbdb9b6bdadbea46da54f5f7599..3f58ffb4c59a92259fc5dde3d220658b6e54896f 100644
|
||||
index 9463169bdb45a53ad774a0e3a5ec07704508685f..fe5f6494fb0610dd11e59793701b2182fa862419 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1954,6 +1954,15 @@ public final class Bukkit {
|
||||
@@ -2132,6 +2132,15 @@ public final class Bukkit {
|
||||
public static void reloadPermissions() {
|
||||
server.reloadPermissions();
|
||||
}
|
||||
@@ -26,10 +26,10 @@ index 191e9985fc17ffbdb9b6bdadbea46da54f5f7599..3f58ffb4c59a92259fc5dde3d220658b
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 731679a0893635f5cb71a19fd9ee8562795230b8..01df6fc54078901a9195dd2bb45eaef1706ba036 100644
|
||||
index cd51a1a9a59cfa868237ab750d98d9df8464152f..29e71b746adcec45657787bf38427027508b0043 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1719,4 +1719,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1876,4 +1876,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
// Spigot end
|
||||
|
||||
void reloadPermissions(); // Paper
|
||||
@@ -56,10 +56,10 @@ index bd2c7a6964722412148fae39e1b4951fc0002b9b..864c263bbd4dd6dd7c37a74b39b1a40a
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index adfc7aae2c0f49bbcdd358e83b04a0cf078a7d52..460fda05a62b12db2edcfb7ea8b2a5dd8e4b110d 100644
|
||||
index 2e23c124311b38aaea64dd274c33afcd52edcf43..950a2d0b3b583c6b9a703190874bbc4df2783ab7 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -297,4 +297,11 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -293,4 +293,11 @@ public class SimpleCommandMap implements CommandMap {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ index adfc7aae2c0f49bbcdd358e83b04a0cf078a7d52..460fda05a62b12db2edcfb7ea8b2a5dd
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||
index c62da4131b17e66892678e8b618fb9ba3de93b56..0c7ba0718de2b93d013968ca0fec34ffd423990f 100644
|
||||
index 5fa9d648bc780e874f658597f1a24715bccac5cb..3ec32b46264cfff857b50129b5e0fa5584943ec6 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java
|
||||
@@ -13,7 +13,7 @@ public class ReloadCommand extends BukkitCommand {
|
||||
@@ -86,13 +86,13 @@ index c62da4131b17e66892678e8b618fb9ba3de93b56..0c7ba0718de2b93d013968ca0fec34ff
|
||||
}
|
||||
@@ -29,6 +29,13 @@ public class ReloadCommand extends BukkitCommand {
|
||||
Bukkit.getServer().reloadPermissions();
|
||||
Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Permissions successfully reloaded.");
|
||||
Command.broadcastCommandMessage(sender, net.kyori.adventure.text.Component.text("Permissions successfully reloaded.", net.kyori.adventure.text.format.NamedTextColor.GREEN));
|
||||
return true;
|
||||
+ } else if ("commands".equalsIgnoreCase(args[0])) {
|
||||
+ if (Bukkit.getServer().reloadCommandAliases()) {
|
||||
+ Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Command aliases successfully reloaded.");
|
||||
+ Command.broadcastCommandMessage(sender, net.kyori.adventure.text.Component.text("Command aliases successfully reloaded.", net.kyori.adventure.text.format.NamedTextColor.GREEN));
|
||||
+ } else {
|
||||
+ Command.broadcastCommandMessage(sender, ChatColor.RED + "An error occurred while trying to reload command aliases.");
|
||||
+ Command.broadcastCommandMessage(sender, net.kyori.adventure.text.Component.text("An error occurred while trying to reload command aliases.", net.kyori.adventure.text.format.NamedTextColor.RED));
|
||||
+ }
|
||||
+ return true;
|
||||
} else if ("confirm".equalsIgnoreCase(args[0])) {
|
||||
|
||||
@@ -5,18 +5,18 @@ Subject: [PATCH] Add String based Action Bar API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 422f322b9623dcb33472744ddfd91d7dba817471..9d9dd1f73b4c3ff143fbba87d8b5630017affd08 100644
|
||||
index bc3fc130b38bb9e102ab6a95e6ca75d815ba4902..80910fcc46b62ee4974a659713a1a72b5b4c135b 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.entity;
|
||||
import java.net.InetSocketAddress;
|
||||
@@ -4,6 +4,7 @@ import java.net.InetSocketAddress;
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
import com.destroystokyo.paper.Title; // Paper
|
||||
+import net.kyori.adventure.text.Component;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.GameMode;
|
||||
@@ -710,6 +711,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -780,6 +781,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
public void sendMap(@NotNull MapView map);
|
||||
|
||||
// Paper start
|
||||
@@ -56,7 +56,7 @@ index 422f322b9623dcb33472744ddfd91d7dba817471..9d9dd1f73b4c3ff143fbba87d8b56300
|
||||
/**
|
||||
* Sends the component to the player
|
||||
*
|
||||
@@ -737,9 +771,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -807,9 +841,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
/**
|
||||
* Sends an array of components as a single message to the specified screen position of this player
|
||||
*
|
||||
@@ -68,7 +68,7 @@ index 422f322b9623dcb33472744ddfd91d7dba817471..9d9dd1f73b4c3ff143fbba87d8b56300
|
||||
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
spigot().sendMessage(position, components);
|
||||
}
|
||||
@@ -2216,6 +2252,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2336,6 +2372,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
/**
|
||||
* Sends the component to the specified screen position of this player
|
||||
*
|
||||
@@ -76,7 +76,7 @@ index 422f322b9623dcb33472744ddfd91d7dba817471..9d9dd1f73b4c3ff143fbba87d8b56300
|
||||
* @param position the screen position
|
||||
* @param component the components to send
|
||||
* @deprecated use {@code sendMessage} methods that accept {@link net.kyori.adventure.text.Component}
|
||||
@@ -2228,6 +2265,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2348,6 +2385,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
/**
|
||||
* Sends an array of components as a single message to the specified screen position of this player
|
||||
*
|
||||
|
||||
@@ -7,10 +7,10 @@ Get the Entity being boosted
|
||||
Get the firework launcher
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Firework.java b/src/main/java/org/bukkit/entity/Firework.java
|
||||
index 05e86cb9d826cdf14490fa649348d46c51adbfdb..d616d5941b3c7b85e350e845901da798601b9a3c 100644
|
||||
index e750b34d7d067a5f2f5587853274b6f479cc4fd6..0d31aa0b22cf1e849572294e2cfe38b48c9210af 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Firework.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Firework.java
|
||||
@@ -43,4 +43,15 @@ public interface Firework extends Projectile {
|
||||
@@ -111,4 +111,20 @@ public interface Firework extends Projectile {
|
||||
* @param shotAtAngle the new shotAtAngle
|
||||
*/
|
||||
void setShotAtAngle(boolean shotAtAngle);
|
||||
@@ -20,9 +20,14 @@ index 05e86cb9d826cdf14490fa649348d46c51adbfdb..d616d5941b3c7b85e350e845901da798
|
||||
+ public java.util.UUID getSpawningEntity();
|
||||
+ /**
|
||||
+ * If this firework is boosting an entity, return it
|
||||
+ * @deprecated use {@link #getAttachedTo()}
|
||||
+ * @see #setAttachedTo(LivingEntity)
|
||||
+ * @return The entity being boosted
|
||||
+ */
|
||||
+ @org.jetbrains.annotations.Nullable
|
||||
+ public LivingEntity getBoostedEntity();
|
||||
+ @Deprecated
|
||||
+ default LivingEntity getBoostedEntity() {
|
||||
+ return getAttachedTo();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
@@ -7,12 +7,12 @@ Provides counts without the ineffeciency of using .getEntities().size()
|
||||
which creates copy of the collections.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 7b1fb280a86ab44756fc233b085f878d2a27ad66..cec39714294127478b6e73452354ba7ccab78b25 100644
|
||||
index 887b85849803cee22a41a701b43cdc9085ba0dc3..e0683e69029e8ac423bda79521045b06673eabf3 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -40,6 +40,33 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -45,6 +45,33 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, net.kyori.adventure.audience.ForwardingAudience { // Paper
|
||||
public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, Keyed, net.kyori.adventure.audience.ForwardingAudience { // Paper
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
|
||||
@@ -5,13 +5,13 @@ Subject: [PATCH] Expose WorldBorder#isInBounds(Location) check
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/WorldBorder.java b/src/main/java/org/bukkit/WorldBorder.java
|
||||
index 7e8f5649ce0eb0090899514b1e228601eb644613..afb7b136b461202026290624836446cff9f9e45d 100644
|
||||
index b1c08a7fc5856bcc29ee64d0a87b95a8ac940ddc..0f2f17f0a443ec5087b3373293b23f663be9dbe1 100644
|
||||
--- a/src/main/java/org/bukkit/WorldBorder.java
|
||||
+++ b/src/main/java/org/bukkit/WorldBorder.java
|
||||
@@ -117,4 +117,18 @@ public interface WorldBorder {
|
||||
* @return if this location is inside the border or not
|
||||
@@ -162,4 +162,18 @@ public interface WorldBorder {
|
||||
* @return The absolute maximum center coordinate of the WorldBorder
|
||||
*/
|
||||
public boolean isInside(@NotNull Location location);
|
||||
public double getMaxCenterCoordinate();
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 3f58ffb4c59a92259fc5dde3d220658b6e54896f..45c4fddb8562736eaf98810d70d002ae6e3664e7 100644
|
||||
index fe5f6494fb0610dd11e59793701b2182fa862419..05908e512b0f2c01124737cf68df79c6c04518ee 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1963,6 +1963,16 @@ public final class Bukkit {
|
||||
@@ -2141,6 +2141,16 @@ public final class Bukkit {
|
||||
public static boolean reloadCommandAliases() {
|
||||
return server.reloadCommandAliases();
|
||||
}
|
||||
@@ -27,10 +27,10 @@ index 3f58ffb4c59a92259fc5dde3d220658b6e54896f..45c4fddb8562736eaf98810d70d002ae
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 01df6fc54078901a9195dd2bb45eaef1706ba036..1db8f63d9207330acc1b403adce0773149bc879f 100644
|
||||
index 29e71b746adcec45657787bf38427027508b0043..f84c37ad591f4d0e4062889941791a3aeb7c5be5 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1721,4 +1721,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1878,4 +1878,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
void reloadPermissions(); // Paper
|
||||
|
||||
boolean reloadCommandAliases(); // Paper
|
||||
@@ -46,12 +46,12 @@ index 01df6fc54078901a9195dd2bb45eaef1706ba036..1db8f63d9207330acc1b403adce07731
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
|
||||
index c4dcafac892169a7bfcc065701fffb43c6cfdf44..b1152f4dede61383232cc6713d448840612eac13 100644
|
||||
index 6fd341482d5250ad814e870360e40b52427f799a..a26df5f6341d22ecd5e71da59b8f091848e627ad 100644
|
||||
--- a/src/main/java/org/bukkit/command/Command.java
|
||||
+++ b/src/main/java/org/bukkit/command/Command.java
|
||||
@@ -99,7 +99,7 @@ public abstract class Command {
|
||||
Validate.notNull(args, "Arguments cannot be null");
|
||||
Validate.notNull(alias, "Alias cannot be null");
|
||||
Preconditions.checkArgument(args != null, "Arguments cannot be null");
|
||||
Preconditions.checkArgument(alias != null, "Alias cannot be null");
|
||||
|
||||
- if (args.length == 0) {
|
||||
+ if (args.length == 0 || !sender.getServer().suggestPlayerNamesWhenNullTabCompletions()) { // Paper - allow preventing player name suggestions by default) {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix upstream javadocs
|
||||
Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 45c4fddb8562736eaf98810d70d002ae6e3664e7..9838557d874e498e1f7cef8f219000dcaea7a263 100644
|
||||
index 05908e512b0f2c01124737cf68df79c6c04518ee..2ff65157d511108e2902838f37732742b186af6e 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1220,6 +1220,8 @@ public final class Bukkit {
|
||||
@@ -1332,6 +1332,8 @@ public final class Bukkit {
|
||||
|
||||
/**
|
||||
* Gets every player that has ever played on this server.
|
||||
@@ -19,10 +19,25 @@ index 45c4fddb8562736eaf98810d70d002ae6e3664e7..9838557d874e498e1f7cef8f219000dc
|
||||
* @return an array containing all previous players
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 1db8f63d9207330acc1b403adce0773149bc879f..ad11f8271d5b6f44d7d5cf0c122b51b2b8d1af3b 100644
|
||||
index f84c37ad591f4d0e4062889941791a3aeb7c5be5..d9566b18e6109db824cbc1732666771bf124adbf 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1027,6 +1027,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -510,13 +510,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* </ul>
|
||||
* <p>
|
||||
* <b>Note:</b> If set to 0, {@link SpawnCategory} mobs spawning will be disabled.
|
||||
- * <p>
|
||||
- * Minecraft default: 1.
|
||||
- * <br>
|
||||
- * <b>Note: </b> the {@link SpawnCategory#MISC} are not consider.
|
||||
*
|
||||
* @param spawnCategory the category of spawn
|
||||
* @return the default ticks per {@link SpawnCategory} mobs spawn value
|
||||
+ * @throws IllegalArgumentException if the category is {@link SpawnCategory#MISC}
|
||||
*/
|
||||
public int getTicksPerSpawns(@NotNull SpawnCategory spawnCategory);
|
||||
|
||||
@@ -1127,6 +1124,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
/**
|
||||
* Gets every player that has ever played on this server.
|
||||
@@ -31,6 +46,36 @@ index 1db8f63d9207330acc1b403adce0773149bc879f..ad11f8271d5b6f44d7d5cf0c122b51b2
|
||||
*
|
||||
* @return an array containing all previous players
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/block/Bed.java b/src/main/java/org/bukkit/block/Bed.java
|
||||
index f9bd74f9ce6bd6650726e5a993f9b6e292cdc74d..f4c37ce1fe7aac3dde8485ee51fc8888ed56e79e 100644
|
||||
--- a/src/main/java/org/bukkit/block/Bed.java
|
||||
+++ b/src/main/java/org/bukkit/block/Bed.java
|
||||
@@ -4,7 +4,22 @@ import org.bukkit.material.Colorable;
|
||||
|
||||
/**
|
||||
* Represents a captured state of a bed.
|
||||
- * @deprecated does not provide useful information beyond the material itself
|
||||
*/
|
||||
-@Deprecated
|
||||
-public interface Bed extends TileState, Colorable { }
|
||||
+// Paper start
|
||||
+// @Deprecated
|
||||
+public interface Bed extends TileState, Colorable {
|
||||
+
|
||||
+ @Override
|
||||
+ @org.jetbrains.annotations.NotNull org.bukkit.DyeColor getColor();
|
||||
+
|
||||
+ /**
|
||||
+ * <b>Unsupported</b>
|
||||
+ *
|
||||
+ * @throws UnsupportedOperationException not supported, set the block type
|
||||
+ */
|
||||
+ @Override
|
||||
+ @org.jetbrains.annotations.Contract("_ -> fail")
|
||||
+ @Deprecated(forRemoval = true)
|
||||
+ void setColor(@org.bukkit.UndefinedNullability("not supported") org.bukkit.DyeColor color);
|
||||
+// Paper end
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
index 91fc11dda99de506be83d40df8929bf7cd8e8d85..7dc631ebd009f5f5c3ac1699c3f3515c47609c05 100644
|
||||
--- a/src/main/java/org/bukkit/entity/ArmorStand.java
|
||||
@@ -45,10 +90,10 @@ index 91fc11dda99de506be83d40df8929bf7cd8e8d85..7dc631ebd009f5f5c3ac1699c3f3515c
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index db4ba67618d29f72d695c66c27d771795565a1d0..0ab94ddd3b88eee8040233a89823bd2fadc78d55 100644
|
||||
index 652238659e0a6e0df11f2798773aea4fe7712360..9c57eda3b7af7026639afda9959bc5e5a720861a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -21,6 +21,11 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -22,6 +22,11 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder {
|
||||
|
||||
@@ -61,10 +106,10 @@ index db4ba67618d29f72d695c66c27d771795565a1d0..0ab94ddd3b88eee8040233a89823bd2f
|
||||
* Returns the name of this player
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||
index be9334a8b5fba9181ad63c211697e798be63da25..0514a141cb93a650be38c63d4336d46e4304f4b6 100644
|
||||
index 2926fa6071bc7640cc10280b5c3962b0ce7686f1..4f63988848443aff55619bc12ef12c925642a3f9 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Mob.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
||||
@@ -8,6 +8,10 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -9,6 +9,10 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface Mob extends LivingEntity, Lootable {
|
||||
|
||||
@@ -76,10 +121,30 @@ index be9334a8b5fba9181ad63c211697e798be63da25..0514a141cb93a650be38c63d4336d46e
|
||||
* Instructs this Mob to set the specified LivingEntity as its target.
|
||||
* <p>
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index d98029f01bc81c5bf33545fee54bdbce17960b50..dae5ffe9ed6ea43b269d14a6aaf08929fb90570f 100644
|
||||
index 80910fcc46b62ee4974a659713a1a72b5b4c135b..50faa513411cdb611ae228f0c07a7dfe15807b85 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -728,7 +728,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -312,15 +312,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
|
||||
/**
|
||||
* Saves the players current location, health, inventory, motion, and
|
||||
- * other information into the username.dat file, in the world/player
|
||||
- * folder
|
||||
+ * other information into the <uuid>.dat file, in the
|
||||
+ * <level-name>/playerdata/ folder.
|
||||
*/
|
||||
public void saveData();
|
||||
|
||||
/**
|
||||
* Loads the players current location, health, inventory, motion, and
|
||||
- * other information from the username.dat file, in the world/player
|
||||
- * folder.
|
||||
+ * other information from the <uuid>.dat file, in the
|
||||
+ * <level-name>/playerdata/ folder.
|
||||
* <p>
|
||||
* Note: This will overwrite the players current inventory, health,
|
||||
* motion, etc, with the state from the saved dat file.
|
||||
@@ -798,7 +798,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* Use supplied alternative character to the section symbol to represent legacy color codes.
|
||||
*
|
||||
@@ -109,29 +174,275 @@ index 1119e26e270bb45f517955b19d95a9ec3d113634..4631647c64c89ffdde2d9b63bdab974a
|
||||
* @param sz The new size of the slime.
|
||||
*/
|
||||
public void setSize(int sz);
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
|
||||
index 1b2267f4e8ebded198773ec80e2bff2c861c7084..1a58734d919fae247eeb85dd785fd59990856505 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
|
||||
@@ -78,7 +78,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
|
||||
*
|
||||
* @return Location the player moved to
|
||||
*/
|
||||
- @Nullable
|
||||
+ @NotNull // Paper
|
||||
public Location getTo() {
|
||||
return to;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java
|
||||
index 99d900b2394b6c210ccf845768dae72864f32270..515587a958041e94f03c48ae87812abc39e1791c 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/PlayerInventory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java
|
||||
@@ -106,7 +106,7 @@ public interface PlayerInventory extends Inventory {
|
||||
*
|
||||
* @return the ItemStack in the given slot
|
||||
*/
|
||||
- @NotNull
|
||||
+ @Nullable
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||
index e9de00e9e434d36117a672fa9fbfc7c52f284b67..9a06487e0f76cd7765e6f900b7458a3cf0aa44e7 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java
|
||||
@@ -158,7 +158,8 @@ public class CreatureSpawnEvent extends EntitySpawnEvent {
|
||||
*/
|
||||
SHEARED,
|
||||
/**
|
||||
- * When eg an effect cloud is spawned as a result of a creeper exploding
|
||||
+ * When an entity is spawned as a result of an explosion. Like an area effect cloud from
|
||||
+ * a creeper or a dragon fireball.
|
||||
*/
|
||||
EXPLOSION,
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
|
||||
index d51d2ec1d04d9ea8a25a70d0d856f2355ebfcb4a..7ecff9fcee19fc94be784474fea620e5dd434731 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
|
||||
@@ -105,7 +105,7 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable
|
||||
*/
|
||||
SATIATED,
|
||||
/**
|
||||
- * When a player regains health from eating consumables
|
||||
+ * When an animal regains health from eating consumables
|
||||
*/
|
||||
EATING,
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java
|
||||
index d5b50a4a954fed35d37f03f1a277cc173ca106df..a91fa5386afd7a1137adb921ad5adb798604772f 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/EntityEquipment.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/EntityEquipment.java
|
||||
@@ -37,9 +37,23 @@ public interface EntityEquipment {
|
||||
public ItemStack getItem(@NotNull EquipmentSlot slot);
|
||||
|
||||
/**
|
||||
- * Gets a copy of the item the entity is currently holding
|
||||
+ * Gets the item the entity is currently holding
|
||||
* in their main hand.
|
||||
*
|
||||
+ * <p>
|
||||
+ * This returns a copy if this equipment instance is from a non-player,
|
||||
+ * or it's an empty stack (has AIR as its type).
|
||||
+ * For non-empty stacks from players, this returns a live mirror. You can check if this
|
||||
+ * will return a mirror with
|
||||
+ * <pre>{@code
|
||||
+ * EntityEquipment equipment = entity.getEquipment();
|
||||
+ * if (equipment instanceof PlayerInventory) {
|
||||
+ * equipment.getItemInMainHand(); // will return a mirror
|
||||
+ * } else {
|
||||
+ * equipment.getItemInMainHand(); // will return a copy
|
||||
+ * }
|
||||
+ * }</pre>
|
||||
+ *
|
||||
* @return the currently held item
|
||||
*/
|
||||
@NotNull
|
||||
@@ -61,9 +75,23 @@ public interface EntityEquipment {
|
||||
void setItemInMainHand(@Nullable ItemStack item, boolean silent);
|
||||
|
||||
/**
|
||||
- * Gets a copy of the item the entity is currently holding
|
||||
+ * Gets the item the entity is currently holding
|
||||
* in their off hand.
|
||||
*
|
||||
+ * <p>
|
||||
+ * This returns a copy if this equipment instance is from a non-player,
|
||||
+ * or it's an empty stack (has AIR as its type).
|
||||
+ * For non-empty stacks from players, this returns a live mirror. You can check if this
|
||||
+ * will return a mirror with
|
||||
+ * <pre>{@code
|
||||
+ * EntityEquipment equipment = entity.getEquipment();
|
||||
+ * if (equipment instanceof PlayerInventory) {
|
||||
+ * equipment.getItemInOffHand(); // will return a mirror
|
||||
+ * } else {
|
||||
+ * equipment.getItemInOffHand(); // will return a copy
|
||||
+ * }
|
||||
+ * }</pre>
|
||||
+ *
|
||||
* @return the currently held item
|
||||
*/
|
||||
@NotNull
|
||||
@@ -85,7 +113,21 @@ public interface EntityEquipment {
|
||||
void setItemInOffHand(@Nullable ItemStack item, boolean silent);
|
||||
|
||||
/**
|
||||
- * Gets a copy of the item the entity is currently holding
|
||||
+ * Gets the item the entity is currently holding
|
||||
+ *
|
||||
+ * <p>
|
||||
+ * This returns a copy if this equipment instance is from a non-player,
|
||||
+ * or it's an empty stack (has AIR as its type).
|
||||
+ * For non-empty stacks from players, this returns a live mirror. You can check if this
|
||||
+ * will return a mirror with
|
||||
+ * <pre>{@code
|
||||
+ * EntityEquipment equipment = entity.getEquipment();
|
||||
+ * if (equipment instanceof PlayerInventory) {
|
||||
+ * equipment.getItemInHand(); // will return a mirror
|
||||
+ * } else {
|
||||
+ * equipment.getItemInHand(); // will return a copy
|
||||
+ * }
|
||||
+ * }</pre>
|
||||
*
|
||||
* @return the currently held item
|
||||
* @see #getItemInMainHand()
|
||||
@@ -110,11 +152,24 @@ public interface EntityEquipment {
|
||||
void setItemInHand(@Nullable ItemStack stack);
|
||||
|
||||
/**
|
||||
- * Gets a copy of the helmet currently being worn by the entity
|
||||
+ * Gets the helmet currently being worn by the entity
|
||||
+ *
|
||||
+ * <p>
|
||||
+ * This returns a copy if this equipment instance is from a non-player.
|
||||
+ * For stacks from players, this returns a live mirror (or null). You can check if this
|
||||
+ * will return a mirror with
|
||||
+ * <pre>{@code
|
||||
+ * EntityEquipment equipment = entity.getEquipment();
|
||||
+ * if (equipment instanceof PlayerInventory) {
|
||||
+ * equipment.getItemInHand(); // will return a mirror
|
||||
+ * } else {
|
||||
+ * equipment.getItemInHand(); // will return a copy
|
||||
+ * }
|
||||
+ * }</pre>
|
||||
*
|
||||
* @return The helmet being worn
|
||||
*/
|
||||
- @Nullable
|
||||
+ @org.bukkit.UndefinedNullability("not null for entities, nullable for players") // Paper
|
||||
ItemStack getHelmet();
|
||||
|
||||
/**
|
||||
@@ -133,11 +188,24 @@ public interface EntityEquipment {
|
||||
void setHelmet(@Nullable ItemStack helmet, boolean silent);
|
||||
|
||||
/**
|
||||
- * Gets a copy of the chest plate currently being worn by the entity
|
||||
+ * Gets the chest plate currently being worn by the entity
|
||||
+ *
|
||||
+ * <p>
|
||||
+ * This returns a copy if this equipment instance is from a non-player.
|
||||
+ * For stacks from players, this returns a live mirror (or null). You can check if this
|
||||
+ * will return a mirror with
|
||||
+ * <pre>{@code
|
||||
+ * EntityEquipment equipment = entity.getEquipment();
|
||||
+ * if (equipment instanceof PlayerInventory) {
|
||||
+ * equipment.getChestplate(); // will return a mirror
|
||||
+ * } else {
|
||||
+ * equipment.getChestplate(); // will return a copy
|
||||
+ * }
|
||||
+ * }</pre>
|
||||
*
|
||||
* @return The chest plate being worn
|
||||
*/
|
||||
- @Nullable
|
||||
+ @org.bukkit.UndefinedNullability("not null for entities, nullable for players") // Paper
|
||||
ItemStack getChestplate();
|
||||
|
||||
/**
|
||||
@@ -156,11 +224,24 @@ public interface EntityEquipment {
|
||||
void setChestplate(@Nullable ItemStack chestplate, boolean silent);
|
||||
|
||||
/**
|
||||
- * Gets a copy of the leggings currently being worn by the entity
|
||||
+ * Gets the leggings currently being worn by the entity
|
||||
+ *
|
||||
+ * <p>
|
||||
+ * This returns a copy if this equipment instance is from a non-player.
|
||||
+ * For stacks from players, this returns a live mirror (or null). You can check if this
|
||||
+ * will return a mirror with
|
||||
+ * <pre>{@code
|
||||
+ * EntityEquipment equipment = entity.getEquipment();
|
||||
+ * if (equipment instanceof PlayerInventory) {
|
||||
+ * equipment.getLeggings(); // will return a mirror
|
||||
+ * } else {
|
||||
+ * equipment.getLeggings(); // will return a copy
|
||||
+ * }
|
||||
+ * }</pre>
|
||||
*
|
||||
* @return The leggings being worn
|
||||
*/
|
||||
- @Nullable
|
||||
+ @org.bukkit.UndefinedNullability("not null for entities, nullable for players") // Paper
|
||||
ItemStack getLeggings();
|
||||
|
||||
/**
|
||||
@@ -179,11 +260,24 @@ public interface EntityEquipment {
|
||||
void setLeggings(@Nullable ItemStack leggings, boolean silent);
|
||||
|
||||
/**
|
||||
- * Gets a copy of the boots currently being worn by the entity
|
||||
+ * Gets the boots currently being worn by the entity
|
||||
+ *
|
||||
+ * <p>
|
||||
+ * This returns a copy if this equipment instance is from a non-player.
|
||||
+ * For stacks from players, this returns a live mirror (or null). You can check if this
|
||||
+ * will return a mirror with
|
||||
+ * <pre>{@code
|
||||
+ * EntityEquipment equipment = entity.getEquipment();
|
||||
+ * if (equipment instanceof PlayerInventory) {
|
||||
+ * equipment.getBoots(); // will return a mirror
|
||||
+ * } else {
|
||||
+ * equipment.getBoots(); // will return a copy
|
||||
+ * }
|
||||
+ * }</pre>
|
||||
*
|
||||
* @return The boots being worn
|
||||
*/
|
||||
- @Nullable
|
||||
+ @org.bukkit.UndefinedNullability("not null for entities, nullable for players") // Paper
|
||||
ItemStack getBoots();
|
||||
|
||||
/**
|
||||
@@ -202,12 +296,25 @@ public interface EntityEquipment {
|
||||
void setBoots(@Nullable ItemStack boots, boolean silent);
|
||||
|
||||
/**
|
||||
- * Gets a copy of all worn armor
|
||||
+ * Gets all worn armor
|
||||
+ *
|
||||
+ * <p>
|
||||
+ * This returns a copy if this equipment instance is from a non-player,
|
||||
+ * or it's an empty stack (has AIR as its type).
|
||||
+ * For non-empty stacks from players, this returns a live mirror. You can check if this
|
||||
+ * will return a mirror with
|
||||
+ * <pre>{@code
|
||||
+ * EntityEquipment equipment = entity.getEquipment();
|
||||
+ * if (equipment instanceof PlayerInventory) {
|
||||
+ * equipment.getArmorContents(); // will return an array of mirror
|
||||
+ * } else {
|
||||
+ * equipment.getArmorContents(); // will return an array of copies
|
||||
+ * }
|
||||
+ * }</pre>
|
||||
*
|
||||
* @return The array of worn armor. Individual items may be null.
|
||||
*/
|
||||
- @NotNull
|
||||
- ItemStack[] getArmorContents();
|
||||
+ @org.bukkit.UndefinedNullability("not null elements for entities, nullable elements for players") ItemStack @NotNull [] getArmorContents(); // Paper
|
||||
|
||||
/**
|
||||
* Sets the entities armor to the provided array of ItemStacks
|
||||
diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java
|
||||
index 62fbd7f6d8195bebcab7f704a0a485a1bbeca26c..5461f7fa75f5a065bb333b4a113640b5fe1e3825 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/PlayerInventory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java
|
||||
@@ -158,7 +158,7 @@ public interface PlayerInventory extends Inventory {
|
||||
public void setBoots(@Nullable ItemStack boots);
|
||||
|
||||
/**
|
||||
- * Gets a copy of the item the player is currently holding
|
||||
+ * Gets the item the player is currently holding
|
||||
* in their main hand.
|
||||
*
|
||||
* @return the currently held item
|
||||
@@ -174,7 +174,7 @@ public interface PlayerInventory extends Inventory {
|
||||
void setItemInMainHand(@Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
- * Gets a copy of the item the player is currently holding
|
||||
+ * Gets the item the player is currently holding
|
||||
* in their off hand.
|
||||
*
|
||||
* @return the currently held item
|
||||
@@ -190,7 +190,7 @@ public interface PlayerInventory extends Inventory {
|
||||
void setItemInOffHand(@Nullable ItemStack item);
|
||||
|
||||
/**
|
||||
- * Gets a copy of the item the player is currently holding
|
||||
+ * Gets the item the player is currently holding
|
||||
*
|
||||
* @return the currently held item
|
||||
* @see #getItemInMainHand()
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java
|
||||
index 3f2736fbddd8661e764bc2f8d0499bd13ca91df5..c404a5b8efea7c780db5ddae19456753808abb3d 100644
|
||||
index 65dd4554c6cc0801fcbc0ef6809b794dcebd1124..ab06c640cef1309ab44b0fae8d95df48cdc869a7 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Item.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Item.java
|
||||
@@ -75,4 +75,20 @@ public interface Item extends Entity {
|
||||
@@ -89,4 +89,20 @@ public interface Item extends Entity {
|
||||
*/
|
||||
@Nullable
|
||||
public UUID getThrower();
|
||||
|
||||
@@ -6,18 +6,17 @@ Subject: [PATCH] Add UnknownCommandEvent
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..d5632d352590dec6982a372b285a8d4a332fa589
|
||||
index 0000000000000000000000000000000000000000..57128c780bc73e39d2733cceeb21dc06c2422c3c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java
|
||||
@@ -0,0 +1,114 @@
|
||||
@@ -0,0 +1,113 @@
|
||||
+package org.bukkit.event.command;
|
||||
+
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
+import org.bukkit.command.CommandSender;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.Event;
|
||||
+
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
@@ -32,7 +31,7 @@ index 0000000000000000000000000000000000000000..d5632d352590dec6982a372b285a8d4a
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public UnknownCommandEvent(@NotNull final CommandSender sender, @NotNull final String commandLine, @Nullable final String message) {
|
||||
+ this(sender, commandLine, message == null ? null : Bukkit.getUnsafe().legacyComponentSerializer().deserialize(message));
|
||||
+ this(sender, commandLine, message == null ? null : LegacyComponentSerializer.legacySection().deserialize(message));
|
||||
+ }
|
||||
+
|
||||
+ public UnknownCommandEvent(@NotNull final CommandSender sender, @NotNull final String commandLine, @Nullable final Component message) {
|
||||
@@ -74,7 +73,7 @@ index 0000000000000000000000000000000000000000..d5632d352590dec6982a372b285a8d4a
|
||||
+ @Nullable
|
||||
+ @Deprecated
|
||||
+ public String getMessage() {
|
||||
+ return this.message == null ? null : Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.message);
|
||||
+ return this.message == null ? null : LegacyComponentSerializer.legacySection().serialize(this.message);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -87,7 +86,7 @@ index 0000000000000000000000000000000000000000..d5632d352590dec6982a372b285a8d4a
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public void setMessage(@Nullable String message) {
|
||||
+ this.message(message == null ? null : Bukkit.getUnsafe().legacyComponentSerializer().deserialize(message));
|
||||
+ this.message(message == null ? null : LegacyComponentSerializer.legacySection().deserialize(message));
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
||||
@@ -7,22 +7,25 @@ Provides basic elements of a PlayerProfile to be used by future API/events
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..2ef9a7bd55e2c9cf8cb20d5f77282676ae11181f
|
||||
index 0000000000000000000000000000000000000000..b76f13a0266806544bde13952476d4867caaf25b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java
|
||||
@@ -0,0 +1,177 @@
|
||||
@@ -0,0 +1,231 @@
|
||||
+package com.destroystokyo.paper.profile;
|
||||
+
|
||||
+import java.util.Collection;
|
||||
+import java.util.Set;
|
||||
+import java.util.UUID;
|
||||
+
|
||||
+import java.util.concurrent.CompletableFuture;
|
||||
+import org.bukkit.profile.PlayerTextures;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Represents a players profile for the game, such as UUID, Name, and textures.
|
||||
+ */
|
||||
+public interface PlayerProfile {
|
||||
+public interface PlayerProfile extends org.bukkit.profile.PlayerProfile {
|
||||
+
|
||||
+ /**
|
||||
+ * @return The players name, if set
|
||||
@@ -37,6 +40,7 @@ index 0000000000000000000000000000000000000000..2ef9a7bd55e2c9cf8cb20d5f77282676
|
||||
+ * @return The previous Name
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @Deprecated(forRemoval = true)
|
||||
+ String setName(@Nullable String name);
|
||||
+
|
||||
+ /**
|
||||
@@ -51,9 +55,28 @@ index 0000000000000000000000000000000000000000..2ef9a7bd55e2c9cf8cb20d5f77282676
|
||||
+ * @return The previous UUID
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @Deprecated(forRemoval = true)
|
||||
+ UUID setId(@Nullable UUID uuid);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the {@link PlayerTextures} of this profile.
|
||||
+ * This will build a snapshot of the current texture data once
|
||||
+ * requested inside PlayerTextures.
|
||||
+ *
|
||||
+ * @return the textures, not <code>null</code>
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ PlayerTextures getTextures();
|
||||
+
|
||||
+ /**
|
||||
+ * Copies the given textures.
|
||||
+ *
|
||||
+ * @param textures the textures to copy, or <code>null</code> to clear the
|
||||
+ * textures
|
||||
+ */
|
||||
+ void setTextures(@Nullable PlayerTextures textures);
|
||||
+
|
||||
+ /**
|
||||
+ * @return A Mutable set of this players properties, such as textures.
|
||||
+ * Values specified here are subject to implementation details.
|
||||
+ */
|
||||
@@ -181,8 +204,39 @@ index 0000000000000000000000000000000000000000..2ef9a7bd55e2c9cf8cb20d5f77282676
|
||||
+ boolean complete(boolean textures, boolean onlineMode);
|
||||
+
|
||||
+ /**
|
||||
+ * Whether or not this Profile has textures associated to it
|
||||
+ * @return If has a textures property
|
||||
+ * Produces an updated player profile based on this profile.
|
||||
+ * <p>
|
||||
+ * This tries to produce a completed profile by filling in missing
|
||||
+ * properties (name, unique id, textures, etc.), and updates existing
|
||||
+ * properties (e.g. name, textures, etc.) to their official and up-to-date
|
||||
+ * values. This operation does not alter the current profile, but produces a
|
||||
+ * new updated {@link PlayerProfile}.
|
||||
+ * <p>
|
||||
+ * If no player exists for the unique id or name of this profile, this
|
||||
+ * operation yields a profile that is equal to the current profile, which
|
||||
+ * might not be complete.
|
||||
+ * <p>
|
||||
+ * This is an asynchronous operation: Updating the profile can result in an
|
||||
+ * outgoing connection in another thread in order to fetch the latest
|
||||
+ * profile properties. The returned {@link CompletableFuture} will be
|
||||
+ * completed once the updated profile is available. In order to not block
|
||||
+ * the server's main thread, you should not wait for the result of the
|
||||
+ * returned CompletableFuture on the server's main thread. Instead, if you
|
||||
+ * want to do something with the updated player profile on the server's main
|
||||
+ * thread once it is available, you could do something like this:
|
||||
+ * <pre>
|
||||
+ * profile.update().thenAcceptAsync(updatedProfile -> {
|
||||
+ * // Do something with the updated profile:
|
||||
+ * // ...
|
||||
+ * }, runnable -> Bukkit.getScheduler().runTask(plugin, runnable));
|
||||
+ * </pre>
|
||||
+ */
|
||||
+ @Override
|
||||
+ @NotNull CompletableFuture<PlayerProfile> update();
|
||||
+
|
||||
+ /**
|
||||
+ * Whether this Profile has textures associated to it
|
||||
+ * @return If it has a textures property
|
||||
+ */
|
||||
+ default boolean hasTextures() {
|
||||
+ return hasProperty("textures");
|
||||
@@ -267,16 +321,20 @@ index 0000000000000000000000000000000000000000..7b3b6ef533d32169fbeca389bd61cfc6
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 9838557d874e498e1f7cef8f219000dcaea7a263..c7daa7c9f85c62d0effd5c3f406568d77fd8cd78 100644
|
||||
index 2ff65157d511108e2902838f37732742b186af6e..d5fd584c109c0a84a4259b10e7b43fae3a1da1ae 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1975,6 +1975,40 @@ public final class Bukkit {
|
||||
@@ -2153,6 +2153,83 @@ public final class Bukkit {
|
||||
public static boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||
return server.suggestPlayerNamesWhenNullTabCompletions();
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Creates a PlayerProfile for the specified uuid, with name as null
|
||||
+ * Creates a PlayerProfile for the specified uuid, with name as null.
|
||||
+ *
|
||||
+ * If a player with the passed uuid exists on the server at the time of creation, the returned player profile will
|
||||
+ * be populated with the properties of said player (including their uuid and name).
|
||||
+ *
|
||||
+ * @param uuid UUID to create profile for
|
||||
+ * @return A PlayerProfile object
|
||||
+ */
|
||||
@@ -286,7 +344,16 @@ index 9838557d874e498e1f7cef8f219000dcaea7a263..c7daa7c9f85c62d0effd5c3f406568d7
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Creates a PlayerProfile for the specified name, with UUID as null
|
||||
+ * Creates a PlayerProfile for the specified name, with UUID as null.
|
||||
+ *
|
||||
+ * If a player with the passed name exists on the server at the time of creation, the returned player profile will
|
||||
+ * be populated with the properties of said player (including their uuid and name).
|
||||
+ * <p>
|
||||
+ * E.g. if the player 'jeb_' is currently playing on the server, calling {@code createProfile("JEB_")} will
|
||||
+ * yield a profile with the name 'jeb_', their uuid and their textures.
|
||||
+ * To bypass this pre-population on a case-insensitive name match, see {@link #createProfileExact(UUID, String)}.
|
||||
+ * <p>
|
||||
+ *
|
||||
+ * @param name Name to create profile for
|
||||
+ * @return A PlayerProfile object
|
||||
+ */
|
||||
@@ -299,6 +366,16 @@ index 9838557d874e498e1f7cef8f219000dcaea7a263..c7daa7c9f85c62d0effd5c3f406568d7
|
||||
+ * Creates a PlayerProfile for the specified name/uuid
|
||||
+ *
|
||||
+ * Both UUID and Name can not be null at same time. One must be supplied.
|
||||
+ * If a player with the passed uuid or name exists on the server at the time of creation, the returned player
|
||||
+ * profile will be populated with the properties of said player (including their uuid and name).
|
||||
+ * <p>
|
||||
+ * E.g. if the player 'jeb_' is currently playing on the server, calling {@code createProfile(null, "JEB_")} will
|
||||
+ * yield a profile with the name 'jeb_', their uuid and their textures.
|
||||
+ * To bypass this pre-population on an case-insensitive name match, see {@link #createProfileExact(UUID, String)}.
|
||||
+ * <p>
|
||||
+ *
|
||||
+ * The name comparison will compare the {@link String#toLowerCase()} version of both the passed name parameter and
|
||||
+ * a players name to honour the case-insensitive nature of a mojang profile lookup.
|
||||
+ *
|
||||
+ * @param uuid UUID to create profile for
|
||||
+ * @param name Name to create profile for
|
||||
@@ -307,21 +384,45 @@ index 9838557d874e498e1f7cef8f219000dcaea7a263..c7daa7c9f85c62d0effd5c3f406568d7
|
||||
+ @NotNull
|
||||
+ public static com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name) {
|
||||
+ return server.createProfile(uuid, name);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Creates an exact PlayerProfile for the specified name/uuid
|
||||
+ *
|
||||
+ * Both UUID and Name can not be null at same time. One must be supplied.
|
||||
+ * If a player with the passed uuid or name exists on the server at the time of creation, the returned player
|
||||
+ * profile will be populated with the properties of said player.
|
||||
+ * <p>
|
||||
+ * Compared to {@link #createProfile(UUID, String)}, this method will never mutate the passed uuid or name.
|
||||
+ * If a player with either the same uuid or a matching name (case-insensitive) is found on the server, their
|
||||
+ * properties, such as textures, will be pre-populated in the profile, however the passed uuid and name stay intact.
|
||||
+ *
|
||||
+ * @param uuid UUID to create profile for
|
||||
+ * @param name Name to create profile for
|
||||
+ * @return A PlayerProfile object
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public static com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable UUID uuid, @Nullable String name) {
|
||||
+ return server.createProfileExact(uuid, name);
|
||||
+ }
|
||||
// Paper end
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index ad11f8271d5b6f44d7d5cf0c122b51b2b8d1af3b..fb5c308d82e9103a212deea2a6fa2e158cddb931 100644
|
||||
index d9566b18e6109db824cbc1732666771bf124adbf..fab39e4fc595c022da27e87e27bd168939e54381 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1732,5 +1732,33 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1886,5 +1886,74 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @return true if player names should be suggested
|
||||
*/
|
||||
boolean suggestPlayerNamesWhenNullTabCompletions();
|
||||
+
|
||||
+ /**
|
||||
+ * Creates a PlayerProfile for the specified uuid, with name as null
|
||||
+ * Creates a PlayerProfile for the specified uuid, with name as null.
|
||||
+ *
|
||||
+ * If a player with the passed uuid exists on the server at the time of creation, the returned player profile will
|
||||
+ * be populated with the properties of said player (including their uuid and name).
|
||||
+ *
|
||||
+ * @param uuid UUID to create profile for
|
||||
+ * @return A PlayerProfile object
|
||||
+ */
|
||||
@@ -329,7 +430,16 @@ index ad11f8271d5b6f44d7d5cf0c122b51b2b8d1af3b..fb5c308d82e9103a212deea2a6fa2e15
|
||||
+ com.destroystokyo.paper.profile.PlayerProfile createProfile(@NotNull UUID uuid);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates a PlayerProfile for the specified name, with UUID as null
|
||||
+ * Creates a PlayerProfile for the specified name, with UUID as null.
|
||||
+ *
|
||||
+ * If a player with the passed name exists on the server at the time of creation, the returned player profile will
|
||||
+ * be populated with the properties of said player (including their uuid and name).
|
||||
+ * <p>
|
||||
+ * E.g. if the player 'jeb_' is currently playing on the server, calling {@code createProfile("JEB_")} will
|
||||
+ * yield a profile with the name 'jeb_', their uuid and their textures.
|
||||
+ * To bypass this pre-population on a case-insensitive name match, see {@link #createProfileExact(UUID, String)}.
|
||||
+ * <p>
|
||||
+ *
|
||||
+ * @param name Name to create profile for
|
||||
+ * @return A PlayerProfile object
|
||||
+ */
|
||||
@@ -340,6 +450,16 @@ index ad11f8271d5b6f44d7d5cf0c122b51b2b8d1af3b..fb5c308d82e9103a212deea2a6fa2e15
|
||||
+ * Creates a PlayerProfile for the specified name/uuid
|
||||
+ *
|
||||
+ * Both UUID and Name can not be null at same time. One must be supplied.
|
||||
+ * If a player with the passed uuid or name exists on the server at the time of creation, the returned player
|
||||
+ * profile will be populated with the properties of said player (including their uuid and name).
|
||||
+ * <p>
|
||||
+ * E.g. if the player 'jeb_' is currently playing on the server, calling {@code createProfile(null, "JEB_")} will
|
||||
+ * yield a profile with the name 'jeb_', their uuid and their textures.
|
||||
+ * To bypass this pre-population on an case-insensitive name match, see {@link #createProfileExact(UUID, String)}.
|
||||
+ * <p>
|
||||
+ *
|
||||
+ * The name comparison will compare the {@link String#toLowerCase()} version of both the passed name parameter and
|
||||
+ * a players name to honour the case-insensitive nature of a mojang profile lookup.
|
||||
+ *
|
||||
+ * @param uuid UUID to create profile for
|
||||
+ * @param name Name to create profile for
|
||||
@@ -347,5 +467,36 @@ index ad11f8271d5b6f44d7d5cf0c122b51b2b8d1af3b..fb5c308d82e9103a212deea2a6fa2e15
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nullable UUID uuid, @Nullable String name);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates an exact PlayerProfile for the specified name/uuid
|
||||
+ *
|
||||
+ * Both UUID and Name can not be null at same time. One must be supplied.
|
||||
+ * If a player with the passed uuid or name exists on the server at the time of creation, the returned player
|
||||
+ * profile will be populated with the properties of said player.
|
||||
+ * <p>
|
||||
+ * Compared to {@link #createProfile(UUID, String)}, this method will never mutate the passed uuid or name.
|
||||
+ * If a player with either the same uuid or a matching name (case-insensitive) is found on the server, their
|
||||
+ * properties, such as textures, will be pre-populated in the profile, however the passed uuid and name stay intact.
|
||||
+ *
|
||||
+ * @param uuid UUID to create profile for
|
||||
+ * @param name Name to create profile for
|
||||
+ * @return A PlayerProfile object
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ com.destroystokyo.paper.profile.PlayerProfile createProfileExact(@Nullable UUID uuid, @Nullable String name);
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/profile/PlayerProfile.java b/src/main/java/org/bukkit/profile/PlayerProfile.java
|
||||
index 16ae1282f3178e8873483a25a5d5cce16b2c21a9..fc46add38bf59dc1a04ea566fd230dcd8ae2708c 100644
|
||||
--- a/src/main/java/org/bukkit/profile/PlayerProfile.java
|
||||
+++ b/src/main/java/org/bukkit/profile/PlayerProfile.java
|
||||
@@ -93,7 +93,7 @@ public interface PlayerProfile extends Cloneable, ConfigurationSerializable {
|
||||
* PlayerProfile once it is available
|
||||
*/
|
||||
@NotNull
|
||||
- CompletableFuture<PlayerProfile> update();
|
||||
+ CompletableFuture<? extends PlayerProfile> update(); // Paper
|
||||
|
||||
@NotNull
|
||||
PlayerProfile clone();
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 0ab94ddd3b88eee8040233a89823bd2fadc78d55..396092fd249928ca01133eeeeb61f0ad90b2e332 100644
|
||||
index 9c57eda3b7af7026639afda9959bc5e5a720861a..be3eaadbc768a306da68a15abcaa7a5d3ec760c7 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -315,6 +315,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -319,6 +319,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public int getExpToLevel();
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 65088203d29798efe211612dfadb356f457ed466..71f519b8f03d2a52f2c5a9283a18c74c1ca52328 100644
|
||||
index 20c529bdd94a6bac09d9f8222f33dfc9e8d53fa9..e598c7c90d625313b8a935418bb68e0e6cb6bc6e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -673,5 +673,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -708,5 +708,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
@Nullable
|
||||
Location getOrigin();
|
||||
|
||||
@@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this,
|
||||
You must replace the language file embedded in the server jar.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 6cc4bad2ecd19f44a680ff03cbfb99d48ea5c337..b1fbb931148a87f29e8b8796b13851d767cc1d68 100644
|
||||
index af4a7ce37eb10bab06eadb6583c7894b3ec55ae6..159e5a908b35b84b7fabc36581e093d9aa4c4b67 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -160,5 +160,16 @@ public interface ItemFactory {
|
||||
@@ -178,5 +178,19 @@ public interface ItemFactory {
|
||||
*/
|
||||
@NotNull
|
||||
net.kyori.adventure.text.Component displayName(@NotNull ItemStack itemStack);
|
||||
@@ -23,16 +23,19 @@ index 6cc4bad2ecd19f44a680ff03cbfb99d48ea5c337..b1fbb931148a87f29e8b8796b13851d7
|
||||
+ *
|
||||
+ * @param item Item to return Display name of
|
||||
+ * @return Display name of Item
|
||||
+ * @deprecated {@link ItemStack} implements {@link net.kyori.adventure.translation.Translatable}; use that and
|
||||
+ * {@link net.kyori.adventure.text.Component#translatable(net.kyori.adventure.translation.Translatable)} instead.
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @Deprecated
|
||||
+ String getI18NDisplayName(@Nullable ItemStack item);
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index a15abec467bac70116a6fc21a300d4930b909f15..de5bcdb7b84acdd5e22500e367df292f35a86e19 100644
|
||||
index d168a836d655b369f67200d7afe101b56ff815b1..edf5cd3734011de9130139e542ebc44bcc67f396 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -611,5 +611,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
||||
@@ -611,5 +611,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
||||
public @NotNull net.kyori.adventure.text.Component displayName() {
|
||||
return Bukkit.getServer().getItemFactory().displayName(this);
|
||||
}
|
||||
@@ -43,8 +46,11 @@ index a15abec467bac70116a6fc21a300d4930b909f15..de5bcdb7b84acdd5e22500e367df292f
|
||||
+ * You must replace the language file embedded in the server jar.
|
||||
+ *
|
||||
+ * @return Display name of Item
|
||||
+ * @deprecated {@link ItemStack} implements {@link net.kyori.adventure.translation.Translatable}; use that and
|
||||
+ * {@link net.kyori.adventure.text.Component#translatable(net.kyori.adventure.translation.Translatable)} instead.
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @Deprecated
|
||||
+ public String getI18NDisplayName() {
|
||||
+ return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
|
||||
+ }
|
||||
|
||||
@@ -7,12 +7,12 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
|
||||
to ensure it meets latest minecraft expectations.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index b1fbb931148a87f29e8b8796b13851d767cc1d68..71e5ee496a947fbd8e3ec579833b157c76b51833 100644
|
||||
index 159e5a908b35b84b7fabc36581e093d9aa4c4b67..66ffc658dba85942f179760dc6c50258e24ab903 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -171,5 +171,17 @@ public interface ItemFactory {
|
||||
*/
|
||||
@@ -192,5 +192,17 @@ public interface ItemFactory {
|
||||
@Nullable
|
||||
@Deprecated
|
||||
String getI18NDisplayName(@Nullable ItemStack item);
|
||||
+
|
||||
+ /**
|
||||
@@ -29,7 +29,7 @@ index b1fbb931148a87f29e8b8796b13851d767cc1d68..71e5ee496a947fbd8e3ec579833b157c
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index de5bcdb7b84acdd5e22500e367df292f35a86e19..e8783b0116f4efd5447a5f6f260506000983ffd2 100644
|
||||
index edf5cd3734011de9130139e542ebc44bcc67f396..8b76d7ca596ea261c0ca3b9fe2fbf5507c3883e3 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -536,7 +536,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] LivingEntity#setKiller
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index b41133f23d25f90fc0993499056c4eeaf003a701..bfc90a3569abc717f37c064e3068c55ef323edab 100644
|
||||
index f00502b59f15c3a92ce18e7d1aa4e546fd45b16a..036936671d816fc553ad2fdf8324609ab610b7f5 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -279,6 +279,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -281,6 +281,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@Nullable
|
||||
public Player getKiller();
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Allows you to do dynamic whitelisting and change of kick message
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..8a259ab49ea79673b6da9e4e2aaecec67469994e
|
||||
index 0000000000000000000000000000000000000000..c6f5e2b5459368ad1e4db9929ca14568a25793fa
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java
|
||||
@@ -0,0 +1,142 @@
|
||||
@@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..8a259ab49ea79673b6da9e4e2aaecec6
|
||||
+
|
||||
+import com.destroystokyo.paper.profile.PlayerProfile;
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
@@ -62,7 +62,7 @@ index 0000000000000000000000000000000000000000..8a259ab49ea79673b6da9e4e2aaecec6
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public ProfileWhitelistVerifyEvent(@NotNull final PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable String kickMessage) {
|
||||
+ this(profile, whitelistEnabled, whitelisted, isOp, kickMessage == null ? null : Bukkit.getUnsafe().legacyComponentSerializer().deserialize(kickMessage));
|
||||
+ this(profile, whitelistEnabled, whitelisted, isOp, kickMessage == null ? null : LegacyComponentSerializer.legacySection().deserialize(kickMessage));
|
||||
+ }
|
||||
+
|
||||
+ public ProfileWhitelistVerifyEvent(@NotNull final PlayerProfile profile, boolean whitelistEnabled, boolean whitelisted, boolean isOp, @Nullable Component kickMessage) {
|
||||
@@ -80,7 +80,7 @@ index 0000000000000000000000000000000000000000..8a259ab49ea79673b6da9e4e2aaecec6
|
||||
+ @Deprecated
|
||||
+ @Nullable
|
||||
+ public String getKickMessage() {
|
||||
+ return this.kickMessage == null ? null : Bukkit.getUnsafe().legacyComponentSerializer().serialize(kickMessage);
|
||||
+ return this.kickMessage == null ? null : LegacyComponentSerializer.legacySection().serialize(kickMessage);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -89,7 +89,7 @@ index 0000000000000000000000000000000000000000..8a259ab49ea79673b6da9e4e2aaecec6
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public void setKickMessage(@Nullable String kickMessage) {
|
||||
+ this.kickMessage(kickMessage == null ? null : Bukkit.getUnsafe().legacyComponentSerializer().deserialize(kickMessage));
|
||||
+ this.kickMessage(kickMessage == null ? null : LegacyComponentSerializer.legacySection().deserialize(kickMessage));
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
|
||||
@@ -14,25 +14,25 @@ it without having to shade it in the plugin and going through
|
||||
several layers of logging abstraction.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index d8d459561cc75935136f8f9888ff27b45ad98f9e..a23b2bd8e1ca1ff8d0ad5ed5d5e41c89e4795090 100644
|
||||
index f0f8047cb3a43b447dc50b730dab3d0bc471b25a..435db1ffe47476bcb7067802faad7aee7e4c3f54 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -38,6 +38,8 @@ dependencies {
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-gson")
|
||||
@@ -39,6 +39,8 @@ dependencies {
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-legacy")
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-plain")
|
||||
+ api("org.apache.logging.log4j:log4j-api:2.17.0")
|
||||
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
||||
+ api("org.apache.logging.log4j:log4j-api:2.17.1")
|
||||
+ api("org.slf4j:slf4j-api:1.8.0-beta4")
|
||||
|
||||
implementation("org.ow2.asm:asm:9.2")
|
||||
implementation("org.ow2.asm:asm-commons:9.2")
|
||||
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
index 03ca87a1cbace2459174bb7bb8847bda766e80c5..c25fc646be750d3a3b2f4fb3f1c53daee5254107 100644
|
||||
index b37938745f916b5f0111b07b1a1c97527f026e9d..08aef59d8443038771704d9587e31f299e587307 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
@@ -179,6 +179,18 @@ public interface Plugin extends TabExecutor {
|
||||
@NotNull
|
||||
public Logger getLogger();
|
||||
@@ -186,6 +186,22 @@ public interface Plugin extends TabExecutor {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
+ // Paper start - Add SLF4J/Log4J loggers
|
||||
+ @NotNull
|
||||
@@ -40,6 +40,10 @@ index 03ca87a1cbace2459174bb7bb8847bda766e80c5..c25fc646be750d3a3b2f4fb3f1c53dae
|
||||
+ return org.slf4j.LoggerFactory.getLogger(getLogger().getName());
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * @deprecated use {@link #getSLF4JLogger()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ @NotNull
|
||||
+ default org.apache.logging.log4j.Logger getLog4JLogger() {
|
||||
+ return org.apache.logging.log4j.LogManager.getLogger(getLogger().getName());
|
||||
|
||||
@@ -17,7 +17,7 @@ The implementation should handle plugin prefixes by displaying
|
||||
logger names when appropriate.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
index 50a479488917b4ce019fa71a496c41e843e9c5c4..f99d60ae4003f953b5680a997e9e43e63c035b0c 100644
|
||||
index 669a70faa95d0d6525a731d73499ed6fb0b48320..1ff0e0ef1aebec5bbb0a8a09af11d07b2a3220e8 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
@@ -43,7 +43,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
|
||||
@@ -60,7 +60,7 @@ index 0000000000000000000000000000000000000000..76f2cb9cd99cad2a9484eab2becd8c36
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
index f99d60ae4003f953b5680a997e9e43e63c035b0c..c943bd801b54519ba6cf5d45aec593d7b7438f99 100644
|
||||
index 1ff0e0ef1aebec5bbb0a8a09af11d07b2a3220e8..3bea5dd67ad0393160ccede4ac99a3c7baa1803b 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
@@ -43,7 +43,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -87,7 +87,7 @@ index f99d60ae4003f953b5680a997e9e43e63c035b0c..c943bd801b54519ba6cf5d45aec593d7
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index 657243776c8a2abb5a57e5c407212a8387d649eb..4fa5f7140ea97e1b6a63808b59115bfb1a85cb32 100644
|
||||
index 6148b69af39344f758b05a28c7c572befa9b8f3f..0db641f5d5e1293b236ad0d2e3a156802ffed839 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -44,6 +44,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
|
||||
|
||||
@@ -9,7 +9,7 @@ on the real tile entity.
|
||||
This is useful for where performance is needed
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index ce1e1e6cc6740d568fbf859c7e2c014fab5a59cd..62ab55729e69bfac8eb4b40d877b945d95df27cd 100644
|
||||
index b4094e042c1619cfcdd68c27f82979a7562ddf55..d29bdc125dba0128d93d57e8d9393b970e6c00a9 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -271,6 +271,16 @@ public interface Block extends Metadatable {
|
||||
@@ -29,3 +29,26 @@ index ce1e1e6cc6740d568fbf859c7e2c014fab5a59cd..62ab55729e69bfac8eb4b40d877b945d
|
||||
/**
|
||||
* Returns the biome that this block resides in
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/block/TileState.java b/src/main/java/org/bukkit/block/TileState.java
|
||||
index 3b10fcc13893403b29f0260b8605144679e89b82..5c8517c5bcae10161952c104b6a4ff7c713bcdbd 100644
|
||||
--- a/src/main/java/org/bukkit/block/TileState.java
|
||||
+++ b/src/main/java/org/bukkit/block/TileState.java
|
||||
@@ -36,4 +36,18 @@ public interface TileState extends BlockState, PersistentDataHolder {
|
||||
@NotNull
|
||||
@Override
|
||||
PersistentDataContainer getPersistentDataContainer();
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Checks if this TileState is a snapshot or a live
|
||||
+ * representation of the underlying tile entity.
|
||||
+ * <p>
|
||||
+ * NOTE: You may still have to call {@link BlockState#update()} on
|
||||
+ * live representations to update any visuals on the block.
|
||||
+ *
|
||||
+ * @return true if this is a snapshot
|
||||
+ * @see Block#getState(boolean)
|
||||
+ */
|
||||
+ boolean isSnapshot();
|
||||
+ // Paper end
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
||||
Date: Sun, 26 Nov 2017 13:17:09 -0500
|
||||
Subject: [PATCH] AsyncTabCompleteEvent
|
||||
|
||||
@@ -11,12 +11,14 @@ and avoid going to main for tab completions.
|
||||
Especially useful if you need to query a database in order to obtain the results for tab
|
||||
completion, such as offline players.
|
||||
|
||||
Co-authored-by: Aikar <aikar@aikar.co>
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/server/AsyncTabCompleteEvent.java b/src/main/java/com/destroystokyo/paper/event/server/AsyncTabCompleteEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..619ed37169c126a8c75d02699a04728bac49d10d
|
||||
index 0000000000000000000000000000000000000000..9be64a95c2345433b6142d611077dedadcef9f5d
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/server/AsyncTabCompleteEvent.java
|
||||
@@ -0,0 +1,177 @@
|
||||
@@ -0,0 +1,328 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2017 Daniel Ennis (Aikar) MIT License
|
||||
+ *
|
||||
@@ -42,8 +44,12 @@ index 0000000000000000000000000000000000000000..619ed37169c126a8c75d02699a04728b
|
||||
+
|
||||
+package com.destroystokyo.paper.event.server;
|
||||
+
|
||||
+import com.google.common.collect.ImmutableList;
|
||||
+import org.apache.commons.lang.Validate;
|
||||
+import com.google.common.base.Preconditions;
|
||||
+import io.papermc.paper.util.TransformingRandomAccessList;
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+import net.kyori.examination.Examinable;
|
||||
+import net.kyori.examination.ExaminableProperty;
|
||||
+import net.kyori.examination.string.StringExaminer;
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.command.Command;
|
||||
+import org.bukkit.command.CommandSender;
|
||||
@@ -53,6 +59,7 @@ index 0000000000000000000000000000000000000000..619ed37169c126a8c75d02699a04728b
|
||||
+
|
||||
+import java.util.ArrayList;
|
||||
+import java.util.List;
|
||||
+import java.util.stream.Stream;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
@@ -67,15 +74,29 @@ index 0000000000000000000000000000000000000000..619ed37169c126a8c75d02699a04728b
|
||||
+ private final boolean isCommand;
|
||||
+ @Nullable
|
||||
+ private final Location loc;
|
||||
+ @NotNull private List<String> completions;
|
||||
+ private final List<Completion> completions = new ArrayList<>();
|
||||
+ private final List<String> stringCompletions = new TransformingRandomAccessList<>(
|
||||
+ this.completions,
|
||||
+ Completion::suggestion,
|
||||
+ Completion::completion
|
||||
+ );
|
||||
+ private boolean cancelled;
|
||||
+ private boolean handled = false;
|
||||
+ private boolean fireSyncHandler = true;
|
||||
+
|
||||
+ public AsyncTabCompleteEvent(@NotNull CommandSender sender, @NotNull String buffer, boolean isCommand, @Nullable Location loc) {
|
||||
+ super(true);
|
||||
+ this.sender = sender;
|
||||
+ this.buffer = buffer;
|
||||
+ this.isCommand = isCommand;
|
||||
+ this.loc = loc;
|
||||
+ }
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public AsyncTabCompleteEvent(@NotNull CommandSender sender, @NotNull List<String> completions, @NotNull String buffer, boolean isCommand, @Nullable Location loc) {
|
||||
+ super(true);
|
||||
+ this.sender = sender;
|
||||
+ this.completions = completions;
|
||||
+ this.completions.addAll(fromStrings(completions));
|
||||
+ this.buffer = buffer;
|
||||
+ this.isCommand = isCommand;
|
||||
+ this.loc = loc;
|
||||
@@ -103,7 +124,7 @@ index 0000000000000000000000000000000000000000..619ed37169c126a8c75d02699a04728b
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public List<String> getCompletions() {
|
||||
+ return completions;
|
||||
+ return this.stringCompletions;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -117,8 +138,42 @@ index 0000000000000000000000000000000000000000..619ed37169c126a8c75d02699a04728b
|
||||
+ * @param completions the new completions
|
||||
+ */
|
||||
+ public void setCompletions(@NotNull List<String> completions) {
|
||||
+ Validate.notNull(completions);
|
||||
+ this.completions = new ArrayList<>(completions);
|
||||
+ if (completions == this.stringCompletions) {
|
||||
+ return;
|
||||
+ }
|
||||
+ Preconditions.checkNotNull(completions);
|
||||
+ this.completions.clear();
|
||||
+ this.completions.addAll(fromStrings(completions));
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * The list of {@link Completion completions} which will be offered to the sender, in order.
|
||||
+ * This list is mutable and reflects what will be offered.
|
||||
+ * <p>
|
||||
+ * If this collection is not empty after the event is fired, then
|
||||
+ * the standard process of calling {@link Command#tabComplete(CommandSender, String, String[])}
|
||||
+ * or current player names will not be called.
|
||||
+ *
|
||||
+ * @return a list of offered completions
|
||||
+ */
|
||||
+ public @NotNull List<Completion> completions() {
|
||||
+ return this.completions;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Set the {@link Completion completions} offered, overriding any already set.
|
||||
+ * If this collection is not empty after the event is fired, then
|
||||
+ * the standard process of calling {@link Command#tabComplete(CommandSender, String, String[])}
|
||||
+ * or current player names will not be called.
|
||||
+ * <p>
|
||||
+ * The passed collection will be cloned to a new List. You must call {{@link #completions()}} to mutate from here
|
||||
+ *
|
||||
+ * @param newCompletions the new completions
|
||||
+ */
|
||||
+ public void completions(final @NotNull List<Completion> newCompletions) {
|
||||
+ Preconditions.checkNotNull(newCompletions, "new completions");
|
||||
+ this.completions.clear();
|
||||
+ this.completions.addAll(newCompletions);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -193,41 +248,299 @@ index 0000000000000000000000000000000000000000..619ed37169c126a8c75d02699a04728b
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ private static @NotNull List<Completion> fromStrings(final @NotNull List<String> strings) {
|
||||
+ final List<Completion> list = new ArrayList<>();
|
||||
+ for (final String it : strings) {
|
||||
+ list.add(new CompletionImpl(it, null));
|
||||
+ }
|
||||
+ return list;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * A rich tab completion, consisting of a string suggestion, and a nullable {@link Component} tooltip.
|
||||
+ */
|
||||
+ public interface Completion extends Examinable {
|
||||
+ /**
|
||||
+ * Get the suggestion string for this {@link Completion}.
|
||||
+ *
|
||||
+ * @return suggestion string
|
||||
+ */
|
||||
+ @NotNull String suggestion();
|
||||
+
|
||||
+ /**
|
||||
+ * Get the suggestion tooltip for this {@link Completion}.
|
||||
+ *
|
||||
+ * @return tooltip component
|
||||
+ */
|
||||
+ @Nullable Component tooltip();
|
||||
+
|
||||
+ @Override
|
||||
+ default @NotNull Stream<? extends ExaminableProperty> examinableProperties() {
|
||||
+ return Stream.of(ExaminableProperty.of("suggestion", this.suggestion()), ExaminableProperty.of("tooltip", this.tooltip()));
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Create a new {@link Completion} from a suggestion string.
|
||||
+ *
|
||||
+ * @param suggestion suggestion string
|
||||
+ * @return new completion instance
|
||||
+ */
|
||||
+ static @NotNull Completion completion(final @NotNull String suggestion) {
|
||||
+ return new CompletionImpl(suggestion, null);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Create a new {@link Completion} from a suggestion string and a tooltip {@link Component}.
|
||||
+ *
|
||||
+ * <p>If the provided component is null, the suggestion will not have a tooltip.</p>
|
||||
+ *
|
||||
+ * @param suggestion suggestion string
|
||||
+ * @param tooltip tooltip component, or null
|
||||
+ * @return new completion instance
|
||||
+ */
|
||||
+ static @NotNull Completion completion(final @NotNull String suggestion, final @Nullable Component tooltip) {
|
||||
+ return new CompletionImpl(suggestion, tooltip);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ static final class CompletionImpl implements Completion {
|
||||
+ private final String suggestion;
|
||||
+ private final Component tooltip;
|
||||
+
|
||||
+ CompletionImpl(final @NotNull String suggestion, final @Nullable Component tooltip) {
|
||||
+ this.suggestion = suggestion;
|
||||
+ this.tooltip = tooltip;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull String suggestion() {
|
||||
+ return this.suggestion;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Component tooltip() {
|
||||
+ return this.tooltip;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean equals(final @Nullable Object o) {
|
||||
+ if (this == o) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ if (o == null || this.getClass() != o.getClass()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ final CompletionImpl that = (CompletionImpl) o;
|
||||
+ return this.suggestion.equals(that.suggestion)
|
||||
+ && java.util.Objects.equals(this.tooltip, that.tooltip);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int hashCode() {
|
||||
+ return java.util.Objects.hash(this.suggestion, this.tooltip);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull String toString() {
|
||||
+ return StringExaminer.simpleEscaping().examine(this);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/util/TransformingRandomAccessList.java b/src/main/java/io/papermc/paper/util/TransformingRandomAccessList.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..6f560a51277ccbd46a9142cfa057d276118c1c7b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/util/TransformingRandomAccessList.java
|
||||
@@ -0,0 +1,169 @@
|
||||
+package io.papermc.paper.util;
|
||||
+
|
||||
+import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+import java.util.AbstractList;
|
||||
+import java.util.Iterator;
|
||||
+import java.util.List;
|
||||
+import java.util.ListIterator;
|
||||
+import java.util.RandomAccess;
|
||||
+import java.util.function.Function;
|
||||
+import java.util.function.Predicate;
|
||||
+
|
||||
+import static com.google.common.base.Preconditions.checkNotNull;
|
||||
+
|
||||
+/**
|
||||
+ * Modified version of the Guava class with the same name to support add operations.
|
||||
+ *
|
||||
+ * @param <F> backing list element type
|
||||
+ * @param <T> transformed list element type
|
||||
+ */
|
||||
+public final class TransformingRandomAccessList<F, T> extends AbstractList<T> implements RandomAccess {
|
||||
+ final List<F> fromList;
|
||||
+ final Function<? super F, ? extends T> toFunction;
|
||||
+ final Function<? super T, ? extends F> fromFunction;
|
||||
+
|
||||
+ /**
|
||||
+ * Create a new {@link TransformingRandomAccessList}.
|
||||
+ *
|
||||
+ * @param fromList backing list
|
||||
+ * @param toFunction function mapping backing list element type to transformed list element type
|
||||
+ * @param fromFunction function mapping transformed list element type to backing list element type
|
||||
+ */
|
||||
+ public TransformingRandomAccessList(
|
||||
+ final @NonNull List<F> fromList,
|
||||
+ final @NonNull Function<? super F, ? extends T> toFunction,
|
||||
+ final @NonNull Function<? super T, ? extends F> fromFunction
|
||||
+ ) {
|
||||
+ this.fromList = checkNotNull(fromList);
|
||||
+ this.toFunction = checkNotNull(toFunction);
|
||||
+ this.fromFunction = checkNotNull(fromFunction);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void clear() {
|
||||
+ this.fromList.clear();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public T get(int index) {
|
||||
+ return this.toFunction.apply(this.fromList.get(index));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull Iterator<T> iterator() {
|
||||
+ return this.listIterator();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull ListIterator<T> listIterator(int index) {
|
||||
+ return new TransformedListIterator<F, T>(this.fromList.listIterator(index)) {
|
||||
+ @Override
|
||||
+ T transform(F from) {
|
||||
+ return TransformingRandomAccessList.this.toFunction.apply(from);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ F transformBack(T from) {
|
||||
+ return TransformingRandomAccessList.this.fromFunction.apply(from);
|
||||
+ }
|
||||
+ };
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isEmpty() {
|
||||
+ return this.fromList.isEmpty();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean removeIf(Predicate<? super T> filter) {
|
||||
+ checkNotNull(filter);
|
||||
+ return this.fromList.removeIf(element -> filter.test(this.toFunction.apply(element)));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public T remove(int index) {
|
||||
+ return this.toFunction.apply(this.fromList.remove(index));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int size() {
|
||||
+ return this.fromList.size();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public T set(int i, T t) {
|
||||
+ return this.toFunction.apply(this.fromList.set(i, this.fromFunction.apply(t)));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void add(int i, T t) {
|
||||
+ this.fromList.add(i, this.fromFunction.apply(t));
|
||||
+ }
|
||||
+
|
||||
+ static abstract class TransformedListIterator<F, T> implements ListIterator<T>, Iterator<T> {
|
||||
+ final Iterator<F> backingIterator;
|
||||
+
|
||||
+ TransformedListIterator(ListIterator<F> backingIterator) {
|
||||
+ this.backingIterator = checkNotNull((Iterator<F>) backingIterator);
|
||||
+ }
|
||||
+
|
||||
+ private ListIterator<F> backingIterator() {
|
||||
+ return cast(this.backingIterator);
|
||||
+ }
|
||||
+
|
||||
+ static <A> ListIterator<A> cast(Iterator<A> iterator) {
|
||||
+ return (ListIterator<A>) iterator;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public final boolean hasPrevious() {
|
||||
+ return this.backingIterator().hasPrevious();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public final T previous() {
|
||||
+ return this.transform(this.backingIterator().previous());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public final int nextIndex() {
|
||||
+ return this.backingIterator().nextIndex();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public final int previousIndex() {
|
||||
+ return this.backingIterator().previousIndex();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void set(T element) {
|
||||
+ this.backingIterator().set(this.transformBack(element));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void add(T element) {
|
||||
+ this.backingIterator().add(this.transformBack(element));
|
||||
+ }
|
||||
+
|
||||
+ abstract T transform(F from);
|
||||
+
|
||||
+ abstract F transformBack(T to);
|
||||
+
|
||||
+ @Override
|
||||
+ public final boolean hasNext() {
|
||||
+ return this.backingIterator.hasNext();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public final T next() {
|
||||
+ return this.transform(this.backingIterator.next());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public final void remove() {
|
||||
+ this.backingIterator.remove();
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/event/server/TabCompleteEvent.java b/src/main/java/org/bukkit/event/server/TabCompleteEvent.java
|
||||
index d1a9956a1573dab54c5ff2e5d67ca86cfe1dc01a..f96c4ba53ab41ea66d4f9a4d54eeabb63f992b58 100644
|
||||
index 270e6d8ad4358baa256cee5f16cff281f063ce3b..4a3451af454295ac3e1b688e6665cad9fc594c82 100644
|
||||
--- a/src/main/java/org/bukkit/event/server/TabCompleteEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/server/TabCompleteEvent.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.bukkit.event.server;
|
||||
|
||||
+import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -8,6 +9,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.player.PlayerCommandSendEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Called when a {@link CommandSender} of any description (ie: player or
|
||||
@@ -29,6 +31,13 @@ public class TabCompleteEvent extends Event implements Cancellable {
|
||||
@@ -29,6 +29,13 @@ public class TabCompleteEvent extends Event implements Cancellable {
|
||||
private boolean cancelled;
|
||||
|
||||
public TabCompleteEvent(@NotNull CommandSender sender, @NotNull String buffer, @NotNull List<String> completions) {
|
||||
+ // Paper start
|
||||
+ this(sender, buffer, completions, sender instanceof org.bukkit.command.ConsoleCommandSender || buffer.startsWith("/"), null);
|
||||
+ }
|
||||
+ public TabCompleteEvent(@NotNull CommandSender sender, @NotNull String buffer, @NotNull List<String> completions, boolean isCommand, @Nullable org.bukkit.Location location) {
|
||||
+ public TabCompleteEvent(@NotNull CommandSender sender, @NotNull String buffer, @NotNull List<String> completions, boolean isCommand, @org.jetbrains.annotations.Nullable org.bukkit.Location location) {
|
||||
+ this.isCommand = isCommand;
|
||||
+ this.loc = location;
|
||||
+ // Paper end
|
||||
Validate.notNull(sender, "sender");
|
||||
Validate.notNull(buffer, "buffer");
|
||||
Validate.notNull(completions, "completions");
|
||||
@@ -69,14 +78,35 @@ public class TabCompleteEvent extends Event implements Cancellable {
|
||||
Preconditions.checkArgument(sender != null, "sender");
|
||||
Preconditions.checkArgument(buffer != null, "buffer");
|
||||
Preconditions.checkArgument(completions != null, "completions");
|
||||
@@ -69,14 +76,35 @@ public class TabCompleteEvent extends Event implements Cancellable {
|
||||
return completions;
|
||||
}
|
||||
|
||||
@@ -244,7 +557,7 @@ index d1a9956a1573dab54c5ff2e5d67ca86cfe1dc01a..f96c4ba53ab41ea66d4f9a4d54eeabb6
|
||||
+ /**
|
||||
+ * @return The position looked at by the sender, or null if none
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @org.jetbrains.annotations.Nullable
|
||||
+ public org.bukkit.Location getLocation() {
|
||||
+ return loc;
|
||||
+ }
|
||||
@@ -258,9 +571,22 @@ index d1a9956a1573dab54c5ff2e5d67ca86cfe1dc01a..f96c4ba53ab41ea66d4f9a4d54eeabb6
|
||||
* @param completions the new completions
|
||||
*/
|
||||
public void setCompletions(@NotNull List<String> completions) {
|
||||
Validate.notNull(completions);
|
||||
Preconditions.checkArgument(completions != null);
|
||||
- this.completions = completions;
|
||||
+ this.completions = new ArrayList<>(completions); // Paper
|
||||
+ this.completions = new java.util.ArrayList<>(completions); // Paper
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
index 93498307004b68b934fbfa1aeb3aaf0e97cbdac7..bbe81f7a420f913ffdcad913a3c43ff41ead41f5 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
@@ -48,6 +48,8 @@ public class AnnotationTest {
|
||||
// Generic functional interface
|
||||
"org/bukkit/util/Consumer",
|
||||
// Paper start
|
||||
+ "io/papermc/paper/util/TransformingRandomAccessList",
|
||||
+ "io/papermc/paper/util/TransformingRandomAccessList$TransformedListIterator",
|
||||
// Timings history is broken in terms of nullability due to guavas Function defining that the param is NonNull
|
||||
"co/aikar/timings/TimingHistory$2",
|
||||
"co/aikar/timings/TimingHistory$2$1",
|
||||
@@ -57,10 +57,10 @@ index 0000000000000000000000000000000000000000..7b2af1bd72dfbcf4e962a982940fc49b
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 48b127cafe6fecb1849b176df43cbf26e5a1db79..b621f693379aedc23a90b03e724ba8a2ffeb283e 100644
|
||||
index 50faa513411cdb611ae228f0c07a7dfe15807b85..1f29ed50c981fa262790a070722bbe9fecac5b02 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -37,7 +37,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -41,7 +41,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a player, connected or not
|
||||
*/
|
||||
|
||||
@@ -10,10 +10,10 @@ on the players login.
|
||||
Plugin authors need to define a key to keep it consistent between server restarts.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
index d74b3114f535e1e5e36ae007f1fe0522916a0362..d742c4058ba9aed4fbe1591fd755a06608b06e98 100644
|
||||
index fde34da0f7a13dee06e479fd6c5350a69beb3c95..ad2ab6e97ccf6900d19f8bfbe08181d4c7743a99 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
@@ -25,6 +25,7 @@ public class ShapedRecipe implements Recipe, Keyed {
|
||||
@@ -24,6 +24,7 @@ public class ShapedRecipe implements Recipe, Keyed {
|
||||
public ShapedRecipe(@NotNull ItemStack result) {
|
||||
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
||||
this.key = NamespacedKey.randomKey();
|
||||
@@ -22,10 +22,10 @@ index d74b3114f535e1e5e36ae007f1fe0522916a0362..d742c4058ba9aed4fbe1591fd755a066
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
index 68447fb8c12356e779b96ec98c54119045046751..84062dd719cb8a6142dc8c806777cb208c6b42b2 100644
|
||||
index cc3f7cccfa06a92f3ca192cb88f30f8929c02dfd..75b47c608d0a902e4ea5f03c395667f47dec8980 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
@@ -26,6 +26,7 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
@@ -25,6 +25,7 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
public ShapelessRecipe(@NotNull ItemStack result) {
|
||||
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
||||
this.key = NamespacedKey.randomKey();
|
||||
|
||||
@@ -10,10 +10,10 @@ of giving the player experience points.
|
||||
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index b621f693379aedc23a90b03e724ba8a2ffeb283e..1e3a56ff656cdfe18cf665eecd8f126275f29715 100644
|
||||
index 1f29ed50c981fa262790a070722bbe9fecac5b02..f42ef55662b8cecd7383ae10424364da97c54453 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -986,12 +986,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1064,12 +1064,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void resetPlayerWeather();
|
||||
|
||||
|
||||
@@ -7,18 +7,10 @@ This allows you to create already filled textures on Skulls to avoid texture loo
|
||||
which commonly cause rate limit issues with Mojang API
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/Skull.java b/src/main/java/org/bukkit/block/Skull.java
|
||||
index 943d751fb3e48212fbe258845beba03c25fa22d9..a6914f01e01e9103702185f92b0209b3c84c152a 100644
|
||||
index 83ca284e02f0c2229126d8f40cb33b18f44524d3..d89da5e370d95cfbc4dac776a64e402c5c1f5fc1 100644
|
||||
--- a/src/main/java/org/bukkit/block/Skull.java
|
||||
+++ b/src/main/java/org/bukkit/block/Skull.java
|
||||
@@ -7,6 +7,7 @@ import org.bukkit.block.data.BlockData;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
+import com.destroystokyo.paper.profile.PlayerProfile; // Paper
|
||||
|
||||
/**
|
||||
* Represents a captured state of a skull block.
|
||||
@@ -61,6 +62,20 @@ public interface Skull extends TileState {
|
||||
@@ -62,6 +62,20 @@ public interface Skull extends TileState {
|
||||
*/
|
||||
public void setOwningPlayer(@NotNull OfflinePlayer player);
|
||||
|
||||
@@ -27,35 +19,39 @@ index 943d751fb3e48212fbe258845beba03c25fa22d9..a6914f01e01e9103702185f92b0209b3
|
||||
+ * Sets this skull to use the supplied Player Profile, which can include textures already prefilled.
|
||||
+ * @param profile The profile to set this Skull to use, may not be null
|
||||
+ */
|
||||
+ void setPlayerProfile(@NotNull PlayerProfile profile);
|
||||
+ void setPlayerProfile(@NotNull com.destroystokyo.paper.profile.PlayerProfile profile);
|
||||
+
|
||||
+ /**
|
||||
+ * If the skull has an owner, per {@link #hasOwner()}, return the owners {@link PlayerProfile}
|
||||
+ * If the skull has an owner, per {@link #hasOwner()}, return the owners {@link com.destroystokyo.paper.profile.PlayerProfile}
|
||||
+ * @return The profile of the owner, if set
|
||||
+ */
|
||||
+ @Nullable PlayerProfile getPlayerProfile();
|
||||
+ @Nullable com.destroystokyo.paper.profile.PlayerProfile getPlayerProfile();
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Gets the rotation of the skull in the world (or facing direction if this
|
||||
* is a wall mounted skull).
|
||||
* Gets the profile of the player who owns the skull. This player profile
|
||||
* may appear as the texture depending on skull type.
|
||||
@@ -69,6 +83,7 @@ public interface Skull extends TileState {
|
||||
* @return the profile of the owning player
|
||||
*/
|
||||
@Nullable
|
||||
+ @Deprecated // Paper
|
||||
PlayerProfile getOwnerProfile();
|
||||
|
||||
/**
|
||||
@@ -83,6 +98,7 @@ public interface Skull extends TileState {
|
||||
* @throws IllegalArgumentException if the profile does not contain the
|
||||
* necessary information
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
void setOwnerProfile(@Nullable PlayerProfile profile);
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
index 496254f959345d74167a9b44d160ea1bb428c5a1..88d1c889c09adb91abb09a8e43a30c871b217da2 100644
|
||||
index dcefd0eea9461441c4209d587896d704389487d0..9ad062968335ee02bff5353d8c63c330d9338cd7 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
@@ -1,9 +1,11 @@
|
||||
package org.bukkit.inventory.meta;
|
||||
|
||||
+import com.destroystokyo.paper.profile.PlayerProfile;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
+
|
||||
/**
|
||||
* Represents a skull that can have an owner.
|
||||
*/
|
||||
@@ -36,6 +38,20 @@ public interface SkullMeta extends ItemMeta {
|
||||
@@ -37,6 +37,20 @@ public interface SkullMeta extends ItemMeta {
|
||||
@Deprecated
|
||||
boolean setOwner(@Nullable String owner);
|
||||
|
||||
@@ -64,15 +60,31 @@ index 496254f959345d74167a9b44d160ea1bb428c5a1..88d1c889c09adb91abb09a8e43a30c87
|
||||
+ * Sets this skull to use the supplied Player Profile, which can include textures already prefilled.
|
||||
+ * @param profile The profile to set this Skull to use, or null to clear owner
|
||||
+ */
|
||||
+ void setPlayerProfile(@Nullable PlayerProfile profile);
|
||||
+ void setPlayerProfile(@Nullable com.destroystokyo.paper.profile.PlayerProfile profile);
|
||||
+
|
||||
+ /**
|
||||
+ * If the skull has an owner, per {@link #hasOwner()}, return the owners {@link PlayerProfile}
|
||||
+ * If the skull has an owner, per {@link #hasOwner()}, return the owners {@link com.destroystokyo.paper.profile.PlayerProfile}
|
||||
+ * @return The profile of the owner, if set
|
||||
+ */
|
||||
+ @Nullable PlayerProfile getPlayerProfile();
|
||||
+ @Nullable com.destroystokyo.paper.profile.PlayerProfile getPlayerProfile();
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Gets the owner of the skull.
|
||||
*
|
||||
@@ -63,6 +77,7 @@ public interface SkullMeta extends ItemMeta {
|
||||
* @return the profile of the owning player
|
||||
*/
|
||||
@Nullable
|
||||
+ @Deprecated // Paper
|
||||
PlayerProfile getOwnerProfile();
|
||||
|
||||
/**
|
||||
@@ -77,6 +92,7 @@ public interface SkullMeta extends ItemMeta {
|
||||
* @throws IllegalArgumentException if the profile does not contain the
|
||||
* necessary information
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
void setOwnerProfile(@Nullable PlayerProfile profile);
|
||||
|
||||
@Override
|
||||
@@ -7,7 +7,7 @@ Adds data about what Item related methods were used in InventoryMoveItem event
|
||||
so that the server can improve the performance of this event.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryMoveItemEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryMoveItemEvent.java
|
||||
index a8c48f5a416326e96c431e5fa22edee04825530e..04d4a83bfc4f86341f9d72128458154d08c8ec43 100644
|
||||
index 919cc993e3cb1c14e2a3aebf90e6cc0fa6fbc17f..95e51bcf5dfd27cc9012d7542c4ed1bceca29626 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryMoveItemEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryMoveItemEvent.java
|
||||
@@ -31,6 +31,8 @@ public class InventoryMoveItemEvent extends Event implements Cancellable {
|
||||
@@ -18,7 +18,7 @@ index a8c48f5a416326e96c431e5fa22edee04825530e..04d4a83bfc4f86341f9d72128458154d
|
||||
+ public boolean calledSetItem; // Paper
|
||||
|
||||
public InventoryMoveItemEvent(@NotNull final Inventory sourceInventory, @NotNull final ItemStack itemStack, @NotNull final Inventory destinationInventory, final boolean didSourceInitiate) {
|
||||
Validate.notNull(itemStack, "ItemStack cannot be null");
|
||||
Preconditions.checkArgument(itemStack != null, "ItemStack cannot be null");
|
||||
@@ -58,7 +60,8 @@ public class InventoryMoveItemEvent extends Event implements Cancellable {
|
||||
*/
|
||||
@NotNull
|
||||
@@ -32,7 +32,7 @@ index a8c48f5a416326e96c431e5fa22edee04825530e..04d4a83bfc4f86341f9d72128458154d
|
||||
@@ -70,6 +73,7 @@ public class InventoryMoveItemEvent extends Event implements Cancellable {
|
||||
*/
|
||||
public void setItem(@NotNull ItemStack itemStack) {
|
||||
Validate.notNull(itemStack, "ItemStack cannot be null. Cancel the event if you want nothing to be transferred.");
|
||||
Preconditions.checkArgument(itemStack != null, "ItemStack cannot be null. Cancel the event if you want nothing to be transferred.");
|
||||
+ calledSetItem = true; // Paper - record this method was used for auto detection of mode
|
||||
this.itemStack = itemStack.clone();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Ability to change PlayerProfile in AsyncPreLoginEvent
|
||||
This will allow you to change the players name or skin on login.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
|
||||
index 31f6f781a0403bf6388d668f0effaed5aae94468..25e0d571710403c334bd73ce1b97109dd65c3244 100644
|
||||
index c7c45e2de8cca1bf8b8e12752e08db62403efa6a..c30b44ff26f8f253902754452a0816f07c7fd035 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
|
||||
@@ -2,6 +2,9 @@ package org.bukkit.event.player;
|
||||
|
||||
@@ -8,7 +8,7 @@ and allows full control of the response sent to the client.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..baac2e4f090a490372ef4aed92c8a5771955e921
|
||||
index 0000000000000000000000000000000000000000..5bacbd0df66953d3c8fdfde5af1338a74339cfda
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
|
||||
@@ -0,0 +1,334 @@
|
||||
@@ -56,9 +56,9 @@ index 0000000000000000000000000000000000000000..baac2e4f090a490372ef4aed92c8a577
|
||||
+ private Object[] players;
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull String motd, int numPlayers, int maxPlayers,
|
||||
+ public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull String motd, boolean shouldSendChatPreviews, int numPlayers, int maxPlayers,
|
||||
+ @NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) {
|
||||
+ super(client.getAddress().getAddress(), motd, numPlayers, maxPlayers);
|
||||
+ super(client.getAddress().getAddress(), motd, shouldSendChatPreviews, numPlayers, maxPlayers);
|
||||
+ this.client = client;
|
||||
+ this.numPlayers = numPlayers;
|
||||
+ this.version = version;
|
||||
@@ -66,9 +66,9 @@ index 0000000000000000000000000000000000000000..baac2e4f090a490372ef4aed92c8a577
|
||||
+ setServerIcon(favicon);
|
||||
+ }
|
||||
+
|
||||
+ public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull net.kyori.adventure.text.Component motd, int numPlayers, int maxPlayers,
|
||||
+ public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull net.kyori.adventure.text.Component motd, boolean shouldSendChatPreviews, int numPlayers, int maxPlayers,
|
||||
+ @NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) {
|
||||
+ super(client.getAddress().getAddress(), motd, numPlayers, maxPlayers);
|
||||
+ super(client.getAddress().getAddress(), motd, shouldSendChatPreviews, numPlayers, maxPlayers);
|
||||
+ this.client = client;
|
||||
+ this.numPlayers = numPlayers;
|
||||
+ this.version = version;
|
||||
|
||||
@@ -5,19 +5,85 @@ Subject: [PATCH] Player.setPlayerProfile API
|
||||
|
||||
This can be useful for changing name or skins after a player has logged in.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index d5fd584c109c0a84a4259b10e7b43fae3a1da1ae..a452adcbf8657c501ad92f4cb361b551992f128f 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1197,8 +1197,10 @@ public final class Bukkit {
|
||||
* @return the new PlayerProfile
|
||||
* @throws IllegalArgumentException if both the unique id is
|
||||
* <code>null</code> and the name is <code>null</code> or blank
|
||||
+ * @deprecated use {@link #createProfile(UUID, String)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
public static PlayerProfile createPlayerProfile(@Nullable UUID uniqueId, @Nullable String name) {
|
||||
return server.createPlayerProfile(uniqueId, name);
|
||||
}
|
||||
@@ -1209,8 +1211,10 @@ public final class Bukkit {
|
||||
* @param uniqueId the unique id
|
||||
* @return the new PlayerProfile
|
||||
* @throws IllegalArgumentException if the unique id is <code>null</code>
|
||||
+ * @deprecated use {@link #createProfile(UUID)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
public static PlayerProfile createPlayerProfile(@NotNull UUID uniqueId) {
|
||||
return server.createPlayerProfile(uniqueId);
|
||||
}
|
||||
@@ -1222,8 +1226,10 @@ public final class Bukkit {
|
||||
* @return the new PlayerProfile
|
||||
* @throws IllegalArgumentException if the name is <code>null</code> or
|
||||
* blank
|
||||
+ * @deprecated use {@link #createProfile(String)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
public static PlayerProfile createPlayerProfile(@NotNull String name) {
|
||||
return server.createPlayerProfile(name);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index fab39e4fc595c022da27e87e27bd168939e54381..e90056341407f58ff6ce2d9b80c8f3f64464e650 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1015,8 +1015,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @return the new PlayerProfile
|
||||
* @throws IllegalArgumentException if both the unique id is
|
||||
* <code>null</code> and the name is <code>null</code> or blank
|
||||
+ * @deprecated use {@link #createProfile(UUID, String)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
PlayerProfile createPlayerProfile(@Nullable UUID uniqueId, @Nullable String name);
|
||||
|
||||
/**
|
||||
@@ -1025,8 +1027,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @param uniqueId the unique id
|
||||
* @return the new PlayerProfile
|
||||
* @throws IllegalArgumentException if the unique id is <code>null</code>
|
||||
+ * @deprecated use {@link #createProfile(UUID)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
PlayerProfile createPlayerProfile(@NotNull UUID uniqueId);
|
||||
|
||||
/**
|
||||
@@ -1036,8 +1040,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @return the new PlayerProfile
|
||||
* @throws IllegalArgumentException if the name is <code>null</code> or
|
||||
* blank
|
||||
+ * @deprecated use {@link #createProfile(String)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated
|
||||
PlayerProfile createPlayerProfile(@NotNull String name);
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 7e390f5d7438f292ddd849f47964282a1ad889d1..ac94189b7bc76e1de0ae7d46fe581af57594ef64 100644
|
||||
index f42ef55662b8cecd7383ae10424364da97c54453..d55104146a7a4668aa73ee0bf6f084471e8b85c2 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -4,6 +4,7 @@ import java.net.InetSocketAddress;
|
||||
import java.util.UUID;
|
||||
import com.destroystokyo.paper.Title; // Paper
|
||||
import net.kyori.adventure.text.Component;
|
||||
+import com.destroystokyo.paper.profile.PlayerProfile; // Paper
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.GameMode;
|
||||
@@ -2202,6 +2203,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2322,6 +2322,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
|
||||
*/
|
||||
boolean hasResourcePack();
|
||||
@@ -27,14 +93,36 @@ index 7e390f5d7438f292ddd849f47964282a1ad889d1..ac94189b7bc76e1de0ae7d46fe581af5
|
||||
+ * @return The players profile object
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ PlayerProfile getPlayerProfile();
|
||||
+ com.destroystokyo.paper.profile.PlayerProfile getPlayerProfile();
|
||||
+
|
||||
+ /**
|
||||
+ * Changes the PlayerProfile for this player. This will cause this player
|
||||
+ * to be reregistered to all clients that can currently see this player
|
||||
+ * @param profile The new profile to use
|
||||
+ */
|
||||
+ void setPlayerProfile(@NotNull PlayerProfile profile);
|
||||
+ void setPlayerProfile(@NotNull com.destroystokyo.paper.profile.PlayerProfile profile);
|
||||
// Paper end
|
||||
|
||||
// Spigot start
|
||||
diff --git a/src/main/java/org/bukkit/profile/PlayerProfile.java b/src/main/java/org/bukkit/profile/PlayerProfile.java
|
||||
index fc46add38bf59dc1a04ea566fd230dcd8ae2708c..d36b3e3c7e53840132011add365ca2a26d799064 100644
|
||||
--- a/src/main/java/org/bukkit/profile/PlayerProfile.java
|
||||
+++ b/src/main/java/org/bukkit/profile/PlayerProfile.java
|
||||
@@ -16,7 +16,9 @@ import org.jetbrains.annotations.Nullable;
|
||||
* <p>
|
||||
* New profiles can be created via
|
||||
* {@link Server#createPlayerProfile(UUID, String)}.
|
||||
+ * @deprecated see {@link com.destroystokyo.paper.profile.PlayerProfile}
|
||||
*/
|
||||
+@Deprecated // Paper
|
||||
public interface PlayerProfile extends Cloneable, ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
@@ -25,6 +27,7 @@ public interface PlayerProfile extends Cloneable, ConfigurationSerializable {
|
||||
* @return the player's unique id, or <code>null</code> if not available
|
||||
*/
|
||||
@Nullable
|
||||
+ @Deprecated // Paper
|
||||
UUID getUniqueId();
|
||||
|
||||
/**
|
||||
@@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
|
||||
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index c7daa7c9f85c62d0effd5c3f406568d77fd8cd78..23960534cbb83cfca08ccc1e37bc7a713728b791 100644
|
||||
index a452adcbf8657c501ad92f4cb361b551992f128f..908e1aba5257688bb70fbf1ed83d2212305263a1 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -616,6 +616,20 @@ public final class Bukkit {
|
||||
@@ -657,6 +657,20 @@ public final class Bukkit {
|
||||
return server.getPlayer(id);
|
||||
}
|
||||
|
||||
@@ -34,10 +34,10 @@ index c7daa7c9f85c62d0effd5c3f406568d77fd8cd78..23960534cbb83cfca08ccc1e37bc7a71
|
||||
* Gets the plugin manager for interfacing with plugins.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index fb5c308d82e9103a212deea2a6fa2e158cddb931..f7320c0797f31cc9609a6764d886bdb6dbd082af 100644
|
||||
index e90056341407f58ff6ce2d9b80c8f3f64464e650..b0e6446c0dc49088878d7ae453dc3eee8b346f4e 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -524,6 +524,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -559,6 +559,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@Nullable
|
||||
public Player getPlayer(@NotNull UUID id);
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add openSign method to HumanEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 396092fd249928ca01133eeeeb61f0ad90b2e332..5cc025b69c4f405be8f7098d0dcef40fa522b39f 100644
|
||||
index be3eaadbc768a306da68a15abcaa7a5d3ec760c7..13b74e942012169611f2791f8b4493d04710e4c0 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -476,6 +476,14 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -480,6 +480,14 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
@Deprecated
|
||||
public void setShoulderEntityRight(@Nullable Entity entity);
|
||||
@@ -24,10 +24,10 @@ index 396092fd249928ca01133eeeeb61f0ad90b2e332..5cc025b69c4f405be8f7098d0dcef40f
|
||||
/**
|
||||
* Make the entity drop the item in their hand.
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index ac94189b7bc76e1de0ae7d46fe581af57594ef64..dbfd062792b0cc1d8fbfc8a30b0143467e7aaef7 100644
|
||||
index d55104146a7a4668aa73ee0bf6f084471e8b85c2..104171d7a75abf5c3ba5903c1fba4ca7a85369ae 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2058,7 +2058,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2177,7 +2177,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
/**
|
||||
* Open a Sign for editing by the Player.
|
||||
*
|
||||
|
||||
@@ -8,10 +8,10 @@ Allows a more logical API for banning players.
|
||||
player.banPlayer("Breaking the rules");
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
index 58313929f81509030216a0e5e3869da63e11108e..6cf05fed701c67a2c797a4e0839c795802a238a1 100644
|
||||
index c5eed3234a8c04bfa9d707685746fc2b40ec8bfc..93f86bb30725dff5dbfcccf15012ffd1cee237bf 100644
|
||||
--- a/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
+++ b/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
@@ -45,6 +45,61 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
@@ -58,6 +58,61 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
* @return true if banned, otherwise false
|
||||
*/
|
||||
public boolean isBanned();
|
||||
@@ -74,21 +74,10 @@ index 58313929f81509030216a0e5e3869da63e11108e..6cf05fed701c67a2c797a4e0839c7958
|
||||
/**
|
||||
* Checks if this player is whitelisted or not
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index da5dd22e75b998495258a482557221ebd52e0c39..07ae612268a5857cedf8c646a09eb30c9b0a036b 100644
|
||||
index 104171d7a75abf5c3ba5903c1fba4ca7a85369ae..d3c3347fd08fd6e05d5b269aa50fa083c555a7e3 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -5,6 +5,10 @@ import java.util.UUID;
|
||||
import com.destroystokyo.paper.Title; // Paper
|
||||
import net.kyori.adventure.text.Component;
|
||||
import com.destroystokyo.paper.profile.PlayerProfile; // Paper
|
||||
+import java.util.Date; // Paper
|
||||
+import org.bukkit.BanEntry; // Paper
|
||||
+import org.bukkit.BanList; // Paper
|
||||
+import org.bukkit.Bukkit; // Paper
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.GameMode;
|
||||
@@ -712,6 +716,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -781,6 +781,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
public void sendMap(@NotNull MapView map);
|
||||
|
||||
// Paper start
|
||||
@@ -100,7 +89,7 @@ index da5dd22e75b998495258a482557221ebd52e0c39..07ae612268a5857cedf8c646a09eb30c
|
||||
+ */
|
||||
+ // For reference, Bukkit defines this as nullable, while they impl isn't, we'll follow API.
|
||||
+ @Nullable
|
||||
+ public default BanEntry banPlayerFull(@Nullable String reason) {
|
||||
+ public default org.bukkit.BanEntry banPlayerFull(@Nullable String reason) {
|
||||
+ return banPlayerFull(reason, null, null);
|
||||
+ }
|
||||
+
|
||||
@@ -112,7 +101,7 @@ index da5dd22e75b998495258a482557221ebd52e0c39..07ae612268a5857cedf8c646a09eb30c
|
||||
+ * @return Ban Entry
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public default BanEntry banPlayerFull(@Nullable String reason, @Nullable String source) {
|
||||
+ public default org.bukkit.BanEntry banPlayerFull(@Nullable String reason, @Nullable String source) {
|
||||
+ return banPlayerFull(reason, null, source);
|
||||
+ }
|
||||
+
|
||||
@@ -124,7 +113,7 @@ index da5dd22e75b998495258a482557221ebd52e0c39..07ae612268a5857cedf8c646a09eb30c
|
||||
+ * @return Ban Entry
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public default BanEntry banPlayerFull(@Nullable String reason, @Nullable Date expires) {
|
||||
+ public default org.bukkit.BanEntry banPlayerFull(@Nullable String reason, @Nullable java.util.Date expires) {
|
||||
+ return banPlayerFull(reason, expires, null);
|
||||
+ }
|
||||
+
|
||||
@@ -137,102 +126,102 @@ index da5dd22e75b998495258a482557221ebd52e0c39..07ae612268a5857cedf8c646a09eb30c
|
||||
+ * @return Ban Entry
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public default BanEntry banPlayerFull(@Nullable String reason, @Nullable Date expires, @Nullable String source) {
|
||||
+ public default org.bukkit.BanEntry banPlayerFull(@Nullable String reason, @Nullable java.util.Date expires, @Nullable String source) {
|
||||
+ banPlayer(reason, expires, source);
|
||||
+ return banPlayerIP(reason, expires, source, true);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Permanently Bans the IP address currently used by the player.
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, Date, String)}
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, java.util.Date, String)}
|
||||
+ *
|
||||
+ * @param reason Reason for ban
|
||||
+ * @param kickPlayer Whether or not to kick the player afterwards
|
||||
+ * @return Ban Entry
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public default BanEntry banPlayerIP(@Nullable String reason, boolean kickPlayer) {
|
||||
+ public default org.bukkit.BanEntry banPlayerIP(@Nullable String reason, boolean kickPlayer) {
|
||||
+ return banPlayerIP(reason, null, null, kickPlayer);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Permanently Bans the IP address currently used by the player.
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, Date, String)}
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, java.util.Date, String)}
|
||||
+ * @param reason Reason for ban
|
||||
+ * @param source Source of ban, or null for default
|
||||
+ * @param kickPlayer Whether or not to kick the player afterwards
|
||||
+ * @return Ban Entry
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public default BanEntry banPlayerIP(@Nullable String reason, @Nullable String source, boolean kickPlayer) {
|
||||
+ public default org.bukkit.BanEntry banPlayerIP(@Nullable String reason, @Nullable String source, boolean kickPlayer) {
|
||||
+ return banPlayerIP(reason, null, source, kickPlayer);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Bans the IP address currently used by the player.
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, Date, String)}
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, java.util.Date, String)}
|
||||
+ * @param reason Reason for Ban
|
||||
+ * @param expires When to expire the ban
|
||||
+ * @param kickPlayer Whether or not to kick the player afterwards
|
||||
+ * @return Ban Entry
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public default BanEntry banPlayerIP(@Nullable String reason, @Nullable Date expires, boolean kickPlayer) {
|
||||
+ public default org.bukkit.BanEntry banPlayerIP(@Nullable String reason, @Nullable java.util.Date expires, boolean kickPlayer) {
|
||||
+ return banPlayerIP(reason, expires, null, kickPlayer);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Permanently Bans the IP address currently used by the player.
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, Date, String)}
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, java.util.Date, String)}
|
||||
+ *
|
||||
+ * @param reason Reason for ban
|
||||
+ * @return Ban Entry
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public default BanEntry banPlayerIP(@Nullable String reason) {
|
||||
+ public default org.bukkit.BanEntry banPlayerIP(@Nullable String reason) {
|
||||
+ return banPlayerIP(reason, null, null);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Permanently Bans the IP address currently used by the player.
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, Date, String)}
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, java.util.Date, String)}
|
||||
+ * @param reason Reason for ban
|
||||
+ * @param source Source of ban, or null for default
|
||||
+ * @return Ban Entry
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public default BanEntry banPlayerIP(@Nullable String reason, @Nullable String source) {
|
||||
+ public default org.bukkit.BanEntry banPlayerIP(@Nullable String reason, @Nullable String source) {
|
||||
+ return banPlayerIP(reason, null, source);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Bans the IP address currently used by the player.
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, Date, String)}
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, java.util.Date, String)}
|
||||
+ * @param reason Reason for Ban
|
||||
+ * @param expires When to expire the ban
|
||||
+ * @return Ban Entry
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public default BanEntry banPlayerIP(@Nullable String reason, @Nullable Date expires) {
|
||||
+ public default org.bukkit.BanEntry banPlayerIP(@Nullable String reason, @Nullable java.util.Date expires) {
|
||||
+ return banPlayerIP(reason, expires, null);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Bans the IP address currently used by the player.
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, Date, String)}
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, java.util.Date, String)}
|
||||
+ * @param reason Reason for Ban
|
||||
+ * @param expires When to expire the ban
|
||||
+ * @param source Source of the banm or null for default
|
||||
+ * @return Ban Entry
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public default BanEntry banPlayerIP(@Nullable String reason, @Nullable Date expires, @Nullable String source) {
|
||||
+ public default org.bukkit.BanEntry banPlayerIP(@Nullable String reason, @Nullable java.util.Date expires, @Nullable String source) {
|
||||
+ return banPlayerIP(reason, expires, source, true);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Bans the IP address currently used by the player.
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, Date, String)}
|
||||
+ * Does not ban the Profile, use {@link #banPlayerFull(String, java.util.Date, String)}
|
||||
+ * @param reason Reason for Ban
|
||||
+ * @param expires When to expire the ban
|
||||
+ * @param source Source of the banm or null for default
|
||||
@@ -240,8 +229,8 @@ index da5dd22e75b998495258a482557221ebd52e0c39..07ae612268a5857cedf8c646a09eb30c
|
||||
+ * @return Ban Entry
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public default BanEntry banPlayerIP(@Nullable String reason, @Nullable Date expires, @Nullable String source, boolean kickPlayer) {
|
||||
+ BanEntry banEntry = Bukkit.getServer().getBanList(BanList.Type.IP).addBan(getAddress().getAddress().getHostAddress(), reason, expires, source);
|
||||
+ public default org.bukkit.BanEntry banPlayerIP(@Nullable String reason, @Nullable java.util.Date expires, @Nullable String source, boolean kickPlayer) {
|
||||
+ org.bukkit.BanEntry banEntry = org.bukkit.Bukkit.getServer().getBanList(org.bukkit.BanList.Type.IP).addBan(getAddress().getAddress().getHostAddress(), reason, expires, source);
|
||||
+ if (kickPlayer && isOnline()) {
|
||||
+ getPlayer().kickPlayer(reason);
|
||||
+ }
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's
|
||||
Provides more methods to get nearby entities, and filter by types and predicates
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index cec39714294127478b6e73452354ba7ccab78b25..bd1e64d03d601d55bab3f1de367792544ed802b1 100644
|
||||
index e0683e69029e8ac423bda79521045b06673eabf3..cf7baa9cd691b02aeaa4d94d5e999e661e003a44 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1,6 +1,9 @@
|
||||
@@ -19,7 +19,7 @@ index cec39714294127478b6e73452354ba7ccab78b25..bd1e64d03d601d55bab3f1de36779254
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -652,6 +655,256 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -657,6 +660,256 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes);
|
||||
|
||||
@@ -277,7 +277,7 @@ index cec39714294127478b6e73452354ba7ccab78b25..bd1e64d03d601d55bab3f1de36779254
|
||||
* Get a list of all players in this World
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
|
||||
index 25e0d571710403c334bd73ce1b97109dd65c3244..033960f566861e303b9cb61aae4c02add501d93f 100644
|
||||
index c30b44ff26f8f253902754452a0816f07c7fd035..9acf1fb404ccf9b3bc06a448c3099ca2e838facf 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
|
||||
@@ -42,8 +42,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
|
||||
|
||||
@@ -500,10 +500,10 @@ index 0000000000000000000000000000000000000000..f45b8cfd1611345e8d81ecb8297a586f
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
|
||||
index dc5142460a711ee79aed30276382b92c82cbef00..40a3a54fc82252692fc8710cabb243d0984ccf4f 100644
|
||||
index 9f646171b3ac617fb5217d5ab9c106c3100a8c8d..2315fffc4a1a5bebc50a703e9df59df8121c2200 100644
|
||||
--- a/src/main/java/org/bukkit/Particle.java
|
||||
+++ b/src/main/java/org/bukkit/Particle.java
|
||||
@@ -122,6 +122,17 @@ public enum Particle {
|
||||
@@ -160,6 +160,17 @@ public enum Particle {
|
||||
return dataType;
|
||||
}
|
||||
|
||||
@@ -522,10 +522,10 @@ index dc5142460a711ee79aed30276382b92c82cbef00..40a3a54fc82252692fc8710cabb243d0
|
||||
* Options which can be applied to redstone dust particles - a particle
|
||||
* color and size.
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index e8b94ae777cad907dbb31c9ea5a3c1690b178777..6156fb9827400cb6c1c0a96e0b6fed180a12d610 100644
|
||||
index cf7baa9cd691b02aeaa4d94d5e999e661e003a44..9ffe69abd0aa706d56e4eff3587cb453a437ba26 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2637,7 +2637,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2787,7 +2787,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* @param data the data to use for the particle or null,
|
||||
* the type of this depends on {@link Particle#getDataType()}
|
||||
*/
|
||||
|
||||
@@ -66,10 +66,10 @@ index 41e26451fe12d8e6e0ef73c85731b24b4e3f200c..0d1b20f2b5580ea5505ccc2f003925db
|
||||
* Gets a {@link Permission} from its fully qualified name
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 3ffe519b759f440f56f3054b0d3e4120b59f8c62..c43d819bae5bc51bcf57a575bc22aee9d501c562 100644
|
||||
index 77caec9f974077ed6580d3cbbc20feb1199feb11..9f32b57464352c08617f6adec144111b8fcad50c 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -508,6 +508,21 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -504,6 +504,21 @@ public final class SimplePluginManager implements PluginManager {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ index 3ffe519b759f440f56f3054b0d3e4120b59f8c62..c43d819bae5bc51bcf57a575bc22aee9
|
||||
public void disablePlugin(@NotNull final Plugin plugin) {
|
||||
if (plugin.isEnabled()) {
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index 0cbac77e16fc36d805b79dd44837a38a79618c0b..47b306929654855944b1e95f81c641dea6102096 100644
|
||||
index 5d74fab03a15d7099e5dacb780eade4cdc185797..032ed2aba7d47144d241d616ba27489ce22d6fea 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -366,6 +366,7 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] PotionEffect clone methods
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
index 60716c627d315b08c3fe03b1a945af60c350711f..74767751199bce03d63f2a9524712656193f850c 100644
|
||||
index 1f0faf16071f0be44c87248582ba173e51aafb52..24e36cdf580da885ac64002673a786b9c5a3f787 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
@@ -101,6 +101,33 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
||||
Allows you to determine how long it takes to use a usable/consumable item
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index e8783b0116f4efd5447a5f6f260506000983ffd2..9fee2f157ac5149cd65136bf8468deaca410fbf4 100644
|
||||
index 8b76d7ca596ea261c0ca3b9fe2fbf5507c3883e3..54d7c4b78f7fb01d8c11c19f038642b155334770 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -636,5 +636,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
||||
@@ -639,5 +639,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
||||
public String getI18NDisplayName() {
|
||||
return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index bfc90a3569abc717f37c064e3068c55ef323edab..588ad09a764236cf858a4e6689cf4ee5246e6f08 100644
|
||||
index 036936671d816fc553ad2fdf8324609ab610b7f5..75629874849e4cdcf0465b653f27baaca5247fea 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -635,5 +635,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -712,5 +712,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
* @param arrows Number of arrows to stick in this entity
|
||||
*/
|
||||
void setArrowsStuck(int arrows);
|
||||
|
||||
@@ -106,10 +106,10 @@ index bbc636baef2e2b0586c7d517be428438ca26ab66..a8d4f7972d07ddde171b4a1ec470a4c6
|
||||
* Returns a list of entities within a bounding box centered around a Location.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 6156fb9827400cb6c1c0a96e0b6fed180a12d610..1e29c0e69973a1f7422852a04f97a6e7c19a3e54 100644
|
||||
index 9ffe69abd0aa706d56e4eff3587cb453a437ba26..147fa28678f09ebc0fdaf3f26ba0693a74a683f2 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1419,6 +1419,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -1424,6 +1424,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
*/
|
||||
public boolean createExplosion(@NotNull Location loc, float power, boolean setFire);
|
||||
|
||||
|
||||
@@ -5,20 +5,18 @@ Subject: [PATCH] ItemStack API additions for quantity/flags/lore
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 9fee2f157ac5149cd65136bf8468deaca410fbf4..686e2a0b9fe061816b41435ef2337870dbdca8e5 100644
|
||||
index 54d7c4b78f7fb01d8c11c19f038642b155334770..7559f75dcc6665fa3d19d6e53a141a214407d1c5 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -2,7 +2,9 @@ package org.bukkit.inventory;
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.inventory;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import java.util.LinkedHashMap;
|
||||
+import java.util.List; // Paper
|
||||
import java.util.Map;
|
||||
+import java.util.Set; // Paper
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
@@ -644,5 +646,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
||||
@@ -647,5 +648,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
|
||||
// Requires access to NMS
|
||||
return ensureServerConversions().getMaxItemUseDuration();
|
||||
}
|
||||
@@ -184,7 +182,7 @@ index 9fee2f157ac5149cd65136bf8468deaca410fbf4..686e2a0b9fe061816b41435ef2337870
|
||||
+ * @return A set of all itemFlags set
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public Set<ItemFlag> getItemFlags() {
|
||||
+ public java.util.Set<ItemFlag> getItemFlags() {
|
||||
+ ItemMeta itemMeta = getItemMeta();
|
||||
+ if (itemMeta == null) {
|
||||
+ return java.util.Collections.emptySet();
|
||||
|
||||
@@ -5,29 +5,35 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
|
||||
|
||||
How long an entity has raised hands to charge an attack or use an item
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 13b74e942012169611f2791f8b4493d04710e4c0..9c711d0b2c2f7b0c0603847590e8a1a94f091ff0 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -308,7 +308,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*
|
||||
* @return the item being used by the player, or null if they are not using
|
||||
* an item
|
||||
+ * @deprecated Deprecated in favor of {@link LivingEntity#getActiveItem()}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
@Nullable
|
||||
public ItemStack getItemInUse();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 588ad09a764236cf858a4e6689cf4ee5246e6f08..6d8d96976bcef4e176453fede81a529478f11234 100644
|
||||
index 75629874849e4cdcf0465b653f27baaca5247fea..c80e75b72ac863db19e3d234e349876dd8797924 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -12,6 +12,7 @@ import org.bukkit.attribute.Attributable;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.memory.MemoryKey;
|
||||
import org.bukkit.inventory.EntityEquipment;
|
||||
+import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.bukkit.projectiles.ProjectileSource;
|
||||
@@ -649,5 +650,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -726,5 +726,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
* @param delay Delay in ticks
|
||||
*/
|
||||
void setShieldBlockingDelay(int delay);
|
||||
+
|
||||
+ /**
|
||||
+ * Get's the item being actively "used" or consumed.
|
||||
+ * @return The item. Will be null if no active item.
|
||||
+ * @return The item
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ ItemStack getActiveItem();
|
||||
+ @NotNull
|
||||
+ org.bukkit.inventory.ItemStack getActiveItem();
|
||||
+
|
||||
+ /**
|
||||
+ * Get's remaining time a player needs to keep hands raised with an item to finish using it.
|
||||
|
||||
@@ -152,10 +152,10 @@ index 818efe2a4d1ac0c4d8dca6c757850d99cdc2cb4b..10f8f6d45ae9280651c3ebddd1f90acb
|
||||
/**
|
||||
* Gets whether this snowman is in "derp mode", meaning it is not wearing a
|
||||
diff --git a/src/main/java/org/bukkit/entity/Witch.java b/src/main/java/org/bukkit/entity/Witch.java
|
||||
index b4343903b66a7fb5250c1da2e09c9e5863c20daf..aa88aede6c4e66a608a63d07bc66d60357b0bee9 100644
|
||||
index 0ebd54df0bb072df25a6ebcf137a39829cf71bf9..6618f2129e108c0a6cd15f6d0e86426021b6ff0d 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Witch.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Witch.java
|
||||
@@ -1,7 +1,9 @@
|
||||
@@ -1,9 +1,11 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
+import com.destroystokyo.paper.entity.RangedEntity;
|
||||
@@ -165,19 +165,19 @@ index b4343903b66a7fb5250c1da2e09c9e5863c20daf..aa88aede6c4e66a608a63d07bc66d603
|
||||
*/
|
||||
-public interface Witch extends Raider {
|
||||
+public interface Witch extends Raider, RangedEntity { // Paper
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether the witch is drinking a potion
|
||||
diff --git a/src/main/java/org/bukkit/entity/Wither.java b/src/main/java/org/bukkit/entity/Wither.java
|
||||
index 3bc332ee7f7d428bef6e2566ddded8b941858e2e..426d3693317cd303d35d8203026b528d87e401d5 100644
|
||||
index 225c65a20a3e33dfb14e108a36f2f4bc60f7920c..b86f0196e6eb8070830f63a94f732522c2a6c2f1 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Wither.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Wither.java
|
||||
@@ -1,7 +1,9 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
+import com.destroystokyo.paper.entity.RangedEntity;
|
||||
+
|
||||
@@ -6,7 +6,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a Wither boss
|
||||
*/
|
||||
-public interface Wither extends Monster, Boss {
|
||||
+public interface Wither extends Monster, Boss, RangedEntity { // Paper
|
||||
}
|
||||
+public interface Wither extends Monster, Boss, com.destroystokyo.paper.entity.RangedEntity { // Paper
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add World.getEntity(UUID) API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 1e29c0e69973a1f7422852a04f97a6e7c19a3e54..91755d27b84abad516d891d4b0b7869124cb263e 100644
|
||||
index 147fa28678f09ebc0fdaf3f26ba0693a74a683f2..f46032ac8d48ba172e6a9157dd6b477ddf2cd4cb 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -939,6 +939,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -944,6 +944,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Collection<Entity> getNearbyEntities(@NotNull Location location, double x, double y, double z);
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
||||
to "confirm" things based on if it was player triggered close or not.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 5cc025b69c4f405be8f7098d0dcef40fa522b39f..1d573d33304e9c15a9949af68dab0626ae04dce4 100644
|
||||
index 9c711d0b2c2f7b0c0603847590e8a1a94f091ff0..8f489abbb7e80d869ca0f6e8626cecbd453b625a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -158,6 +158,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -159,6 +159,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public void closeInventory();
|
||||
|
||||
|
||||
@@ -5,23 +5,15 @@ Subject: [PATCH] Allow setting the vex's summoner
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Vex.java b/src/main/java/org/bukkit/entity/Vex.java
|
||||
index 6b61c4ab773c731fe5ae9577fd13e44707be9787..c34a3ea7b4d16817b4bee25d5c69787e22ec44d8 100644
|
||||
index dc21f3ba648ab02a2b75ec429501143398c356f6..627e3c1a96ae3331f5aa2dd7803dd2a31c7204be 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Vex.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Vex.java
|
||||
@@ -1,5 +1,7 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
/**
|
||||
* Represents a Vex.
|
||||
*/
|
||||
@@ -22,4 +24,21 @@ public interface Vex extends Monster {
|
||||
* @param charging new state
|
||||
@@ -73,4 +73,21 @@ public interface Vex extends Monster {
|
||||
* @return true if the entity has limited life
|
||||
*/
|
||||
void setCharging(boolean charging);
|
||||
+
|
||||
boolean hasLimitedLife();
|
||||
+ // Paper start
|
||||
+
|
||||
+ /**
|
||||
+ * Get the Mob that summoned this vex
|
||||
+ *
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Entity#getChunk API
|
||||
Get the chunk the entity is currently registered to
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 71f519b8f03d2a52f2c5a9283a18c74c1ca52328..c0d6dc1b584c34c541bf9a2549016b4e29818d45 100644
|
||||
index e598c7c90d625313b8a935418bb68e0e6cb6bc6e..c6f14159067a14afd44378aaa9ac840aba2e2f9c 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.entity;
|
||||
@@ -17,7 +17,7 @@ index 71f519b8f03d2a52f2c5a9283a18c74c1ca52328..c0d6dc1b584c34c541bf9a2549016b4e
|
||||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Nameable;
|
||||
@@ -680,5 +681,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -715,5 +716,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
* @return True if entity spawned from a mob spawner
|
||||
*/
|
||||
boolean fromMobSpawner();
|
||||
|
||||
@@ -7,10 +7,10 @@ Not here to name and shame, only so server admins can be aware of which
|
||||
plugins have and haven't been updated.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index bfeec56e83229dbfc8625b3b90bd6c138c73bc1d..9341c7fbf619a42ed5329136b7fb4f52fb81a922 100644
|
||||
index 355c46f1c1f08072446f3cc92c0d22898933a7fc..cbf7df30a7ec8445c8492e3b9f108747dbe1717b 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -92,5 +92,11 @@ public interface UnsafeValues {
|
||||
@@ -101,5 +101,11 @@ public interface UnsafeValues {
|
||||
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
|
||||
}
|
||||
@@ -45,11 +45,11 @@ index 4de959bbd1270d7d6ea8e5e69521bcca6abe2138..1aa58c59e1e8738bbdc77752885ff3b1
|
||||
if (plugin.getDescription().getProvides().size() > 0) {
|
||||
pluginList.append(" (").append(String.join(", ", plugin.getDescription().getProvides())).append(")");
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index 47b306929654855944b1e95f81c641dea6102096..922bb2cbfaf1e4cd111b7ad286c867c4d9f47e05 100644
|
||||
index 032ed2aba7d47144d241d616ba27489ce22d6fea..e98934d32b8dac88b3c3fd14ea5d726872212807 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -306,7 +306,14 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
Validate.isTrue(plugin instanceof JavaPlugin, "Plugin is not associated with this PluginLoader");
|
||||
Preconditions.checkArgument(plugin instanceof JavaPlugin, "Plugin is not associated with this PluginLoader");
|
||||
|
||||
if (!plugin.isEnabled()) {
|
||||
- plugin.getLogger().info("Enabling " + plugin.getDescription().getFullName());
|
||||
|
||||
@@ -73,20 +73,25 @@ index 0000000000000000000000000000000000000000..9ce2948dfaa56d0adf53fe9b6117a90d
|
||||
+}
|
||||
+
|
||||
diff --git a/src/main/java/org/bukkit/entity/SkeletonHorse.java b/src/main/java/org/bukkit/entity/SkeletonHorse.java
|
||||
index b2c6b6a8689f6bd6ce784bbe6f571f756dd700c1..ba9983463263f77db3d3487bc12f01db4508a32b 100644
|
||||
index a34ad28fc43bde224c39253e8479bf7bb7e8df1c..38539d5b77e06865aa65b8db0c1a3b6eaa914d03 100644
|
||||
--- a/src/main/java/org/bukkit/entity/SkeletonHorse.java
|
||||
+++ b/src/main/java/org/bukkit/entity/SkeletonHorse.java
|
||||
@@ -3,4 +3,12 @@ package org.bukkit.entity;
|
||||
/**
|
||||
* Represents a SkeletonHorse - variant of {@link AbstractHorse}.
|
||||
*/
|
||||
-public interface SkeletonHorse extends AbstractHorse { }
|
||||
+public interface SkeletonHorse extends AbstractHorse {
|
||||
+ // Paper start
|
||||
+ int getTrapTime();
|
||||
@@ -43,4 +43,18 @@ public interface SkeletonHorse extends AbstractHorse {
|
||||
* @param trapTime new trap time
|
||||
*/
|
||||
void setTrapTime(int trapTime);
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * @deprecated use {@link #isTrapped()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ boolean isTrap();
|
||||
+
|
||||
+ /**
|
||||
+ * @deprecated use {@link #setTrapped(boolean)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ void setTrap(boolean trap);
|
||||
+ // Paper end
|
||||
+}
|
||||
}
|
||||
Loaded 100 of 2261 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user