Compare commits
563
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbc57469ab | ||
|
|
f9e368621d | ||
|
|
4675152f49 | ||
|
|
274e54ba58 | ||
|
|
8cafc07297 | ||
|
|
e289accb03 | ||
|
|
2553f30153 | ||
|
|
75d04e9b04 | ||
|
|
23860da6c2 | ||
|
|
8a3980c60b | ||
|
|
0cdce89d59 | ||
|
|
15a0de2eef | ||
|
|
43c343228e | ||
|
|
bffb08c2f9 | ||
|
|
6592fed511 | ||
|
|
aa6c4c11e5 | ||
|
|
f78d7ce8ff | ||
|
|
44057da467 | ||
|
|
230682d51b | ||
|
|
487109fddc | ||
|
|
8493340be4 | ||
|
|
0b218903a8 | ||
|
|
1865625d95 | ||
|
|
5bb30ce95b | ||
|
|
3e4eaf2188 | ||
|
|
415d7081d2 | ||
|
|
a81a384303 | ||
|
|
5bdfb29ba1 | ||
|
|
c6fac381ed | ||
|
|
8b1ac39e89 | ||
|
|
52849f6da6 | ||
|
|
b1faa5d5f4 | ||
|
|
b3cac042c1 | ||
|
|
29350674b3 | ||
|
|
8cf2503804 | ||
|
|
996d529fb3 | ||
|
|
b974a6b6f3 | ||
|
|
acc6d012b0 | ||
|
|
c1ac98328c | ||
|
|
90fe0d58a5 | ||
|
|
489bff9bbd | ||
|
|
71a1787f6c | ||
|
|
3a5c6f8cee | ||
|
|
a3e4d1aa36 | ||
|
|
4b0bc74c90 | ||
|
|
00331d943e | ||
|
|
2f4281e2b4 | ||
|
|
e57af7d01e | ||
|
|
44ee1cd05e | ||
|
|
852c1c236d | ||
|
|
3e1c5e3eb0 | ||
|
|
e4d184f39d | ||
|
|
3e9d2ac5f2 | ||
|
|
f613437019 | ||
|
|
2f5bb7e306 | ||
|
|
1a4778d260 | ||
|
|
5509610db5 | ||
|
|
7e5dd92f9f | ||
|
|
69ce9276e4 | ||
|
|
72f7945e77 | ||
|
|
e87240b674 | ||
|
|
a2ba45239c | ||
|
|
99b735c1ac | ||
|
|
a702a083cd | ||
|
|
adb4fb4bd3 | ||
|
|
29a0209575 | ||
|
|
08c0b488b9 | ||
|
|
cfe311d7a5 | ||
|
|
431e6418ab | ||
|
|
02cfaa8ff8 | ||
|
|
5eec4ec3bf | ||
|
|
f36bb59739 | ||
|
|
6573d9555d | ||
|
|
9d21a88218 | ||
|
|
bb1c0dd6fa | ||
|
|
f6969b6374 | ||
|
|
38376f43a0 | ||
|
|
c4ba28a21a | ||
|
|
0f69290f07 | ||
|
|
4cdbb0c86c | ||
|
|
1765917a6f | ||
|
|
fe54a13b13 | ||
|
|
b3b961f9d5 | ||
|
|
c207429b21 | ||
|
|
298c47857b | ||
|
|
3cf03fc31a | ||
|
|
5cbce366b2 | ||
|
|
5923b7d085 | ||
|
|
e284bb1215 | ||
|
|
7a00758b1b | ||
|
|
11138a770e | ||
|
|
8b9e3dcd9e | ||
|
|
866d2d9f4a | ||
|
|
025c5d7a28 | ||
|
|
ea56138b30 | ||
|
|
5dca26ce54 | ||
|
|
84556f3cda | ||
|
|
38dc3b25d8 | ||
|
|
8d922746d9 | ||
|
|
2ec643a53c | ||
|
|
6be43952eb | ||
|
|
9624451ffd | ||
|
|
b561a12078 | ||
|
|
9c126fd2a9 | ||
|
|
38b7565d9e | ||
|
|
8b512e3466 | ||
|
|
9df2066642 | ||
|
|
4c17176c77 | ||
|
|
a353f4d207 | ||
|
|
a50d7c340b | ||
|
|
02807238c4 | ||
|
|
d23c4a50e6 | ||
|
|
b3ec8bd8ae | ||
|
|
81c5901c67 | ||
|
|
47aeab84ad | ||
|
|
915bb9220e | ||
|
|
6af97e11b6 | ||
|
|
d259503c92 | ||
|
|
ea01aa335a | ||
|
|
e88856dd75 | ||
|
|
896aa8b54a | ||
|
|
ead3ddba32 | ||
|
|
603c33df06 | ||
|
|
1ebaffacf5 | ||
|
|
f4d8a64094 | ||
|
|
63a1b0c137 | ||
|
|
a91e19f1df | ||
|
|
8baf510f92 | ||
|
|
ac7e4ad35e | ||
|
|
3aa8e7ef3f | ||
|
|
4875ee4814 | ||
|
|
32d9c6684b | ||
|
|
772fb3e385 | ||
|
|
2617c927a0 | ||
|
|
e5bd562d28 | ||
|
|
452009bbde | ||
|
|
574bc968d3 | ||
|
|
95a31de306 | ||
|
|
af1090259a | ||
|
|
74094edf08 | ||
|
|
662b6c5ca8 | ||
|
|
79fef73926 | ||
|
|
00d82983bd | ||
|
|
2cb3a1a3dc | ||
|
|
fc84aee124 | ||
|
|
2cee84193c | ||
|
|
a62835bbb1 | ||
|
|
24fd5aea0c | ||
|
|
2bc818efd4 | ||
|
|
78a003ee89 | ||
|
|
7b29d1f4c5 | ||
|
|
ef6a41195d | ||
|
|
a27262375c | ||
|
|
c60dd35989 | ||
|
|
7ebfdd5e6d | ||
|
|
91671751e7 | ||
|
|
20253f478f | ||
|
|
2b72b74a36 | ||
|
|
b6e46e90cd | ||
|
|
6267e26420 | ||
|
|
773dd72446 | ||
|
|
3fd1502717 | ||
|
|
1b1c23010a | ||
|
|
581b683931 | ||
|
|
a856073368 | ||
|
|
ba0e1f54b9 | ||
|
|
3cec9c985f | ||
|
|
d8af99a82c | ||
|
|
064fb50cc1 | ||
|
|
06a741d713 | ||
|
|
e312ebb1bd | ||
|
|
ede9c06814 | ||
|
|
0c8e84c20d | ||
|
|
deb92c2129 | ||
|
|
83cfeb1b37 | ||
|
|
99b311de54 | ||
|
|
eb60bffa98 | ||
|
|
29d1c7b602 | ||
|
|
7145f41b6e | ||
|
|
6378792a99 | ||
|
|
e68fd7162a | ||
|
|
eea0c649ca | ||
|
|
1c15111f08 | ||
|
|
517f8fbbac | ||
|
|
fb06829845 | ||
|
|
c9cd94f3c6 | ||
|
|
e2b197132d | ||
|
|
72e87abc2d | ||
|
|
33bec7f20a | ||
|
|
471f4de9c4 | ||
|
|
39953cf08d | ||
|
|
b4e3b3d1dd | ||
|
|
b8edb0e130 | ||
|
|
0c0a480d82 | ||
|
|
0e622c79fa | ||
|
|
7d13b7066c | ||
|
|
6813244fb0 | ||
|
|
6f30f08b20 | ||
|
|
e552bebca1 | ||
|
|
0c8882f7f9 | ||
|
|
b45ecc93c1 | ||
|
|
b8a0049207 | ||
|
|
7a1863ed78 | ||
|
|
a751001ed1 | ||
|
|
fcc5f232f9 | ||
|
|
9cbad8ebbf | ||
|
|
3716832282 | ||
|
|
a712766995 | ||
|
|
7386a13642 | ||
|
|
9395aa6079 | ||
|
|
0c7385b569 | ||
|
|
27d39cac4f | ||
|
|
fed9042390 | ||
|
|
e3f29f4345 | ||
|
|
b29ecd4c22 | ||
|
|
2be57c6943 | ||
|
|
97b9c4a2a4 | ||
|
|
35ef0537be | ||
|
|
281855c877 | ||
|
|
af6142eab3 | ||
|
|
00a68b1efe | ||
|
|
7232506c22 | ||
|
|
1b96c64620 | ||
|
|
5bf82aa136 | ||
|
|
88891c37b1 | ||
|
|
1259b93ba6 | ||
|
|
990765bd08 | ||
|
|
45ba65283f | ||
|
|
f43a19c275 | ||
|
|
d928dda91d | ||
|
|
bd67b83fd0 | ||
|
|
ed8401c748 | ||
|
|
5b34a09ed0 | ||
|
|
67a1a8caf8 | ||
|
|
d12916255a | ||
|
|
666a2147a7 | ||
|
|
2bd6ba2c63 | ||
|
|
fd4f0c7741 | ||
|
|
eb8f2bb2a1 | ||
|
|
307d05bba8 | ||
|
|
ea1f33cf9a | ||
|
|
73af2d4cea | ||
|
|
47b805fdf1 | ||
|
|
6520ca1c47 | ||
|
|
a73ed9572e | ||
|
|
93829bba5a | ||
|
|
23c44c2b8d | ||
|
|
02338e5069 | ||
|
|
1dfdbef42b | ||
|
|
2df309bd49 | ||
|
|
29aaf7bc24 | ||
|
|
20a71c58d3 | ||
|
|
3b4839ee32 | ||
|
|
3c41f8f0b3 | ||
|
|
9bc70e6888 | ||
|
|
4179b8f3fa | ||
|
|
98c567fe6f | ||
|
|
a2002a76b8 | ||
|
|
93cf3eb832 | ||
|
|
9ffccd6430 | ||
|
|
408a9050ba | ||
|
|
ef2b574c6a | ||
|
|
5274ad672b | ||
|
|
d6d2b6f4e5 | ||
|
|
8fe8ca6658 | ||
|
|
31358d5e48 | ||
|
|
508a295b44 | ||
|
|
2fa8efce9b | ||
|
|
69a801305d | ||
|
|
2c55dd86ff | ||
|
|
13c9d3c423 | ||
|
|
81619a652e | ||
|
|
f402f89a67 | ||
|
|
6c7e3c5193 | ||
|
|
7d1cc6d409 | ||
|
|
a40e48f3fd | ||
|
|
1837f6c677 | ||
|
|
b14979e352 | ||
|
|
aa93dcfdce | ||
|
|
42830546f3 | ||
|
|
e19177a2c3 | ||
|
|
2c54b3949f | ||
|
|
d8b8f61961 | ||
|
|
383f0ed924 | ||
|
|
24d690fe7e | ||
|
|
46a36d3b28 | ||
|
|
2f8d9db58c | ||
|
|
b1334b5105 | ||
|
|
c016e039a5 | ||
|
|
40adc2345b | ||
|
|
c793bd93be | ||
|
|
b533905cc3 | ||
|
|
fe780d041e | ||
|
|
de3f149185 | ||
|
|
22ed60c101 | ||
|
|
aefb73c234 | ||
|
|
ece4fd3597 | ||
|
|
836586d59b | ||
|
|
92bc19b049 | ||
|
|
1f8ca77bb6 | ||
|
|
a60eeb85f5 | ||
|
|
a3c760e6af | ||
|
|
f9473d9928 | ||
|
|
b3dc7a3b4b | ||
|
|
805fdd83b3 | ||
|
|
6b325cd6a9 | ||
|
|
5de0f8ac48 | ||
|
|
e105354330 | ||
|
|
d7d3f6371e | ||
|
|
48ea66e97f | ||
|
|
dadd8b5a7c | ||
|
|
12c970097d | ||
|
|
c0936a71bd | ||
|
|
4356758b64 | ||
|
|
171ba7ccf3 | ||
|
|
e16fefb443 | ||
|
|
f2c1e1366a | ||
|
|
fead63e2ea | ||
|
|
225c95025b | ||
|
|
437e8da700 | ||
|
|
2c9c5e4662 | ||
|
|
82cd69fcf4 | ||
|
|
e4b40ddc22 | ||
|
|
8582999344 | ||
|
|
cf0f013f53 | ||
|
|
7103f813bc | ||
|
|
3f6c4b07ac | ||
|
|
990be1691b | ||
|
|
e8bec64217 | ||
|
|
b34d4ecd2e | ||
|
|
aea9cdd37d | ||
|
|
206dd3af05 | ||
|
|
b1696788d6 | ||
|
|
c613877e54 | ||
|
|
3756f5bbf5 | ||
|
|
1f5bec71f3 | ||
|
|
b1fe756b73 | ||
|
|
d6d4c78e7d | ||
|
|
976b95c74c | ||
|
|
275173e538 | ||
|
|
873533b129 | ||
|
|
faf9a65b62 | ||
|
|
072b78a713 | ||
|
|
3a0373901e | ||
|
|
c1ea5502d4 | ||
|
|
38856661c0 | ||
|
|
a226f44b45 | ||
|
|
f5551380b3 | ||
|
|
3f237e869a | ||
|
|
02e3b5a91a | ||
|
|
17966ddb8e | ||
|
|
f6139de06c | ||
|
|
81834ac54a | ||
|
|
fa674f3d35 | ||
|
|
b134eb406a | ||
|
|
41e6f20420 | ||
|
|
f7b386ddc7 | ||
|
|
8bc0574fb8 | ||
|
|
bae6096aa2 | ||
|
|
837cc25c51 | ||
|
|
62262d73d2 | ||
|
|
2e363c73ba | ||
|
|
c287e921a9 | ||
|
|
b48e2e352e | ||
|
|
2d09115b3a | ||
|
|
87dfff4cfa | ||
|
|
de19eb8c4a | ||
|
|
f8cfdd4ba9 | ||
|
|
eb0693fff7 | ||
|
|
f4dfdcbb5b | ||
|
|
3722877c3c | ||
|
|
e2e874f549 | ||
|
|
bc3496ea58 | ||
|
|
3d06377b24 | ||
|
|
2ffb704efa | ||
|
|
dc30ee591d | ||
|
|
0284b272d3 | ||
|
|
648c000fb2 | ||
|
|
4b5f84712b | ||
|
|
4e3febbfe0 | ||
|
|
f9fc44ff9f | ||
|
|
9ebf75d894 | ||
|
|
c9e125f62a | ||
|
|
9ada4bd7af | ||
|
|
ea9fdc393c | ||
|
|
0d969f0a1b | ||
|
|
82c64790f4 | ||
|
|
e829a9d8f3 | ||
|
|
6d74ad155f | ||
|
|
03c3587e2e | ||
|
|
ccb194bbbb | ||
|
|
3621d76d8f | ||
|
|
21f2d158c4 | ||
|
|
c9eb393d18 | ||
|
|
04509f0234 | ||
|
|
8ce5219e07 | ||
|
|
e325e37268 | ||
|
|
59060aaec3 | ||
|
|
9d428792c4 | ||
|
|
aed9ef0788 | ||
|
|
318a08c1db | ||
|
|
a0a2e7287c | ||
|
|
c1def9d852 | ||
|
|
57a592466d | ||
|
|
efb4197a1b | ||
|
|
902691b636 | ||
|
|
619d7c93d8 | ||
|
|
cc491a396e | ||
|
|
3fe0e32495 | ||
|
|
f0aea8123e | ||
|
|
0a9e232f48 | ||
|
|
7002799587 | ||
|
|
37e689f367 | ||
|
|
034edecc37 | ||
|
|
b4ae928db9 | ||
|
|
870dafe358 | ||
|
|
1a0280ccc0 | ||
|
|
f80338725e | ||
|
|
a6628220d3 | ||
|
|
ad4eb2ec7d | ||
|
|
4af62f6d1d | ||
|
|
0cc83ea9b6 | ||
|
|
2873869bb1 | ||
|
|
1c12701691 | ||
|
|
d5682d77c3 | ||
|
|
aa1c25c88d | ||
|
|
bab0b3a7c3 | ||
|
|
b05cd80334 | ||
|
|
605e66c5de | ||
|
|
91b45c49ce | ||
|
|
6d118492b6 | ||
|
|
74ad522fc5 | ||
|
|
819facd7c4 | ||
|
|
0c4a1c4496 | ||
|
|
de18bb96e8 | ||
|
|
20aaebbd47 | ||
|
|
13ab8b77d3 | ||
|
|
47c5d82017 | ||
|
|
1eba407610 | ||
|
|
236eabd751 | ||
|
|
c13b259ff2 | ||
|
|
ac1a626493 | ||
|
|
0ca9f14d58 | ||
|
|
b1a2378144 | ||
|
|
f0889559f3 | ||
|
|
c31a22c563 | ||
|
|
44e22b45a5 | ||
|
|
0b8147f68e | ||
|
|
8f7a7ec440 | ||
|
|
e09a44e169 | ||
|
|
3c8e176265 | ||
|
|
838d8afd76 | ||
|
|
c1f313b273 | ||
|
|
7f384988cd | ||
|
|
3fed7289ed | ||
|
|
94aa4b518a | ||
|
|
0ed49782c5 | ||
|
|
474a02835d | ||
|
|
01f5831171 | ||
|
|
197786ead0 | ||
|
|
c1bbde4bc6 | ||
|
|
3fbb00319f | ||
|
|
965cf53cd5 | ||
|
|
bc4a6647c9 | ||
|
|
175a774247 | ||
|
|
14cfd64d2d | ||
|
|
d8e07590e3 | ||
|
|
956062a5d5 | ||
|
|
d8d3bd70b0 | ||
|
|
8a18fc55ab | ||
|
|
bacbf86ed2 | ||
|
|
2eda177116 | ||
|
|
ea0b63992c | ||
|
|
fa8fa1ce08 | ||
|
|
0f91091ccc | ||
|
|
f9f90791e4 | ||
|
|
90a0835f43 | ||
|
|
bcd8dc2c11 | ||
|
|
b6817605ce | ||
|
|
a61b4845f2 | ||
|
|
4ba5aacc37 | ||
|
|
5b66d33a77 | ||
|
|
f8603a46a8 | ||
|
|
57fdc668fa | ||
|
|
ab7bc3fb34 | ||
|
|
9daa019d6c | ||
|
|
1edfefdef8 | ||
|
|
efd47e3a68 | ||
|
|
688409279f | ||
|
|
1d4c7806ff | ||
|
|
813d0399f9 | ||
|
|
9846d0d89e | ||
|
|
83da4b6101 | ||
|
|
4f9575eed8 | ||
|
|
bcec5b11e6 | ||
|
|
f4ce997a42 | ||
|
|
2cccbbe1f4 | ||
|
|
936205beae | ||
|
|
5c4671a9bf | ||
|
|
8e3009e0db | ||
|
|
f7717c3712 | ||
|
|
beed22d336 | ||
|
|
dd216c1f09 | ||
|
|
6d2121efde | ||
|
|
23a443eeaa | ||
|
|
8d040fad9b | ||
|
|
bd35d605e8 | ||
|
|
e338793603 | ||
|
|
5ffdff8822 | ||
|
|
e811927394 | ||
|
|
8be7a60b76 | ||
|
|
ab72b123ec | ||
|
|
058d7c1aa3 | ||
|
|
b626528da0 | ||
|
|
f8d2f823db | ||
|
|
6a7fef0e4a | ||
|
|
f8c01122e6 | ||
|
|
9cda28480e | ||
|
|
b5ce6e3dc5 | ||
|
|
29b17a892d | ||
|
|
ad6c14c62e | ||
|
|
e9f6e7ae8a | ||
|
|
f5677aa472 | ||
|
|
3c8c22323f | ||
|
|
dab4864a11 | ||
|
|
9b77660f07 | ||
|
|
9367e6e6b3 | ||
|
|
e6ef1bae88 | ||
|
|
497b91939c | ||
|
|
641dafd0a8 | ||
|
|
08491449ae | ||
|
|
9893e2b734 | ||
|
|
1d2fe64da8 | ||
|
|
50e683de14 | ||
|
|
dc08c74cb3 | ||
|
|
5fb3ab0109 | ||
|
|
1704bf782e | ||
|
|
7a96bf2095 | ||
|
|
11ab383e4f | ||
|
|
06fdc02537 | ||
|
|
bf92f3e4db | ||
|
|
cbcdfd03e7 | ||
|
|
ef5fa90932 | ||
|
|
a13759afcc | ||
|
|
32875b429a | ||
|
|
5c78e77da5 | ||
|
|
9940019ff8 | ||
|
|
ce2a36dbd6 | ||
|
|
bd62f2c2dd | ||
|
|
fbf74ba0ac | ||
|
|
a622ebacd4 | ||
|
|
d5abb94e69 | ||
|
|
38be4f873b | ||
|
|
a0f548f5ec | ||
|
|
23b0ef524a | ||
|
|
9087a644a3 | ||
|
|
92f872c146 | ||
|
|
e8b82590d0 | ||
|
|
7af4cd3647 | ||
|
|
c7520ec49d | ||
|
|
ff603cb76d | ||
|
|
7929540ba3 | ||
|
|
83948f6f59 |
No files matched your search
@@ -4,6 +4,10 @@ end_of_line=lf
|
||||
insert_final_newline=true
|
||||
indent_style=space
|
||||
indent_size=4
|
||||
ij_any_block_comment_add_space = false
|
||||
ij_any_block_comment_at_first_column = false
|
||||
ij_any_line_comment_at_first_column = false
|
||||
ij_any_line_comment_add_space = true
|
||||
|
||||
[*.tiny]
|
||||
indent_style=tab
|
||||
@@ -16,3 +20,18 @@ indent_size=2
|
||||
|
||||
[*.patch]
|
||||
trim_trailing_whitespace=false
|
||||
|
||||
[*.java]
|
||||
ij_continuation_indent_size = 4
|
||||
ij_java_class_count_to_use_import_on_demand = 999999
|
||||
ij_java_insert_inner_class_imports = false
|
||||
ij_java_names_count_to_use_import_on_demand = 999999
|
||||
ij_java_imports_layout = *,|,$*
|
||||
ij_java_generate_final_locals = true
|
||||
ij_java_generate_final_parameters = true
|
||||
|
||||
[test-plugin/**/*.java]
|
||||
ij_java_use_fq_class_names = false
|
||||
|
||||
[Paper-Server/src/main/resources/data/**/*.json]
|
||||
indent_size = 2
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
* text=auto
|
||||
* text=auto eol=lf
|
||||
|
||||
*.sh text eol=lf
|
||||
gradlew text eol=lf
|
||||
|
||||
@@ -68,7 +68,7 @@ body:
|
||||
value: |
|
||||
Before submitting this issue, please ensure the following:
|
||||
|
||||
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads).
|
||||
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads/paper).
|
||||
2. You searched for and ensured there isn't already an open issue regarding this.
|
||||
3. Your version of Minecraft is supported by Paper.
|
||||
|
||||
|
||||
@@ -79,6 +79,6 @@ body:
|
||||
value: |
|
||||
Before submitting this issue, please ensure the following:
|
||||
|
||||
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads).
|
||||
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads/paper).
|
||||
2. You searched for and ensured there isn't already an open issue regarding this.
|
||||
3. Your version of Minecraft is supported by Paper.
|
||||
@@ -68,7 +68,7 @@ body:
|
||||
value: |
|
||||
Before submitting this issue, please ensure the following:
|
||||
|
||||
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads).
|
||||
1. You are running the latest version of Paper from [our downloads page](https://papermc.io/downloads/paper).
|
||||
2. Your version of Minecraft is supported by Paper.
|
||||
|
||||
If your server crash log contains `DO NOT REPORT THIS TO PAPER`, please ask in our
|
||||
|
||||
@@ -26,10 +26,13 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: JDK ${{ matrix.java }}
|
||||
uses: actions/setup-java@v3.6.0
|
||||
uses: actions/setup-java@v3.11.0
|
||||
with:
|
||||
java-version: ${{ matrix.java }}
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Validate Gradle wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
- name: Setup Gradle
|
||||
uses: gradle/gradle-build-action@v2
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
name: Update Projects
|
||||
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- labeled
|
||||
- unlabeled
|
||||
- closed
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
bugs:
|
||||
if: "github.event_name == 'issues' && contains(github.event.*.labels.*.name, 'type: bug')"
|
||||
concurrency:
|
||||
group: update-bugs-project-${{ github.event.issue.number }}
|
||||
cancel-in-progress: true
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "authenticate"
|
||||
id: "authenticate"
|
||||
uses: "tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92" # v1
|
||||
with:
|
||||
app_id: "${{ secrets.PROJECTS_APP_ID }}"
|
||||
installation_id: "36153445"
|
||||
private_key: "${{ secrets.PROJECTS_PRIVATE_KEY }}"
|
||||
|
||||
- uses: PaperMC/update-projects-action@v0.2.0
|
||||
name: Update open issue
|
||||
if: github.event.issue.state == 'open'
|
||||
with:
|
||||
github-token: "${{ steps.authenticate.outputs.token }}"
|
||||
project-url: https://github.com/orgs/PaperMC/projects/5/views/2
|
||||
column-field: Status
|
||||
label-to-column-map: |
|
||||
{
|
||||
"status: needs triage": "🕑 Needs Triage",
|
||||
"status: accepted": "✅ Accepted",
|
||||
"status: unlikely": "✅ Accepted",
|
||||
"status: in progress": "Needs Work",
|
||||
"status: rebase required": "Needs Work",
|
||||
"status: blocked": "Needs Work",
|
||||
"status: defer upstream": "Needs Work",
|
||||
"status: input wanted": "Needs Work",
|
||||
"we must go deeper": "Needs Work",
|
||||
"has rough edges": "Needs Work",
|
||||
"status: waiting on reporter": "⌛ Waiting for Reporter",
|
||||
"resolution: works-as-intended": "Invalid",
|
||||
"resolution: invalid": "Invalid",
|
||||
"resolution: wontfix": "Invalid",
|
||||
"resolution: duplicate": "Invalid",
|
||||
"resolution: cannot reproduce": "Invalid",
|
||||
"resolution: unsupported": "Invalid",
|
||||
"resolution: incomplete": "Invalid",
|
||||
"resolution: superseded": "Invalid"
|
||||
}
|
||||
|
||||
- uses: PaperMC/update-projects-action@v0.2.0
|
||||
name: Update closed issue
|
||||
if: github.event.issue.state == 'closed'
|
||||
with:
|
||||
github-token: "${{ steps.authenticate.outputs.token }}"
|
||||
project-url: https://github.com/orgs/PaperMC/projects/5/views/2
|
||||
column-field: Status
|
||||
clear-on-no-match: false
|
||||
# include "status: needs triage" below to catch any closed issues without setting a resolution
|
||||
label-to-column-map: |
|
||||
{
|
||||
"status: accepted": "Done",
|
||||
"status: needs triage": "Invalid",
|
||||
"resolution: works-as-intended": "Invalid",
|
||||
"resolution: invalid": "Invalid",
|
||||
"resolution: wontfix": "Invalid",
|
||||
"resolution: duplicate": "Invalid",
|
||||
"resolution: cannot reproduce": "Invalid",
|
||||
"resolution: unsupported": "Invalid",
|
||||
"resolution: incomplete": "Invalid",
|
||||
"resolution: superseded": "Invalid"
|
||||
}
|
||||
+1
-1
@@ -478,4 +478,4 @@ everything like usual.
|
||||
> in Windows like described here:
|
||||
> <https://docs.microsoft.com/en-us/windows/wsl/filesystems#view-your-current-directory-in-windows-file-explorer>
|
||||
|
||||
[MappingViewer]: https://nms.screamingsandals.org/
|
||||
[MappingViewer]: https://mappings.cephx.dev/
|
||||
@@ -55,4 +55,12 @@ TheFruxz <cedricspitzer@outlook.de>
|
||||
Kieran Wallbanks <kieran.wallbanks@gmail.com>
|
||||
Denery <dorofeevij@gmail.com>
|
||||
Jakubk15 <jakubk15@protonmail.com>
|
||||
Redned <redned235@gmail.com>
|
||||
Luke Chambers <consolelogluke@gmail.com>
|
||||
Emily <emilia.lopezf.1999@gmail.com>
|
||||
dawon <dawon@dawon.eu>
|
||||
Ollie <69084614+olijeffers0n@users.noreply.github.com>
|
||||
Oliwier Miodun <naczs@blueflow.pl>
|
||||
aerulion <aerulion@gmail.com>
|
||||
Lukas Planz <lukas.planz@web.de>
|
||||
```
|
||||
@@ -4,48 +4,47 @@ Paper [](https://opencollective.com/papermc)
|
||||
===========
|
||||
|
||||
High-performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.
|
||||
The most widely used, high-performance Minecraft server that aims to fix gameplay and mechanics inconsistencies.
|
||||
|
||||
|
||||
**Support and Project Discussion:**
|
||||
- [Our forums](https://forums.papermc.io/), [Discord](https://discord.gg/papermc), or [IRC](https://webchat.esper.net/?channels=paper)
|
||||
- [Our forums](https://forums.papermc.io/), [Discord](https://discord.gg/papermc), or [IRC](https://webchat.esper.net/?channels=paper)
|
||||
|
||||
How To (Server Admins)
|
||||
------
|
||||
Paperclip is a jar file that you can download and run just like a normal jar file.
|
||||
|
||||
Download Paper from our [downloads page](https://papermc.io/downloads).
|
||||
Download Paper from our [downloads page](https://papermc.io/downloads/paper).
|
||||
|
||||
Run the Paperclip jar directly from your server. Just like old times
|
||||
|
||||
* 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)
|
||||
* 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)
|
||||
------
|
||||
* See our API patches [here](patches/api)
|
||||
* See upcoming, pending, and recently added API [here](https://github.com/PaperMC/Paper/projects/6)
|
||||
* Paper API javadocs here: [papermc.io/javadocs](https://papermc.io/javadocs/)
|
||||
* Maven Repo (for paper-api):
|
||||
* See our API patches [here](patches/api)
|
||||
* See upcoming, pending, and recently added API [here](https://github.com/orgs/PaperMC/projects/2/views/4)
|
||||
* Paper API javadocs here: [papermc.io/javadocs](https://papermc.io/javadocs/)
|
||||
#### Repository (for paper-api)
|
||||
##### Maven
|
||||
|
||||
```xml
|
||||
<repository>
|
||||
<id>papermc</id>
|
||||
<url>https://repo.papermc.io/repository/maven-public/</url>
|
||||
</repository>
|
||||
```
|
||||
* Artifact Information:
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.19.4-R0.1-SNAPSHOT</version>
|
||||
<version>1.20.2-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
**Or alternatively, with Gradle:**
|
||||
|
||||
* Repository:
|
||||
```
|
||||
##### Gradle
|
||||
```kotlin
|
||||
repositories {
|
||||
maven {
|
||||
@@ -54,7 +53,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
|
||||
compileOnly("io.papermc.paper:paper-api:1.20.2-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
java {
|
||||
@@ -76,9 +75,9 @@ See [Contributing](CONTRIBUTING.md)
|
||||
|
||||
Support Us
|
||||
------
|
||||
First of all, thank you for considering helping out, we really appreciate that!
|
||||
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 financially 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.
|
||||
|
||||
|
||||
@@ -8,4 +8,8 @@
|
||||
# To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId:
|
||||
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
|
||||
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
|
||||
# To import minecraft data files, like the default chat type, use `mc_data` as the prefix:
|
||||
# mc_data chat_type/chat.json
|
||||
# mc_data dimension_type/overworld.json
|
||||
#
|
||||
|
||||
@@ -12,3 +12,7 @@ public net.minecraft.server.MinecraftServer doRunTask(Lnet/minecraft/server/Tick
|
||||
# AT remap issue? todo 1.18
|
||||
public net.minecraft.world.level.dimension.end.EndDragonFight findExitPortal()Lnet/minecraft/world/level/block/state/pattern/BlockPattern$BlockPatternMatch;
|
||||
public net.minecraft.nbt.TagParser readArrayTag()Lnet/minecraft/nbt/Tag;
|
||||
|
||||
# TODO 1.20 remapSpigotAt.at doesn't remap the return type for this method for some reason
|
||||
public net/minecraft/world/entity/Display$TextDisplay getText()Lnet/minecraft/network/chat/Component;
|
||||
public net/minecraft/world/entity/Display$BlockDisplay getBlockState()Lnet/minecraft/world/level/block/state/BlockState;
|
||||
@@ -14,22 +14,15 @@ tiny 2 0 mojang+yarn spigot
|
||||
|
||||
# CraftBukkit changes type
|
||||
c net/minecraft/server/level/ServerLevel net/minecraft/server/level/WorldServer
|
||||
f Lnet/minecraft/world/level/storage/PrimaryLevelData; serverLevelData J
|
||||
f Lnet/minecraft/world/level/storage/PrimaryLevelData; serverLevelData K
|
||||
|
||||
c net/minecraft/world/level/chunk/LevelChunk net/minecraft/world/level/chunk/Chunk
|
||||
f Lnet/minecraft/server/level/ServerLevel; level q
|
||||
f Lnet/minecraft/server/level/ServerLevel; level r
|
||||
|
||||
# See mappings-patch.tiny
|
||||
c net/minecraft/server/level/ChunkMap net/minecraft/server/level/PlayerChunkMap
|
||||
f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager G
|
||||
f Lnet/minecraft/server/level/ChunkMap$ChunkDistanceManager; distanceManager F
|
||||
|
||||
# Paper changes type
|
||||
c net/minecraft/core/MappedRegistry net/minecraft/core/RegistryMaterials
|
||||
f Lit/unimi/dsi/fastutil/objects/Reference2IntOpenHashMap; toId e
|
||||
|
||||
# upstream makes a bunch of methods public that cause accidental overrides now
|
||||
c net/minecraft/world/entity/Display net/minecraft/world/entity/Display
|
||||
m ()I getInterpolationDelay getInterpolationDelay_
|
||||
m (I)V setInterpolationDelay setInterpolationDelay_
|
||||
m (I)V setInterpolationDuration setInterpolationDuration_
|
||||
|
||||
+12
-7
@@ -4,8 +4,8 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
plugins {
|
||||
java
|
||||
`maven-publish`
|
||||
id("com.github.johnrengelman.shadow") version "8.1.0" apply false
|
||||
id("io.papermc.paperweight.core") version "1.5.3"
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
||||
id("io.papermc.paperweight.core") version "1.5.9"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
@@ -61,11 +61,11 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
paramMappings("net.fabricmc:yarn:1.19.4+build.1:mergedv2")
|
||||
remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
|
||||
paramMappings("net.fabricmc:yarn:1.20.2+build.1:mergedv2")
|
||||
remapper("net.fabricmc:tiny-remapper:0.8.10:fat")
|
||||
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
|
||||
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.6")
|
||||
paperclip("io.papermc:paperclip:3.0.2")
|
||||
paperclip("io.papermc:paperclip:3.0.3")
|
||||
}
|
||||
|
||||
paperweight {
|
||||
@@ -131,10 +131,15 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
// Uncomment while updating for a new Minecraft version
|
||||
/*
|
||||
tasks.collectAtsFromPatches {
|
||||
// Uncomment while updating for a new Minecraft version
|
||||
// extraPatchDir.set(layout.projectDirectory.dir("patches/unapplied/server"))
|
||||
extraPatchDir.set(layout.projectDirectory.dir("patches/unapplied/server"))
|
||||
}
|
||||
tasks.withType<io.papermc.paperweight.tasks.RebuildGitPatches> {
|
||||
filterPatches.set(false)
|
||||
}
|
||||
*/
|
||||
|
||||
tasks.register("printMinecraftVersion") {
|
||||
doLast {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
group=io.papermc.paper
|
||||
version=1.19.4-R0.1-SNAPSHOT
|
||||
mcVersion=1.19.4
|
||||
version=1.20.2-R0.1-SNAPSHOT
|
||||
mcVersion=1.20.2
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+2
-1
@@ -1,6 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -83,10 +83,8 @@ done
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -133,10 +131,13 @@ location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
@@ -197,6 +198,10 @@ if "$cygwin" || "$msys" ; then
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
|
||||
@@ -27,10 +27,10 @@ index 11038da2e071699d6561a331565db0c8d7850d0e..317acfec5894101294a55abff6181943
|
||||
+/.factorypath
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..17e8858e01d80c422947f507e9d77b7532788752
|
||||
index 0000000000000000000000000000000000000000..41e77b687df6480adf8f5e21daad105dab208df2
|
||||
--- /dev/null
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +1,82 @@
|
||||
@@ -0,0 +1,91 @@
|
||||
+plugins {
|
||||
+ `java-library`
|
||||
+ `maven-publish`
|
||||
@@ -41,26 +41,30 @@ index 0000000000000000000000000000000000000000..17e8858e01d80c422947f507e9d77b75
|
||||
+ withJavadocJar()
|
||||
+}
|
||||
+
|
||||
+val annotationsVersion = "24.0.1"
|
||||
+val bungeeCordChatVersion = "1.20-R0.1"
|
||||
+
|
||||
+dependencies {
|
||||
+ // api dependencies are listed transitively to API consumers
|
||||
+ api("com.google.guava:guava:31.1-jre")
|
||||
+ api("com.google.code.gson:gson:2.10")
|
||||
+ api("net.md-5:bungeecord-chat:1.16-R0.4")
|
||||
+ api("org.yaml:snakeyaml:1.33")
|
||||
+ api("com.google.guava:guava:32.1.2-jre")
|
||||
+ api("com.google.code.gson:gson:2.10.1")
|
||||
+ api("net.md-5:bungeecord-chat:$bungeeCordChatVersion")
|
||||
+ api("org.yaml:snakeyaml:2.2")
|
||||
+ api("org.joml:joml:1.10.5")
|
||||
+
|
||||
+ 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"
|
||||
+ val annotations = "org.jetbrains:annotations-java5:$annotationsVersion"
|
||||
+ 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.4")
|
||||
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
|
||||
+ testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
+ testImplementation("org.mockito:mockito-core:5.5.0")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.5")
|
||||
+}
|
||||
+
|
||||
+configure<PublishingExtension> {
|
||||
@@ -96,11 +100,12 @@ index 0000000000000000000000000000000000000000..17e8858e01d80c422947f507e9d77b75
|
||||
+ 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.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/",
|
||||
+ "https://guava.dev/releases/32.1.2-jre/api/docs/",
|
||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
|
||||
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
|
||||
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/",
|
||||
+ )
|
||||
+ options.tags("apiNote:a:API Note:")
|
||||
+
|
||||
+ // workaround for https://github.com/gradle/gradle/issues/4046
|
||||
+ inputs.dir("src/main/javadoc").withPropertyName("javadoc-sourceset")
|
||||
@@ -113,12 +118,16 @@ index 0000000000000000000000000000000000000000..17e8858e01d80c422947f507e9d77b75
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+tasks.test {
|
||||
+ useJUnitPlatform()
|
||||
+}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
deleted file mode 100644
|
||||
index 829ebece9d376cbade1422c58759540054fbedbe..0000000000000000000000000000000000000000
|
||||
index a464312b63bb62d196d6ec2d55ffcdc85ae4da67..0000000000000000000000000000000000000000
|
||||
--- a/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -1,261 +0,0 @@
|
||||
@@ -1,278 +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">
|
||||
@@ -126,7 +135,7 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000
|
||||
-
|
||||
- <groupId>org.spigotmc</groupId>
|
||||
- <artifactId>spigot-api</artifactId>
|
||||
- <version>1.19.4-R0.1-SNAPSHOT</version>
|
||||
- <version>1.20.2-R0.1-SNAPSHOT</version>
|
||||
- <packaging>jar</packaging>
|
||||
-
|
||||
- <name>Spigot-API</name>
|
||||
@@ -156,14 +165,14 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>com.google.guava</groupId>
|
||||
- <artifactId>guava</artifactId>
|
||||
- <version>31.1-jre</version>
|
||||
- <version>32.1.2-jre</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- bundled with Minecraft, should be kept in sync -->
|
||||
- <dependency>
|
||||
- <groupId>com.google.code.gson</groupId>
|
||||
- <artifactId>gson</artifactId>
|
||||
- <version>2.10</version>
|
||||
- <version>2.10.1</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- bundled with Minecraft, should be kept in sync -->
|
||||
@@ -176,14 +185,14 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>net.md-5</groupId>
|
||||
- <artifactId>bungeecord-chat</artifactId>
|
||||
- <version>1.16-R0.4</version>
|
||||
- <version>1.20-R0.1</version>
|
||||
- <type>jar</type>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.yaml</groupId>
|
||||
- <artifactId>snakeyaml</artifactId>
|
||||
- <version>1.33</version>
|
||||
- <version>2.2</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- not part of the API proper -->
|
||||
@@ -209,26 +218,32 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>org.jetbrains</groupId>
|
||||
- <artifactId>annotations-java5</artifactId>
|
||||
- <version>23.0.0</version>
|
||||
- <version>24.0.1</version>
|
||||
- <scope>provided</scope>
|
||||
- </dependency>
|
||||
- <!-- testing -->
|
||||
- <dependency>
|
||||
- <groupId>junit</groupId>
|
||||
- <artifactId>junit</artifactId>
|
||||
- <version>4.13.2</version>
|
||||
- <groupId>org.junit.jupiter</groupId>
|
||||
- <artifactId>junit-jupiter</artifactId>
|
||||
- <version>5.10.0</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.hamcrest</groupId>
|
||||
- <artifactId>hamcrest-library</artifactId>
|
||||
- <version>1.3</version>
|
||||
- <artifactId>hamcrest</artifactId>
|
||||
- <version>2.2</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.mockito</groupId>
|
||||
- <artifactId>mockito-core</artifactId>
|
||||
- <version>5.5.0</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.ow2.asm</groupId>
|
||||
- <artifactId>asm-tree</artifactId>
|
||||
- <version>9.4</version>
|
||||
- <version>9.5</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
@@ -238,7 +253,7 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>net.md-5</groupId>
|
||||
- <artifactId>scriptus</artifactId>
|
||||
- <version>0.4.1</version>
|
||||
- <version>0.5.0</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>initialize</phase>
|
||||
@@ -251,23 +266,25 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-compiler-plugin</artifactId>
|
||||
- <version>3.10.1</version>
|
||||
- <version>3.11.0</version>
|
||||
- <configuration>
|
||||
- <!-- we use the Eclipse compiler as it doesn't need a JDK -->
|
||||
- <compilerId>eclipse</compilerId>
|
||||
- <!-- default changed with version 3.11.0 -->
|
||||
- <showWarnings>false</showWarnings>
|
||||
- </configuration>
|
||||
- <dependencies>
|
||||
- <dependency>
|
||||
- <groupId>org.codehaus.plexus</groupId>
|
||||
- <artifactId>plexus-compiler-eclipse</artifactId>
|
||||
- <version>2.12.0</version>
|
||||
- <version>2.13.0</version>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
- </plugin>
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-jar-plugin</artifactId>
|
||||
- <version>3.2.2</version>
|
||||
- <version>3.3.0</version>
|
||||
- <configuration>
|
||||
- <archive>
|
||||
- <manifest>
|
||||
@@ -282,7 +299,7 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-shade-plugin</artifactId>
|
||||
- <version>3.4.1</version>
|
||||
- <version>3.5.0</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>package</phase>
|
||||
@@ -309,16 +326,25 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-javadoc-plugin</artifactId>
|
||||
- <version>3.4.0</version>
|
||||
- <version>3.5.0</version>
|
||||
- <configuration>
|
||||
- <links>
|
||||
- <link>https://guava.dev/releases/31.0.1-jre/api/docs/</link>
|
||||
- <link>https://javadoc.io/doc/org.yaml/snakeyaml/1.30/</link>
|
||||
- <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/</link>
|
||||
- <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/</link>
|
||||
- <link>https://guava.dev/releases/31.1-jre/api/docs/</link>
|
||||
- </links>
|
||||
- <tags>
|
||||
- <tag>
|
||||
- <name>apiNote</name>
|
||||
- <placement>a</placement>
|
||||
- <head>API Note:</head>
|
||||
- </tag>
|
||||
- </tags>
|
||||
- </configuration>
|
||||
- </plugin>
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-surefire-plugin</artifactId>
|
||||
- <version>3.1.0</version>
|
||||
- </plugin>
|
||||
- </plugins>
|
||||
- </build>
|
||||
-
|
||||
@@ -333,7 +359,7 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-checkstyle-plugin</artifactId>
|
||||
- <version>3.1.2</version>
|
||||
- <version>3.3.0</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>process-classes</phase>
|
||||
@@ -358,7 +384,7 @@ index 829ebece9d376cbade1422c58759540054fbedbe..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.codehaus.mojo</groupId>
|
||||
- <artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
- <version>1.21</version>
|
||||
- <version>1.23</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>process-classes</phase>
|
||||
|
||||
@@ -5,12 +5,12 @@ Subject: [PATCH] Build system changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 17e8858e01d80c422947f507e9d77b7532788752..82444d3b95881702910369ec5694dd9f327ad81a 100644
|
||||
index 41e77b687df6480adf8f5e21daad105dab208df2..d86ee6acb78d249424c5df98a851178c0f62eec1 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -15,15 +15,27 @@ dependencies {
|
||||
api("net.md-5:bungeecord-chat:1.16-R0.4")
|
||||
api("org.yaml:snakeyaml:1.33")
|
||||
@@ -18,15 +18,27 @@ dependencies {
|
||||
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion")
|
||||
api("org.yaml:snakeyaml:2.2")
|
||||
api("org.joml:joml:1.10.5")
|
||||
+ // Paper start
|
||||
+ api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
@@ -23,8 +23,8 @@ index 17e8858e01d80c422947f507e9d77b7532788752..82444d3b95881702910369ec5694dd9f
|
||||
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"
|
||||
+ val annotations = "org.jetbrains:annotations:23.0.0" // Paper - we don't want Java 5 annotations...
|
||||
- val annotations = "org.jetbrains:annotations-java5:$annotationsVersion"
|
||||
+ val annotations = "org.jetbrains:annotations:$annotationsVersion" // Paper - we don't want Java 5 annotations...
|
||||
compileOnly(annotations)
|
||||
testCompileOnly(annotations)
|
||||
|
||||
@@ -35,20 +35,25 @@ index 17e8858e01d80c422947f507e9d77b7532788752..82444d3b95881702910369ec5694dd9f
|
||||
+ // Paper end
|
||||
+
|
||||
testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
@@ -65,7 +77,7 @@ tasks.withType<Javadoc> {
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
|
||||
testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
@@ -69,8 +81,12 @@ tasks.withType<Javadoc> {
|
||||
options.links(
|
||||
"https://guava.dev/releases/31.0.1-jre/api/docs/",
|
||||
"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/",
|
||||
"https://guava.dev/releases/32.1.2-jre/api/docs/",
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
|
||||
- "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
|
||||
+ "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
||||
"https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/",
|
||||
+ // Paper start - add missing javadoc links
|
||||
+ "https://javadoc.io/doc/org.joml/joml/1.10.5/index.html",
|
||||
+ "https://www.javadoc.io/doc/com.google.code.gson/gson/2.10.1",
|
||||
+ // Paper end
|
||||
)
|
||||
options.tags("apiNote:a:API Note:")
|
||||
|
||||
@@ -80,3 +92,14 @@ tasks.withType<Javadoc> {
|
||||
}
|
||||
}
|
||||
@@ -89,3 +105,14 @@ tasks.withType<Javadoc> {
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
+
|
||||
+// Paper start
|
||||
|
||||
@@ -3,54 +3,31 @@ From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sun, 17 Mar 2019 23:04:30 +0000
|
||||
Subject: [PATCH] Test changes
|
||||
|
||||
- convert to mockito for mocking of types
|
||||
- Allow use of TYPE_USE annotations
|
||||
- Ignore package-private methods for nullability annotations
|
||||
- Add excludes for classes which don't pass
|
||||
- Disable stupid BukkitMirrorTest
|
||||
|
||||
Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 82444d3b95881702910369ec5694dd9f327ad81a..c06eda648d8626c86afb2140d6a583ddf82f295c 100644
|
||||
index d86ee6acb78d249424c5df98a851178c0f62eec1..75bfb0ab8049ebbb52240abf661d469de5526767 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -35,6 +35,7 @@ dependencies {
|
||||
compileOnlyApi(checkerQual)
|
||||
testCompileOnly(checkerQual)
|
||||
// Paper end
|
||||
+ testImplementation("org.mockito:mockito-core:4.9.0") // Paper - add mockito
|
||||
@@ -106,6 +106,12 @@ tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/EmptyRegistry.java b/src/test/java/io/papermc/paper/testing/EmptyRegistry.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ba9ddce87a9f385e729a5c2cf7c5eec120e388a7
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/testing/EmptyRegistry.java
|
||||
@@ -0,0 +1,23 @@
|
||||
+package io.papermc.paper.testing;
|
||||
+
|
||||
+import java.util.Collections;
|
||||
+import java.util.Iterator;
|
||||
+import org.bukkit.Keyed;
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.bukkit.Registry;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+public record EmptyRegistry() implements Registry<Keyed> {
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public Iterator<Keyed> iterator() {
|
||||
+ return Collections.emptyIterator();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Keyed get(@NotNull final NamespacedKey key) {
|
||||
+ return null;
|
||||
+ }
|
||||
+// Paper start - compile tests with -parameters for better junit parameterized test names
|
||||
+tasks.compileTestJava {
|
||||
+ options.compilerArgs.add("-parameters")
|
||||
+}
|
||||
+// Paper end
|
||||
+
|
||||
// Paper start
|
||||
val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
|
||||
badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/EmptyTag.java b/src/test/java/io/papermc/paper/testing/EmptyTag.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..77154095cfb8b259bdb318e8ff40cb6f559ebc18
|
||||
@@ -88,65 +65,26 @@ index 0000000000000000000000000000000000000000..77154095cfb8b259bdb318e8ff40cb6f
|
||||
+ return Collections.emptySet();
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/TestServer.java b/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..756acf231b1b076b08046d86992ba7ce7f62a94f
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
@@ -0,0 +1,48 @@
|
||||
+package io.papermc.paper.testing;
|
||||
+
|
||||
+import java.util.logging.Logger;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.bukkit.Server;
|
||||
+import org.bukkit.command.SimpleCommandMap;
|
||||
+import org.bukkit.plugin.PluginManager;
|
||||
+import org.bukkit.plugin.SimplePluginManager;
|
||||
+
|
||||
+import static org.mockito.ArgumentMatchers.anyString;
|
||||
+import static org.mockito.Mockito.any;
|
||||
+import static org.mockito.Mockito.mock;
|
||||
+import static org.mockito.Mockito.when;
|
||||
+
|
||||
+public final class TestServer {
|
||||
+
|
||||
+ @SuppressWarnings("removal")
|
||||
+ public static void setup() {
|
||||
+ //noinspection ConstantValue
|
||||
+ if (Bukkit.getServer() != null) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ final Server dummyServer = mock(Server.class);
|
||||
+
|
||||
+ final Logger logger = Logger.getLogger(TestServer.class.getCanonicalName());
|
||||
+ when(dummyServer.getLogger()).thenReturn(logger);
|
||||
+ when(dummyServer.getName()).thenReturn(TestServer.class.getSimpleName());
|
||||
+ when(dummyServer.getVersion()).thenReturn("Version_" + TestServer.class.getPackage().getImplementationVersion());
|
||||
+ when(dummyServer.getBukkitVersion()).thenReturn("BukkitVersion_" + TestServer.class.getPackage().getImplementationVersion());
|
||||
+
|
||||
+
|
||||
+ final Thread currentThread = Thread.currentThread();
|
||||
+ when(dummyServer.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
|
||||
+
|
||||
+ when(dummyServer.getTag(anyString(), any(NamespacedKey.class), any())).thenAnswer(ignored -> new EmptyTag());
|
||||
+
|
||||
+ final PluginManager pluginManager = new SimplePluginManager(dummyServer, new SimpleCommandMap(dummyServer));
|
||||
+ when(dummyServer.getPluginManager()).thenReturn(pluginManager);
|
||||
+
|
||||
+ when(dummyServer.getRegistry(any())).thenAnswer(ignored -> new EmptyRegistry());
|
||||
+ when(dummyServer.getScoreboardCriteria(anyString())).thenReturn(null);
|
||||
+
|
||||
+ Bukkit.setServer(dummyServer);
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
index 4ac3dd977e75cd8464163351d306e037ee32cb48..8f35cda0d67ec66646c6096a5bf1c84891b8b0fd 100644
|
||||
index 64e7aef6220097edefdff3b98a771b988365930d..abadff47166722fdc756afdbc6ac7242b6bd4fb0 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
@@ -40,7 +40,17 @@ public class AnnotationTest {
|
||||
@@ -29,7 +29,13 @@ public class AnnotationTest {
|
||||
"Lorg/jetbrains/annotations/Nullable;",
|
||||
"Lorg/jetbrains/annotations/NotNull;",
|
||||
"Lorg/jetbrains/annotations/Contract;",
|
||||
- "Lorg/bukkit/UndefinedNullability;"
|
||||
+ "Lorg/bukkit/UndefinedNullability;",
|
||||
+ // Paper start
|
||||
+ "Lorg/checkerframework/checker/nullness/qual/MonotonicNonNull;",
|
||||
+ "Lorg/checkerframework/checker/nullness/qual/NonNull;",
|
||||
+ "Lorg/checkerframework/checker/nullness/qual/Nullable;",
|
||||
+ "Lorg/checkerframework/checker/nullness/qual/PolyNull;",
|
||||
+ // Paper end
|
||||
};
|
||||
|
||||
private static final String[] EXCLUDED_CLASSES = {
|
||||
@@ -40,7 +46,17 @@ public class AnnotationTest {
|
||||
"org/bukkit/util/io/Wrapper",
|
||||
"org/bukkit/plugin/java/PluginClassLoader",
|
||||
// Generic functional interface
|
||||
@@ -165,7 +103,7 @@ index 4ac3dd977e75cd8464163351d306e037ee32cb48..8f35cda0d67ec66646c6096a5bf1c848
|
||||
};
|
||||
|
||||
@Test
|
||||
@@ -67,14 +77,40 @@ public class AnnotationTest {
|
||||
@@ -67,14 +83,40 @@ public class AnnotationTest {
|
||||
}
|
||||
|
||||
if (mustBeAnnotated(Type.getReturnType(method.desc)) && !isWellAnnotated(method.invisibleAnnotations)) {
|
||||
@@ -176,7 +114,7 @@ index 4ac3dd977e75cd8464163351d306e037ee32cb48..8f35cda0d67ec66646c6096a5bf1c848
|
||||
+ } else if (method.invisibleTypeAnnotations != null) {
|
||||
+ dance: for (final org.objectweb.asm.tree.TypeAnnotationNode invisibleTypeAnnotation : method.invisibleTypeAnnotations) {
|
||||
+ final org.objectweb.asm.TypeReference ref = new org.objectweb.asm.TypeReference(invisibleTypeAnnotation.typeRef);
|
||||
+ if (ref.getSort() == org.objectweb.asm.TypeReference.METHOD_RETURN && java.util.Arrays.binarySearch(ACCEPTED_ANNOTATIONS, invisibleTypeAnnotation.desc) >= 0) {
|
||||
+ if (ref.getSort() == org.objectweb.asm.TypeReference.METHOD_RETURN && java.util.Arrays.asList(ACCEPTED_ANNOTATIONS).contains(invisibleTypeAnnotation.desc)) {
|
||||
+ warn = false;
|
||||
+ break dance; // cha cha real smooth
|
||||
+ }
|
||||
@@ -197,7 +135,7 @@ index 4ac3dd977e75cd8464163351d306e037ee32cb48..8f35cda0d67ec66646c6096a5bf1c848
|
||||
+ if (method.invisibleTypeAnnotations != null) {
|
||||
+ for (final org.objectweb.asm.tree.TypeAnnotationNode invisibleTypeAnnotation : method.invisibleTypeAnnotations) {
|
||||
+ final org.objectweb.asm.TypeReference ref = new org.objectweb.asm.TypeReference(invisibleTypeAnnotation.typeRef);
|
||||
+ if (ref.getSort() == org.objectweb.asm.TypeReference.METHOD_FORMAL_PARAMETER && ref.getTypeParameterIndex() == i && java.util.Arrays.binarySearch(ACCEPTED_ANNOTATIONS, invisibleTypeAnnotation.desc) >= 0) {
|
||||
+ if (ref.getSort() == org.objectweb.asm.TypeReference.METHOD_FORMAL_PARAMETER && ref.getTypeParameterIndex() == i && java.util.Arrays.asList(ACCEPTED_ANNOTATIONS).contains(invisibleTypeAnnotation.desc)) {
|
||||
+ continue dancing;
|
||||
+ }
|
||||
+ }
|
||||
@@ -206,7 +144,7 @@ index 4ac3dd977e75cd8464163351d306e037ee32cb48..8f35cda0d67ec66646c6096a5bf1c848
|
||||
ParameterNode paramNode = parameters == null ? null : parameters.get(i);
|
||||
String paramName = paramNode == null ? null : paramNode.name;
|
||||
|
||||
@@ -91,13 +127,18 @@ public class AnnotationTest {
|
||||
@@ -91,13 +133,18 @@ public class AnnotationTest {
|
||||
|
||||
Collections.sort(errors);
|
||||
|
||||
@@ -224,12 +162,12 @@ index 4ac3dd977e75cd8464163351d306e037ee32cb48..8f35cda0d67ec66646c6096a5bf1c848
|
||||
+ builder.append("\t").append(message).append("\n");
|
||||
}
|
||||
|
||||
- Assert.fail("There " + errors.size() + " are missing annotation(s)");
|
||||
+ Assert.fail(builder.toString());
|
||||
- fail("There " + errors.size() + " are missing annotation(s)");
|
||||
+ fail(builder.toString());
|
||||
}
|
||||
|
||||
private static void collectClasses(@NotNull File from, @NotNull Map<String, ClassNode> to) throws IOException {
|
||||
@@ -140,6 +181,11 @@ public class AnnotationTest {
|
||||
@@ -140,6 +187,11 @@ public class AnnotationTest {
|
||||
// Exceptions are excluded
|
||||
return false;
|
||||
}
|
||||
@@ -241,7 +179,7 @@ index 4ac3dd977e75cd8464163351d306e037ee32cb48..8f35cda0d67ec66646c6096a5bf1c848
|
||||
|
||||
for (String excludedClass : EXCLUDED_CLASSES) {
|
||||
if (excludedClass.equals(clazz.name)) {
|
||||
@@ -152,7 +198,7 @@ public class AnnotationTest {
|
||||
@@ -152,7 +204,7 @@ public class AnnotationTest {
|
||||
|
||||
private static boolean isMethodIncluded(@NotNull ClassNode clazz, @NotNull MethodNode method, @NotNull Map<String, ClassNode> allClasses) {
|
||||
// Exclude private, synthetic and deprecated methods
|
||||
@@ -250,7 +188,7 @@ index 4ac3dd977e75cd8464163351d306e037ee32cb48..8f35cda0d67ec66646c6096a5bf1c848
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -170,11 +216,30 @@ public class AnnotationTest {
|
||||
@@ -170,11 +222,30 @@ public class AnnotationTest {
|
||||
if ("<init>".equals(method.name) && isAnonymous(clazz)) {
|
||||
return false;
|
||||
}
|
||||
@@ -282,232 +220,31 @@ index 4ac3dd977e75cd8464163351d306e037ee32cb48..8f35cda0d67ec66646c6096a5bf1c848
|
||||
if (annotations == null) {
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/TestServer.java b/src/test/java/org/bukkit/TestServer.java
|
||||
deleted file mode 100644
|
||||
index 701a17c10f31cd345238a3c568264178ce372faa..0000000000000000000000000000000000000000
|
||||
--- a/src/test/java/org/bukkit/TestServer.java
|
||||
+++ /dev/null
|
||||
@@ -1,139 +0,0 @@
|
||||
-package org.bukkit;
|
||||
-
|
||||
-import com.google.common.collect.ImmutableMap;
|
||||
-import java.lang.reflect.InvocationHandler;
|
||||
-import java.lang.reflect.Method;
|
||||
-import java.lang.reflect.Proxy;
|
||||
-import java.util.Iterator;
|
||||
-import java.util.Map;
|
||||
-import java.util.logging.Logger;
|
||||
-import org.bukkit.command.SimpleCommandMap;
|
||||
-import org.bukkit.plugin.PluginManager;
|
||||
-import org.bukkit.plugin.SimplePluginManager;
|
||||
-import org.jetbrains.annotations.NotNull;
|
||||
-import org.jetbrains.annotations.Nullable;
|
||||
-
|
||||
-public final class TestServer implements InvocationHandler {
|
||||
- private static interface MethodHandler {
|
||||
- Object handle(TestServer server, Object[] args);
|
||||
- }
|
||||
-
|
||||
- private static final Map<Method, MethodHandler> methods;
|
||||
-
|
||||
- static {
|
||||
- try {
|
||||
- ImmutableMap.Builder<Method, MethodHandler> methodMap = ImmutableMap.builder();
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("isPrimaryThread"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return Thread.currentThread().equals(server.creatingThread);
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getPluginManager"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return server.pluginManager;
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getLogger"),
|
||||
- new MethodHandler() {
|
||||
- final Logger logger = Logger.getLogger(TestServer.class.getCanonicalName());
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return logger;
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getName"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return TestServer.class.getSimpleName();
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getVersion"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return "Version_" + TestServer.class.getPackage().getImplementationVersion();
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getBukkitVersion"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return "BukkitVersion_" + TestServer.class.getPackage().getImplementationVersion();
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getRegistry", Class.class),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return new Registry() {
|
||||
- @NotNull
|
||||
- @Override
|
||||
- public Iterator iterator() {
|
||||
- return null;
|
||||
- }
|
||||
-
|
||||
- @Nullable
|
||||
- @Override
|
||||
- public Keyed get(@NotNull NamespacedKey key) {
|
||||
- return null;
|
||||
- }
|
||||
- };
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getScoreboardCriteria", String.class),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- // Does not need to return anything. Exists solely to test CriteriaTest which has static init fields
|
||||
- return null;
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methods = methodMap.build();
|
||||
-
|
||||
- TestServer server = new TestServer();
|
||||
- Server instance = Proxy.getProxyClass(Server.class.getClassLoader(), Server.class).asSubclass(Server.class).getConstructor(InvocationHandler.class).newInstance(server);
|
||||
- Bukkit.setServer(instance);
|
||||
- server.pluginManager = new SimplePluginManager(instance, new SimpleCommandMap(instance));
|
||||
- } catch (Throwable t) {
|
||||
- throw new Error(t);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- private Thread creatingThread = Thread.currentThread();
|
||||
- private PluginManager pluginManager;
|
||||
- private TestServer() {};
|
||||
-
|
||||
- public static Server getInstance() {
|
||||
- return Bukkit.getServer();
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public Object invoke(Object proxy, Method method, Object[] args) {
|
||||
- MethodHandler handler = methods.get(method);
|
||||
- if (handler != null) {
|
||||
- return handler.handle(this, args);
|
||||
- }
|
||||
- throw new UnsupportedOperationException(String.valueOf(method));
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/test/java/org/bukkit/TestWorld.java b/src/test/java/org/bukkit/TestWorld.java
|
||||
index ab34f1199921d415fa2ca6e281a8125c9e6d7173..f64d024f5bbf9482aaddb56597b23b04c66f21bf 100644
|
||||
--- a/src/test/java/org/bukkit/TestWorld.java
|
||||
+++ b/src/test/java/org/bukkit/TestWorld.java
|
||||
@@ -18,7 +18,7 @@ public final class TestWorld implements InvocationHandler {
|
||||
diff --git a/src/test/java/org/bukkit/BukkitMirrorTest.java b/src/test/java/org/bukkit/BukkitMirrorTest.java
|
||||
index 89ca06ebecdaadd5dfc7bc74473ca15ad36f6eff..5974ceea58940e1799f3589eac0e39b925a42c3b 100644
|
||||
--- a/src/test/java/org/bukkit/BukkitMirrorTest.java
|
||||
+++ b/src/test/java/org/bukkit/BukkitMirrorTest.java
|
||||
@@ -9,6 +9,7 @@ import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
|
||||
static {
|
||||
try {
|
||||
- TestServer.getInstance();
|
||||
+ io.papermc.paper.testing.TestServer.setup(); // Paper
|
||||
+@org.junit.jupiter.api.Disabled // Paper
|
||||
public class BukkitMirrorTest {
|
||||
|
||||
ImmutableMap.Builder<Method, MethodHandler> methodMap = ImmutableMap.builder();
|
||||
methodMap.put(
|
||||
diff --git a/src/test/java/org/bukkit/event/SyntheticEventTest.java b/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
index d402cb59f508205ebe9ee450594826b04cecb90b..09886568ae6167141b463b6262565fa212af3385 100644
|
||||
--- a/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
+++ b/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.bukkit.event;
|
||||
public static Stream<Arguments> data() {
|
||||
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
|
||||
index 79173d6ed844f1e640e3aa745a9b560ec5e6a2bc..73ec679ac0d1f398b417bd174b47f9af93351e27 100644
|
||||
--- a/src/test/java/org/bukkit/support/TestServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/TestServer.java
|
||||
@@ -61,6 +61,11 @@ public final class TestServer {
|
||||
UnsafeValues unsafeValues = mock(withSettings().stubOnly());
|
||||
when(instance.getUnsafe()).thenReturn(unsafeValues);
|
||||
|
||||
-import org.bukkit.TestServer;
|
||||
import org.bukkit.plugin.PluginLoader;
|
||||
import org.bukkit.plugin.SimplePluginManager;
|
||||
import org.bukkit.plugin.TestPlugin;
|
||||
@@ -12,14 +11,15 @@ public class SyntheticEventTest {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void test() {
|
||||
- final JavaPluginLoader loader = new JavaPluginLoader(TestServer.getInstance());
|
||||
+ io.papermc.paper.testing.TestServer.setup(); // Paper
|
||||
+ final JavaPluginLoader loader = new JavaPluginLoader(org.bukkit.Bukkit.getServer()); // Paper
|
||||
TestPlugin plugin = new TestPlugin(getClass().getName()) {
|
||||
@Override
|
||||
public PluginLoader getPluginLoader() {
|
||||
return loader;
|
||||
}
|
||||
};
|
||||
- SimplePluginManager pluginManager = new SimplePluginManager(TestServer.getInstance(), null);
|
||||
+ SimplePluginManager pluginManager = new SimplePluginManager(org.bukkit.Bukkit.getServer(), null); // Paper
|
||||
|
||||
TestEvent event = new TestEvent(false);
|
||||
Impl impl = new Impl();
|
||||
diff --git a/src/test/java/org/bukkit/plugin/PluginManagerTest.java b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
index f188cd4f3b07027c30d41f1162db77a506b7b6bb..c46ed2acb82db814d660459b705dd49e6d44240f 100644
|
||||
--- a/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
+++ b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
@@ -2,7 +2,6 @@ package org.bukkit.plugin;
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
-import org.bukkit.TestServer;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.TestEvent;
|
||||
import org.bukkit.permissions.Permission;
|
||||
@@ -14,7 +13,7 @@ public class PluginManagerTest {
|
||||
volatile Object value = null;
|
||||
+ // Paper start - testing changes
|
||||
+ when(instance.getTag(anyString(), any(NamespacedKey.class), any())).thenAnswer(ignored -> new io.papermc.paper.testing.EmptyTag());
|
||||
+ when(instance.getScoreboardCriteria(anyString())).thenReturn(null);
|
||||
+ // Paper end - testing changes
|
||||
+
|
||||
Bukkit.setServer(instance);
|
||||
}
|
||||
|
||||
- private static final PluginManager pm = TestServer.getInstance().getPluginManager();
|
||||
+ private static final PluginManager pm = org.bukkit.Bukkit.getServer().getPluginManager(); // Paper
|
||||
|
||||
private final MutableObject store = new MutableObject();
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/scoreboard/CriteriaTest.java b/src/test/java/org/bukkit/scoreboard/CriteriaTest.java
|
||||
index eb94b6f4d58cd9f66b07791c57af7e359992e28c..a93f28e2f987a36e2c7e4f7d31506b750bdb222b 100644
|
||||
--- a/src/test/java/org/bukkit/scoreboard/CriteriaTest.java
|
||||
+++ b/src/test/java/org/bukkit/scoreboard/CriteriaTest.java
|
||||
@@ -2,7 +2,6 @@ package org.bukkit.scoreboard;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Statistic;
|
||||
-import org.bukkit.TestServer;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
@@ -11,7 +10,7 @@ public class CriteriaTest {
|
||||
|
||||
@Test
|
||||
public void testStatistic() {
|
||||
- TestServer.getInstance();
|
||||
+ io.papermc.paper.testing.TestServer.setup(); // Paper
|
||||
|
||||
Assert.assertThrows(IllegalArgumentException.class, () -> Criteria.statistic(Statistic.AVIATE_ONE_CM, Material.STONE)); // Generic statistic with block
|
||||
Assert.assertThrows(IllegalArgumentException.class, () -> Criteria.statistic(Statistic.AVIATE_ONE_CM, EntityType.CREEPER)); // Generic statistic with entity type
|
||||
@@ -6,10 +6,10 @@ 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 c06eda648d8626c86afb2140d6a583ddf82f295c..464a209dbf52ebdfa287a553778a37c382a5405c 100644
|
||||
index 75bfb0ab8049ebbb52240abf661d469de5526767..ecba866b84bc5f86a442bf220ab24ed8706aadf9 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -19,6 +19,7 @@ dependencies {
|
||||
@@ -22,6 +22,7 @@ dependencies {
|
||||
api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
isTransitive = false // includes junit
|
||||
}
|
||||
|
||||
+701
-487
File diff suppressed because it is too large.
Load diff
@@ -6,10 +6,10 @@ 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 23b1e7600d2507be60cb8543773b91f4851afb4f..d95b3d504ddc9ed76fc86cd45fa922d68e597827 100644
|
||||
index 2377d476aee8c88d26ca715fdb756dc97749aac8..0c6e0bb90fe5ea29c467323a179a47ec122ba0f6 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -40,6 +40,9 @@ dependencies {
|
||||
@@ -42,6 +42,9 @@ dependencies {
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-legacy")
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-plain")
|
||||
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
||||
|
||||
@@ -5,18 +5,26 @@ Subject: [PATCH] Paper Plugins
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index bb1f3b3d5a22ca391f4362e5d4cf016e7e9be0e3..f900b73c52971fe682171e7f99246afdb8b080f3 100644
|
||||
index 0c6e0bb90fe5ea29c467323a179a47ec122ba0f6..145f6209a984e74da2d2de03cf725c06c77ef8da 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -45,7 +45,7 @@ dependencies {
|
||||
@@ -47,7 +47,7 @@ dependencies {
|
||||
implementation("org.ow2.asm:asm-commons:9.4")
|
||||
// Paper end
|
||||
|
||||
- compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
+ api("org.apache.maven:maven-resolver-provider:3.8.5") // Paper, expose
|
||||
+ api("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
|
||||
@@ -118,6 +118,7 @@ tasks.withType<Javadoc> {
|
||||
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
|
||||
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
|
||||
// Paper end
|
||||
+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper
|
||||
)
|
||||
options.tags("apiNote:a:API Note:")
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/PermissionManager.java b/src/main/java/io/papermc/paper/plugin/PermissionManager.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..cdbc93b317b3bab47bf6552c29cfbb2c27846933
|
||||
@@ -194,9 +202,29 @@ index 0000000000000000000000000000000000000000..cdbc93b317b3bab47bf6552c29cfbb2c
|
||||
+ void clearPermissions();
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/bootstrap/BootstrapContext.java b/src/main/java/io/papermc/paper/plugin/bootstrap/BootstrapContext.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..08f2050356acaf74e3210416760e3873c2dafd2c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/bootstrap/BootstrapContext.java
|
||||
@@ -0,0 +1,14 @@
|
||||
+package io.papermc.paper.plugin.bootstrap;
|
||||
+
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+
|
||||
+/**
|
||||
+ * Represents the context provided to a {@link PluginBootstrap} during both the bootstrapping and plugin
|
||||
+ * instantiation logic.
|
||||
+ * A boostrap context may be used to access data or logic usually provided to {@link org.bukkit.plugin.Plugin} instances
|
||||
+ * like the plugin's configuration or logger during the plugins bootstrap.
|
||||
+ */
|
||||
+@ApiStatus.Experimental
|
||||
+@ApiStatus.NonExtendable
|
||||
+public interface BootstrapContext extends PluginProviderContext {
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/bootstrap/PluginBootstrap.java b/src/main/java/io/papermc/paper/plugin/bootstrap/PluginBootstrap.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ea84b11e8682e73fcd563fec65e76b707546a99e
|
||||
index 0000000000000000000000000000000000000000..288c078da3d3ca78d02caa4e3565ac7cf89f9f9f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/bootstrap/PluginBootstrap.java
|
||||
@@ -0,0 +1,41 @@
|
||||
@@ -226,7 +254,7 @@ index 0000000000000000000000000000000000000000..ea84b11e8682e73fcd563fec65e76b70
|
||||
+ *
|
||||
+ * @param context the server provided context
|
||||
+ */
|
||||
+ void bootstrap(@NotNull PluginProviderContext context);
|
||||
+ void bootstrap(@NotNull BootstrapContext context);
|
||||
+
|
||||
+ /**
|
||||
+ * Called by the server to instantiate your main class.
|
||||
@@ -243,10 +271,10 @@ index 0000000000000000000000000000000000000000..ea84b11e8682e73fcd563fec65e76b70
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/bootstrap/PluginProviderContext.java b/src/main/java/io/papermc/paper/plugin/bootstrap/PluginProviderContext.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..8be416f01055d94b474ecc425fc0bec69a814815
|
||||
index 0000000000000000000000000000000000000000..2c14693155de3654d5ca011c63e13e4a1abf2080
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/bootstrap/PluginProviderContext.java
|
||||
@@ -0,0 +1,44 @@
|
||||
@@ -0,0 +1,52 @@
|
||||
+package io.papermc.paper.plugin.bootstrap;
|
||||
+
|
||||
+import io.papermc.paper.plugin.configuration.PluginMeta;
|
||||
@@ -258,7 +286,7 @@ index 0000000000000000000000000000000000000000..8be416f01055d94b474ecc425fc0bec6
|
||||
+
|
||||
+/**
|
||||
+ * Represents the context provided to a {@link PluginBootstrap} during both the bootstrapping and plugin
|
||||
+ * instanciation logic.
|
||||
+ * instantiation logic.
|
||||
+ * A boostrap context may be used to access data or logic usually provided to {@link org.bukkit.plugin.Plugin} instances
|
||||
+ * like the plugin's configuration or logger during the plugins bootstrap.
|
||||
+ */
|
||||
@@ -290,6 +318,14 @@ index 0000000000000000000000000000000000000000..8be416f01055d94b474ecc425fc0bec6
|
||||
+ @NotNull
|
||||
+ ComponentLogger getLogger();
|
||||
+
|
||||
+ /**
|
||||
+ * Provides the path to the originating source of the plugin, such as the plugin's JAR file.
|
||||
+ *
|
||||
+ * @return the previously described path
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Path getPluginSource();
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/configuration/PluginMeta.java b/src/main/java/io/papermc/paper/plugin/configuration/PluginMeta.java
|
||||
new file mode 100644
|
||||
@@ -675,7 +711,7 @@ index 0000000000000000000000000000000000000000..0546fa1e9dcd7155086a8650806a8c08
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/loader/library/impl/JarLibrary.java b/src/main/java/io/papermc/paper/plugin/loader/library/impl/JarLibrary.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..3327595d154700890c862a2ced5eff93da4bd634
|
||||
index 0000000000000000000000000000000000000000..e3da0d67cab01e1233dccde1a12ff25961ee79fb
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/loader/library/impl/JarLibrary.java
|
||||
@@ -0,0 +1,45 @@
|
||||
@@ -700,7 +736,7 @@ index 0000000000000000000000000000000000000000..3327595d154700890c862a2ced5eff93
|
||||
+ * resulting in a jar library that provides the jar at {@code libs/custom-library-1.24.jar} to the plugins classloader
|
||||
+ * at runtime.
|
||||
+ * <p>
|
||||
+ * The jar library implementation will error if file exists at the specified path.
|
||||
+ * The jar library implementation will error if the file does not exist at the specified path.
|
||||
+ */
|
||||
+public class JarLibrary implements ClassPathLibrary {
|
||||
+
|
||||
@@ -726,7 +762,7 @@ index 0000000000000000000000000000000000000000..3327595d154700890c862a2ced5eff93
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e3e902a708a760be167cb1bba8e845c5fa5b9141
|
||||
index 0000000000000000000000000000000000000000..9af07d168beadaa77e4965819200eeb94fe3e092
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java
|
||||
@@ -0,0 +1,132 @@
|
||||
@@ -756,12 +792,12 @@ index 0000000000000000000000000000000000000000..e3e902a708a760be167cb1bba8e845c5
|
||||
+import org.eclipse.aether.transfer.TransferEvent;
|
||||
+import org.eclipse.aether.transport.http.HttpTransporterFactory;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.slf4j.Logger;
|
||||
+import org.slf4j.LoggerFactory;
|
||||
+
|
||||
+import java.io.File;
|
||||
+import java.util.ArrayList;
|
||||
+import java.util.List;
|
||||
+import java.util.logging.Level;
|
||||
+import java.util.logging.Logger;
|
||||
+
|
||||
+/**
|
||||
+ * The maven library resolver acts as a resolver for yet to be resolved jar libraries that may be pulled from a
|
||||
@@ -782,7 +818,7 @@ index 0000000000000000000000000000000000000000..e3e902a708a760be167cb1bba8e845c5
|
||||
+ */
|
||||
+public class MavenLibraryResolver implements ClassPathLibrary {
|
||||
+
|
||||
+ private static final Logger logger = Logger.getLogger("MavenLibraryResolver");
|
||||
+ private static final Logger logger = LoggerFactory.getLogger("MavenLibraryResolver");
|
||||
+
|
||||
+ private final RepositorySystem repository;
|
||||
+ private final DefaultRepositorySystemSession session;
|
||||
@@ -810,7 +846,7 @@ index 0000000000000000000000000000000000000000..e3e902a708a760be167cb1bba8e845c5
|
||||
+ this.session.setTransferListener(new AbstractTransferListener() {
|
||||
+ @Override
|
||||
+ public void transferInitiated(@NotNull TransferEvent event) throws TransferCancelledException {
|
||||
+ logger.log(Level.INFO, "Downloading {0}", event.getResource().getRepositoryUrl() + event.getResource().getResourceName());
|
||||
+ logger.info("Downloading {}", event.getResource().getRepositoryUrl() + event.getResource().getResourceName());
|
||||
+ }
|
||||
+ });
|
||||
+ this.session.setReadOnly();
|
||||
@@ -1310,13 +1346,13 @@ index 0000000000000000000000000000000000000000..6bf3d212a6156ad9ab0e82d1ca0a04f8
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index 876072a6c91bd02c9c7de53556419b8e1ac48f27..dc9a4f12d9f05a3ae7c9f1c7648123e4b3dfd115 100644
|
||||
index a3ee6f2f588bc9c87e49378359f450820b9af1b9..0743592273cc1c5f4ab6935349941bf25b438448 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -96,4 +96,14 @@ public interface UnsafeValues {
|
||||
String getTranslationKey(EntityType entityType);
|
||||
|
||||
String getTranslationKey(ItemStack itemStack);
|
||||
@@ -109,4 +109,14 @@ public interface UnsafeValues {
|
||||
* @return an internal potion data
|
||||
*/
|
||||
PotionType.InternalPotionData getInternalPotionData(NamespacedKey key);
|
||||
+
|
||||
+ // Paper start
|
||||
+ @Deprecated(forRemoval = true)
|
||||
@@ -1354,6 +1390,18 @@ index e195e74c48c69047aa825b75fad95419c505b41f..53f28c9e6843991486a576d41b6641c1
|
||||
register("bukkit", new TimingsCommand("timings"));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
||||
index bcb576a4271b1ec7b1cfe6f83cf161b7d89ed2e5..4d849e1283fdf6b0872a0f2183964cc93748c116 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java
|
||||
@@ -9,6 +9,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
+@Deprecated(forRemoval = true) // Paper
|
||||
public class PluginsCommand extends BukkitCommand {
|
||||
public PluginsCommand(@NotNull String name) {
|
||||
super(name);
|
||||
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
index b37938745f916b5f0111b07b1a1c97527f026e9d..8c76716249e44ed8bf6be94c1f5c7b6d9bb35be2 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
@@ -1401,10 +1449,10 @@ index 94f8ceb965cecb5669a84a0ec61c0f706c2a2673..e773db6da357ad210eb24d4c389af2dc
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||
index 77a380537b338fdd0aa2f6777ff775056cc6b221..028805bcdb1d2bb0d11387db165b7376579e5f60 100644
|
||||
index f48bdeb628a82416d93f84a0a10141447482bf83..c0691a849831f99268fdcb7b0f471f80a1a2a70e 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||
@@ -195,7 +195,7 @@ import org.yaml.snakeyaml.nodes.Tag;
|
||||
@@ -198,7 +198,7 @@ import org.yaml.snakeyaml.representer.Representer;
|
||||
* inferno.burningdeaths: true
|
||||
*</pre></blockquote>
|
||||
*/
|
||||
@@ -1413,7 +1461,7 @@ index 77a380537b338fdd0aa2f6777ff775056cc6b221..028805bcdb1d2bb0d11387db165b7376
|
||||
private static final Pattern VALID_NAME = Pattern.compile("^[A-Za-z0-9 _.-]+$");
|
||||
private static final ThreadLocal<Yaml> YAML = new ThreadLocal<Yaml>() {
|
||||
@Override
|
||||
@@ -255,6 +255,70 @@ public final class PluginDescriptionFile {
|
||||
@@ -259,6 +259,70 @@ public final class PluginDescriptionFile {
|
||||
private Set<PluginAwareness> awareness = ImmutableSet.of();
|
||||
private String apiVersion = null;
|
||||
private List<String> libraries = ImmutableList.of();
|
||||
@@ -1536,7 +1584,7 @@ index 41e26451fe12d8e6e0ef73c85731b24b4e3f200c..03213fde8315384ec56c16031cfc606a
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index a69c5d5cad6168aeaae41e8adc319dc8c976b1e2..f64a90241ce7f73e111e6b5ac6ff87cd93583c0e 100644
|
||||
index a69c5d5cad6168aeaae41e8adc319dc8c976b1e2..77f9ebbe675cf1b6a17e98d98e7666711998eb4e 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -43,6 +43,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -1677,7 +1725,7 @@ index a69c5d5cad6168aeaae41e8adc319dc8c976b1e2..f64a90241ce7f73e111e6b5ac6ff87cd
|
||||
Preconditions.checkArgument(priority != null, "Priority cannot be null");
|
||||
Preconditions.checkArgument(executor != null, "Executor cannot be null");
|
||||
Preconditions.checkArgument(plugin != null, "Plugin cannot be null");
|
||||
+ if (true) {this.paperPluginManager.registerEvent(event, listener, priority, executor, plugin); return;} // Paper
|
||||
+ if (true) {this.paperPluginManager.registerEvent(event, listener, priority, executor, plugin, ignoreCancelled); return;} // Paper
|
||||
|
||||
if (!plugin.isEnabled()) {
|
||||
throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled");
|
||||
@@ -1842,10 +1890,10 @@ index a80251eff75430863b37db1c131e22593f3fcd5e..310c4041963a3f1e0a26e39a6da12a9b
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
index 669a70faa95d0d6525a731d73499ed6fb0b48320..c9cf9d361a1289aba383718733a2098b5eafb38f 100644
|
||||
index ee100b7ad89ce1eccef0c3bc55885cd78aadd1ec..f594913e6b94f77b26a4a758c447a42d8a25b6ff 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
@@ -38,6 +38,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -40,6 +40,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
private Server server = null;
|
||||
private File file = null;
|
||||
private PluginDescriptionFile description = null;
|
||||
@@ -1853,7 +1901,7 @@ index 669a70faa95d0d6525a731d73499ed6fb0b48320..c9cf9d361a1289aba383718733a2098b
|
||||
private File dataFolder = null;
|
||||
private ClassLoader classLoader = null;
|
||||
private boolean naggable = true;
|
||||
@@ -46,13 +47,16 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -48,13 +49,16 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
private PluginLogger logger = null;
|
||||
|
||||
public JavaPlugin() {
|
||||
@@ -1874,7 +1922,7 @@ index 669a70faa95d0d6525a731d73499ed6fb0b48320..c9cf9d361a1289aba383718733a2098b
|
||||
protected JavaPlugin(@NotNull final JavaPluginLoader loader, @NotNull final PluginDescriptionFile description, @NotNull final File dataFolder, @NotNull final File file) {
|
||||
final ClassLoader classLoader = this.getClass().getClassLoader();
|
||||
if (classLoader instanceof PluginClassLoader) {
|
||||
@@ -77,9 +81,12 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -79,9 +83,12 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
* Gets the associated PluginLoader responsible for this plugin
|
||||
*
|
||||
* @return PluginLoader that controls this plugin
|
||||
@@ -1887,7 +1935,7 @@ index 669a70faa95d0d6525a731d73499ed6fb0b48320..c9cf9d361a1289aba383718733a2098b
|
||||
public final PluginLoader getPluginLoader() {
|
||||
return loader;
|
||||
}
|
||||
@@ -120,13 +127,20 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -122,13 +129,20 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
* Returns the plugin.yaml file containing the details for this plugin
|
||||
*
|
||||
* @return Contents of the plugin.yaml file
|
||||
@@ -1900,7 +1948,7 @@ index 669a70faa95d0d6525a731d73499ed6fb0b48320..c9cf9d361a1289aba383718733a2098b
|
||||
return description;
|
||||
}
|
||||
|
||||
+ @Nullable
|
||||
+ @NotNull
|
||||
+ public final io.papermc.paper.plugin.configuration.PluginMeta getPluginMeta() {
|
||||
+ return this.pluginMeta;
|
||||
+ }
|
||||
@@ -1908,7 +1956,7 @@ index 669a70faa95d0d6525a731d73499ed6fb0b48320..c9cf9d361a1289aba383718733a2098b
|
||||
@NotNull
|
||||
@Override
|
||||
public FileConfiguration getConfig() {
|
||||
@@ -256,7 +270,8 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -258,7 +272,8 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
*
|
||||
* @param enabled true if enabled, otherwise false
|
||||
*/
|
||||
@@ -1918,7 +1966,7 @@ index 669a70faa95d0d6525a731d73499ed6fb0b48320..c9cf9d361a1289aba383718733a2098b
|
||||
if (isEnabled != enabled) {
|
||||
isEnabled = enabled;
|
||||
|
||||
@@ -268,9 +283,18 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -270,9 +285,18 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1940,7 +1988,7 @@ index 669a70faa95d0d6525a731d73499ed6fb0b48320..c9cf9d361a1289aba383718733a2098b
|
||||
this.server = server;
|
||||
this.file = file;
|
||||
this.description = description;
|
||||
@@ -278,6 +302,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -280,6 +304,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
this.classLoader = classLoader;
|
||||
this.configFile = new File(dataFolder, "config.yml");
|
||||
this.logger = new PluginLogger(this);
|
||||
@@ -1948,7 +1996,7 @@ index 669a70faa95d0d6525a731d73499ed6fb0b48320..c9cf9d361a1289aba383718733a2098b
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -394,10 +419,10 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -396,10 +421,10 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
throw new IllegalArgumentException(clazz + " does not extend " + JavaPlugin.class);
|
||||
}
|
||||
final ClassLoader cl = clazz.getClassLoader();
|
||||
@@ -1962,7 +2010,7 @@ index 669a70faa95d0d6525a731d73499ed6fb0b48320..c9cf9d361a1289aba383718733a2098b
|
||||
if (plugin == null) {
|
||||
throw new IllegalStateException("Cannot get plugin for " + clazz + " from a static initializer");
|
||||
}
|
||||
@@ -420,10 +445,10 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -422,10 +447,10 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
public static JavaPlugin getProvidingPlugin(@NotNull Class<?> clazz) {
|
||||
Preconditions.checkArgument(clazz != null, "Null class cannot have a plugin");
|
||||
final ClassLoader cl = clazz.getClassLoader();
|
||||
@@ -2040,10 +2088,10 @@ index 6d634b0ea813ccb19f1562a7d0e5a59cea4eab21..e4b6f278a811acbb0070e311c5c3bdaf
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index 2f74ec96ece706de23156ebabfe493211bc05391..302319acbc257a075adfb78d9f5c49fdadf45bdc 100644
|
||||
index 64a294aeb6fb548794708b38c3707f9dd882b2ff..74b6581a97a092c44a0876e7981ff8a8e6153100 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -29,7 +29,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -31,7 +31,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* A ClassLoader for plugins, to allow shared classes across multiple plugins
|
||||
*/
|
||||
@@ -2053,7 +2101,7 @@ index 2f74ec96ece706de23156ebabfe493211bc05391..302319acbc257a075adfb78d9f5c49fd
|
||||
private final JavaPluginLoader loader;
|
||||
private final Map<String, Class<?>> classes = new ConcurrentHashMap<String, Class<?>>();
|
||||
private final PluginDescriptionFile description;
|
||||
@@ -43,24 +44,32 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -45,24 +46,32 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
private JavaPlugin pluginInit;
|
||||
private IllegalStateException pluginState;
|
||||
private final Set<String> seenIllegalAccess = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
@@ -2082,15 +2130,15 @@ index 2f74ec96ece706de23156ebabfe493211bc05391..302319acbc257a075adfb78d9f5c49fd
|
||||
this.url = file.toURI().toURL();
|
||||
this.libraryLoader = libraryLoader;
|
||||
|
||||
+
|
||||
+ // Paper start
|
||||
+ this.dependencyContext = dependencyContext;
|
||||
+ this.classLoaderGroup = io.papermc.paper.plugin.provider.classloader.PaperClassLoaderStorage.instance().registerSpigotGroup(this);
|
||||
+ // Paper end
|
||||
+
|
||||
Class<?> jarClass;
|
||||
try {
|
||||
Class<?> jarClass;
|
||||
try {
|
||||
@@ -94,6 +103,27 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
jarClass = Class.forName(description.getMain(), true, this);
|
||||
@@ -107,6 +116,27 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
return findResources(name);
|
||||
}
|
||||
|
||||
@@ -2118,7 +2166,7 @@ index 2f74ec96ece706de23156ebabfe493211bc05391..302319acbc257a075adfb78d9f5c49fd
|
||||
@Override
|
||||
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
|
||||
return loadClass0(name, resolve, true, true);
|
||||
@@ -119,26 +149,11 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -132,26 +162,11 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
|
||||
if (checkGlobal) {
|
||||
// This ignores the libraries of other plugins, unless they are transitive dependencies.
|
||||
@@ -2147,7 +2195,7 @@ index 2f74ec96ece706de23156ebabfe493211bc05391..302319acbc257a075adfb78d9f5c49fd
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -167,7 +182,7 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -180,7 +195,7 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
throw new ClassNotFoundException(name, ex);
|
||||
}
|
||||
|
||||
@@ -2156,7 +2204,7 @@ index 2f74ec96ece706de23156ebabfe493211bc05391..302319acbc257a075adfb78d9f5c49fd
|
||||
|
||||
int dot = name.lastIndexOf('.');
|
||||
if (dot != -1) {
|
||||
@@ -197,8 +212,8 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -210,8 +225,8 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
result = super.findClass(name);
|
||||
}
|
||||
|
||||
@@ -2166,7 +2214,7 @@ index 2f74ec96ece706de23156ebabfe493211bc05391..302319acbc257a075adfb78d9f5c49fd
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -207,6 +222,12 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -220,6 +235,12 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
try {
|
||||
@@ -2179,7 +2227,7 @@ index 2f74ec96ece706de23156ebabfe493211bc05391..302319acbc257a075adfb78d9f5c49fd
|
||||
super.close();
|
||||
} finally {
|
||||
jar.close();
|
||||
@@ -218,7 +239,7 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -231,7 +252,7 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
return classes.values();
|
||||
}
|
||||
|
||||
@@ -2188,7 +2236,7 @@ index 2f74ec96ece706de23156ebabfe493211bc05391..302319acbc257a075adfb78d9f5c49fd
|
||||
Preconditions.checkArgument(javaPlugin != null, "Initializing plugin cannot be null");
|
||||
Preconditions.checkArgument(javaPlugin.getClass().getClassLoader() == this, "Cannot initialize plugin outside of this class loader");
|
||||
if (this.plugin != null || this.pluginInit != null) {
|
||||
@@ -228,6 +249,38 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
@@ -241,6 +262,38 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
pluginState = new IllegalStateException("Initial initialization");
|
||||
this.pluginInit = javaPlugin;
|
||||
|
||||
@@ -2228,48 +2276,35 @@ index 2f74ec96ece706de23156ebabfe493211bc05391..302319acbc257a075adfb78d9f5c49fd
|
||||
+
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/TestServer.java b/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
index 756acf231b1b076b08046d86992ba7ce7f62a94f..52d27d977b9df0bdf02b33ed0aaa3b4db0a04cb4 100644
|
||||
--- a/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
+++ b/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
@@ -36,9 +36,6 @@ public final class TestServer {
|
||||
|
||||
when(dummyServer.getTag(anyString(), any(NamespacedKey.class), any())).thenAnswer(ignored -> new EmptyTag());
|
||||
|
||||
- final PluginManager pluginManager = new SimplePluginManager(dummyServer, new SimpleCommandMap(dummyServer));
|
||||
- when(dummyServer.getPluginManager()).thenReturn(pluginManager);
|
||||
-
|
||||
when(dummyServer.getRegistry(any())).thenAnswer(ignored -> new EmptyRegistry());
|
||||
when(dummyServer.getScoreboardCriteria(anyString())).thenReturn(null);
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/event/SyntheticEventTest.java b/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
deleted file mode 100644
|
||||
index 09886568ae6167141b463b6262565fa212af3385..0000000000000000000000000000000000000000
|
||||
index 40a086f2883c4419d2bf0bd44285f7c55562ba3e..0000000000000000000000000000000000000000
|
||||
--- a/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
+++ /dev/null
|
||||
@@ -1,48 +0,0 @@
|
||||
@@ -1,49 +0,0 @@
|
||||
-package org.bukkit.event;
|
||||
-
|
||||
-import static org.junit.jupiter.api.Assertions.*;
|
||||
-import org.bukkit.Bukkit;
|
||||
-import org.bukkit.plugin.PluginLoader;
|
||||
-import org.bukkit.plugin.SimplePluginManager;
|
||||
-import org.bukkit.plugin.TestPlugin;
|
||||
-import org.bukkit.plugin.java.JavaPluginLoader;
|
||||
-import org.junit.Assert;
|
||||
-import org.junit.Test;
|
||||
-import org.bukkit.support.AbstractTestingBase;
|
||||
-import org.junit.jupiter.api.Test;
|
||||
-
|
||||
-public class SyntheticEventTest {
|
||||
-public class SyntheticEventTest extends AbstractTestingBase {
|
||||
- @SuppressWarnings("deprecation")
|
||||
- @Test
|
||||
- public void test() {
|
||||
- io.papermc.paper.testing.TestServer.setup(); // Paper
|
||||
- final JavaPluginLoader loader = new JavaPluginLoader(org.bukkit.Bukkit.getServer()); // Paper
|
||||
- final JavaPluginLoader loader = new JavaPluginLoader(Bukkit.getServer());
|
||||
- TestPlugin plugin = new TestPlugin(getClass().getName()) {
|
||||
- @Override
|
||||
- public PluginLoader getPluginLoader() {
|
||||
- return loader;
|
||||
- }
|
||||
- };
|
||||
- SimplePluginManager pluginManager = new SimplePluginManager(org.bukkit.Bukkit.getServer(), null); // Paper
|
||||
- SimplePluginManager pluginManager = new SimplePluginManager(Bukkit.getServer(), null);
|
||||
-
|
||||
- TestEvent event = new TestEvent(false);
|
||||
- Impl impl = new Impl();
|
||||
@@ -2277,7 +2312,7 @@ index 09886568ae6167141b463b6262565fa212af3385..00000000000000000000000000000000
|
||||
- pluginManager.registerEvents(impl, plugin);
|
||||
- pluginManager.callEvent(event);
|
||||
-
|
||||
- Assert.assertEquals(1, impl.callCount);
|
||||
- assertEquals(1, impl.callCount);
|
||||
- }
|
||||
-
|
||||
- public abstract static class Base<E extends Event> implements Listener {
|
||||
@@ -2298,26 +2333,28 @@ index 09886568ae6167141b463b6262565fa212af3385..00000000000000000000000000000000
|
||||
-}
|
||||
diff --git a/src/test/java/org/bukkit/plugin/PluginManagerTest.java b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
deleted file mode 100644
|
||||
index c46ed2acb82db814d660459b705dd49e6d44240f..0000000000000000000000000000000000000000
|
||||
index 03b08e47e91e8b56c1992fcd749a62eb9e7d4d68..0000000000000000000000000000000000000000
|
||||
--- a/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
+++ /dev/null
|
||||
@@ -1,183 +0,0 @@
|
||||
@@ -1,185 +0,0 @@
|
||||
-package org.bukkit.plugin;
|
||||
-
|
||||
-import static org.bukkit.support.MatcherAssert.*;
|
||||
-import static org.hamcrest.Matchers.*;
|
||||
-import static org.junit.Assert.*;
|
||||
-import org.bukkit.Bukkit;
|
||||
-import org.bukkit.event.Event;
|
||||
-import org.bukkit.event.TestEvent;
|
||||
-import org.bukkit.permissions.Permission;
|
||||
-import org.junit.After;
|
||||
-import org.junit.Test;
|
||||
-import org.bukkit.support.AbstractTestingBase;
|
||||
-import org.junit.jupiter.api.AfterEach;
|
||||
-import org.junit.jupiter.api.Test;
|
||||
-
|
||||
-public class PluginManagerTest {
|
||||
-public class PluginManagerTest extends AbstractTestingBase {
|
||||
- private class MutableObject {
|
||||
- volatile Object value = null;
|
||||
- }
|
||||
-
|
||||
- private static final PluginManager pm = org.bukkit.Bukkit.getServer().getPluginManager(); // Paper
|
||||
- private static final PluginManager pm = Bukkit.getServer().getPluginManager();
|
||||
-
|
||||
- private final MutableObject store = new MutableObject();
|
||||
-
|
||||
@@ -2466,20 +2503,20 @@ index c46ed2acb82db814d660459b705dd49e6d44240f..00000000000000000000000000000000
|
||||
- private void testRemovePermissionByName(final String name) {
|
||||
- final Permission perm = new Permission(name);
|
||||
- pm.addPermission(perm);
|
||||
- assertThat("Permission \"" + name + "\" was not added", pm.getPermission(name), is(perm));
|
||||
- assertThat(pm.getPermission(name), is(perm), "Permission \"" + name + "\" was not added");
|
||||
- pm.removePermission(name);
|
||||
- assertThat("Permission \"" + name + "\" was not removed", pm.getPermission(name), is(nullValue()));
|
||||
- assertThat(pm.getPermission(name), is(nullValue()), "Permission \"" + name + "\" was not removed");
|
||||
- }
|
||||
-
|
||||
- private void testRemovePermissionByPermission(final String name) {
|
||||
- final Permission perm = new Permission(name);
|
||||
- pm.addPermission(perm);
|
||||
- assertThat("Permission \"" + name + "\" was not added", pm.getPermission(name), is(perm));
|
||||
- assertThat(pm.getPermission(name), is(perm), "Permission \"" + name + "\" was not added");
|
||||
- pm.removePermission(perm);
|
||||
- assertThat("Permission \"" + name + "\" was not removed", pm.getPermission(name), is(nullValue()));
|
||||
- assertThat(pm.getPermission(name), is(nullValue()), "Permission \"" + name + "\" was not removed");
|
||||
- }
|
||||
-
|
||||
- @After
|
||||
- @AfterEach
|
||||
- public void tearDown() {
|
||||
- pm.clearPlugins();
|
||||
- assertThat(pm.getPermissions(), is(empty()));
|
||||
@@ -2502,3 +2539,17 @@ index a8be3e23e3e280ad301d9530de50028515612966..43b58e920e739bb949ac0673e9ef73ba
|
||||
|
||||
@Override
|
||||
public FileConfiguration getConfig() {
|
||||
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
|
||||
index 73ec679ac0d1f398b417bd174b47f9af93351e27..b208150297a23c0b4acb79135416809718f5650e 100644
|
||||
--- a/src/test/java/org/bukkit/support/TestServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/TestServer.java
|
||||
@@ -25,8 +25,7 @@ public final class TestServer {
|
||||
Thread creatingThread = Thread.currentThread();
|
||||
when(instance.isPrimaryThread()).then(mock -> Thread.currentThread().equals(creatingThread));
|
||||
|
||||
- PluginManager pluginManager = new SimplePluginManager(instance, new SimpleCommandMap(instance));
|
||||
- when(instance.getPluginManager()).thenReturn(pluginManager);
|
||||
+ // Paper - remove plugin manager for Paper Plugins
|
||||
|
||||
Logger logger = Logger.getLogger(TestServer.class.getCanonicalName());
|
||||
when(instance.getLogger()).thenReturn(logger);
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Add Position
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/math/BlockPosition.java b/src/main/java/io/papermc/paper/math/BlockPosition.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..f164d32cfbd5bfd84f3067a149d34bb1185a7e00
|
||||
index 0000000000000000000000000000000000000000..f0fdabce4af640da2a406412e67020761ded3ac1
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/math/BlockPosition.java
|
||||
@@ -0,0 +1,98 @@
|
||||
@@ -64,7 +64,7 @@ index 0000000000000000000000000000000000000000..f164d32cfbd5bfd84f3067a149d34bb1
|
||||
+
|
||||
+ @Override
|
||||
+ default @NotNull FinePosition offset(double x, double y, double z) {
|
||||
+ return new FinePositionImpl(this.blockX() + z, this.blockY() + y, this.blockZ() + z);
|
||||
+ return new FinePositionImpl(this.blockX() + x, this.blockY() + y, this.blockZ() + z);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -192,10 +192,10 @@ index 0000000000000000000000000000000000000000..93476aaf8d21efb5a30b6d2cc2eeda81
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/math/Position.java b/src/main/java/io/papermc/paper/math/Position.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..300da713dcc303b340efad70efe57facf5422964
|
||||
index 0000000000000000000000000000000000000000..26bc5a0fa67855af87c8fd4cd8229b4d9f242740
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/math/Position.java
|
||||
@@ -0,0 +1,184 @@
|
||||
@@ -0,0 +1,191 @@
|
||||
+package io.papermc.paper.math;
|
||||
+
|
||||
+import org.bukkit.Location;
|
||||
@@ -273,6 +273,13 @@ index 0000000000000000000000000000000000000000..300da713dcc303b340efad70efe57fac
|
||||
+ boolean isFine();
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if each component of this position is finite.
|
||||
+ */
|
||||
+ default boolean isFinite() {
|
||||
+ return Double.isFinite(this.x()) && Double.isFinite(this.y()) && Double.isFinite(this.z());
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns a position offset by the specified amounts.
|
||||
+ *
|
||||
+ * @param x x value to offset
|
||||
@@ -381,7 +388,7 @@ index 0000000000000000000000000000000000000000..300da713dcc303b340efad70efe57fac
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index 7c4db051472fb6a6c6d24092dc6f75487356690a..3b99f359f556e6f2c341d55fa69b7462e69b6546 100644
|
||||
index 7c4db051472fb6a6c6d24092dc6f75487356690a..85c342fc50f2fe0ce9a1b3980df9e088c3dea92d 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -20,7 +20,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -393,7 +400,7 @@ index 7c4db051472fb6a6c6d24092dc6f75487356690a..3b99f359f556e6f2c341d55fa69b7462
|
||||
private Reference<World> world;
|
||||
private double x;
|
||||
private double y;
|
||||
@@ -706,4 +706,26 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||
@@ -706,4 +706,31 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||
}
|
||||
return pitch;
|
||||
}
|
||||
@@ -415,6 +422,11 @@ index 7c4db051472fb6a6c6d24092dc6f75487356690a..3b99f359f556e6f2c341d55fa69b7462
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isFinite() {
|
||||
+ return io.papermc.paper.math.FinePosition.super.isFinite() && Float.isFinite(this.getYaw()) && Float.isFinite(this.getPitch());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull Location toLocation(@NotNull World world) {
|
||||
+ return new Location(world, this.x(), this.y(), this.z(), this.getYaw(), this.getPitch());
|
||||
+ }
|
||||
|
||||
@@ -8,10 +8,10 @@ expose isRunning
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..43b85ce3a6c27a2f92c67d62bee7484c2652b72a
|
||||
index 0000000000000000000000000000000000000000..36b8fe86335df851f9c85d6bb2a91368b4d945d1
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java
|
||||
@@ -0,0 +1,85 @@
|
||||
@@ -0,0 +1,86 @@
|
||||
+package co.aikar.timings;
|
||||
+
|
||||
+import static co.aikar.timings.TimingsManager.*;
|
||||
@@ -19,6 +19,7 @@ index 0000000000000000000000000000000000000000..43b85ce3a6c27a2f92c67d62bee7484c
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+@Deprecated(forRemoval = true)
|
||||
+public class FullServerTickHandler extends TimingHandler {
|
||||
+ private static final TimingIdentifier IDENTITY = new TimingIdentifier("Minecraft", "Full Server Tick", null);
|
||||
+ final TimingData minuteData;
|
||||
@@ -99,10 +100,10 @@ index 0000000000000000000000000000000000000000..43b85ce3a6c27a2f92c67d62bee7484c
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/NullTimingHandler.java b/src/main/java/co/aikar/timings/NullTimingHandler.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..9b45ce887b9172f30302b83fe24b99b76b16dac3
|
||||
index 0000000000000000000000000000000000000000..81671cf40feeed2844ee8d92348d48062aaf2c46
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/NullTimingHandler.java
|
||||
@@ -0,0 +1,68 @@
|
||||
@@ -0,0 +1,69 @@
|
||||
+/*
|
||||
+ * This file is licensed under the MIT License (MIT).
|
||||
+ *
|
||||
@@ -131,6 +132,7 @@ index 0000000000000000000000000000000000000000..9b45ce887b9172f30302b83fe24b99b7
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+@Deprecated(forRemoval = true)
|
||||
+public final class NullTimingHandler implements Timing {
|
||||
+ public static final Timing NULL = new NullTimingHandler();
|
||||
+ @NotNull
|
||||
@@ -173,10 +175,10 @@ index 0000000000000000000000000000000000000000..9b45ce887b9172f30302b83fe24b99b7
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..4e6e1b8e8aeb07e34536941d2cbfc25e5cfa6c27
|
||||
index 0000000000000000000000000000000000000000..be275c25664e0c76123371c6c8fac601f87fa492
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java
|
||||
@@ -0,0 +1,83 @@
|
||||
@@ -0,0 +1,84 @@
|
||||
+/*
|
||||
+ * This file is licensed under the MIT License (MIT).
|
||||
+ *
|
||||
@@ -213,6 +215,7 @@ index 0000000000000000000000000000000000000000..4e6e1b8e8aeb07e34536941d2cbfc25e
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+@Deprecated(forRemoval = true)
|
||||
+public class TimedEventExecutor implements EventExecutor {
|
||||
+
|
||||
+ private final EventExecutor executor;
|
||||
@@ -262,10 +265,10 @@ index 0000000000000000000000000000000000000000..4e6e1b8e8aeb07e34536941d2cbfc25e
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..a21e5ead5024fd0058c5e3302d8201dd249d32bc
|
||||
index 0000000000000000000000000000000000000000..7514fad26f955329f8bf17ff17db75f0c8301ee5
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/Timing.java
|
||||
@@ -0,0 +1,83 @@
|
||||
@@ -0,0 +1,86 @@
|
||||
+/*
|
||||
+ * This file is licensed under the MIT License (MIT).
|
||||
+ *
|
||||
@@ -296,7 +299,10 @@ index 0000000000000000000000000000000000000000..a21e5ead5024fd0058c5e3302d8201dd
|
||||
+
|
||||
+/**
|
||||
+ * Provides an ability to time sections of code within the Minecraft Server
|
||||
+ *
|
||||
+ * @deprecated Timings will likely be replaced with Spark in the future
|
||||
+ */
|
||||
+@Deprecated(forRemoval = true)
|
||||
+public interface Timing extends AutoCloseable {
|
||||
+ /**
|
||||
+ * Starts timing the execution until {@link #stopTiming()} is called.
|
||||
@@ -711,10 +717,10 @@ index 0000000000000000000000000000000000000000..199789d56d22fcb1b77ebd56805cc28a
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ddaed81275fcc12d1671b668697acf318e96888b
|
||||
index 0000000000000000000000000000000000000000..eb9d58f8852e732a1284beeaf542989301d21b1c
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingHistory.java
|
||||
@@ -0,0 +1,354 @@
|
||||
@@ -0,0 +1,355 @@
|
||||
+/*
|
||||
+ * This file is licensed under the MIT License (MIT).
|
||||
+ *
|
||||
@@ -767,6 +773,7 @@ index 0000000000000000000000000000000000000000..ddaed81275fcc12d1671b668697acf31
|
||||
+import static co.aikar.timings.TimingsManager.MINUTE_REPORTS;
|
||||
+import static co.aikar.util.JSONUtil.*;
|
||||
+
|
||||
+@Deprecated(forRemoval = true)
|
||||
+@SuppressWarnings({"deprecation", "SuppressionAnnotation", "Convert2Lambda", "Anonymous2MethodRef"})
|
||||
+public class TimingHistory {
|
||||
+ public static long lastMinuteTime;
|
||||
@@ -1257,10 +1264,10 @@ index 0000000000000000000000000000000000000000..df142a89b8c43acb81eb383eac0ef048
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..dd72a34eaa4bedd9ea0b92eaa79091b00eb4dd09
|
||||
index 0000000000000000000000000000000000000000..9812d668ad945aba486fbf6d5bf83c4292cb5d03
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/Timings.java
|
||||
@@ -0,0 +1,295 @@
|
||||
@@ -0,0 +1,337 @@
|
||||
+/*
|
||||
+ * This file is licensed under the MIT License (MIT).
|
||||
+ *
|
||||
@@ -1289,6 +1296,10 @@ index 0000000000000000000000000000000000000000..dd72a34eaa4bedd9ea0b92eaa79091b0
|
||||
+import com.google.common.base.Preconditions;
|
||||
+import com.google.common.collect.EvictingQueue;
|
||||
+import com.google.common.collect.Lists;
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+import net.kyori.adventure.text.event.ClickEvent;
|
||||
+import net.kyori.adventure.text.format.TextColor;
|
||||
+import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.command.CommandSender;
|
||||
+import org.bukkit.plugin.Plugin;
|
||||
@@ -1299,6 +1310,10 @@ index 0000000000000000000000000000000000000000..dd72a34eaa4bedd9ea0b92eaa79091b0
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * @deprecated Timings will likely be replaced with Spark in the future
|
||||
+ */
|
||||
+@Deprecated(forRemoval = true)
|
||||
+@SuppressWarnings({"UnusedDeclaration", "WeakerAccess", "SameParameterValue"})
|
||||
+public final class Timings {
|
||||
+
|
||||
@@ -1309,6 +1324,7 @@ index 0000000000000000000000000000000000000000..dd72a34eaa4bedd9ea0b92eaa79091b0
|
||||
+ static boolean verboseEnabled = false;
|
||||
+ private static int historyInterval = -1;
|
||||
+ private static int historyLength = -1;
|
||||
+ private static boolean warnedAboutDeprecationOnEnable;
|
||||
+
|
||||
+ private Timings() {}
|
||||
+
|
||||
@@ -1343,6 +1359,7 @@ index 0000000000000000000000000000000000000000..dd72a34eaa4bedd9ea0b92eaa79091b0
|
||||
+ @NotNull
|
||||
+ public static Timing of(@NotNull Plugin plugin, @NotNull String name, @Nullable Timing groupHandler) {
|
||||
+ Preconditions.checkNotNull(plugin, "Plugin can not be null");
|
||||
+ Bukkit.getLogger().warning(String.format("Plugin '%s' is creating timing '%s' - this is deprecated behavior, please report it to the authors: %s", plugin.getName(), name, String.join(", ", plugin.getDescription().getAuthors())));
|
||||
+ return TimingsManager.getHandler(plugin.getName(), name, groupHandler);
|
||||
+ }
|
||||
+
|
||||
@@ -1399,9 +1416,40 @@ index 0000000000000000000000000000000000000000..dd72a34eaa4bedd9ea0b92eaa79091b0
|
||||
+ */
|
||||
+ public static void setTimingsEnabled(boolean enabled) {
|
||||
+ timingsEnabled = enabled;
|
||||
+ warnAboutDeprecationOnEnable();
|
||||
+ reset();
|
||||
+ }
|
||||
+
|
||||
+ private static void warnAboutDeprecationOnEnable() {
|
||||
+ if (timingsEnabled && !warnedAboutDeprecationOnEnable) {
|
||||
+ Bukkit.getLogger().warning(PlainTextComponentSerializer.plainText().serialize(deprecationMessage()));
|
||||
+ warnedAboutDeprecationOnEnable = true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public static Component deprecationMessage() {
|
||||
+ return Component.text()
|
||||
+ .color(TextColor.color(0xf3ef91))
|
||||
+ .append(Component.text("[!] The timings profiler has been enabled but has been scheduled for removal from Paper in the future."))
|
||||
+ .append(Component.newline())
|
||||
+ .append(
|
||||
+ Component.text(" We recommend installing the spark profiler as a replacement: ")
|
||||
+ .append(
|
||||
+ Component.text()
|
||||
+ .content("https://spark.lucko.me/")
|
||||
+ .clickEvent(ClickEvent.openUrl("https://spark.lucko.me/")))
|
||||
+ )
|
||||
+ .append(Component.newline())
|
||||
+ .append(
|
||||
+ Component.text(" For more information please visit: ")
|
||||
+ .append(
|
||||
+ Component.text()
|
||||
+ .content("https://github.com/PaperMC/Paper/issues/8948")
|
||||
+ .clickEvent(ClickEvent.openUrl("https://github.com/PaperMC/Paper/issues/8948")))
|
||||
+ )
|
||||
+ .build();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * <p>Sets whether or not the Timings should monitor at Verbose level.</p>
|
||||
+ *
|
||||
@@ -1556,12 +1604,13 @@ index 0000000000000000000000000000000000000000..dd72a34eaa4bedd9ea0b92eaa79091b0
|
||||
+ return TimingsManager.getHandler(groupName, name, groupHandler);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..3132dc98d26c54c5e46162e53aaed195d7335c8d
|
||||
index 0000000000000000000000000000000000000000..e801e79fa57c44b2e5d359647c920f88064826f1
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
@@ -0,0 +1,120 @@
|
||||
@@ -0,0 +1,124 @@
|
||||
+/*
|
||||
+ * This file is licensed under the MIT License (MIT).
|
||||
+ *
|
||||
@@ -1601,6 +1650,7 @@ index 0000000000000000000000000000000000000000..3132dc98d26c54c5e46162e53aaed195
|
||||
+import static net.kyori.adventure.text.Component.text;
|
||||
+
|
||||
+
|
||||
+@Deprecated(forRemoval = true)
|
||||
+public class TimingsCommand extends BukkitCommand {
|
||||
+ private static final List<String> TIMINGS_SUBCOMMANDS = ImmutableList.of("report", "reset", "on", "off", "paste", "verbon", "verboff");
|
||||
+ private long lastResetAttempt = 0;
|
||||
@@ -1617,6 +1667,9 @@ index 0000000000000000000000000000000000000000..3132dc98d26c54c5e46162e53aaed195
|
||||
+ if (!testPermission(sender)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ if (false) {
|
||||
+ sender.sendMessage(Timings.deprecationMessage());
|
||||
+ }
|
||||
+ if (args.length < 1) {
|
||||
+ sender.sendMessage(text("Usage: " + this.usageMessage, NamedTextColor.RED));
|
||||
+ return true;
|
||||
@@ -1684,10 +1737,10 @@ index 0000000000000000000000000000000000000000..3132dc98d26c54c5e46162e53aaed195
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..a92925d41110226f7fda055b71ce7be60eedd038
|
||||
index 0000000000000000000000000000000000000000..5e1558ca3ffeeaf2645fa003965474a442d650bf
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsManager.java
|
||||
@@ -0,0 +1,188 @@
|
||||
@@ -0,0 +1,192 @@
|
||||
+/*
|
||||
+ * This file is licensed under the MIT License (MIT).
|
||||
+ *
|
||||
@@ -1729,6 +1782,10 @@ index 0000000000000000000000000000000000000000..a92925d41110226f7fda055b71ce7be6
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * @deprecated Timings will likely be replaced with Spark in the future
|
||||
+ */
|
||||
+@Deprecated(forRemoval = true)
|
||||
+public final class TimingsManager {
|
||||
+ static final Map<TimingIdentifier, TimingHandler> TIMING_MAP = LoadingMap.of(
|
||||
+ new ConcurrentHashMap<>(4096, .5F), TimingHandler::new
|
||||
@@ -1878,10 +1935,10 @@ index 0000000000000000000000000000000000000000..a92925d41110226f7fda055b71ce7be6
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..34f4c02c3bdbe571a7efb1f8c61d8924b0c81268
|
||||
index 0000000000000000000000000000000000000000..3af5b8ea795311582044c712de50d29412024b77
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
@@ -0,0 +1,86 @@
|
||||
@@ -0,0 +1,87 @@
|
||||
+package co.aikar.timings;
|
||||
+
|
||||
+import com.google.common.base.Preconditions;
|
||||
@@ -1896,6 +1953,7 @@ index 0000000000000000000000000000000000000000..34f4c02c3bdbe571a7efb1f8c61d8924
|
||||
+
|
||||
+import java.util.List;
|
||||
+
|
||||
+@Deprecated(forRemoval = true)
|
||||
+@SuppressWarnings("WeakerAccess")
|
||||
+public class TimingsReportListener implements net.kyori.adventure.audience.ForwardingAudience, MessageCommandSender {
|
||||
+ private final List<CommandSender> senders;
|
||||
@@ -2029,10 +2087,10 @@ index 0000000000000000000000000000000000000000..632c4961515f5052551f841cfa840e60
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/util/Counter.java b/src/main/java/co/aikar/util/Counter.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..eff63c371c39e21a5a9cb5af8c2dcf78a60dd52b
|
||||
index 0000000000000000000000000000000000000000..dae84243804b4b076cafb3e1b29bdcf614efc93f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/util/Counter.java
|
||||
@@ -0,0 +1,38 @@
|
||||
@@ -0,0 +1,39 @@
|
||||
+package co.aikar.util;
|
||||
+
|
||||
+import com.google.common.collect.ForwardingMap;
|
||||
@@ -2042,6 +2100,7 @@ index 0000000000000000000000000000000000000000..eff63c371c39e21a5a9cb5af8c2dcf78
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+@Deprecated(forRemoval = true)
|
||||
+public class Counter <T> extends ForwardingMap<T, Long> {
|
||||
+ private final Map<T, Long> counts = new HashMap<>();
|
||||
+
|
||||
@@ -2073,10 +2132,10 @@ index 0000000000000000000000000000000000000000..eff63c371c39e21a5a9cb5af8c2dcf78
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/util/JSONUtil.java b/src/main/java/co/aikar/util/JSONUtil.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..190bf0598442c89c2a1c93ad7c8c1a29797304ae
|
||||
index 0000000000000000000000000000000000000000..c105a1429ca58b37be265708ec345e00f0d43ed8
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/util/JSONUtil.java
|
||||
@@ -0,0 +1,140 @@
|
||||
@@ -0,0 +1,141 @@
|
||||
+package co.aikar.util;
|
||||
+
|
||||
+import com.google.common.base.Function;
|
||||
@@ -2096,6 +2155,7 @@ index 0000000000000000000000000000000000000000..190bf0598442c89c2a1c93ad7c8c1a29
|
||||
+ * Provides Utility methods that assist with generating JSON Objects
|
||||
+ */
|
||||
+@SuppressWarnings({"rawtypes", "SuppressionAnnotation"})
|
||||
+@Deprecated(forRemoval = true)
|
||||
+public final class JSONUtil {
|
||||
+ private JSONUtil() {}
|
||||
+
|
||||
@@ -2219,10 +2279,10 @@ index 0000000000000000000000000000000000000000..190bf0598442c89c2a1c93ad7c8c1a29
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/util/LoadingIntMap.java b/src/main/java/co/aikar/util/LoadingIntMap.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..63a899c7dbdb69daa4876a2ce2a7dfb734b5af9d
|
||||
index 0000000000000000000000000000000000000000..5753b9bce89db2ac378ec41f1b61907cc2e23335
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/util/LoadingIntMap.java
|
||||
@@ -0,0 +1,76 @@
|
||||
@@ -0,0 +1,77 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2015. Starlis LLC / dba Empire Minecraft
|
||||
+ *
|
||||
@@ -2251,6 +2311,7 @@ index 0000000000000000000000000000000000000000..63a899c7dbdb69daa4876a2ce2a7dfb7
|
||||
+ *
|
||||
+ * @param <V> Value
|
||||
+ */
|
||||
+@Deprecated(forRemoval = true)
|
||||
+public class LoadingIntMap<V> extends Int2ObjectOpenHashMap<V> {
|
||||
+ private final Function<Integer, V> loader;
|
||||
+
|
||||
@@ -2301,10 +2362,10 @@ index 0000000000000000000000000000000000000000..63a899c7dbdb69daa4876a2ce2a7dfb7
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/util/LoadingMap.java b/src/main/java/co/aikar/util/LoadingMap.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..aedbb03321886cb267879d7994653e447b485f6a
|
||||
index 0000000000000000000000000000000000000000..1786eeb5cbeaad75602c9c5649bbcd9b2af5cf81
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/util/LoadingMap.java
|
||||
@@ -0,0 +1,368 @@
|
||||
@@ -0,0 +1,369 @@
|
||||
+/*
|
||||
+ * This file is licensed under the MIT License (MIT).
|
||||
+ *
|
||||
@@ -2357,6 +2418,7 @@ index 0000000000000000000000000000000000000000..aedbb03321886cb267879d7994653e44
|
||||
+ * @param <K> Key
|
||||
+ * @param <V> Value
|
||||
+ */
|
||||
+@Deprecated(forRemoval = true)
|
||||
+public class LoadingMap <K, V> extends AbstractMap<K, V> {
|
||||
+ private final Map<K, V> backingMap;
|
||||
+ private final java.util.function.Function<K, V> loader;
|
||||
@@ -2675,10 +2737,10 @@ index 0000000000000000000000000000000000000000..aedbb03321886cb267879d7994653e44
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/util/MRUMapCache.java b/src/main/java/co/aikar/util/MRUMapCache.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5989ee21297935651b0edd44b8239e655eaef1d9
|
||||
index 0000000000000000000000000000000000000000..3e61a926620a67daec3af54b72a1b911eaef2ed4
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/util/MRUMapCache.java
|
||||
@@ -0,0 +1,111 @@
|
||||
@@ -0,0 +1,112 @@
|
||||
+/*
|
||||
+ * This file is licensed under the MIT License (MIT).
|
||||
+ *
|
||||
@@ -2717,6 +2779,7 @@ index 0000000000000000000000000000000000000000..5989ee21297935651b0edd44b8239e65
|
||||
+ * @param <K> Key Type of the Map
|
||||
+ * @param <V> Value Type of the Map
|
||||
+ */
|
||||
+@Deprecated(forRemoval = true)
|
||||
+public class MRUMapCache<K, V> extends AbstractMap<K, V> {
|
||||
+ final Map<K, V> backingMap;
|
||||
+ Object cacheKey;
|
||||
@@ -2791,10 +2854,10 @@ index 0000000000000000000000000000000000000000..5989ee21297935651b0edd44b8239e65
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 0084898567e8bb74fa271b65b56523a5c26d387c..e24589a4cb42b0163e4a1455b8b11d7130b5cd41 100644
|
||||
index b7bc68c5d0dbb41c089f59b7db51342d45d1fc74..8d101352f72fc7fa21e0ba68039c79ce2fb92eb9 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -802,7 +802,6 @@ public final class Bukkit {
|
||||
@@ -833,7 +833,6 @@ public final class Bukkit {
|
||||
*/
|
||||
public static void reload() {
|
||||
server.reload();
|
||||
@@ -2803,10 +2866,10 @@ index 0084898567e8bb74fa271b65b56523a5c26d387c..e24589a4cb42b0163e4a1455b8b11d71
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 892e03189957b0072827be4fd485dd98352334e8..ac087402c90dad4b3c499fcf8507e50e9099cea5 100644
|
||||
index e3602c6703b29ffec17ef7806c9deb3eead8a112..3e642d8a0294f7290c3d4310813e6e8a467810e7 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1768,6 +1768,26 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1835,6 +1835,26 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@@ -2834,10 +2897,10 @@ index 892e03189957b0072827be4fd485dd98352334e8..ac087402c90dad4b3c499fcf8507e50e
|
||||
* Sends the component to the player
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
index dc9a4f12d9f05a3ae7c9f1c7648123e4b3dfd115..daf3ac72cae4d19c0273058dc6a1e1afe9a47f77 100644
|
||||
index 0743592273cc1c5f4ab6935349941bf25b438448..659405d84b5a61618576e930805da5cd3a054b4c 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -33,6 +33,7 @@ public interface UnsafeValues {
|
||||
@@ -36,6 +36,7 @@ public interface UnsafeValues {
|
||||
net.kyori.adventure.text.Component resolveWithContext(net.kyori.adventure.text.Component component, org.bukkit.command.CommandSender context, org.bukkit.entity.Entity scoreboardSubject, boolean bypassPermissions) throws java.io.IOException;
|
||||
// Paper end
|
||||
|
||||
@@ -2845,7 +2908,7 @@ index dc9a4f12d9f05a3ae7c9f1c7648123e4b3dfd115..daf3ac72cae4d19c0273058dc6a1e1af
|
||||
Material toLegacy(Material material);
|
||||
|
||||
Material fromLegacy(Material material);
|
||||
@@ -106,4 +107,12 @@ public interface UnsafeValues {
|
||||
@@ -119,4 +120,12 @@ public interface UnsafeValues {
|
||||
return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion());
|
||||
}
|
||||
// Paper end
|
||||
@@ -2886,7 +2949,7 @@ index 0000000000000000000000000000000000000000..f9a00aecca5ec41b460bf41dfe1c6969
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
|
||||
index caa29be46e8541b69ec47c181eb3320d6515b544..6fd341482d5250ad814e870360e40b52427f799a 100644
|
||||
index 75759131bd94b672bec4cd8e271ebff1ad391cba..5cfd88eec9bf02e83d77b6fce1a5c14b7687f48b 100644
|
||||
--- a/src/main/java/org/bukkit/command/Command.java
|
||||
+++ b/src/main/java/org/bukkit/command/Command.java
|
||||
@@ -33,7 +33,8 @@ public abstract class Command {
|
||||
@@ -3392,10 +3455,10 @@ index 516d7fc7812aac343782861d0d567f54aa578c2a..00000000000000000000000000000000
|
||||
- // Spigot end
|
||||
-}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index baf0887ec941533f8007f2c7f7ab78f16b45bd74..8d8a540c844e5365eed75a87db197a8fd4249bcd 100644
|
||||
index e5a54a2f35d83f8c7a5f2b6512b86481aa7f9f51..c54d478035f7782074c00f870d41da8283fec538 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2077,7 +2077,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2346,7 +2346,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Deprecated // Paper
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -3403,6 +3466,11 @@ index baf0887ec941533f8007f2c7f7ab78f16b45bd74..8d8a540c844e5365eed75a87db197a8f
|
||||
+ }
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * @return the player's ping
|
||||
+ * @deprecated use {@link Player#getPing()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public int getPing() {
|
||||
+ throw new UnsupportedOperationException( "Not supported yet." );
|
||||
}
|
||||
@@ -3411,7 +3479,7 @@ index baf0887ec941533f8007f2c7f7ab78f16b45bd74..8d8a540c844e5365eed75a87db197a8f
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index f64a90241ce7f73e111e6b5ac6ff87cd93583c0e..f13dcbe448111b24b36105d25527ba87ccc9334e 100644
|
||||
index 77f9ebbe675cf1b6a17e98d98e7666711998eb4e..63389474a2b3f0e283b42e7004aa6a94904a3d17 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -368,7 +368,6 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -3538,7 +3606,7 @@ index 5ca863b3692b2e1b58e7fb4d82f554a92cc4f01e..612958a331575d1da2715531ebdf6b11
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
index 44badfedcc3fdc26bdc293b85d8c781d6f659faa..123647bb10fc89508437d7a0bd3fd31d58ee7c82 100644
|
||||
index 44badfedcc3fdc26bdc293b85d8c781d6f659faa..12946bd55fcf7c40d39081779a7fa30049ee6165 100644
|
||||
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
@@ -1,137 +1,67 @@
|
||||
@@ -3604,7 +3672,7 @@ index 44badfedcc3fdc26bdc293b85d8c781d6f659faa..123647bb10fc89508437d7a0bd3fd31d
|
||||
- private long totalTime = 0;
|
||||
- private long curTickTotal = 0;
|
||||
- private long violations = 0;
|
||||
+@Deprecated
|
||||
+@Deprecated(forRemoval = true)
|
||||
+public final class CustomTimingsHandler {
|
||||
+ private final Timing handler;
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
|
||||
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 e24589a4cb42b0163e4a1455b8b11d7130b5cd41..71a09ed2b9863d2d339967f41ab6373ec27429d3 100644
|
||||
index 8d101352f72fc7fa21e0ba68039c79ce2fb92eb9..b5bdefc93d8614b5efbfd6e4c975275b9b53868c 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 {
|
||||
@@ -78,6 +78,20 @@ public final class Bukkit {
|
||||
return server;
|
||||
}
|
||||
|
||||
@@ -32,10 +32,10 @@ index e24589a4cb42b0163e4a1455b8b11d7130b5cd41..71a09ed2b9863d2d339967f41ab6373e
|
||||
* 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 ac087402c90dad4b3c499fcf8507e50e9099cea5..a4f8035b40eebff8afe01788781128b04247f28c 100644
|
||||
index 3e642d8a0294f7290c3d4310813e6e8a467810e7..d4d87ce99ad757733a0f2dd1a02eb79f4ee7972f 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;
|
||||
@@ -63,6 +63,18 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface Server extends PluginMessageRecipient, net.kyori.adventure.audience.ForwardingAudience { // Paper
|
||||
|
||||
@@ -55,7 +55,7 @@ index ac087402c90dad4b3c499fcf8507e50e9099cea5..a4f8035b40eebff8afe01788781128b0
|
||||
* 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 f13dcbe448111b24b36105d25527ba87ccc9334e..3fcb73a0fc2daaeb76dd4c6757afce52c5b3118b 100644
|
||||
index 63389474a2b3f0e283b42e7004aa6a94904a3d17..974ff7116b294473ec450757e8a9341540f43dcd 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -116,9 +116,22 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@@ -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 8d8a540c844e5365eed75a87db197a8fd4249bcd..4ddea8d71723db4326459c96324a817c70492261 100644
|
||||
index c54d478035f7782074c00f870d41da8283fec538..f21183cd5491b09e4543839252aed1ea10ddf849 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1916,6 +1916,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2198,6 +2198,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 71a09ed2b9863d2d339967f41ab6373ec27429d3..397f57f0ab4844fb88c60681bf6e6e3db8a98945 100644
|
||||
index b5bdefc93d8614b5efbfd6e4c975275b9b53868c..67ef3471a5ded760950459db5e65d20ca18af967 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1891,6 +1891,17 @@ public final class Bukkit {
|
||||
@@ -1964,6 +1964,17 @@ public final class Bukkit {
|
||||
return server.getEntity(uuid);
|
||||
}
|
||||
|
||||
@@ -27,10 +27,10 @@ index 71a09ed2b9863d2d339967f41ab6373ec27429d3..397f57f0ab4844fb88c60681bf6e6e3d
|
||||
* 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 a4f8035b40eebff8afe01788781128b04247f28c..3f3531e208472a0e76f76e2b1a08a699527cef8f 100644
|
||||
index d4d87ce99ad757733a0f2dd1a02eb79f4ee7972f..3b273e3ef2160ea3e436cabdfc4b33f605ab82c6 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1605,6 +1605,16 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1672,6 +1672,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 daf3ac72cae4d19c0273058dc6a1e1afe9a47f77..24fad8e59a3a5a174d24505cedda2a3fd52115b1 100644
|
||||
index 659405d84b5a61618576e930805da5cd3a054b4c..4604392831d19a789e4906cf1a5f0197105fd6f2 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -114,5 +114,12 @@ public interface UnsafeValues {
|
||||
@@ -127,5 +127,12 @@ public interface UnsafeValues {
|
||||
* @return name
|
||||
*/
|
||||
String getTimingsServerName();
|
||||
@@ -73,21 +73,24 @@ index daf3ac72cae4d19c0273058dc6a1e1afe9a47f77..24fad8e59a3a5a174d24505cedda2a3f
|
||||
// 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 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..b50f614806f4634960d383e8a33f094c2f46935f 100644
|
||||
index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..b437cf212a63aa96a9492db8d01d5d37061aee23 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 @@
|
||||
package org.bukkit.command.defaults;
|
||||
|
||||
+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;
|
||||
@@ -26,6 +27,15 @@ import org.bukkit.util.StringUtil;
|
||||
@@ -24,8 +24,25 @@ import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.util.StringUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
+// Paper start - version command 2.0
|
||||
+import com.destroystokyo.paper.util.VersionFetcher;
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+import net.kyori.adventure.text.format.NamedTextColor;
|
||||
+import net.kyori.adventure.text.event.ClickEvent;
|
||||
+import net.kyori.adventure.text.format.TextDecoration;
|
||||
+import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||
+// Paper end - version command 2.0
|
||||
|
||||
public class VersionCommand extends BukkitCommand {
|
||||
+ private VersionFetcher versionFetcher;
|
||||
+ private VersionFetcher versionFetcher; // Paper - version command 2.0
|
||||
+ private VersionFetcher getVersionFetcher() { // lazy load because unsafe isn't available at command registration
|
||||
+ if (versionFetcher == null) {
|
||||
+ versionFetcher = Bukkit.getUnsafe().getVersionFetcher();
|
||||
@@ -99,7 +102,7 @@ index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..b50f614806f4634960d383e8a33f094c
|
||||
public VersionCommand(@NotNull String name) {
|
||||
super(name);
|
||||
|
||||
@@ -40,7 +50,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -40,7 +57,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
if (!testPermission(sender)) return true;
|
||||
|
||||
if (args.length == 0) {
|
||||
@@ -108,12 +111,32 @@ index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..b50f614806f4634960d383e8a33f094c
|
||||
sendVersion(sender);
|
||||
} else {
|
||||
StringBuilder name = new StringBuilder();
|
||||
@@ -146,14 +156,14 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -79,8 +96,17 @@ public class VersionCommand extends BukkitCommand {
|
||||
|
||||
private void describeToSender(@NotNull Plugin plugin, @NotNull CommandSender sender) {
|
||||
PluginDescriptionFile desc = plugin.getDescription();
|
||||
- sender.sendMessage(ChatColor.GREEN + desc.getName() + ChatColor.WHITE + " version " + ChatColor.GREEN + desc.getVersion());
|
||||
-
|
||||
+ // Paper start - version command 2.0
|
||||
+ sender.sendMessage(
|
||||
+ Component.text()
|
||||
+ .append(Component.text(desc.getName(), NamedTextColor.GREEN))
|
||||
+ .append(Component.text(" version "))
|
||||
+ .append(Component.text(desc.getVersion(), NamedTextColor.GREEN)
|
||||
+ .hoverEvent(Component.text("Click to copy to clipboard", NamedTextColor.WHITE))
|
||||
+ .clickEvent(ClickEvent.copyToClipboard(desc.getVersion()))
|
||||
+ )
|
||||
+ );
|
||||
+ // Paper end - version command 2.0
|
||||
if (desc.getDescription() != null) {
|
||||
sender.sendMessage(desc.getDescription());
|
||||
}
|
||||
@@ -146,14 +172,14 @@ public class VersionCommand extends BukkitCommand {
|
||||
|
||||
private final ReentrantLock versionLock = new ReentrantLock();
|
||||
private boolean hasVersion = false;
|
||||
- private String versionMessage = null;
|
||||
+ private net.kyori.adventure.text.Component versionMessage = null; // Paper
|
||||
+ private Component versionMessage = null; // Paper
|
||||
private final Set<CommandSender> versionWaiters = new HashSet<CommandSender>();
|
||||
private boolean versionTaskStarted = false;
|
||||
private long lastCheck = 0;
|
||||
@@ -125,22 +148,22 @@ index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..b50f614806f4634960d383e8a33f094c
|
||||
lastCheck = System.currentTimeMillis();
|
||||
hasVersion = false;
|
||||
} else {
|
||||
@@ -168,7 +178,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -168,7 +194,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
return;
|
||||
}
|
||||
versionWaiters.add(sender);
|
||||
- sender.sendMessage("Checking version, please wait...");
|
||||
+ 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
|
||||
+ sender.sendMessage(Component.text("Checking version, please wait...", NamedTextColor.WHITE, TextDecoration.ITALIC)); // Paper
|
||||
if (!versionTaskStarted) {
|
||||
versionTaskStarted = true;
|
||||
new Thread(new Runnable() {
|
||||
@@ -186,6 +196,13 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -186,6 +212,13 @@ public class VersionCommand extends BukkitCommand {
|
||||
|
||||
private void obtainVersion() {
|
||||
String version = Bukkit.getVersion();
|
||||
+ // Paper start
|
||||
+ if (version.startsWith("null")) { // running from ide?
|
||||
+ setVersionMessage(net.kyori.adventure.text.Component.text("Unknown version, custom build?", net.kyori.adventure.text.format.NamedTextColor.YELLOW));
|
||||
+ setVersionMessage(Component.text("Unknown version, custom build?", NamedTextColor.YELLOW));
|
||||
+ return;
|
||||
+ }
|
||||
+ setVersionMessage(getVersionFetcher().getVersionMessage(version));
|
||||
@@ -148,7 +171,7 @@ index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..b50f614806f4634960d383e8a33f094c
|
||||
if (version == null) version = "Custom";
|
||||
String[] parts = version.substring(0, version.indexOf(' ')).split("-");
|
||||
if (parts.length == 4) {
|
||||
@@ -215,11 +232,24 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -215,11 +248,24 @@ public class VersionCommand extends BukkitCommand {
|
||||
} else {
|
||||
setVersionMessage("Unknown version, custom build?");
|
||||
}
|
||||
@@ -158,18 +181,18 @@ index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..b50f614806f4634960d383e8a33f094c
|
||||
|
||||
- private void setVersionMessage(@NotNull String msg) {
|
||||
+ // Paper start
|
||||
+ private void setVersionMessage(final @NotNull net.kyori.adventure.text.Component msg) {
|
||||
+ private void setVersionMessage(final @NotNull Component msg) {
|
||||
lastCheck = System.currentTimeMillis();
|
||||
- versionMessage = msg;
|
||||
+ 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(),
|
||||
+ final Component message = Component.textOfChildren(
|
||||
+ Component.text("This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")", NamedTextColor.WHITE),
|
||||
+ Component.newline(),
|
||||
+ msg
|
||||
+ );
|
||||
+ this.versionMessage = net.kyori.adventure.text.Component.text()
|
||||
+ this.versionMessage = Component.text()
|
||||
+ .append(message)
|
||||
+ .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)))
|
||||
+ .hoverEvent(Component.text("Click to copy to clipboard", NamedTextColor.WHITE))
|
||||
+ .clickEvent(ClickEvent.copyToClipboard(PlainTextComponentSerializer.plainText().serialize(message)))
|
||||
+ .build();
|
||||
+ // Paper end
|
||||
versionLock.lock();
|
||||
|
||||
@@ -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 0a539af95e1bd331cec241403a15e4e6dbf6d996..1b0b365905d4e7f77d3f792797816eeb35d31c69 100644
|
||||
index 121cd27185269339babae1757a604fbb5aabc869..63137429779d06fafb162f1bfb823d5149b3c58a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -724,5 +724,15 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -739,5 +739,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())));
|
||||
}
|
||||
@@ -25,15 +25,15 @@ index 0a539af95e1bd331cec241403a15e4e6dbf6d996..1b0b365905d4e7f77d3f792797816eeb
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java
|
||||
index 64f9d3fd870d65afd2ee9a85625b149163eee144..14cb0d770561151570ab4399ca5facff43076819 100644
|
||||
index d96fd494b523491fcf1ac54d164351fd487f65d6..ae1ce2ee2deb82f3f4144ec54b3ba119b437c5e9 100644
|
||||
--- a/src/main/java/org/bukkit/entity/FallingBlock.java
|
||||
+++ b/src/main/java/org/bukkit/entity/FallingBlock.java
|
||||
@@ -54,4 +54,15 @@ public interface FallingBlock extends Entity {
|
||||
* @param hurtEntities whether entities will be damaged by this block.
|
||||
@@ -126,4 +126,15 @@ public interface FallingBlock extends Entity {
|
||||
* @param damage the max damage to set. Must be >= 0
|
||||
*/
|
||||
void setHurtEntities(boolean hurtEntities);
|
||||
void setMaxDamage(int damage);
|
||||
+
|
||||
+ /**
|
||||
+ /**
|
||||
+ * Gets the source block location of the FallingBlock
|
||||
+ *
|
||||
+ * @return the source block location the FallingBlock was spawned from
|
||||
|
||||
@@ -6,22 +6,23 @@ Subject: [PATCH] Add PlayerLocaleChangeEvent
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerLocaleChangeEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerLocaleChangeEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..29dd763a99ce7c6ecb176b9fb346a400369d48a0
|
||||
index 0000000000000000000000000000000000000000..bb7baa91fd4ba763fd8ce216bc9043c5e2c4b7b7
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerLocaleChangeEvent.java
|
||||
@@ -0,0 +1,50 @@
|
||||
@@ -0,0 +1,51 @@
|
||||
+package com.destroystokyo.paper.event.player;
|
||||
+
|
||||
+import org.bukkit.entity.Player;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.player.PlayerEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+
|
||||
+/**
|
||||
+ * Called when the locale of the player is changed.
|
||||
+ *
|
||||
+ * @deprecated Replaced by {@link org.bukkit.event.player.PlayerLocaleChangeEvent} upstream
|
||||
+ */
|
||||
+@Deprecated
|
||||
+@Deprecated(forRemoval = true) @ApiStatus.ScheduledForRemoval(inVersion = "1.21")
|
||||
+public class PlayerLocaleChangeEvent extends PlayerEvent {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private final String oldLocale;
|
||||
|
||||
@@ -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 ed57cd69d88504b78782271c9a3d423a29471674..8a6a548314eef8d486be908e38e3a4562f26bdb4 100644
|
||||
index 1403d28bf9124e3c4cd741dfda06400318e8a0a0..3559115d09b57acf5c2853b811862e5131f2a625 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2698,6 +2698,62 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2663,6 +2663,62 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
int getSimulationDistance();
|
||||
// Spigot end
|
||||
|
||||
@@ -75,10 +75,10 @@ index ed57cd69d88504b78782271c9a3d423a29471674..8a6a548314eef8d486be908e38e3a456
|
||||
public class Spigot {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 4ddea8d71723db4326459c96324a817c70492261..a8310063973bb18502d561903b78149a6fda4939 100644
|
||||
index f21183cd5491b09e4543839252aed1ea10ddf849..f9b9e0269b3a9402c5be1c1c2007956415ff708a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1930,6 +1930,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2212,6 +2212,78 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param affects Whether the player can affect mob spawning
|
||||
*/
|
||||
public void setAffectsSpawning(boolean affects);
|
||||
|
||||
@@ -7,21 +7,22 @@ For modifying a player's initial spawn location as they join the server
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerInitialSpawnEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerInitialSpawnEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..626e97bbcaa19d55475a0fc8770412d437af2733
|
||||
index 0000000000000000000000000000000000000000..febd384b43560d7d55c96bda5b0701a27fc9e18e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerInitialSpawnEvent.java
|
||||
@@ -0,0 +1,17 @@
|
||||
@@ -0,0 +1,18 @@
|
||||
+package com.destroystokyo.paper.event.player;
|
||||
+
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.entity.Player;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.spigotmc.event.player.PlayerSpawnLocationEvent;
|
||||
+
|
||||
+/**
|
||||
+ * @deprecated Use {@link PlayerSpawnLocationEvent}, Duplicate API
|
||||
+ */
|
||||
+@Deprecated
|
||||
+@Deprecated(forRemoval = true) @ApiStatus.ScheduledForRemoval(inVersion = "1.21")
|
||||
+public class PlayerInitialSpawnEvent extends PlayerSpawnLocationEvent {
|
||||
+
|
||||
+ public PlayerInitialSpawnEvent(@NotNull Player who, @NotNull Location spawnLocation) {
|
||||
|
||||
@@ -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 397f57f0ab4844fb88c60681bf6e6e3db8a98945..1035ce181415a19f8d6460f70d3d900e3f7017d3 100644
|
||||
index 67ef3471a5ded760950459db5e65d20ca18af967..b53e94d79862d66165bbcd2a79b82770398a7f3e 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2092,6 +2092,19 @@ public final class Bukkit {
|
||||
@@ -2165,6 +2165,19 @@ public final class Bukkit {
|
||||
return server.getUnsafe();
|
||||
}
|
||||
|
||||
@@ -29,10 +29,10 @@ index 397f57f0ab4844fb88c60681bf6e6e3db8a98945..1035ce181415a19f8d6460f70d3d900e
|
||||
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 3f3531e208472a0e76f76e2b1a08a699527cef8f..6a7b91af3e738613cf79c13e2844efe9a2efd254 100644
|
||||
index 3b273e3ef2160ea3e436cabdfc4b33f605ab82c6..124e88e512d24b6ff7ace3cf7d5a6adf4c2bb40d 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1615,6 +1615,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1682,6 +1682,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 1035ce181415a19f8d6460f70d3d900e3f7017d3..316146305465b68b703e898206745de94ad5350f 100644
|
||||
index b53e94d79862d66165bbcd2a79b82770398a7f3e..9417030074fccdd9113bf75eb8f17f74b9a9118b 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -379,6 +379,30 @@ public final class Bukkit {
|
||||
@@ -410,6 +410,30 @@ public final class Bukkit {
|
||||
return server.broadcastMessage(message);
|
||||
}
|
||||
|
||||
@@ -41,10 +41,10 @@ index 1035ce181415a19f8d6460f70d3d900e3f7017d3..316146305465b68b703e898206745de9
|
||||
* 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 6a7b91af3e738613cf79c13e2844efe9a2efd254..bef555b3de44fed312b45a5d5cd811b18fda88c8 100644
|
||||
index 124e88e512d24b6ff7ace3cf7d5a6adf4c2bb40d..ccc825a2ea43bb84a5a08dff00c4d8ec27e4e95a 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -312,6 +312,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -345,6 +345,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@Deprecated // Paper
|
||||
public int broadcastMessage(@NotNull String message);
|
||||
|
||||
@@ -76,10 +76,10 @@ index 6a7b91af3e738613cf79c13e2844efe9a2efd254..bef555b3de44fed312b45a5d5cd811b1
|
||||
* 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 a8310063973bb18502d561903b78149a6fda4939..a2c813d6d94ae2a87278d92445635ae8dd3ab00a 100644
|
||||
index f9b9e0269b3a9402c5be1c1c2007956415ff708a..284bb156c4430a9a8afce0a7dffa96722b8c29cc 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -813,6 +813,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1041,6 +1041,42 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void sendMap(@NotNull MapView map);
|
||||
|
||||
@@ -120,5 +120,5 @@ index a8310063973bb18502d561903b78149a6fda4939..a2c813d6d94ae2a87278d92445635ae8
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Add custom chat completion suggestions shown to the player while typing a
|
||||
* message.
|
||||
* Send a hurt animation. This fakes incoming damage towards the player from
|
||||
* the given yaw relative to the player's direction.
|
||||
@@ -322,7 +322,7 @@ index 0000000000000000000000000000000000000000..be3f92e3c6bcefe8b78da701b7512127
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerPluginMessageException.java b/src/main/java/com/destroystokyo/paper/exception/ServerPluginMessageException.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..89e132525cfae0ce979e37b3e2793df781e47227
|
||||
index 0000000000000000000000000000000000000000..2faef4cb358ec65e32a6aba6426f0dd7ddf90d2a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/exception/ServerPluginMessageException.java
|
||||
@@ -0,0 +1,64 @@
|
||||
@@ -364,7 +364,7 @@ index 0000000000000000000000000000000000000000..89e132525cfae0ce979e37b3e2793df7
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the channel to which the error occurred from recieving data from
|
||||
+ * Gets the channel to which the error occurred from receiving data from
|
||||
+ *
|
||||
+ * @return exception channel
|
||||
+ */
|
||||
@@ -493,7 +493,7 @@ index 4205649948a9e2a72f64c3f007112245abac6d50..b3b32ce429edbf1ed040354dbe28ab86
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 3fcb73a0fc2daaeb76dd4c6757afce52c5b3118b..2b8308989fce7f8a16907f8711b362e671fdbfb6 100644
|
||||
index 974ff7116b294473ec450757e8a9341540f43dcd..fc2dae69165776d08274e34a69962cc70445f411 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -515,7 +515,8 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@@ -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 5e7f8822a17459583d9950dc09e3888f492bfd87..d0e1fbb58c5ce71bf2b8d9db9aa3c1b4ca797435 100644
|
||||
index 70fec73328227725f519af845ecbdce8be2fa4e2..04e7cd0e4e2d0eb38fb2862ce6688a4470f30d6b 100644
|
||||
--- a/src/main/java/org/bukkit/command/CommandSender.java
|
||||
+++ b/src/main/java/org/bukkit/command/CommandSender.java
|
||||
@@ -1,6 +1,9 @@
|
||||
@@ -18,7 +18,7 @@ index 5e7f8822a17459583d9950dc09e3888f492bfd87..d0e1fbb58c5ce71bf2b8d9db9aa3c1b4
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.permissions.Permissible;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -145,5 +148,33 @@ public interface CommandSender extends net.kyori.adventure.audience.Audience, Pe
|
||||
@@ -168,5 +171,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,10 +432,10 @@ index 0000000000000000000000000000000000000000..9e90c3df567a65b48a0b9341f784eb90
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index a2c813d6d94ae2a87278d92445635ae8dd3ab00a..3e2b8c1ae51404352adccc9ad108982173306ee9 100644
|
||||
index 284bb156c4430a9a8afce0a7dffa96722b8c29cc..d5746291dd0cfc32591482945040e992ad1efb8e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -847,6 +847,131 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1075,6 +1075,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);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ Upstream added methods for this so the original methods
|
||||
are now deprecated
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 2b816f0e6bdb912ceeff82c0043272b3970fe243..9977bb3cb5a66c84db816f8e4597db1c053f77c8 100644
|
||||
index 7c82644de3c438f45476ac02ce2c51c6fdbd543a..390bb294d09389877937ee2c6c3f346e65dfb178 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -215,12 +215,26 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -38,7 +38,7 @@ index 2b816f0e6bdb912ceeff82c0043272b3970fe243..9977bb3cb5a66c84db816f8e4597db1c
|
||||
|
||||
/**
|
||||
* Returns the living entity's current maximum no damage ticks.
|
||||
@@ -689,4 +703,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -722,4 +736,24 @@ 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 3e2b8c1ae51404352adccc9ad108982173306ee9..cdc67b2c6770119ada67033b388befa607bd46db 100644
|
||||
index d5746291dd0cfc32591482945040e992ad1efb8e..e12d28143a213abdc0552a15e82cacecc414ca26 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1394,7 +1394,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1655,7 +1655,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 3e2b8c1ae51404352adccc9ad108982173306ee9..cdc67b2c6770119ada67033b388befa6
|
||||
public void setResourcePack(@NotNull String url);
|
||||
|
||||
/**
|
||||
@@ -2210,6 +2212,124 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2502,6 +2504,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,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 316146305465b68b703e898206745de94ad5350f..6311d7ef36b3c6922c73695c353c561c507f2128 100644
|
||||
index 9417030074fccdd9113bf75eb8f17f74b9a9118b..9003a603b6bf82a7b6f04fa027cdc889cf7c274f 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2127,6 +2127,13 @@ public final class Bukkit {
|
||||
@@ -2200,6 +2200,13 @@ public final class Bukkit {
|
||||
public static org.bukkit.command.CommandMap getCommandMap() {
|
||||
return server.getCommandMap();
|
||||
}
|
||||
@@ -24,10 +24,10 @@ index 316146305465b68b703e898206745de94ad5350f..6311d7ef36b3c6922c73695c353c561c
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index bef555b3de44fed312b45a5d5cd811b18fda88c8..994f494fe7cace5c88738858def4051788391a3c 100644
|
||||
index ccc825a2ea43bb84a5a08dff00c4d8ec27e4e95a..45e628f6c47945ce008d8436e3b13325bb5084d8 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1876,4 +1876,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1943,4 +1943,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@NotNull
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
|
||||
@@ -3,56 +3,96 @@ From: Jedediah Smith <jedediah@silencegreys.com>
|
||||
Date: Sat, 2 Apr 2016 05:08:36 -0400
|
||||
Subject: [PATCH] Add PlayerUseUnknownEntityEvent
|
||||
|
||||
Adds the PlayerUseUnknownEntityEvent to be used by plugins dealing with
|
||||
virtual entities/entities that are not actually known to the server.
|
||||
|
||||
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..09cfdf48ead8f03f3497646537292174241b0868
|
||||
index 0000000000000000000000000000000000000000..a7228e248e3d8eb2e9f011dfe2c7dd9f3f48000f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerUseUnknownEntityEvent.java
|
||||
@@ -0,0 +1,46 @@
|
||||
@@ -0,0 +1,82 @@
|
||||
+package com.destroystokyo.paper.event.player;
|
||||
+
|
||||
+import org.bukkit.entity.Player;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.player.PlayerEvent;
|
||||
+import org.bukkit.inventory.EquipmentSlot;
|
||||
+import org.bukkit.util.Vector;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Represents an event that is called when a player right-clicks an unknown entity.
|
||||
+ * Useful for plugins dealing with virtual entities (entities that don't actually spawned on the server).
|
||||
+ * <br>
|
||||
+ * This event may be called multiple times per interaction with different interaction hands
|
||||
+ * and with or without the clicked position.
|
||||
+ */
|
||||
+public class PlayerUseUnknownEntityEvent extends PlayerEvent {
|
||||
+
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private static final HandlerList HANDLERS = new HandlerList();
|
||||
+ private final int entityId;
|
||||
+ private final boolean attack;
|
||||
+ @NotNull private final EquipmentSlot hand;
|
||||
+ private final @NotNull EquipmentSlot hand;
|
||||
+ private final @Nullable Vector clickedPosition;
|
||||
+
|
||||
+ public PlayerUseUnknownEntityEvent(@NotNull Player who, int entityId, boolean attack, @NotNull EquipmentSlot hand) {
|
||||
+ public PlayerUseUnknownEntityEvent(@NotNull Player who, int entityId, boolean attack, @NotNull EquipmentSlot hand, @Nullable Vector clickedPosition) {
|
||||
+ super(who);
|
||||
+ this.entityId = entityId;
|
||||
+ this.attack = attack;
|
||||
+ this.hand = hand;
|
||||
+ this.clickedPosition = clickedPosition;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the entity id of the unknown entity that was interacted with.
|
||||
+ *
|
||||
+ * @return the entity id of the entity that was interacted with
|
||||
+ */
|
||||
+ public int getEntityId() {
|
||||
+ return this.entityId;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns whether the interaction was an attack.
|
||||
+ *
|
||||
+ * @return true if the player is attacking the entity, false if the player is interacting with the entity
|
||||
+ */
|
||||
+ public boolean isAttack() {
|
||||
+ return this.attack;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public EquipmentSlot getHand() {
|
||||
+ /**
|
||||
+ * Returns the hand used to perform this interaction.
|
||||
+ *
|
||||
+ * @return the hand used to interact
|
||||
+ */
|
||||
+ public @NotNull EquipmentSlot getHand() {
|
||||
+ return this.hand;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the position relative to the entity that was clicked, or null if not available.
|
||||
+ * See {@link org.bukkit.event.player.PlayerInteractAtEntityEvent} for more details.
|
||||
+ *
|
||||
+ * @return the position relative to the entity that was clicked, or null if not available
|
||||
+ * @see org.bukkit.event.player.PlayerInteractAtEntityEvent
|
||||
+ */
|
||||
+ public @Nullable Vector getClickedRelativePosition() {
|
||||
+ return this.clickedPosition != null ? this.clickedPosition.clone() : null;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ return HANDLERS;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ return HANDLERS;
|
||||
+ }
|
||||
+}
|
||||
@@ -58,10 +58,10 @@ index 0000000000000000000000000000000000000000..b387894fe8001edb41ad2ad2b70ebabe
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java b/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..97815eeb231cf0706b34fa47a4f7d1bb786305b4
|
||||
index 0000000000000000000000000000000000000000..2b01a50b6e18856f4c9e28340a7a111cae646a0a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/loottable/LootableInventory.java
|
||||
@@ -0,0 +1,116 @@
|
||||
@@ -0,0 +1,125 @@
|
||||
+package com.destroystokyo.paper.loottable;
|
||||
+
|
||||
+import org.bukkit.entity.Player;
|
||||
@@ -106,6 +106,15 @@ index 0000000000000000000000000000000000000000..97815eeb231cf0706b34fa47a4f7d1bb
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if this player can loot this block. Takes into account the "restrict player reloot" settings
|
||||
+ *
|
||||
+ * @param player the player to check
|
||||
+ *
|
||||
+ * @return Whether this player can loot this block
|
||||
+ */
|
||||
+ boolean canPlayerLoot(@NotNull UUID player);
|
||||
+
|
||||
+ /**
|
||||
+ * Has this player ever looted this block
|
||||
+ * @param player The player to check
|
||||
+ * @return Whether or not this player has looted this block
|
||||
@@ -229,6 +238,16 @@ index 0000000000000000000000000000000000000000..fd184f13f5e8ee5cf829fff4f44696e1
|
||||
+ cancelled = cancel;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/block/Barrel.java b/src/main/java/org/bukkit/block/Barrel.java
|
||||
index aa1bb7a1a1c94b0b029bb60026efbc7f55584dd7..d3789b2b7dd71d7c1872a0d84698d35a1884101b 100644
|
||||
--- a/src/main/java/org/bukkit/block/Barrel.java
|
||||
+++ b/src/main/java/org/bukkit/block/Barrel.java
|
||||
@@ -5,4 +5,4 @@ import org.bukkit.loot.Lootable;
|
||||
/**
|
||||
* Represents a captured state of a Barrel.
|
||||
*/
|
||||
-public interface Barrel extends Container, Lootable, Lidded { }
|
||||
+public interface Barrel extends Container, com.destroystokyo.paper.loottable.LootableBlockInventory, Lidded { } // Paper
|
||||
diff --git a/src/main/java/org/bukkit/block/Chest.java b/src/main/java/org/bukkit/block/Chest.java
|
||||
index b451191312e4fb19f2131c2d0a0c0337953f6c7c..db6affbc78106b2d93b41953b624a0bca0ca1d72 100644
|
||||
--- a/src/main/java/org/bukkit/block/Chest.java
|
||||
|
||||
@@ -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 6311d7ef36b3c6922c73695c353c561c507f2128..a314ff1363cb527fa7e1b366f9191939e9c7ca6e 100644
|
||||
index 9003a603b6bf82a7b6f04fa027cdc889cf7c274f..297f7befdac5c45efb1c9f432c49696814f513ab 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2134,6 +2134,15 @@ public final class Bukkit {
|
||||
@@ -2207,6 +2207,15 @@ public final class Bukkit {
|
||||
public static void reloadPermissions() {
|
||||
server.reloadPermissions();
|
||||
}
|
||||
@@ -26,10 +26,10 @@ index 6311d7ef36b3c6922c73695c353c561c507f2128..a314ff1363cb527fa7e1b366f9191939
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 994f494fe7cace5c88738858def4051788391a3c..610475aff60b7f19c4bedb932985c736fb890684 100644
|
||||
index 45e628f6c47945ce008d8436e3b13325bb5084d8..d80e9a6770c565c2cdb6bea6ad14969a6a6d0dad 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1878,4 +1878,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1945,4 +1945,6 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
// Spigot end
|
||||
|
||||
void reloadPermissions(); // Paper
|
||||
|
||||
@@ -5,10 +5,10 @@ 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 cdc67b2c6770119ada67033b388befa607bd46db..0fdaf416960ace84fbe9b9c461641efbb8b631a4 100644
|
||||
index e12d28143a213abdc0552a15e82cacecc414ca26..3954f40b23536fec495585a8b14e82d092d62e39 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -814,6 +814,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1042,6 +1042,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
public void sendMap(@NotNull MapView map);
|
||||
|
||||
// Paper start
|
||||
@@ -48,7 +48,7 @@ index cdc67b2c6770119ada67033b388befa607bd46db..0fdaf416960ace84fbe9b9c461641efb
|
||||
/**
|
||||
* Sends the component to the player
|
||||
*
|
||||
@@ -841,9 +874,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1069,9 +1102,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
|
||||
*
|
||||
|
||||
@@ -7,10 +7,10 @@ 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 8a6a548314eef8d486be908e38e3a4562f26bdb4..749d3de7dad480965be536938733d72bdfc2995b 100644
|
||||
index 3559115d09b57acf5c2853b811862e5131f2a625..dbb799aed5bbb80edd2428b63d3fce15cf2e2f05 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -45,6 +45,33 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -47,6 +47,33 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient, Metadatable, PersistentDataHolder, Keyed, net.kyori.adventure.audience.ForwardingAudience { // Paper
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ 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 b1c08a7fc5856bcc29ee64d0a87b95a8ac940ddc..0f2f17f0a443ec5087b3373293b23f663be9dbe1 100644
|
||||
index b1c08a7fc5856bcc29ee64d0a87b95a8ac940ddc..3ab5700b0b13fbfbf7c5b0b2c4a90bcc1e0a2d9c 100644
|
||||
--- a/src/main/java/org/bukkit/WorldBorder.java
|
||||
+++ b/src/main/java/org/bukkit/WorldBorder.java
|
||||
@@ -162,4 +162,18 @@ public interface WorldBorder {
|
||||
@@ -21,7 +21,7 @@ index b1c08a7fc5856bcc29ee64d0a87b95a8ac940ddc..0f2f17f0a443ec5087b3373293b23f66
|
||||
+ * @return true if the location is within the bounds of this border, false otherwise.
|
||||
+ * @deprecated use {@link #isInside(Location)} for an upstream compatible replacement
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ @Deprecated(forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.21")
|
||||
+ public default boolean isInBounds(@NotNull Location location) {
|
||||
+ return this.isInside(location);
|
||||
+ }
|
||||
|
||||
@@ -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 a314ff1363cb527fa7e1b366f9191939e9c7ca6e..d3d8c5ac59cee2ec24e91223e0c994016a4f9752 100644
|
||||
index 297f7befdac5c45efb1c9f432c49696814f513ab..add298a1a0b6f6dbd72fe9e8f87794d193760fb7 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2143,6 +2143,16 @@ public final class Bukkit {
|
||||
@@ -2216,6 +2216,16 @@ public final class Bukkit {
|
||||
public static boolean reloadCommandAliases() {
|
||||
return server.reloadCommandAliases();
|
||||
}
|
||||
@@ -27,10 +27,10 @@ index a314ff1363cb527fa7e1b366f9191939e9c7ca6e..d3d8c5ac59cee2ec24e91223e0c99401
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 610475aff60b7f19c4bedb932985c736fb890684..a8d3addae5b0ed261d6a27052ad4e54970de597c 100644
|
||||
index d80e9a6770c565c2cdb6bea6ad14969a6a6d0dad..22d508a6c80d7e19352bceb57009fdbcb16bc723 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1880,4 +1880,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1947,4 +1947,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
void reloadPermissions(); // Paper
|
||||
|
||||
boolean reloadCommandAliases(); // Paper
|
||||
@@ -46,7 +46,7 @@ index 610475aff60b7f19c4bedb932985c736fb890684..a8d3addae5b0ed261d6a27052ad4e549
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
|
||||
index 6fd341482d5250ad814e870360e40b52427f799a..a26df5f6341d22ecd5e71da59b8f091848e627ad 100644
|
||||
index 5cfd88eec9bf02e83d77b6fce1a5c14b7687f48b..1c6205cc667bbec8f6aca479f13b3e9cfcd63ab2 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 {
|
||||
|
||||
@@ -3,13 +3,56 @@ From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Sat, 10 Jun 2017 16:59:40 -0500
|
||||
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/BanList.java b/src/main/java/org/bukkit/BanList.java
|
||||
index a04cde615f8c4bc593f8d9f8f6f1438008aaa707..548f6d28c28d74bed8b58ee82875909354afe132 100644
|
||||
--- a/src/main/java/org/bukkit/BanList.java
|
||||
+++ b/src/main/java/org/bukkit/BanList.java
|
||||
@@ -38,6 +38,9 @@ public interface BanList<T> {
|
||||
|
||||
/**
|
||||
* Gets a {@link BanEntry} by target.
|
||||
+ * <p>
|
||||
+ * Bans by name for ban type {@link Type#NAME NAME} are no longer supported and this method will return
|
||||
+ * null when trying to request them. The replacement is bans by UUID.
|
||||
*
|
||||
* @param target entry parameter to search for
|
||||
* @return the corresponding entry, or null if none found
|
||||
@@ -59,6 +62,9 @@ public interface BanList<T> {
|
||||
/**
|
||||
* Adds a ban to this list. If a previous ban exists, this will
|
||||
* update the previous entry.
|
||||
+ * <p>
|
||||
+ * Bans by name for ban type {@link Type#NAME NAME} are no longer supported and this method will return
|
||||
+ * null when trying to request them. The replacement is bans by UUID.
|
||||
*
|
||||
* @param target the target of the ban
|
||||
* @param reason reason for the ban, null indicates implementation default
|
||||
@@ -139,6 +145,9 @@ public interface BanList<T> {
|
||||
/**
|
||||
* Gets if a {@link BanEntry} exists for the target, indicating an active
|
||||
* ban status.
|
||||
+ * <p>
|
||||
+ * Bans by name for ban type {@link Type#NAME NAME} are no longer supported.
|
||||
+ * The replacement is bans by UUID.
|
||||
*
|
||||
* @param target the target to find
|
||||
* @return true if a {@link BanEntry} exists for the target, indicating an
|
||||
@@ -161,6 +170,9 @@ public interface BanList<T> {
|
||||
/**
|
||||
* Removes the specified target from this list, therefore indicating a
|
||||
* "not banned" status.
|
||||
+ * <p>
|
||||
+ * Bans by name for ban type {@link Type#NAME NAME} are no longer supported.
|
||||
+ * The replacement is bans by UUID.
|
||||
*
|
||||
* @param target the target to remove from this list
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index d3d8c5ac59cee2ec24e91223e0c994016a4f9752..82757d3013e01a6bfbb685929955d3e7dad8508c 100644
|
||||
index add298a1a0b6f6dbd72fe9e8f87794d193760fb7..b21f90f291a087b6282cd7b55e0075a01729f0ba 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1334,6 +1334,8 @@ public final class Bukkit {
|
||||
@@ -1388,6 +1388,8 @@ public final class Bukkit {
|
||||
|
||||
/**
|
||||
* Gets every player that has ever played on this server.
|
||||
@@ -31,11 +74,50 @@ index 0cf808356a1a5c6fc4bcf97a694ed9beb80a776a..dc765dea47a9a1c1520fb16ddb24f814
|
||||
* @param z Z-coordinate (0-15)
|
||||
* @return temperature at given coordinate
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/RegionAccessor.java b/src/main/java/org/bukkit/RegionAccessor.java
|
||||
index 02de62c083ceaa466c80cb732e8304b8cc3f07f8..7c2b1eff41dd43fda84d84e76c05bbbf37c186b8 100644
|
||||
--- a/src/main/java/org/bukkit/RegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/RegionAccessor.java
|
||||
@@ -158,7 +158,7 @@ public interface RegionAccessor {
|
||||
* Creates a tree at the given {@link Location}
|
||||
*
|
||||
* @param location Location to spawn the tree
|
||||
- * @param random Random to use to generated the tree
|
||||
+ * @param random Random to use to generate the tree
|
||||
* @param type Type of the tree to create
|
||||
* @return true if the tree was created successfully, otherwise false
|
||||
*/
|
||||
@@ -170,14 +170,14 @@ public interface RegionAccessor {
|
||||
* The provided consumer gets called for every block which gets changed
|
||||
* as a result of the tree generation. When the consumer gets called no
|
||||
* modifications to the world are done yet. Which means, that calling
|
||||
- * {@link #getBlockState(Location)} in the consumer while return the state
|
||||
+ * {@link #getBlockState(Location)} in the consumer will return the state
|
||||
* of the block before the generation.
|
||||
* <p>
|
||||
* Modifications done to the {@link BlockState} in the consumer are respected,
|
||||
* which means that it is not necessary to call {@link BlockState#update()}
|
||||
*
|
||||
* @param location Location to spawn the tree
|
||||
- * @param random Random to use to generated the tree
|
||||
+ * @param random Random to use to generate the tree
|
||||
* @param type Type of the tree to create
|
||||
* @param stateConsumer The consumer which should get called for every block which gets changed
|
||||
* @return true if the tree was created successfully, otherwise false
|
||||
@@ -197,7 +197,7 @@ public interface RegionAccessor {
|
||||
* If it returns {@code false} the block won't get set in the world.
|
||||
*
|
||||
* @param location Location to spawn the tree
|
||||
- * @param random Random to use to generated the tree
|
||||
+ * @param random Random to use to generate the tree
|
||||
* @param type Type of the tree to create
|
||||
* @param statePredicate The predicate which should get used to test if a block should be set or not.
|
||||
* @return true if the tree was created successfully, otherwise false
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index a8d3addae5b0ed261d6a27052ad4e54970de597c..3485db7548e93242f99977a236eb3bcebedfb964 100644
|
||||
index 22d508a6c80d7e19352bceb57009fdbcb16bc723..3c1862b9a9293155f756615b5bd23cc810a6df5e 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -510,13 +510,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -543,13 +543,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.
|
||||
@@ -50,7 +132,7 @@ index a8d3addae5b0ed261d6a27052ad4e54970de597c..3485db7548e93242f99977a236eb3bce
|
||||
*/
|
||||
public int getTicksPerSpawns(@NotNull SpawnCategory spawnCategory);
|
||||
|
||||
@@ -1129,6 +1126,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1181,6 +1178,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
/**
|
||||
* Gets every player that has ever played on this server.
|
||||
@@ -59,6 +141,37 @@ index a8d3addae5b0ed261d6a27052ad4e54970de597c..3485db7548e93242f99977a236eb3bce
|
||||
*
|
||||
* @return an array containing all previous players
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index dbb799aed5bbb80edd2428b63d3fce15cf2e2f05..609e4908ed21f69b9e813500e702bbe784bff00c 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2577,7 +2577,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
/**
|
||||
* Find the closest nearby structure of a given {@link StructureType}.
|
||||
* Finding unexplored structures can, and will, block if the world is
|
||||
- * looking in chunks that gave not generated yet. This can lead to the world
|
||||
+ * looking in chunks that have not generated yet. This can lead to the world
|
||||
* temporarily freezing while locating an unexplored structure.
|
||||
* <p>
|
||||
* The {@code radius} is not a rigid square radius. Each structure may alter
|
||||
@@ -2611,7 +2611,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
/**
|
||||
* Find the closest nearby structure of a given {@link StructureType}.
|
||||
* Finding unexplored structures can, and will, block if the world is
|
||||
- * looking in chunks that gave not generated yet. This can lead to the world
|
||||
+ * looking in chunks that have not generated yet. This can lead to the world
|
||||
* temporarily freezing while locating an unexplored structure.
|
||||
* <p>
|
||||
* The {@code radius} is not a rigid square radius. Each structure may alter
|
||||
@@ -2644,7 +2644,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
/**
|
||||
* Find the closest nearby structure of a given {@link Structure}. Finding
|
||||
* unexplored structures can, and will, block if the world is looking in
|
||||
- * chunks that gave not generated yet. This can lead to the world
|
||||
+ * chunks that have not generated yet. This can lead to the world
|
||||
* temporarily freezing while locating an unexplored structure.
|
||||
* <p>
|
||||
* The {@code radius} is not a rigid square radius. Each structure may alter
|
||||
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
|
||||
@@ -89,6 +202,93 @@ index f9bd74f9ce6bd6650726e5a993f9b6e292cdc74d..f4c37ce1fe7aac3dde8485ee51fc8888
|
||||
+ void setColor(@org.bukkit.UndefinedNullability("not supported") org.bukkit.DyeColor color);
|
||||
+// Paper end
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index f8e12868f2e629cdf4784f0157fdb2f8e7b01f99..870ad6cd930653e6248abcc0fce94ffafbe9ebde 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -357,7 +357,7 @@ public interface Block extends Metadatable, Translatable {
|
||||
* Gets the temperature of this block.
|
||||
* <p>
|
||||
* If the raw biome temperature without adjusting for height effects is
|
||||
- * required then please use {@link World#getTemperature(int, int)}.
|
||||
+ * required then please use {@link World#getTemperature(int, int, int)}.
|
||||
*
|
||||
* @return Temperature of this block
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/block/data/BlockData.java b/src/main/java/org/bukkit/block/data/BlockData.java
|
||||
index 2e2232956f626669005cfdfd6550aa8ee29fc1ab..869fa47a13fbcb128228963bf53cc72da4499a01 100644
|
||||
--- a/src/main/java/org/bukkit/block/data/BlockData.java
|
||||
+++ b/src/main/java/org/bukkit/block/data/BlockData.java
|
||||
@@ -215,7 +215,7 @@ public interface BlockData extends Cloneable {
|
||||
* {@link Material#REDSTONE_WIRE} -> {@link Material#REDSTONE}
|
||||
* {@link Material#CARROTS} -> {@link Material#CARROT}
|
||||
* </pre>
|
||||
- * @return placement material
|
||||
+ * @return placement material or {@link Material#AIR} if it doesn't have one
|
||||
*/
|
||||
@NotNull
|
||||
Material getPlacementMaterial();
|
||||
diff --git a/src/main/java/org/bukkit/block/data/FaceAttachable.java b/src/main/java/org/bukkit/block/data/FaceAttachable.java
|
||||
index 9599e1237b9717ddbf84c3738bf6c1293e8b3c54..950266b4bb0a2fabeb9539c5676ed58f0b0fe620 100644
|
||||
--- a/src/main/java/org/bukkit/block/data/FaceAttachable.java
|
||||
+++ b/src/main/java/org/bukkit/block/data/FaceAttachable.java
|
||||
@@ -38,7 +38,7 @@ public interface FaceAttachable extends BlockData {
|
||||
*/
|
||||
WALL,
|
||||
/**
|
||||
- * The switch is mounted to the ceiling and pointing dowanrds.
|
||||
+ * The switch is mounted to the ceiling and pointing downwards.
|
||||
*/
|
||||
CEILING;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/data/type/CommandBlock.java b/src/main/java/org/bukkit/block/data/type/CommandBlock.java
|
||||
index 9a7122c907308e4e0a4d0eab815df16899503c19..3b1dab4c1c38477fbe651382f37fdb042ce67cd1 100644
|
||||
--- a/src/main/java/org/bukkit/block/data/type/CommandBlock.java
|
||||
+++ b/src/main/java/org/bukkit/block/data/type/CommandBlock.java
|
||||
@@ -4,7 +4,7 @@ import org.bukkit.block.data.Directional;
|
||||
|
||||
/**
|
||||
* 'conditional' denotes whether this command block is conditional or not, i.e.
|
||||
- * will only execute if the preceeding command block also executed successfully.
|
||||
+ * will only execute if the preceding command block also executed successfully.
|
||||
*/
|
||||
public interface CommandBlock extends Directional {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/data/type/Gate.java b/src/main/java/org/bukkit/block/data/type/Gate.java
|
||||
index 494f97d47b52bc99b13748c1b57730fbd37d8f51..ebc98607b93294847f95e793304bc5d2528de2a3 100644
|
||||
--- a/src/main/java/org/bukkit/block/data/type/Gate.java
|
||||
+++ b/src/main/java/org/bukkit/block/data/type/Gate.java
|
||||
@@ -5,7 +5,7 @@ import org.bukkit.block.data.Openable;
|
||||
import org.bukkit.block.data.Powerable;
|
||||
|
||||
/**
|
||||
- * 'in_wall" indicates if the fence gate is attached to a wall, and if true the
|
||||
+ * 'in_wall' indicates if the fence gate is attached to a wall, and if true the
|
||||
* texture is lowered by a small amount to blend in better.
|
||||
*/
|
||||
public interface Gate extends Directional, Openable, Powerable {
|
||||
diff --git a/src/main/java/org/bukkit/block/data/type/Switch.java b/src/main/java/org/bukkit/block/data/type/Switch.java
|
||||
index be06f8db02ca41d5cc3a5dc02951ad27e3cc8f9d..d91a07c7bcb36b3810bb2db89afef1eefd89253d 100644
|
||||
--- a/src/main/java/org/bukkit/block/data/type/Switch.java
|
||||
+++ b/src/main/java/org/bukkit/block/data/type/Switch.java
|
||||
@@ -21,7 +21,7 @@ public interface Switch extends Directional, FaceAttachable, Powerable {
|
||||
* Sets the value of the 'face' property.
|
||||
*
|
||||
* @param face the new 'face' value
|
||||
- * @deprecated use {@link #getAttachedFace()}
|
||||
+ * @deprecated use {@link #setAttachedFace(AttachedFace)}
|
||||
*/
|
||||
@Deprecated
|
||||
void setFace(@NotNull Face face);
|
||||
@@ -42,7 +42,7 @@ public interface Switch extends Directional, FaceAttachable, Powerable {
|
||||
*/
|
||||
WALL,
|
||||
/**
|
||||
- * The switch is mounted to the ceiling and pointing dowanrds.
|
||||
+ * The switch is mounted to the ceiling and pointing downwards.
|
||||
*/
|
||||
CEILING;
|
||||
}
|
||||
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
|
||||
@@ -102,6 +302,32 @@ index 91fc11dda99de506be83d40df8929bf7cd8e8d85..7dc631ebd009f5f5c3ac1699c3f3515c
|
||||
+ org.bukkit.inventory.@NotNull EntityEquipment getEquipment();
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Arrow.java b/src/main/java/org/bukkit/entity/Arrow.java
|
||||
index 8eb0cf31b1ce6d714a14cf65bbb117ff163ae2f3..8e57082e8b19a2fd9625816c2ea4a90d41f78ca5 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Arrow.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Arrow.java
|
||||
@@ -93,7 +93,7 @@ public interface Arrow extends AbstractArrow {
|
||||
* Removes a custom potion effect from this arrow.
|
||||
*
|
||||
* @param type the potion effect type to remove
|
||||
- * @return true if the an effect was removed as a result of this call
|
||||
+ * @return true if the effect was removed as a result of this call
|
||||
* @throws IllegalArgumentException if this operation would leave the Arrow
|
||||
* in a state with no Custom Effects and PotionType.UNCRAFTABLE
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/entity/EnderDragon.java b/src/main/java/org/bukkit/entity/EnderDragon.java
|
||||
index 1e56aef9188487d3e9c737e85025f601ab359a72..92cd35c87bad578c2b714761c93a5b72ebf4bc9e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/EnderDragon.java
|
||||
+++ b/src/main/java/org/bukkit/entity/EnderDragon.java
|
||||
@@ -30,7 +30,7 @@ public interface EnderDragon extends ComplexLivingEntity, Boss, Mob, Enemy {
|
||||
*/
|
||||
FLY_TO_PORTAL,
|
||||
/**
|
||||
- * The dragon will land on on the portal. If the dragon is not near
|
||||
+ * The dragon will land on the portal. If the dragon is not near
|
||||
* the portal, it will fly to it before mounting.
|
||||
*/
|
||||
LAND_ON_PORTAL,
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 09936f3a2376a46721bbc8365c989581c2a789ef..3845a726adbd0e75d7bf2aeeb6da8cb571d51a8f 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -118,6 +344,19 @@ index 09936f3a2376a46721bbc8365c989581c2a789ef..3845a726adbd0e75d7bf2aeeb6da8cb5
|
||||
/**
|
||||
* Returns the name of this player
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/ItemFrame.java b/src/main/java/org/bukkit/entity/ItemFrame.java
|
||||
index b688b3856cb3068a539fcecfbfa113f8ab4160a9..c275b881cbd11307a6dcc7190d7a7d4063000ad8 100644
|
||||
--- a/src/main/java/org/bukkit/entity/ItemFrame.java
|
||||
+++ b/src/main/java/org/bukkit/entity/ItemFrame.java
|
||||
@@ -75,7 +75,7 @@ public interface ItemFrame extends Hanging {
|
||||
public void setRotation(@NotNull Rotation rotation) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
- * Returns whether the item frame is be visible or not.
|
||||
+ * Returns whether the item frame is visible or not.
|
||||
*
|
||||
* @return whether the item frame is visible or not
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
||||
index 2926fa6071bc7640cc10280b5c3962b0ce7686f1..4f63988848443aff55619bc12ef12c925642a3f9 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Mob.java
|
||||
@@ -133,11 +372,24 @@ index 2926fa6071bc7640cc10280b5c3962b0ce7686f1..4f63988848443aff55619bc12ef12c92
|
||||
/**
|
||||
* Instructs this Mob to set the specified LivingEntity as its target.
|
||||
* <p>
|
||||
diff --git a/src/main/java/org/bukkit/entity/PigZombie.java b/src/main/java/org/bukkit/entity/PigZombie.java
|
||||
index ae9eaaa8e38e1d9dfc459926c7fc51ddb89de84a..b2ec535bb1b0ce0c114ddd7638b90218b05cd835 100644
|
||||
--- a/src/main/java/org/bukkit/entity/PigZombie.java
|
||||
+++ b/src/main/java/org/bukkit/entity/PigZombie.java
|
||||
@@ -44,8 +44,6 @@ public interface PigZombie extends Zombie {
|
||||
|
||||
/**
|
||||
* <b>Not applicable to this entity</b>
|
||||
- *
|
||||
- * @return UnsuppotedOperationException
|
||||
*/
|
||||
@Override
|
||||
public int getConversionTime();
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 0fdaf416960ace84fbe9b9c461641efbb8b631a4..1017db005f8c7a095911f5dd0dbe37d9fc239c95 100644
|
||||
index 3954f40b23536fec495585a8b14e82d092d62e39..264c6bdeb2f1f0d937e4356d761a3264a1c4d58a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -310,15 +310,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -431,15 +431,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
|
||||
/**
|
||||
* Saves the players current location, health, inventory, motion, and
|
||||
@@ -157,7 +409,16 @@ index 0fdaf416960ace84fbe9b9c461641efbb8b631a4..1017db005f8c7a095911f5dd0dbe37d9
|
||||
* <p>
|
||||
* Note: This will overwrite the players current inventory, health,
|
||||
* motion, etc, with the state from the saved dat file.
|
||||
@@ -831,7 +831,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -674,7 +674,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
/**
|
||||
* Plays an effect to just this player.
|
||||
*
|
||||
- * @param <T> the data based based on the type of the effect
|
||||
+ * @param <T> the data based on the type of the effect
|
||||
* @param loc the location to play the effect at
|
||||
* @param effect the {@link Effect}
|
||||
* @param data a data bit needed for some effects
|
||||
@@ -1059,7 +1059,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* Use supplied alternative character to the section symbol to represent legacy color codes.
|
||||
*
|
||||
@@ -166,6 +427,24 @@ index 0fdaf416960ace84fbe9b9c461641efbb8b631a4..1017db005f8c7a095911f5dd0dbe37d9
|
||||
* @param message The message to send
|
||||
* @deprecated use {@link #sendActionBar(net.kyori.adventure.text.Component)}
|
||||
*/
|
||||
@@ -1525,7 +1525,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
|
||||
/**
|
||||
* Allows this player to see a player that was previously hidden. If
|
||||
- * another another plugin had hidden the player too, then the player will
|
||||
+ * another plugin had hidden the player too, then the player will
|
||||
* remain hidden until the other plugin calls this method too.
|
||||
*
|
||||
* @param plugin Plugin that wants to show the player
|
||||
@@ -1554,7 +1554,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
|
||||
/**
|
||||
* Allows this player to see an entity that was previously hidden. If
|
||||
- * another another plugin had hidden the entity too, then the entity will
|
||||
+ * another plugin had hidden the entity too, then the entity will
|
||||
* remain hidden until the other plugin calls this method too.
|
||||
*
|
||||
* @param plugin Plugin that wants to show the entity
|
||||
diff --git a/src/main/java/org/bukkit/entity/Slime.java b/src/main/java/org/bukkit/entity/Slime.java
|
||||
index a5ad3250cebfeb302c58e0bfd6db1295913c927e..bfac874840cf1f36afba16ae4d176c5821a68cfb 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Slime.java
|
||||
@@ -187,11 +466,106 @@ index a5ad3250cebfeb302c58e0bfd6db1295913c927e..bfac874840cf1f36afba16ae4d176c58
|
||||
* @param sz The new size of the slime.
|
||||
*/
|
||||
public void setSize(int sz);
|
||||
diff --git a/src/main/java/org/bukkit/entity/Sniffer.java b/src/main/java/org/bukkit/entity/Sniffer.java
|
||||
index af5110b4160979c39cc1e5de6fa3bd7957b21403..15a0a733b0e5804655b5957cbf20831290d52a08 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Sniffer.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Sniffer.java
|
||||
@@ -12,8 +12,6 @@ public interface Sniffer extends Animals {
|
||||
|
||||
/**
|
||||
* Gets the locations explored by the sniffer.
|
||||
- * <br>
|
||||
- * <b>Note:</b> the returned locations use sniffer's current world.
|
||||
*
|
||||
* @return a collection of locations
|
||||
*/
|
||||
@@ -22,9 +20,6 @@ public interface Sniffer extends Animals {
|
||||
|
||||
/**
|
||||
* Remove a location of the explored locations.
|
||||
- * <br>
|
||||
- * <b>Note:</b> the location must be in the sniffer's current world for this
|
||||
- * method to have any effect.
|
||||
*
|
||||
* @param location the location to remove
|
||||
* @see #getExploredLocations()
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index 6bf3af3ed81b66f61e53105d3591165ea74dba0e..a91400cd8bb4c72d1f3200a17f6de025540fe09d 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -202,7 +202,7 @@ public interface Villager extends AbstractVillager {
|
||||
*/
|
||||
NITWIT,
|
||||
/**
|
||||
- * Sheperd profession. Wears a brown robe. Shepherds primarily trade for
|
||||
+ * Shepherd profession. Wears a brown robe. Shepherds primarily trade for
|
||||
* wool items, and shears.
|
||||
*/
|
||||
SHEPHERD,
|
||||
diff --git a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
|
||||
index 44f7f6939a27b9a0a796d91eac4b7c97ec90a643..641c71ab66bd2499b35cf3c1d533fd105d096e10 100644
|
||||
--- a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
|
||||
@@ -7,7 +7,9 @@ import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * Called when a block explodes
|
||||
+ * Called when a block explodes interacting with blocks. The
|
||||
+ * event isn't called if the {@link org.bukkit.GameRule#MOB_GRIEFING}
|
||||
+ * is disabled as no block interaction will occur.
|
||||
*/
|
||||
public class BlockExplodeEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
diff --git a/src/main/java/org/bukkit/event/block/BlockPlaceEvent.java b/src/main/java/org/bukkit/event/block/BlockPlaceEvent.java
|
||||
index be0a2d1f234d8265d98e54e518a994957b1f3ab7..4e3c406ba883aae553e8d69b6b719b872cd6096c 100644
|
||||
--- a/src/main/java/org/bukkit/event/block/BlockPlaceEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/block/BlockPlaceEvent.java
|
||||
@@ -114,7 +114,7 @@ public class BlockPlaceEvent extends BlockEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Gets the value whether the player would be allowed to build here.
|
||||
- * Defaults to spawn if the server was going to stop them (such as, the
|
||||
+ * Defaults to false if the server was going to stop them (such as, the
|
||||
* player is in Spawn). Note that this is an entirely different check
|
||||
* than BLOCK_CANBUILD, as this refers to a player, not universe-physics
|
||||
* rule like cactus on dirt.
|
||||
diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||
index 2ff1b1308571d8f8056d3359e8a8ba4a589c3726..e9a6e5be5f33a342f7e5c496f0f1c64b2f302ace 100644
|
||||
--- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||
@@ -80,7 +80,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
|
||||
/**
|
||||
* Get a list of available {@link EnchantmentOffer} for the player. You can
|
||||
* modify the values to change the available offers for the player. An offer
|
||||
- * may be null, if there isn't a enchantment offer at a specific slot. There
|
||||
+ * may be null, if there isn't an enchantment offer at a specific slot. There
|
||||
* are 3 slots in the enchantment table available to modify.
|
||||
*
|
||||
* @return list of available enchantment offers
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/AreaEffectCloudApplyEvent.java b/src/main/java/org/bukkit/event/entity/AreaEffectCloudApplyEvent.java
|
||||
index a37febd0d4dd5b733e9ee72628fdf9395fec4367..9cee218b9ee14688356f16b1f58512186286e7e9 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/AreaEffectCloudApplyEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/AreaEffectCloudApplyEvent.java
|
||||
@@ -8,7 +8,7 @@ import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * Called when a lingering potion applies it's effects. Happens
|
||||
+ * Called when a lingering potion applies its effects. Happens
|
||||
* once every 5 ticks
|
||||
*/
|
||||
public class AreaEffectCloudApplyEvent extends EntityEvent implements Cancellable {
|
||||
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
|
||||
index e9de00e9e434d36117a672fa9fbfc7c52f284b67..4065432c884324b107d04f4ccd486085b0c440e7 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 {
|
||||
@@ -154,11 +154,12 @@ public class CreatureSpawnEvent extends EntitySpawnEvent {
|
||||
*/
|
||||
DROWNED,
|
||||
/**
|
||||
- * When an cow is spawned by shearing a mushroom cow
|
||||
+ * When a cow is spawned by shearing a mushroom cow
|
||||
*/
|
||||
SHEARED,
|
||||
/**
|
||||
@@ -201,6 +575,69 @@ index e9de00e9e434d36117a672fa9fbfc7c52f284b67..9a06487e0f76cd7765e6f900b7458a3c
|
||||
*/
|
||||
EXPLOSION,
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java b/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
index 10d0e18dfd423b108fe381e8142867eb10399359..099efafa14c10910e4ed04abb1823f0c1a96b6a6 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java
|
||||
@@ -9,7 +9,9 @@ import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * Called when an entity explodes
|
||||
+ * Called when an entity explodes interacting with blocks. The
|
||||
+ * event isn't called if the {@link org.bukkit.GameRule#MOB_GRIEFING}
|
||||
+ * is disabled as no block interaction will occur.
|
||||
*/
|
||||
public class EntityExplodeEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityPickupItemEvent.java b/src/main/java/org/bukkit/event/entity/EntityPickupItemEvent.java
|
||||
index c866df03d66dd8724e12c7353da4cf144c70b2c8..94ee5a3354722aa5d825da727b7b7071fdc6bacc 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityPickupItemEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityPickupItemEvent.java
|
||||
@@ -7,7 +7,7 @@ import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * Thrown when a entity picks an item up from the ground
|
||||
+ * Thrown when an entity picks an item up from the ground
|
||||
*/
|
||||
public class EntityPickupItemEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityPlaceEvent.java b/src/main/java/org/bukkit/event/entity/EntityPlaceEvent.java
|
||||
index 327876e0ad7dcfeb71d9d22afe1c04bcd71c3bf9..71d664dd89995f088c47d17b38547d530319470c 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityPlaceEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityPlaceEvent.java
|
||||
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
- * Triggered when a entity is created in the world by a player "placing" an item
|
||||
+ * Triggered when an entity is created in the world by a player "placing" an item
|
||||
* on a block.
|
||||
* <br>
|
||||
* Note that this event is currently only fired for four specific placements:
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityPotionEffectEvent.java b/src/main/java/org/bukkit/event/entity/EntityPotionEffectEvent.java
|
||||
index 01c5e8b71338fbb4b1605e45bf2a2e705188f6b5..c9f395064656dd0126410eb3c6e197baa450c063 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityPotionEffectEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityPotionEffectEvent.java
|
||||
@@ -133,7 +133,7 @@ public class EntityPotionEffectEvent extends EntityEvent implements Cancellable
|
||||
public enum Action {
|
||||
|
||||
/**
|
||||
- * When the potion effect is added because the entity didn't have it's
|
||||
+ * When the potion effect is added because the entity didn't have its
|
||||
* type.
|
||||
*/
|
||||
ADDED,
|
||||
@@ -238,7 +238,7 @@ public class EntityPotionEffectEvent extends EntityEvent implements Cancellable
|
||||
*/
|
||||
SPIDER_SPAWN,
|
||||
/**
|
||||
- * When the entity gets effects from a totem item saving it's life.
|
||||
+ * When the entity gets effects from a totem item saving its life.
|
||||
*/
|
||||
TOTEM,
|
||||
/**
|
||||
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
|
||||
@@ -214,6 +651,19 @@ index d51d2ec1d04d9ea8a25a70d0d856f2355ebfcb4a..7ecff9fcee19fc94be784474fea620e5
|
||||
*/
|
||||
EATING,
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java b/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java
|
||||
index dee186e99463a56394bbc2039d1e763d109125b9..c6e4d69eecd2789b1d78fe99fe590932e9758ba1 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java
|
||||
@@ -156,7 +156,7 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable {
|
||||
FOLLOW_LEADER,
|
||||
/**
|
||||
* When another entity tempts this entity by having a desired item such
|
||||
- * as wheat in it's hand.
|
||||
+ * as wheat in its hand.
|
||||
*/
|
||||
TEMPT,
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/PiglinBarterEvent.java b/src/main/java/org/bukkit/event/entity/PiglinBarterEvent.java
|
||||
index c17ff41a688b2cbd877cda25d4ec033ac8ef5524..bd67b7cba78b9bbdd82a5a40048e658a979e3108 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/PiglinBarterEvent.java
|
||||
@@ -228,8 +678,195 @@ index c17ff41a688b2cbd877cda25d4ec033ac8ef5524..bd67b7cba78b9bbdd82a5a40048e658a
|
||||
*/
|
||||
public class PiglinBarterEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java
|
||||
index bc71bc2d3ace0d19d730c09f05f9e0655bcee8f5..24077da8e6a7937f66eafc6779206055cf82e8d2 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java
|
||||
@@ -8,7 +8,9 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * Called when an ItemStack is successfully burned as fuel in a furnace.
|
||||
+ * Called when an ItemStack is successfully burned as fuel in a furnace-like block such as a
|
||||
+ * {@link org.bukkit.block.Furnace}, {@link org.bukkit.block.Smoker}, or
|
||||
+ * {@link org.bukkit.block.BlastFurnace}.
|
||||
*/
|
||||
public class FurnaceBurnEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceExtractEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceExtractEvent.java
|
||||
index 020739697a0b535cad0b15b574f77cdabbdfa3eb..a965b6a78073c5da86ad671752eff4a270029420 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/FurnaceExtractEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceExtractEvent.java
|
||||
@@ -7,7 +7,9 @@ import org.bukkit.event.block.BlockExpEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * This event is called when a player takes items out of the furnace
|
||||
+ * This event is called when a player takes items out of a furnace-like block such as a
|
||||
+ * {@link org.bukkit.block.Furnace}, {@link org.bukkit.block.Smoker}, or
|
||||
+ * {@link org.bukkit.block.BlastFurnace}.
|
||||
*/
|
||||
public class FurnaceExtractEvent extends BlockExpEvent {
|
||||
private final Player player;
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java
|
||||
index 066e7dd9a34d35c8b643a5efcf95d6a5ef47c7ee..f8f9b08a0bd82a2667ae4e0c99dae9103f0db3f0 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java
|
||||
@@ -6,7 +6,9 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * Called when an ItemStack is successfully smelted in a furnace.
|
||||
+ * Called when an ItemStack is successfully smelted in a furnace-like block
|
||||
+ * such as a {@link org.bukkit.block.Furnace}, {@link org.bukkit.block.Smoker},
|
||||
+ * or {@link org.bukkit.block.BlastFurnace}.
|
||||
*/
|
||||
public class FurnaceSmeltEvent extends BlockCookEvent {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||
index 1440c6115520d692faf75455df35b92aa8734491..0808e7aeffb69160913344de5b5e21d5e857f1d6 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceStartSmeltEvent.java
|
||||
@@ -8,7 +8,10 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * Called when a Furnace starts smelting.
|
||||
+ * Called when any of the furnace-like blocks start smelting.
|
||||
+ * <p>
|
||||
+ * Furnace-like blocks are {@link org.bukkit.block.Furnace},
|
||||
+ * {@link org.bukkit.block.Smoker}, and {@link org.bukkit.block.BlastFurnace}.
|
||||
*/
|
||||
public class FurnaceStartSmeltEvent extends InventoryBlockStartEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
|
||||
index 79797a2be7fb139d528116d34d13e51d39b96e56..fe58058f9b5d29388d48115cc81dc48ab08c58c1 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java
|
||||
@@ -19,9 +19,10 @@ import org.jetbrains.annotations.Nullable;
|
||||
* Because InventoryClickEvent occurs within a modification of the Inventory,
|
||||
* not all Inventory related methods are safe to use.
|
||||
* <p>
|
||||
- * The following should never be invoked by an EventHandler for
|
||||
- * InventoryClickEvent using the HumanEntity or InventoryView associated with
|
||||
- * this event:
|
||||
+ * Methods that change the view a player is looking at should never be invoked
|
||||
+ * by an EventHandler for InventoryClickEvent using the HumanEntity or
|
||||
+ * InventoryView associated with this event.
|
||||
+ * Examples of these include:
|
||||
* <ul>
|
||||
* <li>{@link HumanEntity#closeInventory()}
|
||||
* <li>{@link HumanEntity#openInventory(Inventory)}
|
||||
@@ -92,7 +93,7 @@ public class InventoryClickEvent extends InventoryInteractEvent {
|
||||
/**
|
||||
* Gets the ItemStack currently in the clicked slot.
|
||||
*
|
||||
- * @return the item in the clicked
|
||||
+ * @return the item in the clicked slot
|
||||
*/
|
||||
@Nullable
|
||||
public ItemStack getCurrentItem() {
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
|
||||
index 5861247c1b8ee4fe2736fd5098e05a2ca9ab78ea..c0cc82d98348e8aae3cb56bafb2fcb590b03094f 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
|
||||
@@ -7,7 +7,26 @@ import org.bukkit.inventory.InventoryView;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * Represents a player related inventory event
|
||||
+ * This event is called when a player closes an inventory.
|
||||
+ * <p>
|
||||
+ * Because InventoryCloseEvent occurs within a modification of the Inventory,
|
||||
+ * not all Inventory related methods are safe to use.
|
||||
+ * <p>
|
||||
+ * Methods that change the view a player is looking at should never be invoked
|
||||
+ * by an EventHandler for InventoryCloseEvent using the HumanEntity or
|
||||
+ * InventoryView associated with this event.
|
||||
+ * Examples of these include:
|
||||
+ * <ul>
|
||||
+ * <li>{@link HumanEntity#closeInventory()}
|
||||
+ * <li>{@link HumanEntity#openInventory(org.bukkit.inventory.Inventory)}
|
||||
+ * <li>{@link HumanEntity#openWorkbench(org.bukkit.Location, boolean)}
|
||||
+ * <li>{@link HumanEntity#openEnchanting(org.bukkit.Location, boolean)}
|
||||
+ * <li>{@link InventoryView#close()}
|
||||
+ * </ul>
|
||||
+ * To invoke one of these methods, schedule a task using
|
||||
+ * {@link org.bukkit.scheduler.BukkitScheduler#runTask(org.bukkit.plugin.Plugin, Runnable)}, which will run the task
|
||||
+ * on the next tick. Also be aware that this is not an exhaustive list, and
|
||||
+ * other methods could potentially create issues as well.
|
||||
*/
|
||||
public class InventoryCloseEvent extends InventoryEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryOpenEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryOpenEvent.java
|
||||
index 9013d043503d175004ad276799e5935b7fa59dc4..ceae092eb782698803c6c3df41267dde20ba62b2 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryOpenEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryOpenEvent.java
|
||||
@@ -7,7 +7,7 @@ import org.bukkit.inventory.InventoryView;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * Represents a player related inventory event
|
||||
+ * Called when a player opens an inventory
|
||||
*/
|
||||
public class InventoryOpenEvent extends InventoryEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
||||
index 6782024735a885ba0b1b4dba4a576740c1410366..8977f7609431c3c46324a82de84d4a32f4b71c57 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
||||
@@ -24,6 +24,20 @@ public class PrepareAnvilEvent extends PrepareInventoryResultEvent {
|
||||
return (AnvilInventory) super.getInventory();
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * {@inheritDoc}
|
||||
+ *
|
||||
+ * <p>
|
||||
+ * Note: by default custom recipes in anvil are disabled
|
||||
+ * you should define a repair cost on the anvil inventory
|
||||
+ * greater or equals to zero in order to allow that.
|
||||
+ *
|
||||
+ * @param result result item
|
||||
+ */
|
||||
+ public void setResult(@Nullable ItemStack result) {
|
||||
+ super.setResult(result);
|
||||
+ }
|
||||
+
|
||||
@NotNull
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
|
||||
index 4c2102a11c3d682d98f0db4ccafa35231e66bcdd..ca238af544764273b9cd4cf3587e8632031c9ede 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
|
||||
@@ -5,8 +5,9 @@ import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
- * Called when a player takes action on a resource pack request sent via
|
||||
- * {@link Player#setResourcePack(java.lang.String)}.
|
||||
+ * Called when a player takes action on a resource pack request.
|
||||
+ * @see Player#setResourcePack(String, String)
|
||||
+ * @see Player#setResourcePack(String, String, boolean)
|
||||
*/
|
||||
public class PlayerResourcePackStatusEvent extends PlayerEvent {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/generator/ChunkGenerator.java b/src/main/java/org/bukkit/generator/ChunkGenerator.java
|
||||
index 0cc6e29a5af28e95f87f415d6b2424d4622a6f34..c0b749a5bbf4980d01fed74768bb61909b579cb9 100644
|
||||
--- a/src/main/java/org/bukkit/generator/ChunkGenerator.java
|
||||
+++ b/src/main/java/org/bukkit/generator/ChunkGenerator.java
|
||||
@@ -627,7 +627,7 @@ public abstract class ChunkGenerator {
|
||||
* Get the biome at x, y, z within chunk being generated
|
||||
*
|
||||
* @param x the x location in the chunk from 0-15 inclusive
|
||||
- * @param y the y location in the chunk from minimum (inclusive) -
|
||||
+ * @param y the y location in the chunk from minHeight (inclusive) -
|
||||
* maxHeight (exclusive)
|
||||
* @param z the z location in the chunk from 0-15 inclusive
|
||||
* @return Biome value
|
||||
diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java
|
||||
index d5b50a4a954fed35d37f03f1a277cc173ca106df..a91fa5386afd7a1137adb921ad5adb798604772f 100644
|
||||
index d5b50a4a954fed35d37f03f1a277cc173ca106df..c69904f3ee7f3a41d6cebcd401abf8385dfbf868 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 {
|
||||
@@ -319,9 +956,9 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..a91fa5386afd7a1137adb921ad5adb79
|
||||
+ * <pre>{@code
|
||||
+ * EntityEquipment equipment = entity.getEquipment();
|
||||
+ * if (equipment instanceof PlayerInventory) {
|
||||
+ * equipment.getItemInHand(); // will return a mirror
|
||||
+ * equipment.getHelmet(); // will return a mirror
|
||||
+ * } else {
|
||||
+ * equipment.getItemInHand(); // will return a copy
|
||||
+ * equipment.getHelmet(); // will return a copy
|
||||
+ * }
|
||||
+ * }</pre>
|
||||
*
|
||||
@@ -486,3 +1123,147 @@ index 62fbd7f6d8195bebcab7f704a0a485a1bbeca26c..5461f7fa75f5a065bb333b4a113640b5
|
||||
*
|
||||
* @return the currently held item
|
||||
* @see #getItemInMainHand()
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
index 05f1acaac3a49c42f6cf544adb3ffec267c72700..9f9c67e935940833bbfe58e6bfa398e6c86980d5 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
@@ -24,8 +24,6 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||
* @param result The item you want the recipe to create.
|
||||
* @see ShapedRecipe#shape(String...)
|
||||
* @see ShapedRecipe#setIngredient(char, Material)
|
||||
- * @see ShapedRecipe#setIngredient(char, Material, int)
|
||||
- * @see ShapedRecipe#setIngredient(char, MaterialData)
|
||||
* @see ShapedRecipe#setIngredient(char, RecipeChoice)
|
||||
* @deprecated Recipes must have keys. Use {@link #ShapedRecipe(NamespacedKey, ItemStack)}
|
||||
* instead.
|
||||
@@ -44,8 +42,6 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||
* @param result The item you want the recipe to create.
|
||||
* @see ShapedRecipe#shape(String...)
|
||||
* @see ShapedRecipe#setIngredient(char, Material)
|
||||
- * @see ShapedRecipe#setIngredient(char, Material, int)
|
||||
- * @see ShapedRecipe#setIngredient(char, MaterialData)
|
||||
* @see ShapedRecipe#setIngredient(char, RecipeChoice)
|
||||
*/
|
||||
public ShapedRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) {
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
index 3d50775da447175b2a94ed9056ef36aa1e69c2eb..03839302c94adc3175d0a88065cd230257ffd20d 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
@@ -30,11 +30,8 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
* @param key the unique recipe key
|
||||
* @param result The item you want the recipe to create.
|
||||
* @see ShapelessRecipe#addIngredient(Material)
|
||||
- * @see ShapelessRecipe#addIngredient(MaterialData)
|
||||
- * @see ShapelessRecipe#addIngredient(Material,int)
|
||||
* @see ShapelessRecipe#addIngredient(int,Material)
|
||||
- * @see ShapelessRecipe#addIngredient(int,MaterialData)
|
||||
- * @see ShapelessRecipe#addIngredient(int,Material,int)
|
||||
+ * @see ShapelessRecipe#addIngredient(RecipeChoice)
|
||||
*/
|
||||
public ShapelessRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) {
|
||||
super(key, result);
|
||||
@@ -174,7 +171,7 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
|
||||
/**
|
||||
* Removes multiple instances of an ingredient from the list. If there are
|
||||
- * less instances then specified, all will be removed. Only removes exact
|
||||
+ * fewer instances than specified, all will be removed. Only removes exact
|
||||
* matches, with a data value of 0.
|
||||
*
|
||||
* @param count The number of copies to remove.
|
||||
diff --git a/src/main/java/org/bukkit/inventory/StonecuttingRecipe.java b/src/main/java/org/bukkit/inventory/StonecuttingRecipe.java
|
||||
index 07c3dff4d6190ef388d9c1e1c36f67f00a3e8e66..597a18a767b68b47e81454b7d44613c7178c1366 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/StonecuttingRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/StonecuttingRecipe.java
|
||||
@@ -28,7 +28,7 @@ public class StonecuttingRecipe implements Recipe, Keyed {
|
||||
}
|
||||
|
||||
/**
|
||||
- * Create a cooking recipe to craft the specified ItemStack.
|
||||
+ * Create a Stonecutting recipe to craft the specified ItemStack.
|
||||
*
|
||||
* @param key The unique recipe key
|
||||
* @param result The item you want the recipe to create.
|
||||
@@ -42,7 +42,7 @@ public class StonecuttingRecipe implements Recipe, Keyed {
|
||||
}
|
||||
|
||||
/**
|
||||
- * Sets the input of this cooking recipe.
|
||||
+ * Sets the input of this Stonecutting recipe.
|
||||
*
|
||||
* @param input The input material.
|
||||
* @return The changed recipe, so you can chain calls.
|
||||
@@ -64,7 +64,7 @@ public class StonecuttingRecipe implements Recipe, Keyed {
|
||||
}
|
||||
|
||||
/**
|
||||
- * Sets the input of this cooking recipe.
|
||||
+ * Sets the input of this Stonecutting recipe.
|
||||
*
|
||||
* @param input The input choice.
|
||||
* @return The changed recipe, so you can chain calls.
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index d7fab2b856f6dfec4f9225c1bdb4254b238d98a4..9d40e6a5ce7adc377934cfc5ce663b5d9cb2e4dc 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -306,7 +306,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
/**
|
||||
* Return an immutable copy of all {@link Attribute}s and their
|
||||
* {@link AttributeModifier}s for a given {@link EquipmentSlot}.<br>
|
||||
- * Any {@link AttributeModifier} that does have have a given
|
||||
+ * Any {@link AttributeModifier} that does have a given
|
||||
* {@link EquipmentSlot} will be returned. This is because
|
||||
* AttributeModifiers without a slot are active in any slot.<br>
|
||||
* If there are no attributes set for the given slot, an empty map
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Objective.java b/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
index 22b1dc5fd4d453161a5ee520072f8e8f955b3a80..a625bcab8e77b05b3341a52c708fae1542b7e3d5 100644
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
@@ -86,7 +86,7 @@ public interface Objective {
|
||||
*
|
||||
* @return true if scores are modifiable
|
||||
* @throws IllegalStateException if this objective has been unregistered
|
||||
- * @see Criterias#HEALTH
|
||||
+ * @see Criteria#HEALTH
|
||||
*/
|
||||
boolean isModifiable();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
index 52e8be769d2e9b69e9833bc9a7fe39afd10c5095..4d2b8e10263802432dfeac72666487f9547cd2c5 100644
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
@@ -265,7 +265,7 @@ public interface Team extends net.kyori.adventure.audience.ForwardingAudience {
|
||||
* Gets the Set of entries on the team
|
||||
*
|
||||
* @return entries on the team
|
||||
- * @throws IllegalStateException if this entries has been unregistered
|
||||
+ * @throws IllegalStateException if this team has been unregistered
|
||||
*/
|
||||
@NotNull
|
||||
Set<String> getEntries();
|
||||
diff --git a/src/main/java/org/bukkit/util/BoundingBox.java b/src/main/java/org/bukkit/util/BoundingBox.java
|
||||
index 9883983c33fcff0f4c1e23867adafa436e2ed96f..5017b73bcec0d4d5256d89db14201c03829dc981 100644
|
||||
--- a/src/main/java/org/bukkit/util/BoundingBox.java
|
||||
+++ b/src/main/java/org/bukkit/util/BoundingBox.java
|
||||
@@ -358,7 +358,7 @@ public class BoundingBox implements Cloneable, ConfigurationSerializable {
|
||||
* <p>
|
||||
* Negative values will shrink the bounding box in the corresponding
|
||||
* direction. Shrinking will be limited to the point where the affected
|
||||
- * opposite faces would meet if the they shrank at uniform speeds.
|
||||
+ * opposite faces would meet if they shrank at uniform speeds.
|
||||
*
|
||||
* @param negativeX the amount of expansion in the negative x direction
|
||||
* @param negativeY the amount of expansion in the negative y direction
|
||||
diff --git a/src/main/java/org/bukkit/util/CachedServerIcon.java b/src/main/java/org/bukkit/util/CachedServerIcon.java
|
||||
index 612958a331575d1da2715531ebdf6b1168f2e860..9a7768d41270714d4a1c89b4dcb436cc66f57545 100644
|
||||
--- a/src/main/java/org/bukkit/util/CachedServerIcon.java
|
||||
+++ b/src/main/java/org/bukkit/util/CachedServerIcon.java
|
||||
@@ -5,7 +5,7 @@ import org.bukkit.event.server.ServerListPingEvent;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
- * This is a cached version of a server-icon. It's internal representation
|
||||
+ * This is a cached version of a server-icon. Its internal representation
|
||||
* and implementation is undefined.
|
||||
*
|
||||
* @see Server#getServerIcon()
|
||||
@@ -321,10 +321,10 @@ index 0000000000000000000000000000000000000000..7b3b6ef533d32169fbeca389bd61cfc6
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 82757d3013e01a6bfbb685929955d3e7dad8508c..a6a792babe69712594c18f49542feb30ff591810 100644
|
||||
index b21f90f291a087b6282cd7b55e0075a01729f0ba..dcd539220e5a2bda41f27101ea4c0ece146e1d0d 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2155,6 +2155,83 @@ public final class Bukkit {
|
||||
@@ -2228,6 +2228,83 @@ public final class Bukkit {
|
||||
public static boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||
return server.suggestPlayerNamesWhenNullTabCompletions();
|
||||
}
|
||||
@@ -409,10 +409,10 @@ index 82757d3013e01a6bfbb685929955d3e7dad8508c..a6a792babe69712594c18f49542feb30
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 3485db7548e93242f99977a236eb3bcebedfb964..bf1102b4481b8c9b9c4f5ba0c561556b75fea077 100644
|
||||
index 3c1862b9a9293155f756615b5bd23cc810a6df5e..016cee903c7179baf711984503d1d0793d40c5c5 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1888,5 +1888,74 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1955,5 +1955,74 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @return true if player names should be suggested
|
||||
*/
|
||||
boolean suggestPlayerNamesWhenNullTabCompletions();
|
||||
|
||||
@@ -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 1b0b365905d4e7f77d3f792797816eeb35d31c69..c10e19e06f0c4e33b2c5a4a1446b151f818e92db 100644
|
||||
index 63137429779d06fafb162f1bfb823d5149b3c58a..4319dbac54b4cce95ad7479d5bd141a2b12ab7ae 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -734,5 +734,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -749,5 +749,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
@Nullable
|
||||
Location getOrigin();
|
||||
|
||||
@@ -8,17 +8,18 @@ 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 af4a7ce37eb10bab06eadb6583c7894b3ec55ae6..159e5a908b35b84b7fabc36581e093d9aa4c4b67 100644
|
||||
index 30770d03044da684aa8c79ca74796050c319f6be..f0025ba978f4bdf1e6bab7d30466fc950bb2a13b 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -178,5 +178,19 @@ public interface ItemFactory {
|
||||
*/
|
||||
@@ -192,4 +192,20 @@ public interface ItemFactory {
|
||||
@NotNull
|
||||
net.kyori.adventure.text.Component displayName(@NotNull ItemStack itemStack);
|
||||
// Paper end - Adventure
|
||||
+
|
||||
+ // Paper start - add getI18NDisplayName
|
||||
+ /**
|
||||
+ * Gets the Display name as seen in the Client.
|
||||
+ * Currently the server only supports the English language. To override this,
|
||||
+ * Currently, the server only supports the English language. To override this,
|
||||
+ * You must replace the language file embedded in the server jar.
|
||||
+ *
|
||||
+ * @param item Item to return Display name of
|
||||
@@ -29,14 +30,14 @@ index af4a7ce37eb10bab06eadb6583c7894b3ec55ae6..159e5a908b35b84b7fabc36581e093d9
|
||||
+ @Nullable
|
||||
+ @Deprecated
|
||||
+ String getI18NDisplayName(@Nullable ItemStack item);
|
||||
// Paper end
|
||||
+ // Paper end - add getI18NDisplayName
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 9da047582e9648d84875b6d3c136960bbb97b70e..87f7942082ad943a97058f58c09ea2fe9caf5bfe 100644
|
||||
index 9d327f0832c40d4a8d212346284274f6cf78834f..09a36df6edce2a283df80c67d5ef62da7ff73555 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -618,5 +618,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
public @NotNull net.kyori.adventure.text.Component displayName() {
|
||||
public net.kyori.adventure.text.@NotNull Component displayName() {
|
||||
return Bukkit.getServer().getItemFactory().displayName(this);
|
||||
}
|
||||
+
|
||||
|
||||
@@ -7,29 +7,30 @@ 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 159e5a908b35b84b7fabc36581e093d9aa4c4b67..66ffc658dba85942f179760dc6c50258e24ab903 100644
|
||||
index f0025ba978f4bdf1e6bab7d30466fc950bb2a13b..d641a8293f3acd465d5fdde8507046647cb6c568 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -192,5 +192,17 @@ public interface ItemFactory {
|
||||
@Nullable
|
||||
@@ -208,4 +208,18 @@ public interface ItemFactory {
|
||||
@Deprecated
|
||||
String getI18NDisplayName(@Nullable ItemStack item);
|
||||
// Paper end - add getI18NDisplayName
|
||||
+
|
||||
+ // Paper start - ensure server conversions API
|
||||
+ /**
|
||||
+ * Minecraft updates are converting simple item stacks into more complex NBT oriented Item Stacks.
|
||||
+ * Minecraft's updates are converting simple item stacks into more complex NBT oriented Item Stacks.
|
||||
+ *
|
||||
+ * Use this method to to ensure any desired data conversions are processed.
|
||||
+ * Use this method to ensure any desired data conversions are processed.
|
||||
+ * The input itemstack will not be the same as the returned itemstack.
|
||||
+ *
|
||||
+ * @param item The item to process conversions on
|
||||
+ * @return A potentially Data Converted ItemStack
|
||||
+ * @return A potentially Data-Converted-ItemStack
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ ItemStack ensureServerConversions(@NotNull ItemStack item);
|
||||
// Paper end
|
||||
+ // Paper end - ensure server conversions API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 87f7942082ad943a97058f58c09ea2fe9caf5bfe..9d32283ee612a50b8a2bfe5151f42c9f181ede4c 100644
|
||||
index 09a36df6edce2a283df80c67d5ef62da7ff73555..a8faa4c1881bae4d47d901388a78b991d138b518 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -537,7 +537,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -48,7 +49,7 @@ index 87f7942082ad943a97058f58c09ea2fe9caf5bfe..9d32283ee612a50b8a2bfe5151f42c9f
|
||||
+ /**
|
||||
+ * Minecraft updates are converting simple item stacks into more complex NBT oriented Item Stacks.
|
||||
+ *
|
||||
+ * Use this method to to ensure any desired data conversions are processed.
|
||||
+ * Use this method to ensure any desired data conversions are processed.
|
||||
+ * The input itemstack will not be the same as the returned itemstack.
|
||||
+ *
|
||||
+ * @return A potentially Data Converted ItemStack
|
||||
|
||||
@@ -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 9977bb3cb5a66c84db816f8e4597db1c053f77c8..ccd8f36c8450bab9f609bb220b5270394960580e 100644
|
||||
index 390bb294d09389877937ee2c6c3f346e65dfb178..6a9df4ec0eee205bcd37de9c4d04a6c67eb21644 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -295,6 +295,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -319,6 +319,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@Nullable
|
||||
public Player getKiller();
|
||||
|
||||
|
||||
@@ -14,18 +14,36 @@ 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 9d6e604c7667985dc8107a5df9d36c53e8006326..1de2f8f345a287d93aad106dd13472a7837ec805 100644
|
||||
index 145f6209a984e74da2d2de03cf725c06c77ef8da..639651972fddce4dff63a0f0a7e566a15b9e2dd6 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -40,6 +40,8 @@ dependencies {
|
||||
@@ -11,6 +11,8 @@ java {
|
||||
val annotationsVersion = "24.0.1"
|
||||
val bungeeCordChatVersion = "1.20-R0.1"
|
||||
val adventureVersion = "4.14.0"
|
||||
+val slf4jVersion = "1.8.0-beta4"
|
||||
+val log4jVersion = "2.17.1"
|
||||
val apiAndDocs: Configuration by configurations.creating {
|
||||
attributes {
|
||||
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||
@@ -42,6 +44,8 @@ dependencies {
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-legacy")
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-plain")
|
||||
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")
|
||||
+ api("org.apache.logging.log4j:log4j-api:$log4jVersion")
|
||||
+ api("org.slf4j:slf4j-api:$slf4jVersion")
|
||||
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
implementation("org.ow2.asm:asm-commons:9.4")
|
||||
@@ -117,6 +121,8 @@ tasks.withType<Javadoc> {
|
||||
"https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
|
||||
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
|
||||
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
|
||||
+ "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
|
||||
+ "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/",
|
||||
// Paper end
|
||||
"https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper
|
||||
)
|
||||
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
index 8c76716249e44ed8bf6be94c1f5c7b6d9bb35be2..4eb639fbb46a0848be207149ea433455550fae1c 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/Plugin.java
|
||||
|
||||
@@ -17,10 +17,10 @@ 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 c9cf9d361a1289aba383718733a2098b5eafb38f..71c8d2345eef6895edb8d210553ec3cddd9c76d0 100644
|
||||
index f594913e6b94f77b26a4a758c447a42d8a25b6ff..7cd9f98c042dc2bb80876af35c755f81bef34651 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
@@ -44,7 +44,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -46,7 +46,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
private boolean naggable = true;
|
||||
private FileConfiguration newConfig = null;
|
||||
private File configFile = null;
|
||||
@@ -29,7 +29,7 @@ index c9cf9d361a1289aba383718733a2098b5eafb38f..71c8d2345eef6895edb8d210553ec3cd
|
||||
|
||||
public JavaPlugin() {
|
||||
// Paper start
|
||||
@@ -301,8 +301,8 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -303,8 +303,8 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
this.dataFolder = dataFolder;
|
||||
this.classLoader = classLoader;
|
||||
this.configFile = new File(dataFolder, "config.yml");
|
||||
|
||||
@@ -67,49 +67,49 @@ index 0000000000000000000000000000000000000000..087ee57fe5485bc760fadd45a176d4d9
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
index 71c8d2345eef6895edb8d210553ec3cddd9c76d0..6d31f3a2569ae9c522a5e6cddd38ac8f252f1bfe 100644
|
||||
index 7cd9f98c042dc2bb80876af35c755f81bef34651..5cd236965de12392d8c7aa81307c0ff1cc8673b1 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
@@ -44,7 +44,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
private boolean naggable = true;
|
||||
private FileConfiguration newConfig = null;
|
||||
private File configFile = null;
|
||||
- private Logger logger = null; // Paper - PluginLogger -> Logger
|
||||
+ public Logger logger = null; // Paper - PluginLogger -> Logger, public
|
||||
|
||||
public JavaPlugin() {
|
||||
// Paper start
|
||||
@@ -302,7 +302,11 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -291,10 +291,10 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
.orElseThrow();
|
||||
}
|
||||
public final void init(@NotNull PluginLoader loader, @NotNull Server server, @NotNull PluginDescriptionFile description, @NotNull File dataFolder, @NotNull File file, @NotNull ClassLoader classLoader) {
|
||||
- init(server, description, dataFolder, file, classLoader, description);
|
||||
+ init(server, description, dataFolder, file, classLoader, description, com.destroystokyo.paper.utils.PaperPluginLogger.getLogger(description));
|
||||
this.pluginMeta = description;
|
||||
}
|
||||
- public final void init(@NotNull Server server, @NotNull PluginDescriptionFile description, @NotNull File dataFolder, @NotNull File file, @NotNull ClassLoader classLoader, @Nullable io.papermc.paper.plugin.configuration.PluginMeta configuration) {
|
||||
+ public final void init(@NotNull Server server, @NotNull PluginDescriptionFile description, @NotNull File dataFolder, @NotNull File file, @NotNull ClassLoader classLoader, @Nullable io.papermc.paper.plugin.configuration.PluginMeta configuration, @NotNull Logger logger) {
|
||||
// Paper end
|
||||
this.loader = DummyPluginLoaderImplHolder.INSTANCE; // Paper
|
||||
this.server = server;
|
||||
@@ -304,7 +304,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
this.classLoader = classLoader;
|
||||
this.configFile = new File(dataFolder, "config.yml");
|
||||
this.pluginMeta = configuration; // Paper
|
||||
- this.logger = Logger.getLogger(description.getPrefix() != null ? description.getPrefix() : description.getName()); // Paper - Handle plugin prefix in implementation
|
||||
+ // Paper start
|
||||
+ if (this.logger == null) {
|
||||
+ this.logger = com.destroystokyo.paper.utils.PaperPluginLogger.getLogger(this.description);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ this.logger = logger; // Paper
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index 2d2fa6ce5200eb5c75a733f9f54f400113cc22b0..5c5aadc15c8198e0e79b4ac0f043a45720aef002 100644
|
||||
index 74b6581a97a092c44a0876e7981ff8a8e6153100..d6d3e1332e51adc5611543b2a6689efa5921a9f2 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -65,7 +65,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
@@ -67,6 +67,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
this.url = file.toURI().toURL();
|
||||
this.libraryLoader = libraryLoader;
|
||||
|
||||
-
|
||||
+ this.logger = com.destroystokyo.paper.utils.PaperPluginLogger.getLogger(description); // Paper - Register logger early
|
||||
// Paper start
|
||||
this.dependencyContext = dependencyContext;
|
||||
this.classLoaderGroup = io.papermc.paper.plugin.provider.classloader.PaperClassLoaderStorage.instance().registerSpigotGroup(this);
|
||||
@@ -249,6 +249,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
@@ -262,7 +263,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
|
||||
pluginState = new IllegalStateException("Initial initialization");
|
||||
this.pluginInit = javaPlugin;
|
||||
|
||||
+ javaPlugin.logger = this.logger; // Paper - set logger
|
||||
javaPlugin.init(null, org.bukkit.Bukkit.getServer(), description, dataFolder, file, this); // Paper
|
||||
- javaPlugin.init(null, org.bukkit.Bukkit.getServer(), description, dataFolder, file, this); // Paper
|
||||
+ javaPlugin.init(org.bukkit.Bukkit.getServer(), description, dataFolder, file, this, description, this.logger); // Paper
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerArmorChangeEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerArmorChangeEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e406ce639a2e88b78f82f25e71678a669d0a958b
|
||||
index 0000000000000000000000000000000000000000..57521010ff0574f1bbc96727948a6185fd37e9ee
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerArmorChangeEvent.java
|
||||
@@ -0,0 +1,137 @@
|
||||
@@ -0,0 +1,139 @@
|
||||
+package com.destroystokyo.paper.event.player;
|
||||
+
|
||||
+import org.bukkit.Material;
|
||||
@@ -22,6 +22,7 @@ index 0000000000000000000000000000000000000000..e406ce639a2e88b78f82f25e71678a66
|
||||
+import java.util.Collections;
|
||||
+import java.util.HashSet;
|
||||
+import java.util.Set;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
@@ -36,10 +37,11 @@ index 0000000000000000000000000000000000000000..e406ce639a2e88b78f82f25e71678a66
|
||||
+ private static final HandlerList HANDLERS = new HandlerList();
|
||||
+
|
||||
+ @NotNull private final SlotType slotType;
|
||||
+ @Nullable private final ItemStack oldItem;
|
||||
+ @Nullable private final ItemStack newItem;
|
||||
+ @NotNull private final ItemStack oldItem;
|
||||
+ @NotNull private final ItemStack newItem;
|
||||
+
|
||||
+ public PlayerArmorChangeEvent(@NotNull Player player, @NotNull SlotType slotType, @Nullable ItemStack oldItem, @Nullable ItemStack newItem) {
|
||||
+ @ApiStatus.Internal
|
||||
+ public PlayerArmorChangeEvent(@NotNull Player player, @NotNull SlotType slotType, @NotNull ItemStack oldItem, @NotNull ItemStack newItem) {
|
||||
+ super(player);
|
||||
+ this.slotType = slotType;
|
||||
+ this.oldItem = oldItem;
|
||||
@@ -61,7 +63,7 @@ index 0000000000000000000000000000000000000000..e406ce639a2e88b78f82f25e71678a66
|
||||
+ *
|
||||
+ * @return old item
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @NotNull
|
||||
+ public ItemStack getOldItem() {
|
||||
+ return this.oldItem;
|
||||
+ }
|
||||
@@ -71,7 +73,7 @@ index 0000000000000000000000000000000000000000..e406ce639a2e88b78f82f25e71678a66
|
||||
+ *
|
||||
+ * @return new item
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @NotNull
|
||||
+ public ItemStack getNewItem() {
|
||||
+ return this.newItem;
|
||||
+ }
|
||||
@@ -93,7 +95,7 @@ index 0000000000000000000000000000000000000000..e406ce639a2e88b78f82f25e71678a66
|
||||
+ }
|
||||
+
|
||||
+ public enum SlotType {
|
||||
+ HEAD(NETHERITE_HELMET, DIAMOND_HELMET, GOLDEN_HELMET, IRON_HELMET, CHAINMAIL_HELMET, LEATHER_HELMET, CARVED_PUMPKIN, PLAYER_HEAD, SKELETON_SKULL, ZOMBIE_HEAD, CREEPER_HEAD, WITHER_SKELETON_SKULL, TURTLE_HELMET),
|
||||
+ HEAD(NETHERITE_HELMET, DIAMOND_HELMET, GOLDEN_HELMET, IRON_HELMET, CHAINMAIL_HELMET, LEATHER_HELMET, CARVED_PUMPKIN, PLAYER_HEAD, SKELETON_SKULL, ZOMBIE_HEAD, CREEPER_HEAD, WITHER_SKELETON_SKULL, TURTLE_HELMET, DRAGON_HEAD, PIGLIN_HEAD),
|
||||
+ CHEST(NETHERITE_CHESTPLATE, DIAMOND_CHESTPLATE, GOLDEN_CHESTPLATE, IRON_CHESTPLATE, CHAINMAIL_CHESTPLATE, LEATHER_CHESTPLATE, ELYTRA),
|
||||
+ LEGS(NETHERITE_LEGGINGS, DIAMOND_LEGGINGS, GOLDEN_LEGGINGS, IRON_LEGGINGS, CHAINMAIL_LEGGINGS, LEATHER_LEGGINGS),
|
||||
+ FEET(NETHERITE_BOOTS, DIAMOND_BOOTS, GOLDEN_BOOTS, IRON_BOOTS, CHAINMAIL_BOOTS, LEATHER_BOOTS);
|
||||
@@ -137,10 +139,10 @@ index 0000000000000000000000000000000000000000..e406ce639a2e88b78f82f25e71678a66
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets whether or not this material can be equipped to a slot
|
||||
+ * Gets whether this material can be equipped to a slot
|
||||
+ *
|
||||
+ * @param material material to check
|
||||
+ * @return whether or not this material can be equipped
|
||||
+ * @return whether this material can be equipped
|
||||
+ */
|
||||
+ public static boolean isEquipable(@NotNull Material material) {
|
||||
+ return getByMaterial(material) != null;
|
||||
|
||||
@@ -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 f8e12868f2e629cdf4784f0157fdb2f8e7b01f99..61ce341daec63392f040b70cd12662379b2f1ebd 100644
|
||||
index 870ad6cd930653e6248abcc0fce94ffafbe9ebde..9f4d383ea3d6b26d16b8b77ca4c29d2d839ad6dd 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -272,6 +272,16 @@ public interface Block extends Metadatable, Translatable {
|
||||
|
||||
@@ -578,7 +578,7 @@ index 270e6d8ad4358baa256cee5f16cff281f063ce3b..4a3451af454295ac3e1b688e6665cad9
|
||||
|
||||
@Override
|
||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
index 9825db30d42701aad5d9970bbb989fbff0142fb1..2cb81e6d253d70388da15c9d07b630277d486c70 100644
|
||||
index abadff47166722fdc756afdbc6ac7242b6bd4fb0..88f1ca89fa640a686231b8eec87e70419b2d73ef 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
+++ b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
@@ -48,6 +48,8 @@ public class AnnotationTest {
|
||||
|
||||
@@ -57,15 +57,15 @@ index 0000000000000000000000000000000000000000..7b2af1bd72dfbcf4e962a982940fc49b
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 1017db005f8c7a095911f5dd0dbe37d9fc239c95..2f2cce2a8b4b26fbe85da10f55f7313112b05435 100644
|
||||
index 264c6bdeb2f1f0d937e4356d761a3264a1c4d58a..f9239eae50b86f54f0cd8c604d2ba9468fc5f33b 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -39,7 +39,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -51,7 +51,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a player, connected or not
|
||||
*/
|
||||
-public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified { // Paper
|
||||
+public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, com.destroystokyo.paper.network.NetworkClient { // Paper
|
||||
-public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, net.kyori.adventure.bossbar.BossBarViewer { // Paper
|
||||
+public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginMessageRecipient, net.kyori.adventure.identity.Identified, net.kyori.adventure.bossbar.BossBarViewer, com.destroystokyo.paper.network.NetworkClient { // Paper
|
||||
|
||||
// Paper start
|
||||
@Override
|
||||
@@ -10,26 +10,26 @@ 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 e57e600283702dd7fc60fa3baa1e1cc1b8574873..7be830ea0a3b24c5cdfb8e6ab62cb2ee506a4026 100644
|
||||
index 9f9c67e935940833bbfe58e6bfa398e6c86980d5..71e494177473c62449aafda1699b26a0c4c81a68 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
@@ -26,6 +26,7 @@ public class ShapedRecipe implements Recipe, Keyed {
|
||||
@@ -31,6 +31,7 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||
@Deprecated
|
||||
public ShapedRecipe(@NotNull ItemStack result) {
|
||||
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
||||
this.key = NamespacedKey.randomKey();
|
||||
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace();
|
||||
this.output = new ItemStack(result);
|
||||
super(NamespacedKey.randomKey(), result);
|
||||
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
index df4c52f1f0be2409c7506b09167bd58b5602fa7a..62675962d1b7882b953d2618aed1f363c046e97d 100644
|
||||
index 03839302c94adc3175d0a88065cd230257ffd20d..d6e38c7ccfe3b6e85eafb611da20b1a29fb74d97 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
@@ -27,6 +27,7 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
@@ -20,6 +20,7 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
@Deprecated
|
||||
public ShapelessRecipe(@NotNull ItemStack result) {
|
||||
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
||||
this.key = NamespacedKey.randomKey();
|
||||
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace();
|
||||
this.output = new ItemStack(result);
|
||||
super(NamespacedKey.randomKey(), result);
|
||||
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -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 2f2cce2a8b4b26fbe85da10f55f7313112b05435..af92443e50b66e526d382c820e1b2e27c6e1b461 100644
|
||||
index f9239eae50b86f54f0cd8c604d2ba9468fc5f33b..9dca8fc727b727063d9ca50fdd8f6452173a5cd4 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1128,12 +1128,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1368,6 +1368,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void resetPlayerWeather();
|
||||
|
||||
@@ -27,6 +27,9 @@ index 2f2cce2a8b4b26fbe85da10f55f7313112b05435..af92443e50b66e526d382c820e1b2e27
|
||||
+ giveExp(amount, false);
|
||||
+ }
|
||||
/**
|
||||
* Gets the player's cooldown between picking up experience orbs.
|
||||
*
|
||||
@@ -1393,8 +1402,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* Gives the player the amount of experience specified.
|
||||
*
|
||||
* @param amount Exp amount to give
|
||||
|
||||
@@ -16,7 +16,7 @@ See: https://github.com/PaperMC/Paper/issues/917
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/PreCreatureSpawnEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/PreCreatureSpawnEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..02e421b0bb4ce3529ef1c4d34ec8a0c0345cce57
|
||||
index 0000000000000000000000000000000000000000..8b48759bf6f4fcef0847d9a2461993e3f2fdc9aa
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/PreCreatureSpawnEvent.java
|
||||
@@ -0,0 +1,105 @@
|
||||
@@ -117,7 +117,7 @@ index 0000000000000000000000000000000000000000..02e421b0bb4ce3529ef1c4d34ec8a0c0
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Cancelling this event is more effecient than cancelling CreatureSpawnEvent
|
||||
+ * Cancelling this event is more efficient than cancelling CreatureSpawnEvent
|
||||
+ * @param cancel true if you wish to cancel this event, and abort the spawn of this creature
|
||||
+ */
|
||||
+ @Override
|
||||
|
||||
@@ -7,7 +7,7 @@ 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 8d4093a413ca14a1c4c24a2a1b74c1d574943ffa..c7502a3913cf14e66559c21489d6f2205f3eb06a 100644
|
||||
index b39128bb0ca2d4fe7a254193236c60fb5bfaa7da..5135b8e6028e6926e2711e2dd6ce68b76f468fd7 100644
|
||||
--- a/src/main/java/org/bukkit/block/Skull.java
|
||||
+++ b/src/main/java/org/bukkit/block/Skull.java
|
||||
@@ -63,6 +63,20 @@ public interface Skull extends TileState {
|
||||
|
||||
@@ -3,37 +3,17 @@ From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 18 Jan 2018 01:00:27 -0500
|
||||
Subject: [PATCH] Optimize Hoppers
|
||||
|
||||
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 919cc993e3cb1c14e2a3aebf90e6cc0fa6fbc17f..95e51bcf5dfd27cc9012d7542c4ed1bceca29626 100644
|
||||
index 919cc993e3cb1c14e2a3aebf90e6cc0fa6fbc17f..0161b8a94c7e8774fec3ed9c36d9c37221525928 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 {
|
||||
private final Inventory destinationInventory;
|
||||
private ItemStack itemStack;
|
||||
private final boolean didSourceInitiate;
|
||||
+ public boolean calledGetItem; // Paper
|
||||
+ public boolean calledSetItem; // Paper
|
||||
|
||||
public InventoryMoveItemEvent(@NotNull final Inventory sourceInventory, @NotNull final ItemStack itemStack, @NotNull final Inventory destinationInventory, final boolean didSourceInitiate) {
|
||||
Preconditions.checkArgument(itemStack != null, "ItemStack cannot be null");
|
||||
@@ -58,7 +60,8 @@ public class InventoryMoveItemEvent extends Event implements Cancellable {
|
||||
@@ -58,7 +58,7 @@ public class InventoryMoveItemEvent extends Event implements Cancellable {
|
||||
*/
|
||||
@NotNull
|
||||
public ItemStack getItem() {
|
||||
- return itemStack.clone();
|
||||
+ calledGetItem = true; // Paper - record this method was used for auto detection of mode
|
||||
+ return itemStack; // Paper - Removed clone, handled better in Server
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,6 +73,7 @@ public class InventoryMoveItemEvent extends Event implements Cancellable {
|
||||
*/
|
||||
public void setItem(@NotNull ItemStack itemStack) {
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -366,7 +366,7 @@ index 0000000000000000000000000000000000000000..517d15238ed117f38bbd39f570874014
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/util/CachedServerIcon.java b/src/main/java/org/bukkit/util/CachedServerIcon.java
|
||||
index 612958a331575d1da2715531ebdf6b1168f2e860..bb4f7702ced0baf0670a7a21d48ad528b7249361 100644
|
||||
index 9a7768d41270714d4a1c89b4dcb436cc66f57545..b74b21a1ac7798e847b6d34ff45026e1c9cfed14 100644
|
||||
--- a/src/main/java/org/bukkit/util/CachedServerIcon.java
|
||||
+++ b/src/main/java/org/bukkit/util/CachedServerIcon.java
|
||||
@@ -18,4 +18,9 @@ public interface CachedServerIcon {
|
||||
|
||||
@@ -6,10 +6,10 @@ 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 a6a792babe69712594c18f49542feb30ff591810..ec1af46667d8590ea218370249286f86652f3ac4 100644
|
||||
index dcd539220e5a2bda41f27101ea4c0ece146e1d0d..f5358612884aae8d0686f3ff98ccee567a746f16 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1199,8 +1199,10 @@ public final class Bukkit {
|
||||
@@ -1230,8 +1230,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
|
||||
@@ -20,7 +20,7 @@ index a6a792babe69712594c18f49542feb30ff591810..ec1af46667d8590ea218370249286f86
|
||||
public static PlayerProfile createPlayerProfile(@Nullable UUID uniqueId, @Nullable String name) {
|
||||
return server.createPlayerProfile(uniqueId, name);
|
||||
}
|
||||
@@ -1211,8 +1213,10 @@ public final class Bukkit {
|
||||
@@ -1242,8 +1244,10 @@ public final class Bukkit {
|
||||
* @param uniqueId the unique id
|
||||
* @return the new PlayerProfile
|
||||
* @throws IllegalArgumentException if the unique id is <code>null</code>
|
||||
@@ -31,7 +31,7 @@ index a6a792babe69712594c18f49542feb30ff591810..ec1af46667d8590ea218370249286f86
|
||||
public static PlayerProfile createPlayerProfile(@NotNull UUID uniqueId) {
|
||||
return server.createPlayerProfile(uniqueId);
|
||||
}
|
||||
@@ -1224,8 +1228,10 @@ public final class Bukkit {
|
||||
@@ -1255,8 +1259,10 @@ public final class Bukkit {
|
||||
* @return the new PlayerProfile
|
||||
* @throws IllegalArgumentException if the name is <code>null</code> or
|
||||
* blank
|
||||
@@ -43,10 +43,10 @@ index a6a792babe69712594c18f49542feb30ff591810..ec1af46667d8590ea218370249286f86
|
||||
return server.createPlayerProfile(name);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
index c5eed3234a8c04bfa9d707685746fc2b40ec8bfc..3ba8ff1a41ac9fd96fd4dec5cbe0f714fef93022 100644
|
||||
index bec480aff819e09220b52175cab0cb6d68ae68c6..12349910297a75c00e64f6ccc7981aeeeb43ecd3 100644
|
||||
--- a/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
+++ b/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
@@ -50,7 +50,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
@@ -59,7 +59,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
* @return the player's profile
|
||||
*/
|
||||
@NotNull
|
||||
@@ -54,12 +54,12 @@ index c5eed3234a8c04bfa9d707685746fc2b40ec8bfc..3ba8ff1a41ac9fd96fd4dec5cbe0f714
|
||||
+ com.destroystokyo.paper.profile.PlayerProfile getPlayerProfile(); // Paper
|
||||
|
||||
/**
|
||||
* Checks if this player is banned or not
|
||||
* Checks if this player has had their profile banned.
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index bf1102b4481b8c9b9c4f5ba0c561556b75fea077..8539bac19bf9ba1a66689a9af90e088a03f9c152 100644
|
||||
index 016cee903c7179baf711984503d1d0793d40c5c5..064edd612885b2ea4b35001a864503b568c53987 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1017,8 +1017,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1050,8 +1050,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
|
||||
@@ -70,7 +70,7 @@ index bf1102b4481b8c9b9c4f5ba0c561556b75fea077..8539bac19bf9ba1a66689a9af90e088a
|
||||
PlayerProfile createPlayerProfile(@Nullable UUID uniqueId, @Nullable String name);
|
||||
|
||||
/**
|
||||
@@ -1027,8 +1029,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1060,8 +1062,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>
|
||||
@@ -81,7 +81,7 @@ index bf1102b4481b8c9b9c4f5ba0c561556b75fea077..8539bac19bf9ba1a66689a9af90e088a
|
||||
PlayerProfile createPlayerProfile(@NotNull UUID uniqueId);
|
||||
|
||||
/**
|
||||
@@ -1038,8 +1042,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1071,8 +1075,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
|
||||
@@ -93,10 +93,10 @@ index bf1102b4481b8c9b9c4f5ba0c561556b75fea077..8539bac19bf9ba1a66689a9af90e088a
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index af92443e50b66e526d382c820e1b2e27c6e1b461..95163d95b80f245712839af4c03e0df721809117 100644
|
||||
index 9dca8fc727b727063d9ca50fdd8f6452173a5cd4..ccd80734cf5641455fd9d9b63238739987e225da 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2386,6 +2386,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2678,6 +2678,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
|
||||
*/
|
||||
boolean hasResourcePack();
|
||||
@@ -110,7 +110,11 @@ index af92443e50b66e526d382c820e1b2e27c6e1b461..95163d95b80f245712839af4c03e0df7
|
||||
+
|
||||
+ /**
|
||||
+ * Changes the PlayerProfile for this player. This will cause this player
|
||||
+ * to be reregistered to all clients that can currently see this player
|
||||
+ * to be reregistered to all clients that can currently see this player.
|
||||
+ *
|
||||
+ * After executing this method, the player {@link java.util.UUID} won't
|
||||
+ * be swapped, only their name and gameprofile properties.
|
||||
+ *
|
||||
+ * @param profile The new profile to use
|
||||
+ */
|
||||
+ void setPlayerProfile(@NotNull com.destroystokyo.paper.profile.PlayerProfile profile);
|
||||
|
||||
@@ -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 ec1af46667d8590ea218370249286f86652f3ac4..aa4217c87756cffe774aaa2d390217b9056c4b95 100644
|
||||
index f5358612884aae8d0686f3ff98ccee567a746f16..a6f9336f27cb4a7aed0c01cde417d2287e393929 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -657,6 +657,20 @@ public final class Bukkit {
|
||||
@@ -688,6 +688,20 @@ public final class Bukkit {
|
||||
return server.getPlayer(id);
|
||||
}
|
||||
|
||||
@@ -34,10 +34,10 @@ index ec1af46667d8590ea218370249286f86652f3ac4..aa4217c87756cffe774aaa2d390217b9
|
||||
* 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 8539bac19bf9ba1a66689a9af90e088a03f9c152..c46cae77e6a1d3f01b08ff03407eb1a564d000de 100644
|
||||
index 064edd612885b2ea4b35001a864503b568c53987..dfbccef8dd67195d588112989a9ffecb712a9fe9 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -559,6 +559,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -592,6 +592,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 abdca9fe5acc90f167219eb769ece66c35682bb1..9715a9d36187e2eecfeab1a05087d27c28b8690e 100644
|
||||
index abdca9fe5acc90f167219eb769ece66c35682bb1..b3aa3dc6aa5afbc36cc86741b4cba56f463c2234 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -500,6 +500,14 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -500,6 +500,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
@Deprecated
|
||||
public void setShoulderEntityRight(@Nullable Entity entity);
|
||||
@@ -17,17 +17,29 @@ index abdca9fe5acc90f167219eb769ece66c35682bb1..9715a9d36187e2eecfeab1a05087d27c
|
||||
+ * Opens an editor window for the specified sign
|
||||
+ *
|
||||
+ * @param sign The sign to open
|
||||
+ * @deprecated use {@link #openSign(org.bukkit.block.Sign, org.bukkit.block.sign.Side)}
|
||||
+ */
|
||||
+ void openSign(@NotNull org.bukkit.block.Sign sign);
|
||||
+ @Deprecated
|
||||
+ default void openSign(@NotNull org.bukkit.block.Sign sign) {
|
||||
+ this.openSign(sign, org.bukkit.block.sign.Side.FRONT);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Opens an editor window for the specified sign
|
||||
+ *
|
||||
+ * @param sign The sign to open
|
||||
+ * @param side The side of the sign to open
|
||||
+ */
|
||||
+ void openSign(org.bukkit.block.@NotNull Sign sign, org.bukkit.block.sign.@NotNull Side side);
|
||||
+ // Paper end
|
||||
|
||||
/**
|
||||
* 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 95163d95b80f245712839af4c03e0df721809117..3a9dd66d8f30c04342180097d8de44933304b88c 100644
|
||||
index ccd80734cf5641455fd9d9b63238739987e225da..bca4794a67c369b0bb882e56f489ed952488b2c5 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2241,7 +2241,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2523,10 +2523,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
/**
|
||||
* Open a Sign for editing by the Player.
|
||||
*
|
||||
@@ -35,4 +47,9 @@ index 95163d95b80f245712839af4c03e0df721809117..3a9dd66d8f30c04342180097d8de4493
|
||||
+ * The Sign must be in the same world as the player.
|
||||
*
|
||||
* @param sign The sign to edit
|
||||
+ * @deprecated use {@link #openSign(Sign, Side)}
|
||||
*/
|
||||
+ @Deprecated
|
||||
public void openSign(@NotNull Sign sign);
|
||||
|
||||
/**
|
||||
@@ -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 3ba8ff1a41ac9fd96fd4dec5cbe0f714fef93022..b39ed4eb2e7d9e40805e201d77973877481db8fd 100644
|
||||
index 12349910297a75c00e64f6ccc7981aeeeb43ecd3..8f2f3e0ac5266f571b62a754921422bb07d61984 100644
|
||||
--- a/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
+++ b/src/main/java/org/bukkit/OfflinePlayer.java
|
||||
@@ -58,6 +58,61 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
@@ -67,6 +67,61 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
* @return true if banned, otherwise false
|
||||
*/
|
||||
public boolean isBanned();
|
||||
@@ -72,12 +72,12 @@ index 3ba8ff1a41ac9fd96fd4dec5cbe0f714fef93022..b39ed4eb2e7d9e40805e201d77973877
|
||||
+ // Paper end
|
||||
|
||||
/**
|
||||
* Checks if this player is whitelisted or not
|
||||
* Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 3a9dd66d8f30c04342180097d8de44933304b88c..c43cf2bdf24de153d16017e50d9b5723218e3d44 100644
|
||||
index bca4794a67c369b0bb882e56f489ed952488b2c5..a851ec4d350ce442eb01385d21ca75e695cf09d2 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -814,6 +814,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1042,6 +1042,162 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
public void sendMap(@NotNull MapView map);
|
||||
|
||||
// Paper start
|
||||
@@ -211,7 +211,7 @@ index 3a9dd66d8f30c04342180097d8de44933304b88c..c43cf2bdf24de153d16017e50d9b5723
|
||||
+ * 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
|
||||
+ * @param source Source of the ban or null for default
|
||||
+ * @return Ban Entry
|
||||
+ */
|
||||
+ @Nullable
|
||||
@@ -224,7 +224,7 @@ index 3a9dd66d8f30c04342180097d8de44933304b88c..c43cf2bdf24de153d16017e50d9b5723
|
||||
+ * 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
|
||||
+ * @param source Source of the ban or null for default
|
||||
+ * @param kickPlayer if the targeted player should be kicked
|
||||
+ * @return Ban Entry
|
||||
+ */
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Enderman.teleportRandomly()
|
||||
Ability to trigger the vanilla "teleport randomly" mechanic of an enderman.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Enderman.java b/src/main/java/org/bukkit/entity/Enderman.java
|
||||
index bb325d9c802e33431530bbccdcf5de5839e5fe68..821c690f8a32918bdb284ffec4af98f411f76ccc 100644
|
||||
index 0a03dc437973888ba57ba00fec47193fee38b5a9..605af1a9fc48602643aec57dd14e8c4ab657a0bc 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Enderman.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Enderman.java
|
||||
@@ -10,6 +10,17 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -11,6 +11,17 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface Enderman extends Monster {
|
||||
|
||||
|
||||
@@ -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 749d3de7dad480965be536938733d72bdfc2995b..dad7de7246741d6f3f2a444cf0b88f396302a8af 100644
|
||||
index 609e4908ed21f69b9e813500e702bbe784bff00c..7a6caf93606203198369030a295f1edbffde3c31 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 749d3de7dad480965be536938733d72bdfc2995b..dad7de7246741d6f3f2a444cf0b88f39
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -657,6 +660,256 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -625,6 +628,256 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes);
|
||||
|
||||
@@ -276,17 +276,3 @@ index 749d3de7dad480965be536938733d72bdfc2995b..dad7de7246741d6f3f2a444cf0b88f39
|
||||
/**
|
||||
* 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 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 {
|
||||
return profile;
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Changes the PlayerProfile the player will login as
|
||||
+ /* * Changes the PlayerProfile the player will login as
|
||||
* @param profile The profile to use
|
||||
*/
|
||||
public void setPlayerProfile(@NotNull PlayerProfile profile) {
|
||||
@@ -500,11 +500,11 @@ index 0000000000000000000000000000000000000000..f45b8cfd1611345e8d81ecb8297a586f
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
|
||||
index 0ca7955003eea0556a04a54056152ec27d93a9ee..93244e6d940891f1297d4a26a80ba155af306071 100644
|
||||
index e2adb9901cc92ede9d44ca9939c6a54d4762eb4b..81bd12c8addcee754c71e5e030c729c7e096fb4c 100644
|
||||
--- a/src/main/java/org/bukkit/Particle.java
|
||||
+++ b/src/main/java/org/bukkit/Particle.java
|
||||
@@ -163,6 +163,17 @@ public enum Particle {
|
||||
return dataType;
|
||||
@@ -194,6 +194,18 @@ public enum Particle implements Keyed {
|
||||
return key;
|
||||
}
|
||||
|
||||
+ // Paper start - Particle API expansion
|
||||
@@ -518,14 +518,15 @@ index 0ca7955003eea0556a04a54056152ec27d93a9ee..93244e6d940891f1297d4a26a80ba155
|
||||
+ return new com.destroystokyo.paper.ParticleBuilder(this);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* 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 dad7de7246741d6f3f2a444cf0b88f396302a8af..ae102dddda30ff0e15f70bdb17385c8d9d4b9a08 100644
|
||||
index 7a6caf93606203198369030a295f1edbffde3c31..3e7385d21380abcd40649045e4666cf4bed32195 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2812,7 +2812,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2777,7 +2777,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()}
|
||||
*/
|
||||
|
||||
@@ -5,10 +5,10 @@ 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 1f0faf16071f0be44c87248582ba173e51aafb52..24e36cdf580da885ac64002673a786b9c5a3f787 100644
|
||||
index 88f720aba13961b08e54b3fd35dbaabc5dd9a4c2..037af5fd6d71a526c0e6620f2db0cd6df9625261 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 {
|
||||
@@ -107,6 +107,33 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)));
|
||||
}
|
||||
|
||||
@@ -41,4 +41,4 @@ index 1f0faf16071f0be44c87248582ba173e51aafb52..24e36cdf580da885ac64002673a786b9
|
||||
+
|
||||
@NotNull
|
||||
private static PotionEffectType getEffectType(@NotNull Map<?, ?> map) {
|
||||
int type = getInt(map, TYPE);
|
||||
PotionEffectType effect;
|
||||
@@ -7,7 +7,7 @@ Control what potion the witch readies to use
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/WitchReadyPotionEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/WitchReadyPotionEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5351b523defa054ba56ae3fb591029283ca7510d
|
||||
index 0000000000000000000000000000000000000000..57f93af14acc6346c5a343e05fe8f5d44d6adbc6
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/WitchReadyPotionEvent.java
|
||||
@@ -0,0 +1,80 @@
|
||||
@@ -31,7 +31,7 @@ index 0000000000000000000000000000000000000000..5351b523defa054ba56ae3fb59102928
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Fires thee event, returning the desired potion, or air of cancelled
|
||||
+ * Fires the event, returning the desired potion, or air of cancelled
|
||||
+ * @param witch the witch whom is readying to use a potion
|
||||
+ * @param potion the potion to be used
|
||||
+ * @return The ItemStack to be used
|
||||
|
||||
@@ -6,7 +6,7 @@ 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 9d32283ee612a50b8a2bfe5151f42c9f181ede4c..53d99d214652ae1636f28a179a5b66edc0f8f229 100644
|
||||
index a8faa4c1881bae4d47d901388a78b991d138b518..b85eb71ff5d198d6270cbe07da0de3ed27fa72d5 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -646,5 +646,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
|
||||
@@ -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 ccd8f36c8450bab9f609bb220b5270394960580e..2bfeebe26f32d2e931dc483714d30430deeb9b04 100644
|
||||
index 6a9df4ec0eee205bcd37de9c4d04a6c67eb21644..b470d86c00be238a430e64d349a247e2740cfeec 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -731,5 +731,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -764,5 +764,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
@Deprecated
|
||||
void setArrowsStuck(int arrows);
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Expand Explosions API
|
||||
Add Entity as a Source capability, and add more API choices, and on Location.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index 6693e3d8dc2519facb12db981a6b6325faa095bf..5a6b33c6d9a68affdbd02c13fdb0854e011e327d 100644
|
||||
index 6693e3d8dc2519facb12db981a6b6325faa095bf..b7ff09ffdd3aecc1843d175bc76fe5fae1f48dde 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -7,6 +7,7 @@ import java.util.HashMap;
|
||||
@@ -17,10 +17,11 @@ index 6693e3d8dc2519facb12db981a6b6325faa095bf..5a6b33c6d9a68affdbd02c13fdb0854e
|
||||
import org.bukkit.util.NumberConversions;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -568,6 +569,87 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
|
||||
@@ -568,6 +569,89 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
|
||||
return centerLoc;
|
||||
}
|
||||
|
||||
+ // Paper start - Expand Explosions API
|
||||
+ /**
|
||||
+ * Creates explosion at this location with given power
|
||||
+ *
|
||||
@@ -98,18 +99,19 @@ index 6693e3d8dc2519facb12db981a6b6325faa095bf..5a6b33c6d9a68affdbd02c13fdb0854e
|
||||
+ * @param breakBlocks Whether or not to have blocks be destroyed
|
||||
+ * @return false if explosion was canceled, otherwise true
|
||||
+ */
|
||||
+ public boolean createExplosion(@NotNull Entity source, float power, boolean setFire, boolean breakBlocks) {
|
||||
+ public boolean createExplosion(@Nullable Entity source, float power, boolean setFire, boolean breakBlocks) {
|
||||
+ return this.getWorld().createExplosion(source, this, power, setFire, breakBlocks);
|
||||
+ }
|
||||
+ // Paper end - Expand Explosions API
|
||||
+
|
||||
/**
|
||||
* 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 ae102dddda30ff0e15f70bdb17385c8d9d4b9a08..adf743334f4e69ebca8045df70800f67bcd7d98f 100644
|
||||
index 3e7385d21380abcd40649045e4666cf4bed32195..266ed71b79d32f9b812be322563c247051ccd9d0 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1424,6 +1424,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -1392,6 +1392,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
*/
|
||||
public boolean createExplosion(@NotNull Location loc, float power, boolean setFire);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ 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 53d99d214652ae1636f28a179a5b66edc0f8f229..a70de962712c14cb895708e89ad3811041728935 100644
|
||||
index b85eb71ff5d198d6270cbe07da0de3ed27fa72d5..83a0631a80db156ace1d977df71d5fc653b70bb6 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit.inventory;
|
||||
@@ -139,7 +139,7 @@ index 53d99d214652ae1636f28a179a5b66edc0f8f229..a70de962712c14cb895708e89ad38110
|
||||
+ *
|
||||
+ * @param lore the lore that will be set
|
||||
+ */
|
||||
+ public void lore(@Nullable List<net.kyori.adventure.text.Component> lore) {
|
||||
+ public void lore(@Nullable List<? extends net.kyori.adventure.text.Component> lore) {
|
||||
+ ItemMeta itemMeta = getItemMeta();
|
||||
+ if (itemMeta == null) {
|
||||
+ throw new IllegalStateException("Cannot set lore on " + getType());
|
||||
|
||||
@@ -6,7 +6,7 @@ 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 9715a9d36187e2eecfeab1a05087d27c28b8690e..12068d14af5731494a839b87b67ed3cc26bf8f36 100644
|
||||
index b3aa3dc6aa5afbc36cc86741b4cba56f463c2234..9e012c3c0671e5d0e55c243fdb4e14057038c153 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -328,7 +328,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -20,10 +20,10 @@ index 9715a9d36187e2eecfeab1a05087d27c28b8690e..12068d14af5731494a839b87b67ed3cc
|
||||
public ItemStack getItemInUse();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 2bfeebe26f32d2e931dc483714d30430deeb9b04..17e5d2e2acdae23d8ea3b3b1a89f62e8be7b81a8 100644
|
||||
index b470d86c00be238a430e64d349a247e2740cfeec..97d0f82041a229e85217a7e575bf003eddc31b70 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -745,5 +745,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -778,5 +778,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
* @param delay Delay in ticks
|
||||
*/
|
||||
void setShieldBlockingDelay(int delay);
|
||||
|
||||
@@ -169,7 +169,7 @@ index 0ebd54df0bb072df25a6ebcf137a39829cf71bf9..6618f2129e108c0a6cd15f6d0e864260
|
||||
/**
|
||||
* 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 225c65a20a3e33dfb14e108a36f2f4bc60f7920c..b86f0196e6eb8070830f63a94f732522c2a6c2f1 100644
|
||||
index b3a5d7a91e483b9fd569dd3c8cec989498a50104..87a814f63c3f35be35bfa210c9248ad211c0dd8f 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Wither.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Wither.java
|
||||
@@ -6,7 +6,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -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 adf743334f4e69ebca8045df70800f67bcd7d98f..e0caac06b7f5459faefbbd5a6a3486dbb6bfa9ba 100644
|
||||
index 266ed71b79d32f9b812be322563c247051ccd9d0..ffe6c8be86fc93d39e256a89e5016e3025afbe5c 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -944,6 +944,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -912,6 +912,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Collection<Entity> getNearbyEntities(@NotNull Location location, double x, double y, double z);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ 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 12068d14af5731494a839b87b67ed3cc26bf8f36..3b184a66d1aebe4501fbdfd78ddf7a4ef5378f9f 100644
|
||||
index 9e012c3c0671e5d0e55c243fdb4e14057038c153..d44c5a3fda0b159dc541246cb2fca8427cb38243 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -179,6 +179,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -27,10 +27,10 @@ index 12068d14af5731494a839b87b67ed3cc26bf8f36..3b184a66d1aebe4501fbdfd78ddf7a4e
|
||||
* Returns the ItemStack currently in your hand, can be empty.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
|
||||
index 5861247c1b8ee4fe2736fd5098e05a2ca9ab78ea..21ad8888c0e403bfc63518502577d651c02dda05 100644
|
||||
index c0cc82d98348e8aae3cb56bafb2fcb590b03094f..4db0a07db156c61867644f50c185e63b695e2462 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
|
||||
@@ -11,9 +11,60 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -30,9 +30,60 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public class InventoryCloseEvent extends InventoryEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@@ -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 c10e19e06f0c4e33b2c5a4a1446b151f818e92db..13e0316b2446c1d10b2ff3582b948265de21bfef 100644
|
||||
index 4319dbac54b4cce95ad7479d5bd141a2b12ab7ae..5fc085f785719933eef7ab1b3cf173579c64739b 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 c10e19e06f0c4e33b2c5a4a1446b151f818e92db..13e0316b2446c1d10b2ff3582b948265
|
||||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Nameable;
|
||||
@@ -741,5 +742,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -756,5 +757,16 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
* @return True if entity spawned from a mob spawner
|
||||
*/
|
||||
boolean fromMobSpawner();
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] EnderDragon Events
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..118c7b6772a52c250649af2a9286f483f43da385
|
||||
index 0000000000000000000000000000000000000000..615bc4c973ff371d87f996e981207fc15b70275b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFireballHitEvent.java
|
||||
@@ -0,0 +1,79 @@
|
||||
@@ -0,0 +1,77 @@
|
||||
+package com.destroystokyo.paper.event.entity;
|
||||
+
|
||||
+import org.bukkit.entity.AreaEffectCloud;
|
||||
@@ -20,17 +20,21 @@ index 0000000000000000000000000000000000000000..118c7b6772a52c250649af2a9286f483
|
||||
+import org.bukkit.event.entity.EntityEvent;
|
||||
+
|
||||
+import java.util.Collection;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Fired when a DragonFireball collides with a block/entity and spawns an AreaEffectCloud
|
||||
+ */
|
||||
+public class EnderDragonFireballHitEvent extends EntityEvent implements Cancellable {
|
||||
+ @Nullable private final Collection<LivingEntity> targets;
|
||||
+ @NotNull private final AreaEffectCloud areaEffectCloud;
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ public EnderDragonFireballHitEvent(@NotNull DragonFireball fireball, @Nullable Collection<LivingEntity> targets, @NotNull AreaEffectCloud areaEffectCloud) {
|
||||
+ @NotNull private final Collection<LivingEntity> targets;
|
||||
+ @NotNull private final AreaEffectCloud areaEffectCloud;
|
||||
+ private boolean cancelled = false;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public EnderDragonFireballHitEvent(@NotNull DragonFireball fireball, @NotNull Collection<LivingEntity> targets, @NotNull AreaEffectCloud areaEffectCloud) {
|
||||
+ super(fireball);
|
||||
+ this.targets = targets;
|
||||
+ this.areaEffectCloud = areaEffectCloud;
|
||||
@@ -48,11 +52,9 @@ index 0000000000000000000000000000000000000000..118c7b6772a52c250649af2a9286f483
|
||||
+ /**
|
||||
+ * The living entities hit by fireball
|
||||
+ *
|
||||
+ * May be null if no entities were hit
|
||||
+ *
|
||||
+ * @return the targets
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @NotNull
|
||||
+ public Collection<LivingEntity> getTargets() {
|
||||
+ return targets;
|
||||
+ }
|
||||
@@ -65,20 +67,6 @@ index 0000000000000000000000000000000000000000..118c7b6772a52c250649af2a9286f483
|
||||
+ return areaEffectCloud;
|
||||
+ }
|
||||
+
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ private boolean cancelled = false;
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return cancelled;
|
||||
@@ -88,6 +76,16 @@ index 0000000000000000000000000000000000000000..118c7b6772a52c250649af2a9286f483
|
||||
+ public void setCancelled(boolean cancel) {
|
||||
+ cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EnderDragonFlameEvent.java
|
||||
new file mode 100644
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] EntityTransformedEvent
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityTransformedEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityTransformedEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..12194f1fc7f03ca6785904b6187b3dfd03b16461
|
||||
index 0000000000000000000000000000000000000000..c6802ca6acad1b841c01284eef0a601774486f55
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityTransformedEvent.java
|
||||
@@ -0,0 +1,92 @@
|
||||
@@ -0,0 +1,93 @@
|
||||
+package com.destroystokyo.paper.event.entity;
|
||||
+
|
||||
+
|
||||
@@ -18,6 +18,7 @@ index 0000000000000000000000000000000000000000..12194f1fc7f03ca6785904b6187b3dfd
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.entity.EntityEvent;
|
||||
+import org.bukkit.event.entity.EntityTransformEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+
|
||||
+/**
|
||||
+ * Fired when an entity transforms into another entity
|
||||
@@ -25,7 +26,7 @@ index 0000000000000000000000000000000000000000..12194f1fc7f03ca6785904b6187b3dfd
|
||||
+ * If the event is cancelled, the entity will not transform
|
||||
+ * @deprecated Bukkit has added {@link EntityTransformEvent}, you should start using that
|
||||
+ */
|
||||
+@Deprecated
|
||||
+@Deprecated(forRemoval = true) @ApiStatus.ScheduledForRemoval(inVersion = "1.21")
|
||||
+public class EntityTransformedEvent extends EntityEvent implements Cancellable {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private boolean cancelled;
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Expand Location Manipulation API
|
||||
Adds set(x, y, z), add(base, x, y, z), subtract(base, x, y, z);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index 5a6b33c6d9a68affdbd02c13fdb0854e011e327d..943c3364f6b931fe11f9a6099504590b2da34657 100644
|
||||
index b7ff09ffdd3aecc1843d175bc76fe5fae1f48dde..aa6821aa33d3c579a139bd7c0378253c43b3754a 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -546,6 +546,54 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] AnvilDamageEvent
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java b/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..a83c286c1c11af25fc4d16af7a42b95ce90b9dee
|
||||
index 0000000000000000000000000000000000000000..aa5c3690fb898a7560a9551df91588a0cdc69fe2
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/block/AnvilDamagedEvent.java
|
||||
@@ -0,0 +1,148 @@
|
||||
@@ -0,0 +1,151 @@
|
||||
+package com.destroystokyo.paper.event.block;
|
||||
+
|
||||
+import org.bukkit.Material;
|
||||
@@ -19,6 +19,7 @@ index 0000000000000000000000000000000000000000..a83c286c1c11af25fc4d16af7a42b95c
|
||||
+import org.bukkit.event.inventory.InventoryEvent;
|
||||
+import org.bukkit.inventory.AnvilInventory;
|
||||
+import org.bukkit.inventory.InventoryView;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
@@ -26,11 +27,13 @@ index 0000000000000000000000000000000000000000..a83c286c1c11af25fc4d16af7a42b95c
|
||||
+ * Called when an anvil is damaged from being used
|
||||
+ */
|
||||
+public class AnvilDamagedEvent extends InventoryEvent implements Cancellable {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
+
|
||||
+ private boolean cancel;
|
||||
+ private DamageState damageState;
|
||||
+
|
||||
+ public AnvilDamagedEvent(@NotNull InventoryView inventory, @NotNull BlockData blockData) {
|
||||
+ @ApiStatus.Internal
|
||||
+ public AnvilDamagedEvent(@NotNull InventoryView inventory, @Nullable BlockData blockData) {
|
||||
+ super(inventory);
|
||||
+ this.damageState = DamageState.getState(blockData);
|
||||
+ }
|
||||
@@ -92,12 +95,12 @@ index 0000000000000000000000000000000000000000..a83c286c1c11af25fc4d16af7a42b95c
|
||||
+
|
||||
+ @NotNull
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ return HANDLER_LIST;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
@@ -109,7 +112,7 @@ index 0000000000000000000000000000000000000000..a83c286c1c11af25fc4d16af7a42b95c
|
||||
+ DAMAGED(Material.DAMAGED_ANVIL),
|
||||
+ BROKEN(Material.AIR);
|
||||
+
|
||||
+ private Material material;
|
||||
+ private final Material material;
|
||||
+
|
||||
+ DamageState(@NotNull Material material) {
|
||||
+ this.material = material;
|
||||
@@ -154,7 +157,7 @@ index 0000000000000000000000000000000000000000..a83c286c1c11af25fc4d16af7a42b95c
|
||||
+ return state;
|
||||
+ }
|
||||
+ }
|
||||
+ throw new IllegalArgumentException("Material not an anvil");
|
||||
+ throw new IllegalArgumentException("Material is not an anvil state");
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Add TNTPrimeEvent
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/block/TNTPrimeEvent.java b/src/main/java/com/destroystokyo/paper/event/block/TNTPrimeEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..73dabb82c7fbea3f0cccade0a2944b11a80ede06
|
||||
index 0000000000000000000000000000000000000000..9d7221583454dc922b20af6c233897c0b2ec47da
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/block/TNTPrimeEvent.java
|
||||
@@ -0,0 +1,114 @@
|
||||
@@ -0,0 +1,116 @@
|
||||
+package com.destroystokyo.paper.event.block;
|
||||
+
|
||||
+import org.bukkit.block.Block;
|
||||
@@ -27,7 +27,9 @@ index 0000000000000000000000000000000000000000..73dabb82c7fbea3f0cccade0a2944b11
|
||||
+ * the TNT block as-is
|
||||
+ *
|
||||
+ * @author Mark Vainomaa
|
||||
+ * @deprecated use {@link org.bukkit.event.block.TNTPrimeEvent}
|
||||
+ */
|
||||
+@Deprecated(forRemoval = true)
|
||||
+public class TNTPrimeEvent extends BlockEvent implements Cancellable {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private boolean cancelled;
|
||||
|
||||
@@ -7,10 +7,10 @@ Allows you to easily access the chunks X/z as a long, and a method
|
||||
to look up by the long key too.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
|
||||
index a33379e6df0577ea149be473a647258a3bda99f1..fa14c276309fc113d5fda38dfdda1d6ee25b8787 100644
|
||||
index efbfed855248cff8b4bdbfc181d3e82058df4749..766d643f0fe79660942fdad25e39e488e9379419 100644
|
||||
--- a/src/main/java/org/bukkit/Chunk.java
|
||||
+++ b/src/main/java/org/bukkit/Chunk.java
|
||||
@@ -29,6 +29,32 @@ public interface Chunk extends PersistentDataHolder {
|
||||
@@ -33,6 +33,32 @@ public interface Chunk extends PersistentDataHolder {
|
||||
*/
|
||||
int getZ();
|
||||
|
||||
@@ -44,17 +44,17 @@ index a33379e6df0577ea149be473a647258a3bda99f1..fa14c276309fc113d5fda38dfdda1d6e
|
||||
* Gets the world containing this chunk
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index e0caac06b7f5459faefbbd5a6a3486dbb6bfa9ba..7d6c923ea603a3193865e6a34b41617ac7016d19 100644
|
||||
index ffe6c8be86fc93d39e256a89e5016e3025afbe5c..315ecb5dc0f33edfef893ead1297c8165d292250 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -212,6 +212,22 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -180,6 +180,37 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Chunk getChunkAt(@NotNull Block block);
|
||||
|
||||
+ // Paper start
|
||||
+ // Paper start - chunk long key API
|
||||
+ /**
|
||||
+ * Gets the chunk at the specified chunk key, which is the X and Z packed into a long.
|
||||
+ *
|
||||
+ * <p>
|
||||
+ * See {@link Chunk#getChunkKey()} for easy access to the key, or you may calculate it as:
|
||||
+ * long chunkKey = (long) chunkX & 0xffffffffL | ((long) chunkZ & 0xffffffffL) >> 32;
|
||||
+ *
|
||||
@@ -62,10 +62,25 @@ index e0caac06b7f5459faefbbd5a6a3486dbb6bfa9ba..7d6c923ea603a3193865e6a34b41617a
|
||||
+ * @return The chunk at the specified key
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public default Chunk getChunkAt(long chunkKey) {
|
||||
+ return getChunkAt((int) chunkKey, (int) (chunkKey >> 32));
|
||||
+ default Chunk getChunkAt(long chunkKey) {
|
||||
+ return getChunkAt(chunkKey, true);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the chunk at the specified chunk key, which is the X and Z packed into a long.
|
||||
+ * <p>
|
||||
+ * See {@link Chunk#getChunkKey()} for easy access to the key, or you may calculate it as:
|
||||
+ * long chunkKey = (long) chunkX & 0xffffffffL | ((long) chunkZ & 0xffffffffL) >> 32;
|
||||
+ *
|
||||
+ * @param chunkKey The Chunk Key to look up the chunk by
|
||||
+ * @param generate Whether the chunk should be fully generated or not
|
||||
+ * @return The chunk at the specified key
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ default Chunk getChunkAt(long chunkKey, boolean generate) {
|
||||
+ return getChunkAt((int) chunkKey, (int) (chunkKey >> 32), generate);
|
||||
+ }
|
||||
+ // Paper end - chunk long key API
|
||||
+
|
||||
/**
|
||||
* Checks if the specified {@link Chunk} is loaded
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
|
||||
index fa14c276309fc113d5fda38dfdda1d6ee25b8787..eccc357cabd8317afc5666c3347936d50eb34015 100644
|
||||
index 766d643f0fe79660942fdad25e39e488e9379419..4418c41f75e9a190dd77abdd6048b0a4fb2a57ed 100644
|
||||
--- a/src/main/java/org/bukkit/Chunk.java
|
||||
+++ b/src/main/java/org/bukkit/Chunk.java
|
||||
@@ -118,7 +118,30 @@ public interface Chunk extends PersistentDataHolder {
|
||||
@@ -122,7 +122,30 @@ public interface Chunk extends PersistentDataHolder {
|
||||
* @return The tile entities.
|
||||
*/
|
||||
@NotNull
|
||||
@@ -39,4 +39,4 @@ index fa14c276309fc113d5fda38dfdda1d6ee25b8787..eccc357cabd8317afc5666c3347936d5
|
||||
+ // Paper end
|
||||
|
||||
/**
|
||||
* Checks if the chunk is loaded.
|
||||
* Checks if the chunk is fully generated.
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Don't use snapshots for Timings Tile Entity reports
|
||||
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java
|
||||
index ddaed81275fcc12d1671b668697acf318e96888b..203cda0f9a4dea4f28a21ea9ee8db7a7369842e3 100644
|
||||
index eb9d58f8852e732a1284beeaf542989301d21b1c..02e88db63be2d5e31da6b65157ba7b971b1f10f3 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingHistory.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingHistory.java
|
||||
@@ -119,7 +119,7 @@ public class TimingHistory {
|
||||
@@ -120,7 +120,7 @@ public class TimingHistory {
|
||||
data.entityCounts.get(entity.getType()).increment();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Y range: [0, 1023]
|
||||
X, Z range: [-67 108 864, 67 108 863]
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index 943c3364f6b931fe11f9a6099504590b2da34657..16a604b6315daff228c827fe02b1234cca3e884d 100644
|
||||
index aa6821aa33d3c579a139bd7c0378253c43b3754a..6e6e65c40813ccce618fa7a3df2c0030aa0a3bbe 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -15,7 +15,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -50,10 +50,10 @@ index 943c3364f6b931fe11f9a6099504590b2da34657..16a604b6315daff228c827fe02b1234c
|
||||
* @return A new location where X/Y/Z are the center of the block
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 7d6c923ea603a3193865e6a34b41617ac7016d19..00651d5486f1de886df7a4a01aaf272ceb0fa82a 100644
|
||||
index 315ecb5dc0f33edfef893ead1297c8165d292250..ad5afa7a05636cee82b517c673d281f0f4e38644 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -95,6 +95,40 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -97,6 +97,41 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Block getBlockAt(@NotNull Location location);
|
||||
|
||||
@@ -83,6 +83,7 @@ index 7d6c923ea603a3193865e6a34b41617ac7016d19..00651d5486f1de886df7a4a01aaf272c
|
||||
+ * @see Block#getBlockKey(int, int, int)
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @Deprecated
|
||||
+ public default Location getLocationAtKey(long key) {
|
||||
+ int x = Block.getBlockKeyX(key);
|
||||
+ int y = Block.getBlockKeyY(key);
|
||||
@@ -92,10 +93,10 @@ index 7d6c923ea603a3193865e6a34b41617ac7016d19..00651d5486f1de886df7a4a01aaf272c
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Gets the highest non-empty (impassable) coordinate at the given
|
||||
* coordinates.
|
||||
* Gets the highest non-empty (impassable) block at the given coordinates.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index 61ce341daec63392f040b70cd12662379b2f1ebd..0be73b2f45c9aab6e73bcb7a76136ec6e2428163 100644
|
||||
index 9f4d383ea3d6b26d16b8b77ca4c29d2d839ad6dd..78f6cc1a8a8de05aec6f551f8a5f425944f0ffa3 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -156,6 +156,82 @@ public interface Block extends Metadatable, Translatable {
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Slime Pathfinder Events
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/SlimeChangeDirectionEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/SlimeChangeDirectionEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..2638bbd3e1392b3d8640be58163f6eb2789dee4a
|
||||
index 0000000000000000000000000000000000000000..473fbded8ab534308f2c0bd0b87512fcce5c9e58
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/SlimeChangeDirectionEvent.java
|
||||
@@ -0,0 +1,38 @@
|
||||
@@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..2638bbd3e1392b3d8640be58163f6eb2
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+/**
|
||||
+ * Fired when a Slime decides to change it's facing direction.
|
||||
+ * Fired when a Slime decides to change its facing direction.
|
||||
+ * <p>
|
||||
+ * This event does not fire for the entity's actual movement. Only when it
|
||||
+ * is choosing to change direction.
|
||||
|
||||
@@ -6,16 +6,17 @@ Subject: [PATCH] Add PhantomPreSpawnEvent
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/PhantomPreSpawnEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/PhantomPreSpawnEvent.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..9022f697ab244df43074e48c9150f39d44217531
|
||||
index 0000000000000000000000000000000000000000..d8f3f1c354331bc5e6fc1d9aa013476baf2daf05
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/PhantomPreSpawnEvent.java
|
||||
@@ -0,0 +1,31 @@
|
||||
@@ -0,0 +1,33 @@
|
||||
+package com.destroystokyo.paper.event.entity;
|
||||
+
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.entity.Entity;
|
||||
+import org.bukkit.entity.EntityType;
|
||||
+import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
@@ -26,6 +27,7 @@ index 0000000000000000000000000000000000000000..9022f697ab244df43074e48c9150f39d
|
||||
+public class PhantomPreSpawnEvent extends PreCreatureSpawnEvent {
|
||||
+ @NotNull private final Entity entity;
|
||||
+
|
||||
+ @ApiStatus.Internal
|
||||
+ public PhantomPreSpawnEvent(@NotNull Location location, @NotNull Entity entity, @NotNull CreatureSpawnEvent.SpawnReason reason) {
|
||||
+ super(location, EntityType.PHANTOM, reason);
|
||||
+ this.entity = entity;
|
||||
@@ -36,7 +38,7 @@ index 0000000000000000000000000000000000000000..9022f697ab244df43074e48c9150f39d
|
||||
+ *
|
||||
+ * @return Entity
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @NotNull
|
||||
+ public Entity getSpawningEntity() {
|
||||
+ return entity;
|
||||
+ }
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] isChunkGenerated API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index 16a604b6315daff228c827fe02b1234cca3e884d..20978b269a7757a561d6b872cc77898b44bbd272 100644
|
||||
index 6e6e65c40813ccce618fa7a3df2c0030aa0a3bbe..8508aa2c6fb7c9f41f3d185f5228c86dd3b8b627 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit;
|
||||
@@ -34,14 +34,14 @@ index 16a604b6315daff228c827fe02b1234cca3e884d..20978b269a7757a561d6b872cc77898b
|
||||
/**
|
||||
* Sets the position of this Location and returns itself
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 00651d5486f1de886df7a4a01aaf272ceb0fa82a..8075ff77eddb971a0a73dad3c9b809131b5db343 100644
|
||||
index ad5afa7a05636cee82b517c673d281f0f4e38644..880ff5ee1237096ac2da115b665dc663c677e57b 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -260,6 +260,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
public default Chunk getChunkAt(long chunkKey) {
|
||||
return getChunkAt((int) chunkKey, (int) (chunkKey >> 32));
|
||||
@@ -246,6 +246,19 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
}
|
||||
+
|
||||
// Paper end - chunk long key API
|
||||
|
||||
+ // Paper start - isChunkGenerated API
|
||||
+ /**
|
||||
+ * Checks if a {@link Chunk} has been generated at the specified chunk key,
|
||||
+ * which is the X and Z packed into a long.
|
||||
@@ -49,9 +49,11 @@ index 00651d5486f1de886df7a4a01aaf272ceb0fa82a..8075ff77eddb971a0a73dad3c9b80913
|
||||
+ * @param chunkKey The Chunk Key to look up the chunk by
|
||||
+ * @return true if the chunk has been generated, otherwise false
|
||||
+ */
|
||||
+ public default boolean isChunkGenerated(long chunkKey) {
|
||||
+ default boolean isChunkGenerated(long chunkKey) {
|
||||
+ return isChunkGenerated((int) chunkKey, (int) (chunkKey >> 32));
|
||||
+ }
|
||||
// Paper end
|
||||
|
||||
+ // Paper end - isChunkGenerated API
|
||||
+
|
||||
/**
|
||||
* Checks if the specified {@link Chunk} is loaded
|
||||
*
|
||||
@@ -8,10 +8,10 @@ Adds API's to load or generate chunks asynchronously.
|
||||
Also adds utility methods to Entity to teleport asynchronously.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937b70cf27d 100644
|
||||
index 880ff5ee1237096ac2da115b665dc663c677e57b..fc6b99e4f37179b15254bf0b398b1a800de1b73f 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -969,6 +969,482 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -955,6 +955,482 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
}
|
||||
return nearby;
|
||||
}
|
||||
@@ -56,8 +56,8 @@ index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937
|
||||
+ * on the main Server Thread.
|
||||
+ *
|
||||
+ * @deprecated Use either the Future or the Consumer based methods
|
||||
+ * @param x Chunk X-coordinate of the chunk - (world coordinate / 16)
|
||||
+ * @param z Chunk Z-coordinate of the chunk - (world coordinate / 16)
|
||||
+ * @param x Chunk X-coordinate of the chunk - floor(world coordinate / 16)
|
||||
+ * @param z Chunk Z-coordinate of the chunk - floor(world coordinate / 16)
|
||||
+ * @param cb Callback to receive the chunk when it is loaded.
|
||||
+ * will be executed synchronously
|
||||
+ */
|
||||
@@ -134,8 +134,8 @@ index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937
|
||||
+ * The {@link java.util.function.Consumer} will always be executed synchronously
|
||||
+ * on the main Server Thread.
|
||||
+ *
|
||||
+ * @param x Chunk X-coordinate of the chunk - (world coordinate / 16)
|
||||
+ * @param z Chunk Z-coordinate of the chunk - (world coordinate / 16)
|
||||
+ * @param x Chunk X-coordinate of the chunk - floor(world coordinate / 16)
|
||||
+ * @param z Chunk Z-coordinate of the chunk - floor(world coordinate / 16)
|
||||
+ * @param cb Callback to receive the chunk when it is loaded.
|
||||
+ * will be executed synchronously
|
||||
+ */
|
||||
@@ -159,9 +159,9 @@ index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937
|
||||
+ * The {@link java.util.function.Consumer} will always be executed synchronously
|
||||
+ * on the main Server Thread.
|
||||
+ *
|
||||
+ * @param x Chunk X-coordinate of the chunk - (world coordinate / 16)
|
||||
+ * @param z Chunk Z-coordinate of the chunk - (world coordinate / 16)
|
||||
+ * @param gen Should we generate a chunk if it doesn't exists or not
|
||||
+ * @param x Chunk X-coordinate of the chunk - floor(world coordinate / 16)
|
||||
+ * @param z Chunk Z-coordinate of the chunk - floor(world coordinate / 16)
|
||||
+ * @param gen Should we generate a chunk if it doesn't exist or not
|
||||
+ * @param cb Callback to receive the chunk when it is loaded.
|
||||
+ * will be executed synchronously
|
||||
+ */
|
||||
@@ -207,7 +207,7 @@ index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937
|
||||
+ * on the main Server Thread.
|
||||
+ *
|
||||
+ * @param loc Location of the chunk
|
||||
+ * @param gen Should the chunk generate
|
||||
+ * @param gen Should the chunk generate if it doesn't exist
|
||||
+ * @param cb Callback to receive the chunk when it is loaded.
|
||||
+ * will be executed synchronously
|
||||
+ */
|
||||
@@ -250,7 +250,7 @@ index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937
|
||||
+ * on the main Server Thread.
|
||||
+ *
|
||||
+ * @param block Block to get the containing chunk from
|
||||
+ * @param gen Should the chunk generate
|
||||
+ * @param gen Should the chunk generate if it doesn't exist
|
||||
+ * @param cb Callback to receive the chunk when it is loaded.
|
||||
+ * will be executed synchronously
|
||||
+ */
|
||||
@@ -291,7 +291,7 @@ index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937
|
||||
+ * The future will always be executed synchronously
|
||||
+ * on the main Server Thread.
|
||||
+ * @param loc Location to load the corresponding chunk from
|
||||
+ * @param gen Should the chunk generate
|
||||
+ * @param gen Should the chunk generate if it doesn't exist
|
||||
+ * @return Future that will resolve when the chunk is loaded
|
||||
+ */
|
||||
+ @NotNull
|
||||
@@ -332,7 +332,7 @@ index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937
|
||||
+ * The future will always be executed synchronously
|
||||
+ * on the main Server Thread.
|
||||
+ * @param block Block to load the corresponding chunk from
|
||||
+ * @param gen Should the chunk generate
|
||||
+ * @param gen Should the chunk generate if it doesn't exist
|
||||
+ * @return Future that will resolve when the chunk is loaded
|
||||
+ */
|
||||
+ @NotNull
|
||||
@@ -353,8 +353,8 @@ index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937
|
||||
+ * The future will always be executed synchronously
|
||||
+ * on the main Server Thread.
|
||||
+ *
|
||||
+ * @param x X Coord
|
||||
+ * @param z Z Coord
|
||||
+ * @param x Chunk X-coordinate of the chunk - floor(world coordinate / 16)
|
||||
+ * @param z Chunk Z-coordinate of the chunk - floor(world coordinate / 16)
|
||||
+ * @return Future that will resolve when the chunk is loaded
|
||||
+ */
|
||||
+ @NotNull
|
||||
@@ -375,9 +375,9 @@ index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937
|
||||
+ * The future will always be executed synchronously
|
||||
+ * on the main Server Thread.
|
||||
+ *
|
||||
+ * @param x Chunk X-coordinate of the chunk - (world coordinate / 16)
|
||||
+ * @param z Chunk Z-coordinate of the chunk - (world coordinate / 16)
|
||||
+ * @param gen Should we generate a chunk if it doesn't exists or not
|
||||
+ * @param x Chunk X-coordinate of the chunk - floor(world coordinate / 16)
|
||||
+ * @param z Chunk Z-coordinate of the chunk - floor(world coordinate / 16)
|
||||
+ * @param gen Should we generate a chunk if it doesn't exist or not
|
||||
+ * @return Future that will resolve when the chunk is loaded
|
||||
+ */
|
||||
+ @NotNull
|
||||
@@ -418,7 +418,7 @@ index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937
|
||||
+ * The future will always be executed synchronously
|
||||
+ * on the main Server Thread.
|
||||
+ * @param loc Location to load the corresponding chunk from
|
||||
+ * @param gen Should the chunk generate
|
||||
+ * @param gen Should the chunk generate if it doesn't exist
|
||||
+ * @return Future that will resolve when the chunk is loaded
|
||||
+ */
|
||||
+ @NotNull
|
||||
@@ -459,7 +459,7 @@ index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937
|
||||
+ * The future will always be executed synchronously
|
||||
+ * on the main Server Thread.
|
||||
+ * @param block Block to load the corresponding chunk from
|
||||
+ * @param gen Should the chunk generate
|
||||
+ * @param gen Should the chunk generate if it doesn't exist
|
||||
+ * @return Future that will resolve when the chunk is loaded
|
||||
+ */
|
||||
+ @NotNull
|
||||
@@ -495,10 +495,10 @@ index 8075ff77eddb971a0a73dad3c9b809131b5db343..12c1731cd3e7138b30a509bf1c6de937
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 13e0316b2446c1d10b2ff3582b948265de21bfef..6fb14175962ec9730e4b70330481ec21d2c87da5 100644
|
||||
index 5fc085f785719933eef7ab1b3cf173579c64739b..711d95bfafac0d415895023bdaac4059395667ab 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -164,6 +164,33 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -165,6 +165,33 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
public boolean teleport(@NotNull Entity destination, @NotNull TeleportCause cause);
|
||||
|
||||
|
||||
Loaded 100 of 2413 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user