mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2026-02-18 17:53:00 +01:00
Compare commits
3419 Commits
1.2.10
...
dev-comman
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13f0f396d7 | ||
|
|
31e04a2d91 | ||
|
|
2fcd3904dc | ||
|
|
92fa2782d0 | ||
|
|
eb10db5b06 | ||
|
|
f64f62492f | ||
|
|
3fe936306b | ||
|
|
c79f8043ad | ||
|
|
8369ae4616 | ||
|
|
4715688fe8 | ||
|
|
62e03a4ef5 | ||
|
|
9ef3c721df | ||
|
|
f55039ac6b | ||
|
|
be792a1052 | ||
|
|
c612036db3 | ||
|
|
ad4ee6f402 | ||
|
|
49a5bd2ba6 | ||
|
|
8aac6a992b | ||
|
|
5da66f05d4 | ||
|
|
134e0db2e9 | ||
|
|
b3415ee2f4 | ||
|
|
14175a6dfd | ||
|
|
7b3fb46a9a | ||
|
|
0aea165a8f | ||
|
|
17b7a9bf10 | ||
|
|
bd611ee11c | ||
|
|
c6ca65f5c9 | ||
|
|
95f15e68fe | ||
|
|
89dabaeb43 | ||
|
|
c2e100b1e3 | ||
|
|
9f33c6cef1 | ||
|
|
7e241e3993 | ||
|
|
bc51505150 | ||
|
|
e0599a0dea | ||
|
|
d410251595 | ||
|
|
810c74dc2a | ||
|
|
100f2c7e56 | ||
|
|
e13e5295e8 | ||
|
|
b100b7bcc7 | ||
|
|
f4ff8518c2 | ||
|
|
dbd27b641e | ||
|
|
4a428a47af | ||
|
|
3252137ed7 | ||
|
|
68c4b99d1b | ||
|
|
f282891d0a | ||
|
|
7f4e3fedb3 | ||
|
|
2042e0cdbd | ||
|
|
2662fee9fb | ||
|
|
e8e2dcff46 | ||
|
|
3b09012b35 | ||
|
|
a774733af4 | ||
|
|
4a7e1e2b94 | ||
|
|
b8c1f868f5 | ||
|
|
3f56a8fbcf | ||
|
|
d8e86d0fc7 | ||
|
|
e125700b43 | ||
|
|
819a1c62ed | ||
|
|
4bc446e306 | ||
|
|
7f2f15d88e | ||
|
|
be4736fffd | ||
|
|
b4f4de4628 | ||
|
|
b9c652ef2b | ||
|
|
bf4e8d43ea | ||
|
|
468fbdab56 | ||
|
|
309dfd50cd | ||
|
|
44e3e4d1e1 | ||
|
|
476f426590 | ||
|
|
766f1f4127 | ||
|
|
b3cf9bf839 | ||
|
|
056f7cc93b | ||
|
|
741f629ab8 | ||
|
|
dd64c4008b | ||
|
|
3a5de8e2ce | ||
|
|
2d78c0738d | ||
|
|
77617ebee2 | ||
|
|
67e9d9c535 | ||
|
|
800786111c | ||
|
|
ed8197bd50 | ||
|
|
82f8c4ce36 | ||
|
|
b1cf7d0348 | ||
|
|
ae77313007 | ||
|
|
49cbaad47f | ||
|
|
1d96ed72dc | ||
|
|
ec378d046f | ||
|
|
a25dc24c6c | ||
|
|
68eb51a3d0 | ||
|
|
2eda3a9c83 | ||
|
|
ad8e200a84 | ||
|
|
0c83bf2a80 | ||
|
|
6eaec5ffab | ||
|
|
8a2c5fb051 | ||
|
|
9485869014 | ||
|
|
e1bf55b077 | ||
|
|
81140824e4 | ||
|
|
d5545de81f | ||
|
|
8632baed27 | ||
|
|
9aaea7e44f | ||
|
|
c2f8f4d016 | ||
|
|
5131e74349 | ||
|
|
3927427b5b | ||
|
|
4aef4c63fc | ||
|
|
fb4777e7f0 | ||
|
|
d8f3a54f9b | ||
|
|
de964a3a60 | ||
|
|
ce3bc07aa8 | ||
|
|
5a6bb363cf | ||
|
|
3f9c98d72e | ||
|
|
96b54387fe | ||
|
|
70eb67dd6a | ||
|
|
77f9f40065 | ||
|
|
14ae1a69c4 | ||
|
|
c9858dfd49 | ||
|
|
f75fe3cc89 | ||
|
|
c19ccbccac | ||
|
|
2f90e533a5 | ||
|
|
0cd0919447 | ||
|
|
e8b886fcc6 | ||
|
|
b8e937a234 | ||
|
|
eb2e0d3abf | ||
|
|
3365da7f8d | ||
|
|
a0e37a4a09 | ||
|
|
5541c15753 | ||
|
|
f87110749e | ||
|
|
a0ef0d5708 | ||
|
|
2e2abcd645 | ||
|
|
6baf820afa | ||
|
|
288287badf | ||
|
|
ca4feca073 | ||
|
|
7c9356955e | ||
|
|
57541ec233 | ||
|
|
9c6d1ce020 | ||
|
|
c72ead9d0a | ||
|
|
4262a1b2a5 | ||
|
|
eb589b6e78 | ||
|
|
98e5e53fda | ||
|
|
00918fbdc1 | ||
|
|
5ad0f2c624 | ||
|
|
babb9baa2b | ||
|
|
45143836e5 | ||
|
|
ceacd7dc52 | ||
|
|
6eb255632f | ||
|
|
3a37d0e092 | ||
|
|
4c7fb1854d | ||
|
|
763cff6898 | ||
|
|
fa34d06341 | ||
|
|
1ca53da0e2 | ||
|
|
57dfa00541 | ||
|
|
36ae84eada | ||
|
|
7f290504ad | ||
|
|
92b4be9a01 | ||
|
|
8cb8dea642 | ||
|
|
a63f745c73 | ||
|
|
4a0fee5796 | ||
|
|
cf90236e57 | ||
|
|
fc6c7bb1de | ||
|
|
1b92131ce9 | ||
|
|
792ecd6aad | ||
|
|
933b6f278b | ||
|
|
45dfc13ebd | ||
|
|
1254ab232a | ||
|
|
b49e56c857 | ||
|
|
d5bd9a1693 | ||
|
|
9b60cd96f9 | ||
|
|
0a05ed98d0 | ||
|
|
6a3a564bd4 | ||
|
|
3828f78480 | ||
|
|
239d7e33cb | ||
|
|
b8c479549c | ||
|
|
0a9fd4a92e | ||
|
|
4c96161acb | ||
|
|
ce7a7a31a7 | ||
|
|
834e26b44e | ||
|
|
f71b302f6f | ||
|
|
566a381e95 | ||
|
|
5d7d779a49 | ||
|
|
59a35b170c | ||
|
|
14eb473355 | ||
|
|
a8e23e08ee | ||
|
|
15f5dcf860 | ||
|
|
9be9908a22 | ||
|
|
446b6c107b | ||
|
|
5a3f8ad15f | ||
|
|
3a2c6a0827 | ||
|
|
e865acd871 | ||
|
|
4a0e1ba444 | ||
|
|
1a88b0b944 | ||
|
|
e0592b3f62 | ||
|
|
1ec55c2d7e | ||
|
|
6427a7dcdf | ||
|
|
7bac0e2ca5 | ||
|
|
e8bc2475c3 | ||
|
|
816b08b14a | ||
|
|
64e1448782 | ||
|
|
ae0a27991b | ||
|
|
f1b82dcbe6 | ||
|
|
bfbd50d8f4 | ||
|
|
de07316261 | ||
|
|
eae196c6a1 | ||
|
|
8af41975ff | ||
|
|
957bbbc9b2 | ||
|
|
17faf1561f | ||
|
|
ec6419f0ff | ||
|
|
f6e60bebcc | ||
|
|
797ac20567 | ||
|
|
3bc029a0de | ||
|
|
4eba33a1c6 | ||
|
|
800a452d62 | ||
|
|
177604e94a | ||
|
|
088015dd4d | ||
|
|
0f2d0aee5f | ||
|
|
1004e2a32b | ||
|
|
5c2b523f7a | ||
|
|
de42063171 | ||
|
|
a49d373af0 | ||
|
|
0095f7f9c7 | ||
|
|
f53820e4de | ||
|
|
25e4700ef9 | ||
|
|
58c7dcb705 | ||
|
|
44626c36a9 | ||
|
|
cfd5bfe2c4 | ||
|
|
f7928787dc | ||
|
|
d6630a0eb5 | ||
|
|
af39e84aef | ||
|
|
93fe2ff504 | ||
|
|
b42f2d4073 | ||
|
|
c5c231920d | ||
|
|
89ddf8c4fa | ||
|
|
71ab678945 | ||
|
|
14daee3b1b | ||
|
|
d2bbbb0fe7 | ||
|
|
fd8d9b02a9 | ||
|
|
a639a37637 | ||
|
|
7eec53d621 | ||
|
|
7523afffb5 | ||
|
|
2c8b9334b6 | ||
|
|
d41ccf9072 | ||
|
|
c98d298cf1 | ||
|
|
73d0b377ae | ||
|
|
df29306a1f | ||
|
|
435522415d | ||
|
|
a17d1d3a2f | ||
|
|
94a5bef62c | ||
|
|
2cd9a5658e | ||
|
|
3c5bd3cedd | ||
|
|
8e02b57369 | ||
|
|
935b8b7bc4 | ||
|
|
9c54f8fd11 | ||
|
|
6bfc1b84de | ||
|
|
59f545d5ce | ||
|
|
23983422e0 | ||
|
|
956bf2d763 | ||
|
|
964b2636fb | ||
|
|
490bc195d8 | ||
|
|
0ce41150c6 | ||
|
|
0455416dec | ||
|
|
a6e7febf77 | ||
|
|
ede0757d83 | ||
|
|
8282d84b16 | ||
|
|
223649ec28 | ||
|
|
68e433b3b7 | ||
|
|
1a51b93ec9 | ||
|
|
c31ffa5ab4 | ||
|
|
ca6bee07ea | ||
|
|
9acaa7b126 | ||
|
|
2bae937b28 | ||
|
|
51bf989418 | ||
|
|
07dd460d78 | ||
|
|
045d74fb9d | ||
|
|
c8c76f4174 | ||
|
|
83c4d09093 | ||
|
|
50ef8d9610 | ||
|
|
98c6abad36 | ||
|
|
62146480db | ||
|
|
6518d192ec | ||
|
|
3fe9cfee74 | ||
|
|
d495054eb5 | ||
|
|
ce80636141 | ||
|
|
fe93be66ad | ||
|
|
1f712063bf | ||
|
|
560c3860b4 | ||
|
|
36f1a2d78a | ||
|
|
3ddd8d2056 | ||
|
|
5441fcc374 | ||
|
|
1d83784820 | ||
|
|
fb5bab6e92 | ||
|
|
90fcf35c34 | ||
|
|
4ff6b5fbc7 | ||
|
|
ead1398132 | ||
|
|
6330c4a69e | ||
|
|
dcc18049a1 | ||
|
|
fcb8909a54 | ||
|
|
37e3bfe7d9 | ||
|
|
d61b837dcf | ||
|
|
f079e22789 | ||
|
|
1f53c62ced | ||
|
|
9fb4e0988b | ||
|
|
d8bbe459b9 | ||
|
|
8bd7526b43 | ||
|
|
24b1485555 | ||
|
|
7683dfc436 | ||
|
|
ccbffca278 | ||
|
|
aeaab43f44 | ||
|
|
a2450d2d07 | ||
|
|
c85bd8ab70 | ||
|
|
3f6bce0fc6 | ||
|
|
e566b20e2b | ||
|
|
f37a7d759a | ||
|
|
d1341b0be0 | ||
|
|
4ea3d690db | ||
|
|
d5dc9895e4 | ||
|
|
b1fc72e8a9 | ||
|
|
7479a02220 | ||
|
|
d1bf48ad79 | ||
|
|
a345737b8b | ||
|
|
c501ebb357 | ||
|
|
15e0570a8c | ||
|
|
09e77c8c94 | ||
|
|
f5c58f3679 | ||
|
|
ddcbe64db6 | ||
|
|
c5137eb884 | ||
|
|
e073eca458 | ||
|
|
78f2e0a064 | ||
|
|
df2defe969 | ||
|
|
6d4a2feaae | ||
|
|
8939fc09b3 | ||
|
|
e0e574c19e | ||
|
|
02126c93b9 | ||
|
|
37671bad9a | ||
|
|
0e8ce005d7 | ||
|
|
584a225d6e | ||
|
|
736359056f | ||
|
|
bf2e527e72 | ||
|
|
be7992d541 | ||
|
|
435eb7f8b9 | ||
|
|
001f1dbd3c | ||
|
|
7b5372a985 | ||
|
|
1647ef4fae | ||
|
|
ee86f8244f | ||
|
|
e518b58b23 | ||
|
|
5af1164b5c | ||
|
|
c9aba059e2 | ||
|
|
dc9469c0cc | ||
|
|
696e82e622 | ||
|
|
18a5ec73d7 | ||
|
|
83ee8dd3f8 | ||
|
|
04224b309a | ||
|
|
01a1cf5765 | ||
|
|
8fdf4042bb | ||
|
|
621969459a | ||
|
|
6fe1c85592 | ||
|
|
79346d92d7 | ||
|
|
24ceeb626b | ||
|
|
68727496ad | ||
|
|
d07b67b5bf | ||
|
|
4dc9c97978 | ||
|
|
99916f99fd | ||
|
|
4a5307f47b | ||
|
|
69aead58a7 | ||
|
|
f0dcfb0346 | ||
|
|
c85d52e594 | ||
|
|
4342abca3d | ||
|
|
11e4ff34d6 | ||
|
|
f118ac14ca | ||
|
|
f5eb7a10de | ||
|
|
36b09421e8 | ||
|
|
d6b39a11e7 | ||
|
|
23729f45ee | ||
|
|
27d7b73e57 | ||
|
|
af60f08a8b | ||
|
|
c19d3fd068 | ||
|
|
0f8312dd5e | ||
|
|
1edb11cedf | ||
|
|
6fea7c8d74 | ||
|
|
a4a1ba4331 | ||
|
|
de46277bea | ||
|
|
6d7d811814 | ||
|
|
98b98256b7 | ||
|
|
abd389f4de | ||
|
|
602956a555 | ||
|
|
8d0601babc | ||
|
|
050be563bf | ||
|
|
965dbda101 | ||
|
|
f2b2cd9cc0 | ||
|
|
3a78e1b487 | ||
|
|
db637f0bc9 | ||
|
|
b15f1dde28 | ||
|
|
28a78d820a | ||
|
|
a1792fe125 | ||
|
|
3f7b17961f | ||
|
|
0ea07d4bc7 | ||
|
|
190b7ee1f5 | ||
|
|
4ff4271da2 | ||
|
|
8705974e08 | ||
|
|
de0487d16f | ||
|
|
fc0c386ecb | ||
|
|
86db4251a2 | ||
|
|
effe5ec305 | ||
|
|
8fb92292bd | ||
|
|
375fa4f75c | ||
|
|
da25b02e0a | ||
|
|
d43ae17bd2 | ||
|
|
f81a763d6c | ||
|
|
385f8ca0b3 | ||
|
|
0ba4bc25c7 | ||
|
|
b0eb4b93a8 | ||
|
|
54f135aebd | ||
|
|
10e369f9c5 | ||
|
|
1ae9b0f4d2 | ||
|
|
198ee6a7ed | ||
|
|
2414ddf485 | ||
|
|
2cd52db8c9 | ||
|
|
5e00636761 | ||
|
|
a82cc9609b | ||
|
|
45c6c20ccd | ||
|
|
7a61f55e49 | ||
|
|
aa0b77a64c | ||
|
|
030c8e59d7 | ||
|
|
f21fbe2d40 | ||
|
|
9a5f4b638f | ||
|
|
9aa49a09da | ||
|
|
bf8945ac59 | ||
|
|
d9926bab4e | ||
|
|
38ba2c21e5 | ||
|
|
a48fb30edf | ||
|
|
92ec04bd46 | ||
|
|
0b6372a6ea | ||
|
|
4f8b66f94d | ||
|
|
0c52b3016c | ||
|
|
a2f80569e3 | ||
|
|
87df536a1f | ||
|
|
12e70490d8 | ||
|
|
23b1518dc0 | ||
|
|
6dbf2e0d95 | ||
|
|
60304e9643 | ||
|
|
614557e2fa | ||
|
|
e312e95aed | ||
|
|
2ee919b51f | ||
|
|
22f6ae858b | ||
|
|
3c3b4af2c4 | ||
|
|
feb0d1fe5d | ||
|
|
2d66b8ed12 | ||
|
|
483f348403 | ||
|
|
a8a5100f58 | ||
|
|
1f9dc70bb1 | ||
|
|
7f1ef61657 | ||
|
|
2e74c079b0 | ||
|
|
ce4295289a | ||
|
|
7fde04851d | ||
|
|
71d030e5ad | ||
|
|
b08649d0a4 | ||
|
|
0a11a9a2c8 | ||
|
|
068f47b523 | ||
|
|
79aab57abc | ||
|
|
2cf58f1b5b | ||
|
|
9678875b4b | ||
|
|
d1a7ce827a | ||
|
|
9b2f4b7bde | ||
|
|
24e5147a2a | ||
|
|
0423a7831d | ||
|
|
feea22b3a4 | ||
|
|
7f40a9f284 | ||
|
|
bc706109e0 | ||
|
|
a25bddba5e | ||
|
|
ab897724d3 | ||
|
|
a7861fc54b | ||
|
|
936bec8ff5 | ||
|
|
01d10971a1 | ||
|
|
12e388a392 | ||
|
|
fb450671d6 | ||
|
|
fca5f9ec98 | ||
|
|
c9ae6436bd | ||
|
|
b6c4d2b4ad | ||
|
|
27ab2f5b12 | ||
|
|
9b08062a58 | ||
|
|
401bdfa9ac | ||
|
|
68d8d6dd30 | ||
|
|
2a57d7007d | ||
|
|
fd675ac291 | ||
|
|
41f020bbb7 | ||
|
|
00dee500e0 | ||
|
|
36bdb8a63e | ||
|
|
aa9eb0868c | ||
|
|
48aafa9834 | ||
|
|
78f53f294a | ||
|
|
3158c7e3eb | ||
|
|
47d27ebf31 | ||
|
|
bc3773ae75 | ||
|
|
d8ddd27d71 | ||
|
|
8d5696507a | ||
|
|
9ec376a228 | ||
|
|
a05a0da9fb | ||
|
|
5029ad9d93 | ||
|
|
1444be665c | ||
|
|
3dedb94bdc | ||
|
|
c0f6c15a80 | ||
|
|
00626a4893 | ||
|
|
b416a59bb7 | ||
|
|
bf96fb2214 | ||
|
|
2e79c8d770 | ||
|
|
6c9d1c4953 | ||
|
|
df8df192d3 | ||
|
|
e5f43462c8 | ||
|
|
1867a3e040 | ||
|
|
6818f98de3 | ||
|
|
f910c76248 | ||
|
|
975cbf0bf8 | ||
|
|
f10b3cef01 | ||
|
|
ad39c94773 | ||
|
|
f189ab30e5 | ||
|
|
0ad18ee971 | ||
|
|
501f5de55a | ||
|
|
0b18ae8ff2 | ||
|
|
de12970486 | ||
|
|
7550b99aaa | ||
|
|
ed5a43966d | ||
|
|
95ea6703f1 | ||
|
|
55f9092aa6 | ||
|
|
5f50a46603 | ||
|
|
c5e6704530 | ||
|
|
8552192894 | ||
|
|
0261d16140 | ||
|
|
2b414526e5 | ||
|
|
c0b7eb526a | ||
|
|
7b7196a8c4 | ||
|
|
f648289035 | ||
|
|
8a0b1d548d | ||
|
|
1f17d5d11e | ||
|
|
18efd09421 | ||
|
|
18d3b30647 | ||
|
|
7f0243b2df | ||
|
|
33610c8997 | ||
|
|
8e0a1f4f70 | ||
|
|
b07cf6bdde | ||
|
|
7ed218ee7f | ||
|
|
3aedeea220 | ||
|
|
4f9b7b2609 | ||
|
|
09abab1b5d | ||
|
|
499713c8e7 | ||
|
|
cb953a1619 | ||
|
|
3ab4938f3d | ||
|
|
f6e9fd9f3a | ||
|
|
8dab75f3cb | ||
|
|
b36096e54d | ||
|
|
0574de4a29 | ||
|
|
6d6bc3de76 | ||
|
|
5c4c3cf59c | ||
|
|
0033c8864e | ||
|
|
e7c749ee3a | ||
|
|
5c026be0cd | ||
|
|
c465546871 | ||
|
|
3322677d32 | ||
|
|
76cf0ebb01 | ||
|
|
d34a0cca30 | ||
|
|
a77a916fcc | ||
|
|
e1ebb96545 | ||
|
|
d85a6bec43 | ||
|
|
78eb7787e9 | ||
|
|
b55ce30b2d | ||
|
|
14050cf096 | ||
|
|
5930128b7f | ||
|
|
08be78fa35 | ||
|
|
88f43d9a91 | ||
|
|
6cbf960dea | ||
|
|
374d34f76d | ||
|
|
cc486c2dc7 | ||
|
|
724dce07a9 | ||
|
|
1486e2063b | ||
|
|
50c9649b23 | ||
|
|
339a54b0ac | ||
|
|
b97afb85a1 | ||
|
|
15da9d580b | ||
|
|
62aed496cc | ||
|
|
fba131936a | ||
|
|
70601a4560 | ||
|
|
83604ecb6d | ||
|
|
b912f7072c | ||
|
|
7e7e468408 | ||
|
|
748c97f6c1 | ||
|
|
a3aab57cf8 | ||
|
|
5548e26dd9 | ||
|
|
89d2f07c03 | ||
|
|
f42a28f34f | ||
|
|
bdc753f03c | ||
|
|
68a7b540c5 | ||
|
|
b2dd820507 | ||
|
|
612308eb9a | ||
|
|
98dc7b853a | ||
|
|
a2fefd6fb6 | ||
|
|
17a0382283 | ||
|
|
eea5784527 | ||
|
|
1aff2cf9eb | ||
|
|
4fc6349824 | ||
|
|
7a3921eace | ||
|
|
e99599c377 | ||
|
|
e1f6366a00 | ||
|
|
182b01ac2f | ||
|
|
18f3914428 | ||
|
|
bd0a045da3 | ||
|
|
9a4bed8c67 | ||
|
|
ae0cf692cd | ||
|
|
2ca7d139fe | ||
|
|
7e67505dfb | ||
|
|
21100de85d | ||
|
|
d8f799f8b4 | ||
|
|
cb03a98113 | ||
|
|
4b36a11dda | ||
|
|
8099490213 | ||
|
|
6cb2843707 | ||
|
|
e831f0561a | ||
|
|
d57c253b19 | ||
|
|
c8c68ea7d9 | ||
|
|
150fe730bd | ||
|
|
8af425d067 | ||
|
|
c3845abd2a | ||
|
|
eba6820ec6 | ||
|
|
822e40bc1f | ||
|
|
3ffcaae122 | ||
|
|
42a30b4521 | ||
|
|
377ed9e8e5 | ||
|
|
be76fe61d8 | ||
|
|
07ba7a8d9e | ||
|
|
2be3e3b43c | ||
|
|
49bf190895 | ||
|
|
c9a53bdaca | ||
|
|
3a76a111d3 | ||
|
|
e59c7ac34a | ||
|
|
f05b9ae365 | ||
|
|
c60e5a65d6 | ||
|
|
1b4eda713f | ||
|
|
cb133ced80 | ||
|
|
062a3028f4 | ||
|
|
682c2631f0 | ||
|
|
faecb9a439 | ||
|
|
5dc40f3c03 | ||
|
|
569e87847f | ||
|
|
b448315f20 | ||
|
|
2c87ce06eb | ||
|
|
875091a1ce | ||
|
|
5ad7716137 | ||
|
|
8c97399cec | ||
|
|
27e0a9d3b6 | ||
|
|
07f9b287e7 | ||
|
|
fbee4f1b37 | ||
|
|
26542f3d6e | ||
|
|
14630fe956 | ||
|
|
30f5c761d9 | ||
|
|
365abaaa8f | ||
|
|
f4681a282c | ||
|
|
8a14d9ac26 | ||
|
|
0ab1986202 | ||
|
|
e11dc680de | ||
|
|
71249334c3 | ||
|
|
fa41dbce16 | ||
|
|
4246e6c900 | ||
|
|
1b421a24b0 | ||
|
|
9cc9eead52 | ||
|
|
8b21aea9c7 | ||
|
|
4f87cb6446 | ||
|
|
7525de1a72 | ||
|
|
78d2fa7520 | ||
|
|
7fe8122499 | ||
|
|
532c2e7450 | ||
|
|
b391a53c6b | ||
|
|
f3c6346b95 | ||
|
|
dd8984314f | ||
|
|
b82c3f41d3 | ||
|
|
7d6eb65776 | ||
|
|
dc0800e7e1 | ||
|
|
c151366952 | ||
|
|
212137ec3e | ||
|
|
31f36935d3 | ||
|
|
a14fc3e3c9 | ||
|
|
158b3c43f8 | ||
|
|
e31c1e33d9 | ||
|
|
25dfa6d34d | ||
|
|
431429a29c | ||
|
|
d4c8cc28a1 | ||
|
|
ce08405c00 | ||
|
|
da29185b7d | ||
|
|
87feb8c250 | ||
|
|
12797893df | ||
|
|
6d47e43ba9 | ||
|
|
f6b1643378 | ||
|
|
f1c16df63b | ||
|
|
c16e5231f4 | ||
|
|
2365c253dd | ||
|
|
c4e7f2597e | ||
|
|
13fd522bd4 | ||
|
|
b74f6e92dc | ||
|
|
630c3e81e6 | ||
|
|
0f77cf8066 | ||
|
|
52746fca76 | ||
|
|
dae25c2f2d | ||
|
|
a272316301 | ||
|
|
6772f4f169 | ||
|
|
9463e210b8 | ||
|
|
4c44b72f78 | ||
|
|
c849f751bb | ||
|
|
1cde45599e | ||
|
|
f1a22f5f6b | ||
|
|
90d6fbde48 | ||
|
|
802ad84613 | ||
|
|
c4aa9396fd | ||
|
|
f0c937ad47 | ||
|
|
fcc36ee5d7 | ||
|
|
0f023f627c | ||
|
|
fa645b5e00 | ||
|
|
1fb28eeee0 | ||
|
|
d7f67d43b3 | ||
|
|
5a1ec745ce | ||
|
|
6fd599bd31 | ||
|
|
afd706bed8 | ||
|
|
6c3820c747 | ||
|
|
0ebc555136 | ||
|
|
4992c50098 | ||
|
|
4e9322485a | ||
|
|
fc8ad40b00 | ||
|
|
f62e053a84 | ||
|
|
0af3c7ab7d | ||
|
|
7f4efe1775 | ||
|
|
80a5c2f9c4 | ||
|
|
90e13c9562 | ||
|
|
fe89c19969 | ||
|
|
0b6dfad7e5 | ||
|
|
f2b1758439 | ||
|
|
86eaa3b091 | ||
|
|
24153c2fb1 | ||
|
|
5e36683ff2 | ||
|
|
c53563e7d1 | ||
|
|
d778293531 | ||
|
|
7d8888d47d | ||
|
|
6fbfec48b0 | ||
|
|
1f25b0b00b | ||
|
|
0118346aaf | ||
|
|
287842c675 | ||
|
|
61dc77559b | ||
|
|
ca51b2f70f | ||
|
|
3cf01cb6f3 | ||
|
|
16a4b78580 | ||
|
|
94b560ba01 | ||
|
|
3ae9956df9 | ||
|
|
78109eb499 | ||
|
|
da5238878d | ||
|
|
f9a823e4b0 | ||
|
|
eb20da021d | ||
|
|
596f2fa78a | ||
|
|
fa99ebb391 | ||
|
|
9b685be84e | ||
|
|
96f9d2a030 | ||
|
|
2b7178fb00 | ||
|
|
c47bf84493 | ||
|
|
8cf16d4a1c | ||
|
|
5b5b73cde0 | ||
|
|
9f55c25775 | ||
|
|
92c6a7bfcf | ||
|
|
145a47c890 | ||
|
|
70160468c0 | ||
|
|
9730cdb880 | ||
|
|
399bf8e3b9 | ||
|
|
c3a69c8c55 | ||
|
|
db2bf9ee51 | ||
|
|
255dece550 | ||
|
|
d004361836 | ||
|
|
5453b0511d | ||
|
|
42bc5065df | ||
|
|
b0d609e9a3 | ||
|
|
814ffbe800 | ||
|
|
e7ee23b871 | ||
|
|
c14ceab24d | ||
|
|
70e8e534fe | ||
|
|
c4504de1da | ||
|
|
685f901e09 | ||
|
|
d196710a87 | ||
|
|
050f97e088 | ||
|
|
c2fea660e7 | ||
|
|
b2cdf21de5 | ||
|
|
ed09d1b390 | ||
|
|
171026ba23 | ||
|
|
dafa690a09 | ||
|
|
4cd4223ee0 | ||
|
|
3ac5ac385d | ||
|
|
0ae5421d10 | ||
|
|
3f56c8e690 | ||
|
|
c14f3777c0 | ||
|
|
2838a52e0c | ||
|
|
dcfdfa0e62 | ||
|
|
23719ace47 | ||
|
|
33882983e9 | ||
|
|
5aecedc074 | ||
|
|
69bf17a619 | ||
|
|
0292d3eefb | ||
|
|
0cd3e4ed84 | ||
|
|
3a26194a71 | ||
|
|
1313e3fe4b | ||
|
|
b2f400f61a | ||
|
|
9aa676cee1 | ||
|
|
eabf0f7f82 | ||
|
|
d0171809ec | ||
|
|
410c946faf | ||
|
|
3a7d88db4f | ||
|
|
9eba2c683b | ||
|
|
8059636b62 | ||
|
|
d78a1efbf6 | ||
|
|
c0b4a33346 | ||
|
|
2cef6700c7 | ||
|
|
df67bd6720 | ||
|
|
655dcb1c9b | ||
|
|
ce32792668 | ||
|
|
4b384abc51 | ||
|
|
82bccd357b | ||
|
|
12709bcd7f | ||
|
|
0b53f8266a | ||
|
|
a07f14e326 | ||
|
|
3349e9cb05 | ||
|
|
0e2746622d | ||
|
|
d9bd0ace9a | ||
|
|
e31b7d5c48 | ||
|
|
4bddbbf56e | ||
|
|
0654f27599 | ||
|
|
3f71dab0b1 | ||
|
|
bd45fff1b4 | ||
|
|
9618e45a11 | ||
|
|
3839373f5a | ||
|
|
1633617006 | ||
|
|
57e33bbf39 | ||
|
|
cddcf36016 | ||
|
|
dff03109a3 | ||
|
|
c0986a1f89 | ||
|
|
cd4c328320 | ||
|
|
03d0ecd450 | ||
|
|
3a809dab32 | ||
|
|
ade9e20cdd | ||
|
|
29520dc95c | ||
|
|
d40d89f29a | ||
|
|
9377de930f | ||
|
|
3219674678 | ||
|
|
a9438ed52b | ||
|
|
09169bd019 | ||
|
|
c30fdef615 | ||
|
|
109e9725a9 | ||
|
|
44ede5c3f8 | ||
|
|
c1161da6de | ||
|
|
80927417f2 | ||
|
|
91d8cd5da8 | ||
|
|
869d731b81 | ||
|
|
f6a18ef777 | ||
|
|
3e084b3b5d | ||
|
|
2c7f931c4d | ||
|
|
6b18cec7fb | ||
|
|
08960a2dbc | ||
|
|
5f4e269efa | ||
|
|
e5f6da01ec | ||
|
|
ae741a1b99 | ||
|
|
78a3ea4765 | ||
|
|
1a66ff7659 | ||
|
|
df53e2fd4f | ||
|
|
4210920c5f | ||
|
|
3440833af8 | ||
|
|
1e738263bc | ||
|
|
9cf322ca0b | ||
|
|
0c027ca697 | ||
|
|
27ed5f7c38 | ||
|
|
2f83e559a4 | ||
|
|
8b55744447 | ||
|
|
2f491b24e2 | ||
|
|
d2cb55befa | ||
|
|
e3e4cf9884 | ||
|
|
1b461ac96a | ||
|
|
1fc3c8fab2 | ||
|
|
7c28be5e62 | ||
|
|
cbe9cae4ea | ||
|
|
c0b7f8a323 | ||
|
|
f8b4412049 | ||
|
|
10e227a5ac | ||
|
|
077431630a | ||
|
|
37395a70e6 | ||
|
|
b779258d69 | ||
|
|
d3ec976f44 | ||
|
|
79a5732c4d | ||
|
|
12c6bfc2e8 | ||
|
|
31fff0623d | ||
|
|
0d2b87834c | ||
|
|
2feba8f64c | ||
|
|
cf82ae4c66 | ||
|
|
0d7c402c01 | ||
|
|
ae8b70be0f | ||
|
|
a87336b7ee | ||
|
|
7814fa8d46 | ||
|
|
a542d6cf3e | ||
|
|
13111a8d1b | ||
|
|
bbbba12e95 | ||
|
|
fbd016f86d | ||
|
|
10e7fe5560 | ||
|
|
d5bcb4346e | ||
|
|
213b4763e7 | ||
|
|
886515400d | ||
|
|
c900edb261 | ||
|
|
8fb8c67148 | ||
|
|
499411f6a2 | ||
|
|
c3eaec513b | ||
|
|
a7f858ab03 | ||
|
|
5ba4dc7b77 | ||
|
|
bbcc8f918e | ||
|
|
356c97cd67 | ||
|
|
0bdd5b219f | ||
|
|
90368d4ece | ||
|
|
ec12303834 | ||
|
|
294393bd1c | ||
|
|
4aaaf01ab5 | ||
|
|
cbbe436a69 | ||
|
|
18510ba851 | ||
|
|
0201ed332f | ||
|
|
e46ed07b94 | ||
|
|
3db6762531 | ||
|
|
f388948f04 | ||
|
|
4392e6b9ab | ||
|
|
38c3891533 | ||
|
|
a28d673eb7 | ||
|
|
55138f1599 | ||
|
|
0cd07cf2fd | ||
|
|
ae1eda915b | ||
|
|
38cd395171 | ||
|
|
3aec0e5ef4 | ||
|
|
56bd782625 | ||
|
|
d8904827ec | ||
|
|
f767edba93 | ||
|
|
07a0f43825 | ||
|
|
ec8581a835 | ||
|
|
f5290c3256 | ||
|
|
070189a7fd | ||
|
|
d409610a55 | ||
|
|
d46b134dbb | ||
|
|
5026bdcbd4 | ||
|
|
3607d0b9a1 | ||
|
|
21b8626366 | ||
|
|
4c10fdf34a | ||
|
|
8001a928ea | ||
|
|
26c2134484 | ||
|
|
2373ca82ba | ||
|
|
3bd9a30055 | ||
|
|
52467075b4 | ||
|
|
9888fe6e09 | ||
|
|
19068dee03 | ||
|
|
ca8204d8f4 | ||
|
|
35139815a6 | ||
|
|
da1e03cbfc | ||
|
|
219667965f | ||
|
|
ec8221610a | ||
|
|
afe28d54c6 | ||
|
|
1eb225cae1 | ||
|
|
e716e38386 | ||
|
|
1fe471b005 | ||
|
|
5cd542002e | ||
|
|
a485308fca | ||
|
|
9659ef65b9 | ||
|
|
214079a3cd | ||
|
|
e9dcb31002 | ||
|
|
3b05bb96e3 | ||
|
|
54ca6e78f5 | ||
|
|
9759224690 | ||
|
|
20970e430c | ||
|
|
38155e3af4 | ||
|
|
3036d4fa90 | ||
|
|
aba662e3d0 | ||
|
|
301914d94b | ||
|
|
8d16c06739 | ||
|
|
7e1eeb66d6 | ||
|
|
920bdde135 | ||
|
|
1db9a554dc | ||
|
|
62aaad8707 | ||
|
|
2fee9df625 | ||
|
|
6c6ab4c96e | ||
|
|
1d316f9420 | ||
|
|
d2035f1816 | ||
|
|
fd821139bd | ||
|
|
7e6550d147 | ||
|
|
e556b707c9 | ||
|
|
9282b7bd15 | ||
|
|
0d473d232e | ||
|
|
f9ad8ffe93 | ||
|
|
e85a0f6cfc | ||
|
|
63974f3968 | ||
|
|
3b07d4055a | ||
|
|
d052d7a3ce | ||
|
|
513a9212e4 | ||
|
|
84dce845a5 | ||
|
|
0a68b82078 | ||
|
|
3dc1afde7e | ||
|
|
e50eb1963f | ||
|
|
fdd6c0a0d8 | ||
|
|
c589c5556b | ||
|
|
17a85c94c6 | ||
|
|
4284fe1029 | ||
|
|
dec3c10ec1 | ||
|
|
c805a48a87 | ||
|
|
918d81198f | ||
|
|
1d87de0a3e | ||
|
|
fdeadde7f0 | ||
|
|
760432fb41 | ||
|
|
240589e9ea | ||
|
|
400c93fb7d | ||
|
|
1bcf43db63 | ||
|
|
79bcd76aa0 | ||
|
|
8833ceb3b5 | ||
|
|
ccc265edf9 | ||
|
|
b18a4da0d9 | ||
|
|
e956988c60 | ||
|
|
1b6d66d4b0 | ||
|
|
fd47d77800 | ||
|
|
5c76ef312f | ||
|
|
f189907ff8 | ||
|
|
6e32843fb4 | ||
|
|
a99d6eb9f8 | ||
|
|
bb37a5982e | ||
|
|
a43a5a0861 | ||
|
|
4ff1e79cc0 | ||
|
|
d28794a587 | ||
|
|
19292c8007 | ||
|
|
a67dd1d9d7 | ||
|
|
9c0f763949 | ||
|
|
6571864b16 | ||
|
|
701822c69f | ||
|
|
2eab93292e | ||
|
|
29fb8b83c2 | ||
|
|
ad68f50b14 | ||
|
|
519485f155 | ||
|
|
45fbb47ccf | ||
|
|
cf0f075acb | ||
|
|
d9aad67ca5 | ||
|
|
083a89c1a3 | ||
|
|
671be42472 | ||
|
|
add4bc24df | ||
|
|
1da1bb7218 | ||
|
|
d0d9527d39 | ||
|
|
c39827ed59 | ||
|
|
5d6a35d4ef | ||
|
|
0d62688343 | ||
|
|
80b7cc717f | ||
|
|
05a9c8b7e5 | ||
|
|
e78cbcfcc8 | ||
|
|
f7b1aea7e0 | ||
|
|
2744fb122c | ||
|
|
77638bf56a | ||
|
|
57e6e5400b | ||
|
|
f2b03896e2 | ||
|
|
8a795e6091 | ||
|
|
946513cb66 | ||
|
|
1fe182babe | ||
|
|
f61aed9f6c | ||
|
|
08882e58b6 | ||
|
|
4c6f2da78a | ||
|
|
3550310e5c | ||
|
|
cedd8da9ba | ||
|
|
3cb269de4b | ||
|
|
91010f2958 | ||
|
|
f3e823997b | ||
|
|
4ae276d1d7 | ||
|
|
f6b38ab32a | ||
|
|
6f96a5026b | ||
|
|
4071f259ad | ||
|
|
a9ed1a1850 | ||
|
|
72a2e24c98 | ||
|
|
593975a255 | ||
|
|
b16cc87ffb | ||
|
|
c5e8b90d71 | ||
|
|
88a6326f87 | ||
|
|
0603ea0fc4 | ||
|
|
c4aedd5323 | ||
|
|
6eb125c913 | ||
|
|
704f7374d2 | ||
|
|
009396cad9 | ||
|
|
a38b7ca9fa | ||
|
|
c5daaffeb1 | ||
|
|
83debde0a1 | ||
|
|
9c2ab19404 | ||
|
|
ef1a777180 | ||
|
|
77014b03ef | ||
|
|
9143051d9f | ||
|
|
f496ecf7b1 | ||
|
|
fc3afc4340 | ||
|
|
fd138eb0b5 | ||
|
|
6d5835849f | ||
|
|
800ebf5b64 | ||
|
|
9df149c489 | ||
|
|
efcf80899e | ||
|
|
c1b12c027a | ||
|
|
476ea80c4e | ||
|
|
bf4d70e8be | ||
|
|
284002bf8b | ||
|
|
b92b9c6507 | ||
|
|
a8cfcf31ab | ||
|
|
d14821e385 | ||
|
|
5e8b036481 | ||
|
|
27ba4ff800 | ||
|
|
c80bb45cad | ||
|
|
dedcf0469b | ||
|
|
9ec6a6d1aa | ||
|
|
1ce01d2043 | ||
|
|
0701169a7e | ||
|
|
2d0cf6413e | ||
|
|
4cf658b629 | ||
|
|
8d21883c20 | ||
|
|
fca0847929 | ||
|
|
1d19dab71d | ||
|
|
49fe98ac57 | ||
|
|
bc9e946618 | ||
|
|
3d3a1abf7b | ||
|
|
1ef1d53fd9 | ||
|
|
0419dca385 | ||
|
|
11bd473f55 | ||
|
|
5947ad5004 | ||
|
|
894218cac9 | ||
|
|
4ce06de18a | ||
|
|
6c4ea34811 | ||
|
|
34736836cc | ||
|
|
9c09c168f8 | ||
|
|
c61e710341 | ||
|
|
63753b8197 | ||
|
|
20f436c646 | ||
|
|
092b9096e6 | ||
|
|
caa1b0d14c | ||
|
|
d39ff036c7 | ||
|
|
6702256b4c | ||
|
|
110fbe9478 | ||
|
|
128c24c8f6 | ||
|
|
6cc2497182 | ||
|
|
615288e635 | ||
|
|
1b814b937b | ||
|
|
01e26f321d | ||
|
|
e8319aee81 | ||
|
|
ca5bf0bd09 | ||
|
|
88b05cd5aa | ||
|
|
132fcb8c74 | ||
|
|
1492fa473f | ||
|
|
9bd33ab3df | ||
|
|
7d826a0cdb | ||
|
|
ec6fc30f47 | ||
|
|
25a54ea802 | ||
|
|
dda9c82940 | ||
|
|
55b88f0274 | ||
|
|
f4da69a205 | ||
|
|
3a919f3e4c | ||
|
|
6cfd124804 | ||
|
|
0879e1f326 | ||
|
|
8312570825 | ||
|
|
7110e6ec3d | ||
|
|
1455a9b3a4 | ||
|
|
2ad73e9b2c | ||
|
|
b1db0d037d | ||
|
|
776821a988 | ||
|
|
1380e64c0b | ||
|
|
0319e2cbff | ||
|
|
7350fdb99c | ||
|
|
25061e7f71 | ||
|
|
0cd8d2b333 | ||
|
|
28dca6e66f | ||
|
|
491a70ad82 | ||
|
|
aa0acf767b | ||
|
|
e37f5e765e | ||
|
|
fe1cf40bbb | ||
|
|
9be6a7cf3b | ||
|
|
0684b1d425 | ||
|
|
12a2107601 | ||
|
|
163b3d19f9 | ||
|
|
15113ba7e4 | ||
|
|
5e9f01ac57 | ||
|
|
ec718f04d7 | ||
|
|
bb96c00cb9 | ||
|
|
697cfeea64 | ||
|
|
0528139c2c | ||
|
|
cbe68e7879 | ||
|
|
074a798213 | ||
|
|
e9b016903b | ||
|
|
8f4d5442b1 | ||
|
|
2160eef1af | ||
|
|
b66c5d7023 | ||
|
|
b21d5bdcc4 | ||
|
|
574770c289 | ||
|
|
adda85a660 | ||
|
|
92473cc56d | ||
|
|
d7e74b9fe0 | ||
|
|
9db2d50676 | ||
|
|
048a979375 | ||
|
|
761fb3b811 | ||
|
|
505d6e258f | ||
|
|
9f22382506 | ||
|
|
f486492c37 | ||
|
|
6f1ddee0ac | ||
|
|
2fac0170e7 | ||
|
|
56056797bc | ||
|
|
bbc2091b77 | ||
|
|
51493fab48 | ||
|
|
5d693c5d8f | ||
|
|
8cd9942be6 | ||
|
|
b2575c9b8f | ||
|
|
a60a6355d2 | ||
|
|
6acfba1315 | ||
|
|
ab731302e0 | ||
|
|
5a48d5c5f8 | ||
|
|
e92c6b8f26 | ||
|
|
200ac53078 | ||
|
|
288907cfd4 | ||
|
|
c822be4a53 | ||
|
|
70f588cce1 | ||
|
|
e5c7e81b08 | ||
|
|
45ebc2b89b | ||
|
|
76523d2988 | ||
|
|
98a64a0948 | ||
|
|
2d6fb72b9d | ||
|
|
e66ff53ca4 | ||
|
|
e8ac3c812f | ||
|
|
a597a7d281 | ||
|
|
1c0e392552 | ||
|
|
59a52a73bb | ||
|
|
0aeff40aaa | ||
|
|
bcd8906315 | ||
|
|
de9249e523 | ||
|
|
5160f5c380 | ||
|
|
5da51e78cc | ||
|
|
2be57414ad | ||
|
|
c2293396be | ||
|
|
cdbc19570d | ||
|
|
ccedd23342 | ||
|
|
46b5746dcc | ||
|
|
97dafc45fa | ||
|
|
adf62fd332 | ||
|
|
98bb865062 | ||
|
|
d50123085f | ||
|
|
b628b9eb4d | ||
|
|
317a39177b | ||
|
|
73924543df | ||
|
|
457754b6f1 | ||
|
|
c659f8a9a9 | ||
|
|
74df4a4fb6 | ||
|
|
b60d9032be | ||
|
|
a2cbfa2668 | ||
|
|
340c47eebd | ||
|
|
ae5f39253e | ||
|
|
3df5f529eb | ||
|
|
0fae8be816 | ||
|
|
f97e9bd19f | ||
|
|
400d551295 | ||
|
|
4957366beb | ||
|
|
27e4a2c290 | ||
|
|
a424d36e96 | ||
|
|
9c0518f251 | ||
|
|
794071efb8 | ||
|
|
787c4e5b73 | ||
|
|
33d3cd0522 | ||
|
|
e14f8ad93c | ||
|
|
7a357634c7 | ||
|
|
ef5f72f56c | ||
|
|
ae3a95dd34 | ||
|
|
6d9db06305 | ||
|
|
35f243a6e6 | ||
|
|
ea25558ac9 | ||
|
|
1f09cb29f0 | ||
|
|
9e4b06e0b6 | ||
|
|
114858505c | ||
|
|
3da062c4cc | ||
|
|
291393d45d | ||
|
|
3cc5cd4a04 | ||
|
|
70ba4a0f3d | ||
|
|
9de6b4724a | ||
|
|
79b96c380d | ||
|
|
3ccf79cff5 | ||
|
|
02bccf6dc1 | ||
|
|
e397de99df | ||
|
|
911f036723 | ||
|
|
af1288b6f8 | ||
|
|
366940fc14 | ||
|
|
4f45431dd3 | ||
|
|
6c266a8926 | ||
|
|
c3f83302c5 | ||
|
|
57063246fb | ||
|
|
29f47d5ca7 | ||
|
|
e0180881e2 | ||
|
|
7c579a1040 | ||
|
|
59219e3f33 | ||
|
|
b67a308a34 | ||
|
|
d5550c8fd1 | ||
|
|
d0ca2b9d4b | ||
|
|
84fb7eec36 | ||
|
|
c04b5dc4d6 | ||
|
|
4b4fb7fd39 | ||
|
|
215bd0f4a2 | ||
|
|
a13d28a6ec | ||
|
|
bcdd235b9f | ||
|
|
6be0714872 | ||
|
|
7e70c4001b | ||
|
|
9326921e2a | ||
|
|
7a0f8ea2dd | ||
|
|
2799bab206 | ||
|
|
ba4d0451ff | ||
|
|
40773ee6f6 | ||
|
|
cd190eebc9 | ||
|
|
c13593def1 | ||
|
|
bbfbe1e72c | ||
|
|
bb88812668 | ||
|
|
94a9230525 | ||
|
|
c7a0841c2e | ||
|
|
b843970033 | ||
|
|
4931ff6e4a | ||
|
|
b9ef701ff1 | ||
|
|
c07364f775 | ||
|
|
64d3430455 | ||
|
|
7e4188e776 | ||
|
|
3f6c07ba6a | ||
|
|
419937f62e | ||
|
|
ab92aa3ffa | ||
|
|
2d9dc92f83 | ||
|
|
0f214496f2 | ||
|
|
9103914bc9 | ||
|
|
aad14169fb | ||
|
|
3550c25b7d | ||
|
|
2764368089 | ||
|
|
e46dcb69da | ||
|
|
ef7aeb752e | ||
|
|
81ba0404b2 | ||
|
|
9af470536b | ||
|
|
5349b46122 | ||
|
|
0de7e22408 | ||
|
|
03f96daba3 | ||
|
|
f6aca88b36 | ||
|
|
ea32cb9e12 | ||
|
|
1c328e7ac7 | ||
|
|
89eef2ce07 | ||
|
|
433c99e239 | ||
|
|
e2faeac505 | ||
|
|
263cb2823c | ||
|
|
5769c8dea9 | ||
|
|
3cff8aba16 | ||
|
|
e5e19f77b9 | ||
|
|
4d93f3271d | ||
|
|
0683745dd2 | ||
|
|
49ef013152 | ||
|
|
3153bbc973 | ||
|
|
717a258430 | ||
|
|
bb945a765c | ||
|
|
6d486401b5 | ||
|
|
07df5edc86 | ||
|
|
ae5ab13533 | ||
|
|
fc40f545fe | ||
|
|
37e01f992d | ||
|
|
b497853e8a | ||
|
|
85dc6e51d2 | ||
|
|
6d5ce1357e | ||
|
|
ac1d556895 | ||
|
|
4aceadd777 | ||
|
|
49de6614c0 | ||
|
|
cc50428646 | ||
|
|
b60bdc9b17 | ||
|
|
35cdcb62b7 | ||
|
|
458f7f5f5b | ||
|
|
284bab397a | ||
|
|
5f306447a0 | ||
|
|
44b862c0bb | ||
|
|
74c367c069 | ||
|
|
c3db026fd9 | ||
|
|
958095d11b | ||
|
|
b21dc8631a | ||
|
|
03354ed1cb | ||
|
|
1a63fc7638 | ||
|
|
6498c711ba | ||
|
|
57c8c94db7 | ||
|
|
15f212c384 | ||
|
|
dee384c8b9 | ||
|
|
93ffd950e9 | ||
|
|
b01d80b1f4 | ||
|
|
84d01362f9 | ||
|
|
939586ce1a | ||
|
|
2888fdff9e | ||
|
|
b048cc1e55 | ||
|
|
3c94074533 | ||
|
|
2de8962887 | ||
|
|
e37e913f6a | ||
|
|
51305118fa | ||
|
|
52bd48cde7 | ||
|
|
ecf32da760 | ||
|
|
1dbe56b026 | ||
|
|
f51bdad6b4 | ||
|
|
97d47c19b7 | ||
|
|
a1ab6f286b | ||
|
|
6d871c9bdb | ||
|
|
12faebca27 | ||
|
|
c231a68bb2 | ||
|
|
bd3db4a425 | ||
|
|
5801981147 | ||
|
|
727cb029a6 | ||
|
|
dd0933c584 | ||
|
|
e92b57c50c | ||
|
|
2e3c1d53f5 | ||
|
|
a67e0c1433 | ||
|
|
a42a1f4a9f | ||
|
|
8f17ec96f0 | ||
|
|
b11e28c880 | ||
|
|
a16d5b62cf | ||
|
|
e9425625e2 | ||
|
|
12324017d7 | ||
|
|
8aabe1c148 | ||
|
|
76ff0374ce | ||
|
|
09373c45f3 | ||
|
|
d0a5454333 | ||
|
|
9ea693d3ce | ||
|
|
ebca9fc2da | ||
|
|
c43e8f8f19 | ||
|
|
b6b03369f7 | ||
|
|
0b6e854520 | ||
|
|
55b17e7d2b | ||
|
|
c15fdae32e | ||
|
|
0fe232e1f5 | ||
|
|
fc33f27899 | ||
|
|
e40095977a | ||
|
|
d1f499f6fd | ||
|
|
610bc42815 | ||
|
|
2006356ccd | ||
|
|
63e827aefb | ||
|
|
1898537149 | ||
|
|
60033d47ec | ||
|
|
b633f36131 | ||
|
|
749443454d | ||
|
|
d68dfe2a32 | ||
|
|
f3b119b91b | ||
|
|
aca3d5c4c6 | ||
|
|
b0acea3353 | ||
|
|
862f5d73e1 | ||
|
|
52bf73aecc | ||
|
|
54e5be1961 | ||
|
|
7fbf3d4f27 | ||
|
|
2df285fd7c | ||
|
|
a3e9d12f6a | ||
|
|
89e5e16aad | ||
|
|
cec132092f | ||
|
|
01723b2d36 | ||
|
|
b463e4ce6f | ||
|
|
8c7fd7b1a6 | ||
|
|
2762a9d1fd | ||
|
|
137864dc04 | ||
|
|
ef775f1c24 | ||
|
|
56617a1c1c | ||
|
|
77e048471e | ||
|
|
7d83dd8283 | ||
|
|
d0c0b9a089 | ||
|
|
75894c4419 | ||
|
|
d3c8a5565a | ||
|
|
bd2cd07f46 | ||
|
|
cd35df17ec | ||
|
|
a1d710fe3d | ||
|
|
c34d269f33 | ||
|
|
01c8b8ad4a | ||
|
|
fc5dda78f5 | ||
|
|
d6e78beb72 | ||
|
|
f324181190 | ||
|
|
5c13661c47 | ||
|
|
8b514d631c | ||
|
|
13a65e875f | ||
|
|
a1d4a4b3f8 | ||
|
|
610b87f462 | ||
|
|
374b758700 | ||
|
|
d32e0962b0 | ||
|
|
1cb9f93f0e | ||
|
|
4a24ade442 | ||
|
|
3f6bd7894d | ||
|
|
cbb941116f | ||
|
|
bcaa7ecacb | ||
|
|
b8eb6186ed | ||
|
|
6d5cf2b139 | ||
|
|
5e6b1fe362 | ||
|
|
1c0cafc6c8 | ||
|
|
8eee0cb0b0 | ||
|
|
bfe8403d75 | ||
|
|
8a852ce22e | ||
|
|
64fc7bcaf8 | ||
|
|
599bbe73b4 | ||
|
|
852872f55c | ||
|
|
62a037a4fd | ||
|
|
637442149c | ||
|
|
9a89c7c49f | ||
|
|
c6ef053aac | ||
|
|
d3b0da4186 | ||
|
|
d09cd49f01 | ||
|
|
bfa29cbf02 | ||
|
|
74d9fa422f | ||
|
|
b43538ee78 | ||
|
|
755b9bc2a1 | ||
|
|
ae49f0b6e4 | ||
|
|
063de93eb8 | ||
|
|
ec997bd2b6 | ||
|
|
20aa312173 | ||
|
|
48b0050451 | ||
|
|
c04b14c751 | ||
|
|
3d8aa29b52 | ||
|
|
ac7ed67d91 | ||
|
|
20f6a55df2 | ||
|
|
60041a1253 | ||
|
|
1e7b54ef0d | ||
|
|
d2cb88d93b | ||
|
|
659e982c47 | ||
|
|
5bf1e49e43 | ||
|
|
5b862a4cee | ||
|
|
2aec202e6d | ||
|
|
f5259decab | ||
|
|
0a17bf69c0 | ||
|
|
6db78d3cda | ||
|
|
0692dd82ad | ||
|
|
088d4ac14a | ||
|
|
92262d0e47 | ||
|
|
1549f66fd7 | ||
|
|
1118cd8ca1 | ||
|
|
d744c6a46d | ||
|
|
765199eba3 | ||
|
|
cb46040309 | ||
|
|
abd8223e41 | ||
|
|
e061acb44a | ||
|
|
cc6850b37d | ||
|
|
a3c92b07cb | ||
|
|
e61581c4e6 | ||
|
|
43dbb94a7f | ||
|
|
d43e61a49c | ||
|
|
7ccadae489 | ||
|
|
251c152efa | ||
|
|
a8fa625b5c | ||
|
|
5151be05b9 | ||
|
|
3f44bd8eac | ||
|
|
2eb593e163 | ||
|
|
2356fda67a | ||
|
|
bff7919c21 | ||
|
|
f1075f800f | ||
|
|
473b9e8bbe | ||
|
|
00c84e775f | ||
|
|
a1a630bad2 | ||
|
|
b91b88a74b | ||
|
|
56e16acce4 | ||
|
|
4692a461eb | ||
|
|
3e04bacf73 | ||
|
|
a0a52a3433 | ||
|
|
188ad359fe | ||
|
|
d601496173 | ||
|
|
85b909a7ab | ||
|
|
18a4f5ed40 | ||
|
|
c4ec9a6df9 | ||
|
|
a4aebdc643 | ||
|
|
b61410b6eb | ||
|
|
51d681974c | ||
|
|
071f7edade | ||
|
|
46f1157030 | ||
|
|
3cca6d9ab4 | ||
|
|
91e8051cee | ||
|
|
c220f0dee5 | ||
|
|
a7be57241c | ||
|
|
a35af4dbe6 | ||
|
|
329f779781 | ||
|
|
95fa688306 | ||
|
|
3d275a4f53 | ||
|
|
06cf0ff2c2 | ||
|
|
ba7ebe1319 | ||
|
|
3efc2138d6 | ||
|
|
9b0cba9dbe | ||
|
|
62a5d2db5c | ||
|
|
96d59a2e81 | ||
|
|
f5179cdcea | ||
|
|
4639b8b939 | ||
|
|
9cdfebda9a | ||
|
|
7c59621c9e | ||
|
|
8736aae2ef | ||
|
|
76a987e1e0 | ||
|
|
9dac898c1c | ||
|
|
ab677e941d | ||
|
|
29d796b6af | ||
|
|
276800f999 | ||
|
|
8d22df0411 | ||
|
|
8d077ff4f2 | ||
|
|
58b01021c1 | ||
|
|
5a6dc8511f | ||
|
|
b7bb3f4487 | ||
|
|
bba23de31c | ||
|
|
973279ed40 | ||
|
|
a4494f0873 | ||
|
|
121354e489 | ||
|
|
531e92bda3 | ||
|
|
135bfc2627 | ||
|
|
a01882aea5 | ||
|
|
a8b5b438bf | ||
|
|
8ccaf3caf2 | ||
|
|
1337c45f1d | ||
|
|
a968019799 | ||
|
|
0a9e1ba42e | ||
|
|
7e91776cfb | ||
|
|
9689c50603 | ||
|
|
bb2eb053da | ||
|
|
de5110310f | ||
|
|
64137995c2 | ||
|
|
6f45e479bd | ||
|
|
53ac857b43 | ||
|
|
6f0e2437e0 | ||
|
|
56d27c3d78 | ||
|
|
7919e591cb | ||
|
|
aabbc2f238 | ||
|
|
fb31cef68b | ||
|
|
2a89e912f8 | ||
|
|
ee91ed8708 | ||
|
|
69475f92c7 | ||
|
|
dc2452231d | ||
|
|
1bbb245e32 | ||
|
|
1548863a21 | ||
|
|
9169f53465 | ||
|
|
b5542effc2 | ||
|
|
6b0e7a9c61 | ||
|
|
00d50953ad | ||
|
|
397dd96383 | ||
|
|
cac5f15a37 | ||
|
|
74c32c4e59 | ||
|
|
e048a6d0d0 | ||
|
|
65d71db72f | ||
|
|
b4fffe154d | ||
|
|
716c4d3783 | ||
|
|
5a9ca96a0f | ||
|
|
cedfb1a538 | ||
|
|
176ffcc3d1 | ||
|
|
91b318e8f7 | ||
|
|
3cc9672ff3 | ||
|
|
946d845987 | ||
|
|
eef5df33b3 | ||
|
|
f0f7dee3c2 | ||
|
|
ddbf5a559a | ||
|
|
67fd45ef25 | ||
|
|
7f8beca33c | ||
|
|
0fcf033ecc | ||
|
|
ea4048dce9 | ||
|
|
0a295f7738 | ||
|
|
0711454e31 | ||
|
|
900623461a | ||
|
|
9512879cc7 | ||
|
|
299c7ff804 | ||
|
|
0276294569 | ||
|
|
06b75386b9 | ||
|
|
16bc359f99 | ||
|
|
c8013421e6 | ||
|
|
c1e82b566e | ||
|
|
f7aba26be2 | ||
|
|
77ffc9c3c2 | ||
|
|
9a6ebb0b9a | ||
|
|
57d1cd5f63 | ||
|
|
b7354779d4 | ||
|
|
0cdb50e538 | ||
|
|
37469232b0 | ||
|
|
0c52260a89 | ||
|
|
a85c9679a9 | ||
|
|
d625edf53e | ||
|
|
643af1c32b | ||
|
|
e7ceef479e | ||
|
|
0545ed434d | ||
|
|
b9bf3f96d2 | ||
|
|
f184e7bd01 | ||
|
|
e1804cded4 | ||
|
|
09eabe98c4 | ||
|
|
173cb001cb | ||
|
|
7d6a4d11fd | ||
|
|
11ea6b269e | ||
|
|
372950071a | ||
|
|
b424ecfd3e | ||
|
|
fc38bbd179 | ||
|
|
00f24fd5bd | ||
|
|
50de88a0a0 | ||
|
|
ca2673f258 | ||
|
|
7d416a90de | ||
|
|
d09526e470 | ||
|
|
ed68f227ac | ||
|
|
f72b1e7eec | ||
|
|
bbd756f0d3 | ||
|
|
87a9c12827 | ||
|
|
ebd83e1f19 | ||
|
|
5b4b99f44e | ||
|
|
d153e3e25c | ||
|
|
e3b3b7cfdb | ||
|
|
2c78bac8f7 | ||
|
|
db1c0647ed | ||
|
|
2f16dbc9b5 | ||
|
|
7e7ab249c2 | ||
|
|
1d2298e5f6 | ||
|
|
b53b5bbc6c | ||
|
|
0dfd2fe9ef | ||
|
|
c0b3a4e929 | ||
|
|
5830bf461d | ||
|
|
857bb00c8a | ||
|
|
c5ae4ca615 | ||
|
|
abb0184e49 | ||
|
|
b11762da99 | ||
|
|
946d00cce6 | ||
|
|
0262255bea | ||
|
|
38a8a6f2ff | ||
|
|
a6446563d8 | ||
|
|
225adb5cce | ||
|
|
a9c722de67 | ||
|
|
49610e372f | ||
|
|
a33768de1b | ||
|
|
790b31c60e | ||
|
|
37c92b8d7c | ||
|
|
07211611a6 | ||
|
|
ea7fee2a53 | ||
|
|
89da8b832f | ||
|
|
5f4c83b6a1 | ||
|
|
2e751b1438 | ||
|
|
1a888d3116 | ||
|
|
2a4fe4aa48 | ||
|
|
4c81eb3058 | ||
|
|
64c20d0e24 | ||
|
|
ff186d5d9d | ||
|
|
734d691e00 | ||
|
|
51777dbe85 | ||
|
|
fb1d48fcae | ||
|
|
41ae8cbbf3 | ||
|
|
9717be3da8 | ||
|
|
67a4efa03e | ||
|
|
fd4f0f4096 | ||
|
|
957605d46b | ||
|
|
55f824e0c8 | ||
|
|
faa22002e3 | ||
|
|
5d0e85452a | ||
|
|
8c61e35fde | ||
|
|
bdfdc61e7f | ||
|
|
b333916f56 | ||
|
|
737d4e2d65 | ||
|
|
c0dfcfd9f6 | ||
|
|
c073c7ed3a | ||
|
|
7fa1a8c6c7 | ||
|
|
037fd890dc | ||
|
|
d673676a8a | ||
|
|
793538d4ef | ||
|
|
92fc00bb0a | ||
|
|
9d70a2a9a6 | ||
|
|
46a5245a1d | ||
|
|
9b94fba3a6 | ||
|
|
a6144f6dee | ||
|
|
615eb9666e | ||
|
|
94a4f628c7 | ||
|
|
d440876bbb | ||
|
|
32c62fd7eb | ||
|
|
65f78ba447 | ||
|
|
9c9a097ff3 | ||
|
|
ff6cdc3e9d | ||
|
|
24367b350d | ||
|
|
e0da44b34a | ||
|
|
ea13ce09c9 | ||
|
|
ef69217b81 | ||
|
|
7e297ac884 | ||
|
|
e6e8470851 | ||
|
|
89a36ae47e | ||
|
|
137c46b8ce | ||
|
|
5512bd7df6 | ||
|
|
96e2cfaad6 | ||
|
|
f7d482e7bc | ||
|
|
6c67308a1f | ||
|
|
6bbdbee669 | ||
|
|
9204b23d51 | ||
|
|
7203a0fcad | ||
|
|
5bdf4b5dcc | ||
|
|
105f088576 | ||
|
|
f40433fc99 | ||
|
|
bbbd12d461 | ||
|
|
81dae8c43d | ||
|
|
ec6a7e79d6 | ||
|
|
630b64462e | ||
|
|
72b8eb85b0 | ||
|
|
a92843533b | ||
|
|
83855268d5 | ||
|
|
67e1defdb8 | ||
|
|
724aad8504 | ||
|
|
5b1337ed07 | ||
|
|
a64e177c21 | ||
|
|
e7aafb7242 | ||
|
|
75e52bbe66 | ||
|
|
348887f799 | ||
|
|
8915a535c6 | ||
|
|
0587741437 | ||
|
|
dd766d5363 | ||
|
|
8e2707d33e | ||
|
|
3390c2dbf2 | ||
|
|
268db10361 | ||
|
|
ed5120eead | ||
|
|
aab532f475 | ||
|
|
00ee75bb29 | ||
|
|
e7e680fd8e | ||
|
|
7b334601c6 | ||
|
|
050cb8c5f4 | ||
|
|
cb8af637e1 | ||
|
|
c1bbc685e6 | ||
|
|
d5d6f7e860 | ||
|
|
c2738d247a | ||
|
|
f73d0dbc40 | ||
|
|
395e243730 | ||
|
|
4d1bcf1cc0 | ||
|
|
eb2c552316 | ||
|
|
664239c567 | ||
|
|
06df8e7f7b | ||
|
|
21a0849a5b | ||
|
|
1f660c8c5b | ||
|
|
14f5a25633 | ||
|
|
606195c78a | ||
|
|
6a7f92b4e2 | ||
|
|
0e1646e3a7 | ||
|
|
ea5af0397e | ||
|
|
6ed0038b1e | ||
|
|
00640fe39b | ||
|
|
4fb7d60eee | ||
|
|
c54755b9c1 | ||
|
|
07c9b614bc | ||
|
|
7bea8f5120 | ||
|
|
ea97dcdb55 | ||
|
|
931bafe962 | ||
|
|
a3a6509410 | ||
|
|
5e26f2e707 | ||
|
|
54ef85e1a3 | ||
|
|
6f29e475ee | ||
|
|
e6607783e9 | ||
|
|
2021a0b065 | ||
|
|
0871a96399 | ||
|
|
2ed5e8e717 | ||
|
|
0c61cc8bdc | ||
|
|
c2bad4419b | ||
|
|
d0e2358fab | ||
|
|
db95085b26 | ||
|
|
08592cbacf | ||
|
|
487e67d208 | ||
|
|
a8abfdae5e | ||
|
|
6496816692 | ||
|
|
364c18b842 | ||
|
|
e20098d462 | ||
|
|
d25a314d3a | ||
|
|
3dde331f9d | ||
|
|
f7e56d9833 | ||
|
|
b554fb342a | ||
|
|
6d9ef91315 | ||
|
|
ce42da5806 | ||
|
|
5b5413c1a2 | ||
|
|
6cdb27aef0 | ||
|
|
2205ad0772 | ||
|
|
637e826c1b | ||
|
|
b19395b40d | ||
|
|
085a25306c | ||
|
|
88c39dbb72 | ||
|
|
91670d3945 | ||
|
|
bdfd7d9839 | ||
|
|
e01b6f175c | ||
|
|
3f899380d9 | ||
|
|
2513b4ca23 | ||
|
|
93180ccd06 | ||
|
|
f43b4ebdc5 | ||
|
|
ff4832a6a2 | ||
|
|
8267a10f41 | ||
|
|
771ef6e16e | ||
|
|
f7ef2b768f | ||
|
|
74c3ce0552 | ||
|
|
67b63f84f1 | ||
|
|
f8c5c380b1 | ||
|
|
2708449089 | ||
|
|
bcfec56300 | ||
|
|
ec6b9d4387 | ||
|
|
621f739831 | ||
|
|
607d2b8bd7 | ||
|
|
c1463c3257 | ||
|
|
e036b7ac70 | ||
|
|
4a4db675f1 | ||
|
|
e193da2cd7 | ||
|
|
c60cbe824c | ||
|
|
8b9432d1d9 | ||
|
|
75a5ffcb10 | ||
|
|
6cc2fc7a6e | ||
|
|
4bb6f68e6f | ||
|
|
00e1521d46 | ||
|
|
1055186e86 | ||
|
|
fc17448473 | ||
|
|
1839f6ce8c | ||
|
|
39e9e426ef | ||
|
|
7c2d590951 | ||
|
|
551b73ea74 | ||
|
|
fca095689e | ||
|
|
e76078fc89 | ||
|
|
2b6b7b899e | ||
|
|
4e6086e8ed | ||
|
|
97a59cd21e | ||
|
|
9ef0ed8516 | ||
|
|
3c919c3af7 | ||
|
|
fbe3c70b85 | ||
|
|
46bf22e36b | ||
|
|
003c89c3a4 | ||
|
|
793bd04afe | ||
|
|
0249ae2724 | ||
|
|
32e0be481a | ||
|
|
e5592c5da8 | ||
|
|
b0500332bc | ||
|
|
78b8ac663e | ||
|
|
e41ab3ac18 | ||
|
|
36d97bbcaf | ||
|
|
f3c89fe48b | ||
|
|
9b31520684 | ||
|
|
660e68b0a3 | ||
|
|
08b46e1a7c | ||
|
|
b78299bbbd | ||
|
|
c8687bfc74 | ||
|
|
a5219055ef | ||
|
|
f79a9e5182 | ||
|
|
3904b172ad | ||
|
|
e0da506d1a | ||
|
|
d2f6191615 | ||
|
|
7c211fa50c | ||
|
|
fadec1a846 | ||
|
|
d2aa19e31f | ||
|
|
ccfe1181be | ||
|
|
85fb12a4ec | ||
|
|
84994c2b2f | ||
|
|
1a2dfb9b19 | ||
|
|
753652dcf9 | ||
|
|
b99d261084 | ||
|
|
aee4bcd65e | ||
|
|
159ec3f04d | ||
|
|
57ff84cd4d | ||
|
|
2933f80d69 | ||
|
|
3d38892f7e | ||
|
|
1d990979ac | ||
|
|
d69cf09d4e | ||
|
|
b8d346d890 | ||
|
|
5d58d85eae | ||
|
|
bc4d34f2fc | ||
|
|
6565d84cf9 | ||
|
|
95ed33b2ce | ||
|
|
e8f6d4107b | ||
|
|
deb0b211b4 | ||
|
|
83888f80d4 | ||
|
|
974862a60a | ||
|
|
2965f35d6d | ||
|
|
6aa300dac0 | ||
|
|
00020a9cbb | ||
|
|
99c6c46d54 | ||
|
|
d183b1b940 | ||
|
|
49fc2a93fa | ||
|
|
1c3066aaf7 | ||
|
|
cdd9745341 | ||
|
|
d0c051a9c2 | ||
|
|
d444e088c4 | ||
|
|
9ae74e0fba | ||
|
|
447aafd106 | ||
|
|
376b79cab3 | ||
|
|
b95ac44a4c | ||
|
|
4161952566 | ||
|
|
5b18abbea0 | ||
|
|
66cc9bc6db | ||
|
|
4f8337c11a | ||
|
|
3aee334fbd | ||
|
|
6d76a14ed0 | ||
|
|
48150e2002 | ||
|
|
d741d9a11e | ||
|
|
3194baffd7 | ||
|
|
7a49fbb0bb | ||
|
|
1ff1704697 | ||
|
|
aeaad41c45 | ||
|
|
15cdf3bfd6 | ||
|
|
146fa474a1 | ||
|
|
11468abc98 | ||
|
|
ef6d47b801 | ||
|
|
bfdb825e0b | ||
|
|
707a388c51 | ||
|
|
d33334708d | ||
|
|
0e853d44b7 | ||
|
|
c598f202f8 | ||
|
|
e607e04af4 | ||
|
|
802d1dfa8e | ||
|
|
00279502e4 | ||
|
|
cc18794a93 | ||
|
|
905e92fa4d | ||
|
|
7a503ea76c | ||
|
|
eed8a57ff9 | ||
|
|
2968803f29 | ||
|
|
6cf6e8ab54 | ||
|
|
3668249267 | ||
|
|
28b092a4e3 | ||
|
|
c0bba7dead | ||
|
|
7fc8d432b5 | ||
|
|
34027ee7c4 | ||
|
|
dc675162c9 | ||
|
|
db370418f8 | ||
|
|
43de871392 | ||
|
|
5e9c483892 | ||
|
|
17169903b4 | ||
|
|
aa70c82824 | ||
|
|
73a5143a17 | ||
|
|
d35e56fd37 | ||
|
|
cafed2d98c | ||
|
|
cd5df82d72 | ||
|
|
5404371b35 | ||
|
|
899bbfee40 | ||
|
|
b9f2aa5eff | ||
|
|
0a028afe7f | ||
|
|
6f1ee88b78 | ||
|
|
e5cc06e822 | ||
|
|
e13ba010bf | ||
|
|
f6bc473eb4 | ||
|
|
b491090037 | ||
|
|
0416f5f4a8 | ||
|
|
5177bf6c1f | ||
|
|
fcd2fb0f12 | ||
|
|
37115d238b | ||
|
|
2c8bfd6573 | ||
|
|
de3bae41ae | ||
|
|
bd1850db69 | ||
|
|
11b5c54c69 | ||
|
|
6f081eb1e4 | ||
|
|
d367dbf767 | ||
|
|
8237bd52b5 | ||
|
|
71471d3bbc | ||
|
|
34169aebaf | ||
|
|
07e98ab79f | ||
|
|
9af66a8e69 | ||
|
|
5e965aec2c | ||
|
|
ecb38693db | ||
|
|
36d5344ded | ||
|
|
6b3bde585d | ||
|
|
f7ea25be61 | ||
|
|
9136530618 | ||
|
|
f4e7e6c74a | ||
|
|
c4766ad3fb | ||
|
|
894a78c0f9 | ||
|
|
c082290cf1 | ||
|
|
4cac324e9f | ||
|
|
493353e774 | ||
|
|
3289215e19 | ||
|
|
cdb5fed5a5 | ||
|
|
bb1dbab984 | ||
|
|
8a97718dd4 | ||
|
|
01142b67c6 | ||
|
|
e0bba80f55 | ||
|
|
34276539fa | ||
|
|
4511dd79fa | ||
|
|
7500685115 | ||
|
|
658e7d64c2 | ||
|
|
569079fed0 | ||
|
|
b042d78186 | ||
|
|
abd051d07b | ||
|
|
8c5b22a8fb | ||
|
|
de93b11c25 | ||
|
|
7f16339bd9 | ||
|
|
42dc6e7c4f | ||
|
|
3153973c2b | ||
|
|
cc044fe41b | ||
|
|
fd5de7b218 | ||
|
|
0037524cfd | ||
|
|
082fa2ca0d | ||
|
|
b1cf9d139a | ||
|
|
9854360ab7 | ||
|
|
b8755b808e | ||
|
|
139812b3bc | ||
|
|
6adbe9a29b | ||
|
|
52f7120392 | ||
|
|
0d2abb95b5 | ||
|
|
6b2adc9359 | ||
|
|
325f89a80d | ||
|
|
e8152a3475 | ||
|
|
6d42d14575 | ||
|
|
2b269ebf54 | ||
|
|
d2493e89ca | ||
|
|
a61423aa99 | ||
|
|
506efec858 | ||
|
|
8e3320ad72 | ||
|
|
ff279bf633 | ||
|
|
a582b07549 | ||
|
|
1e7fef4557 | ||
|
|
f8b44cd8ce | ||
|
|
b0681c10b9 | ||
|
|
1bf0cd1d15 | ||
|
|
01f38537de | ||
|
|
adbb20d7c9 | ||
|
|
c3c7fe08b6 | ||
|
|
4a52135a0b | ||
|
|
a56f805787 | ||
|
|
3a467b3da4 | ||
|
|
4500c4d407 | ||
|
|
eebda74bb7 | ||
|
|
e6e8c12735 | ||
|
|
212b42c8b9 | ||
|
|
9c4ff30ce7 | ||
|
|
d7510b83c8 | ||
|
|
9a9e0cc7de | ||
|
|
a8a90ee815 | ||
|
|
7859660ece | ||
|
|
b93dafee63 | ||
|
|
a1a61e9d4a | ||
|
|
464d6bdd35 | ||
|
|
2c613d5b99 | ||
|
|
d1f683b8a5 | ||
|
|
f4bb8ccb7d | ||
|
|
00364afd8f | ||
|
|
f5f07f7016 | ||
|
|
2bdeeb2d6e | ||
|
|
f023529d37 | ||
|
|
b8d37cb223 | ||
|
|
88ed14fe5c | ||
|
|
cd30771775 | ||
|
|
00a5bc5cf3 | ||
|
|
a17d58fe32 | ||
|
|
c21286dbc3 | ||
|
|
7fc99630e0 | ||
|
|
69a5cd1017 | ||
|
|
3129acfc19 | ||
|
|
c3dd777e44 | ||
|
|
c5120b9c72 | ||
|
|
91a18fe7a2 | ||
|
|
62f5185a1b | ||
|
|
f4cb83319e | ||
|
|
c7b3b7a826 | ||
|
|
01fb245da3 | ||
|
|
83e072dad1 | ||
|
|
eb5ac80714 | ||
|
|
b57cc7bd59 | ||
|
|
d532164cd6 | ||
|
|
61ae4826d1 | ||
|
|
be4e62fe9d | ||
|
|
d9346ab260 | ||
|
|
87c4f318a4 | ||
|
|
30b87e8035 | ||
|
|
26a85846fc | ||
|
|
cd40507609 | ||
|
|
a9ea2e0137 | ||
|
|
6964f7adfc | ||
|
|
70231b6ae0 | ||
|
|
9354831729 | ||
|
|
ab7a83b37e | ||
|
|
8dfa8c20f3 | ||
|
|
67499eeff7 | ||
|
|
d43ff6263f | ||
|
|
058dc8c611 | ||
|
|
8871964be0 | ||
|
|
42aa426991 | ||
|
|
7cee94e0b8 | ||
|
|
fa96a6beec | ||
|
|
efc0edf3ef | ||
|
|
f1d785777c | ||
|
|
db0168205d | ||
|
|
2a20ed95fa | ||
|
|
11f1889f1f | ||
|
|
703b5b2f3f | ||
|
|
58a15e61dd | ||
|
|
896f57f0b4 | ||
|
|
34ae64706e | ||
|
|
43fe92fe3f | ||
|
|
31513d52d7 | ||
|
|
70a16fe344 | ||
|
|
4570ffb8f5 | ||
|
|
22f6ed324d | ||
|
|
e29484e14b | ||
|
|
7e21fdd862 | ||
|
|
01e69cdf5e | ||
|
|
9ad7840236 | ||
|
|
e97ec36094 | ||
|
|
ef318eeaec | ||
|
|
3314b18318 | ||
|
|
5f04ecfdd4 | ||
|
|
91d294acff | ||
|
|
283cdeed6c | ||
|
|
a283fce4ec | ||
|
|
f8d525d797 | ||
|
|
80dabad10e | ||
|
|
8181989e98 | ||
|
|
0f7bf13834 | ||
|
|
c1d6e79a41 | ||
|
|
6f073250f4 | ||
|
|
c084ccde40 | ||
|
|
b73a06b9ab | ||
|
|
740c1131ea | ||
|
|
0a798aec30 | ||
|
|
9089e70155 | ||
|
|
f532630d1b | ||
|
|
7b47d32a96 | ||
|
|
3934392219 | ||
|
|
ed6f48b5fe | ||
|
|
729e4a6eac | ||
|
|
9a39dead4f | ||
|
|
cb1eabc3fa | ||
|
|
b30002948c | ||
|
|
d528f11082 | ||
|
|
42a1fdf2df | ||
|
|
394ddd4e51 | ||
|
|
8c7d95f9ea | ||
|
|
422550abfd | ||
|
|
ca9ce1ba1b | ||
|
|
ac1c420cb5 | ||
|
|
05a9e85529 | ||
|
|
ca6ed76e8f | ||
|
|
3d04da39e3 | ||
|
|
127908f104 | ||
|
|
686bcd5308 | ||
|
|
07c66378c0 | ||
|
|
4e7107c8a8 | ||
|
|
3c2d658b37 | ||
|
|
f0b2cc1bab | ||
|
|
d038cbf357 | ||
|
|
c3ea632cb9 | ||
|
|
a31d50924d | ||
|
|
c567e2714a | ||
|
|
a2e342b4fc | ||
|
|
4469637f27 | ||
|
|
f4ecbe7f65 | ||
|
|
dbaab4efe1 | ||
|
|
8c178869b7 | ||
|
|
3c7bcb990e | ||
|
|
f7a5678814 | ||
|
|
646bb32965 | ||
|
|
dce7d8fdd3 | ||
|
|
6dd17312f4 | ||
|
|
9c64f40ea1 | ||
|
|
da6b461408 | ||
|
|
77dce75108 | ||
|
|
37308917d1 | ||
|
|
21d2229572 | ||
|
|
7d372af51e | ||
|
|
a3e0753076 | ||
|
|
a728d1f9c8 | ||
|
|
b893e86f3c | ||
|
|
63cf6e9b3a | ||
|
|
67738d811e | ||
|
|
4d77f6d04d | ||
|
|
3702495038 | ||
|
|
ede08ce5ac | ||
|
|
5571e0bc0c | ||
|
|
73bb73c8ca | ||
|
|
54011fdeb7 | ||
|
|
5b8811bd09 | ||
|
|
c460eec0ab | ||
|
|
bc6233541a | ||
|
|
18aef9d526 | ||
|
|
ccc6fd30f8 | ||
|
|
1ba498c443 | ||
|
|
64f31f2b5a | ||
|
|
b94085c5f4 | ||
|
|
62b90ad552 | ||
|
|
d6d1e0ffed | ||
|
|
ccd103cd88 | ||
|
|
0606f16a11 | ||
|
|
c9e3ea005b | ||
|
|
f009f5803f | ||
|
|
3f8268d848 | ||
|
|
cefec723d0 | ||
|
|
124aa72fd9 | ||
|
|
dbc7277ba9 | ||
|
|
24d8769b5b | ||
|
|
4aecb9756e | ||
|
|
51ca29ab9f | ||
|
|
c6e5264b7b | ||
|
|
73203ce869 | ||
|
|
b80a29ca04 | ||
|
|
5ee440d9a5 | ||
|
|
cda3675dc5 | ||
|
|
caf9c07ba3 | ||
|
|
96e70aa4d2 | ||
|
|
9f1b77a007 | ||
|
|
946b5bb006 | ||
|
|
bebcc40987 | ||
|
|
d6d7f5099f | ||
|
|
bdcc2f644b | ||
|
|
c3ba54a0ce | ||
|
|
1443e2f6b8 | ||
|
|
7799acec05 | ||
|
|
1bbc1f28aa | ||
|
|
8257fd8e7c | ||
|
|
bc58aff362 | ||
|
|
1073954550 | ||
|
|
c3d7a4e3de | ||
|
|
92ae92c116 | ||
|
|
3c10be6d1a | ||
|
|
f18a9bdcc7 | ||
|
|
87f59cd3eb | ||
|
|
819b6fcacb | ||
|
|
246961887e | ||
|
|
54e21333a3 | ||
|
|
c45beec59d | ||
|
|
c88ada489a | ||
|
|
189f23f407 | ||
|
|
9789143c6d | ||
|
|
f4dd7ff483 | ||
|
|
50e05c6320 | ||
|
|
9ba5360bfc | ||
|
|
565ef693ce | ||
|
|
0c1a8eff85 | ||
|
|
32e9de6e9a | ||
|
|
533955a9c7 | ||
|
|
2faa0356a5 | ||
|
|
ee2a5c199a | ||
|
|
bdcc522897 | ||
|
|
71b20bdeaa | ||
|
|
0e85b4776a | ||
|
|
24d2c1bc7a | ||
|
|
1610e932c6 | ||
|
|
31d7bb2332 | ||
|
|
3d9c03c0c8 | ||
|
|
dd94343d92 | ||
|
|
4b93dede33 | ||
|
|
61205989cc | ||
|
|
2559ea61d8 | ||
|
|
eae665c1c5 | ||
|
|
d73521e0a0 | ||
|
|
e8deb0384a | ||
|
|
881f2c023e | ||
|
|
5057a8a7a3 | ||
|
|
b8e9269488 | ||
|
|
76afd5a7ca | ||
|
|
dc48d467f5 | ||
|
|
0b0390620e | ||
|
|
24eb34c182 | ||
|
|
1a5bd1b6a2 | ||
|
|
ab7b6ce460 | ||
|
|
c4cd677021 | ||
|
|
6b84d39dda | ||
|
|
e61342177d | ||
|
|
d51fa92b46 | ||
|
|
3e20dc7de6 | ||
|
|
dce1d7ba39 | ||
|
|
adffea1d52 | ||
|
|
20b73dcc84 | ||
|
|
b331fa353b | ||
|
|
9fe14609af | ||
|
|
f6973b8907 | ||
|
|
8738036f6f | ||
|
|
fce02dc0e5 | ||
|
|
2bef0e833f | ||
|
|
9040a2a2e3 | ||
|
|
4407ed0a6f | ||
|
|
09721518b0 | ||
|
|
8ad6337dde | ||
|
|
271740d2ac | ||
|
|
48dd537257 | ||
|
|
77b4aaa50d | ||
|
|
1014316581 | ||
|
|
739cd83155 | ||
|
|
df08bc4da0 | ||
|
|
55e832d4f6 | ||
|
|
032472dcb3 | ||
|
|
68bf93d1ac | ||
|
|
ba133f94fc | ||
|
|
064c16f4d7 | ||
|
|
5a394ee744 | ||
|
|
3bc2f5dc55 | ||
|
|
6f63818e5f | ||
|
|
a5d7bee939 | ||
|
|
9d396162f1 | ||
|
|
4a0d9a96ab | ||
|
|
9f65e5a9ab | ||
|
|
c71f4e438b | ||
|
|
14d13eb4c7 | ||
|
|
29c629eb22 | ||
|
|
050b794b42 | ||
|
|
89b5f8c275 | ||
|
|
f589197321 | ||
|
|
09575a68f0 | ||
|
|
c1b838e356 | ||
|
|
8ed2696315 | ||
|
|
ab138bdba2 | ||
|
|
5ba9fb78fd | ||
|
|
2d47447375 | ||
|
|
d9eaede4c2 | ||
|
|
c6db11a10b | ||
|
|
2225e542ad | ||
|
|
975e13d45f | ||
|
|
534a165c45 | ||
|
|
5cff6ed67b | ||
|
|
3448733834 | ||
|
|
c382c95d24 | ||
|
|
0034226fa7 | ||
|
|
5f067a6bb5 | ||
|
|
6ab1996440 | ||
|
|
5bff6d63f2 | ||
|
|
5fe227b874 | ||
|
|
cbaf2f8370 | ||
|
|
393ac886e2 | ||
|
|
c9082083d1 | ||
|
|
5d0d89e74d | ||
|
|
e9c3583fd8 | ||
|
|
81eadc1418 | ||
|
|
dfff0efc0b | ||
|
|
3732db2226 | ||
|
|
e9ccdcfbbe | ||
|
|
01345a5dc4 | ||
|
|
90c8e57ed7 | ||
|
|
d644b4c331 | ||
|
|
2f15c71412 | ||
|
|
0a44a74f59 | ||
|
|
f876fe8d25 | ||
|
|
290032646f | ||
|
|
e5d2ed4bb2 | ||
|
|
e9ea0e0389 | ||
|
|
35565bb021 | ||
|
|
56aff1d191 | ||
|
|
b8be1d1866 | ||
|
|
1d7d2cd52e | ||
|
|
71446a12af | ||
|
|
ca6cafaebd | ||
|
|
c97be335ee | ||
|
|
fd1227b87e | ||
|
|
7ef72c501e | ||
|
|
f7ee96aa99 | ||
|
|
b84478898d | ||
|
|
6afe0e8a34 | ||
|
|
6e4f4b5c8d | ||
|
|
f86fe4a138 | ||
|
|
63c663b8c1 | ||
|
|
a1296596fa | ||
|
|
1cca4de9e5 | ||
|
|
7ada587df3 | ||
|
|
1e58c32a5f | ||
|
|
2a27048174 | ||
|
|
2b291954cf | ||
|
|
8f8bfc62ca | ||
|
|
38d4d448a9 | ||
|
|
d5d11ca4bd | ||
|
|
e3e400f376 | ||
|
|
6637758ad0 | ||
|
|
41e9bd3cb5 | ||
|
|
c2d1909379 | ||
|
|
77688f297f | ||
|
|
714f665cc7 | ||
|
|
ec138d5741 | ||
|
|
560e5aa19a | ||
|
|
ad162f3366 | ||
|
|
5d07830339 | ||
|
|
b310d25ee3 | ||
|
|
443ccbd807 | ||
|
|
8cdecf80c7 | ||
|
|
a16d5435de | ||
|
|
ec02422226 | ||
|
|
cc5d438550 | ||
|
|
806d116501 | ||
|
|
066c9d9fec | ||
|
|
5b3b9fbc30 | ||
|
|
d15e189b7c | ||
|
|
1bd9974f89 | ||
|
|
90296d87df | ||
|
|
75b287771a | ||
|
|
5765504796 | ||
|
|
dda8c0c9e0 | ||
|
|
ce9d668602 | ||
|
|
39c2c5f25f | ||
|
|
12a7d794b4 | ||
|
|
ff8b0300ae | ||
|
|
f882df4cb7 | ||
|
|
e1300005cb | ||
|
|
e599ab9214 | ||
|
|
92acf62884 | ||
|
|
c2fb57fce9 | ||
|
|
3699d26e5d | ||
|
|
6eb0159ea1 | ||
|
|
433913c77a | ||
|
|
d955feef61 | ||
|
|
5377b9b618 | ||
|
|
5c9371c575 | ||
|
|
23d916f191 | ||
|
|
35d4914518 | ||
|
|
eb2ec71d2b | ||
|
|
dc50758dc9 | ||
|
|
9775d71c28 | ||
|
|
c40e4ee9ee | ||
|
|
2b469c385c | ||
|
|
a104fe45aa | ||
|
|
257df25a67 | ||
|
|
2a977557c2 | ||
|
|
d0e9f03311 | ||
|
|
97ca699170 | ||
|
|
702537e8fd | ||
|
|
83a3488d0d | ||
|
|
450e938092 | ||
|
|
b88e076f27 | ||
|
|
0fe90df01e | ||
|
|
66ad909908 | ||
|
|
77d74717d2 | ||
|
|
63f683982f | ||
|
|
9525ce8299 | ||
|
|
d7b8ec1274 | ||
|
|
96cd16faf7 | ||
|
|
9ddc7501fe | ||
|
|
301c496fb2 | ||
|
|
3eb265c5f7 | ||
|
|
049338e83b | ||
|
|
a336e9f460 | ||
|
|
0294cf8c4a | ||
|
|
c5183309ae | ||
|
|
0a15cb1e13 | ||
|
|
9546cc42b2 | ||
|
|
ac01262655 | ||
|
|
6ea962c1fa | ||
|
|
9e35283273 | ||
|
|
9c8e1d9c9f | ||
|
|
7d324b3fd4 | ||
|
|
badc5738ff | ||
|
|
8feaf4410f | ||
|
|
4e224d761e | ||
|
|
e775abdc5a | ||
|
|
60754c9380 | ||
|
|
c890ff5605 | ||
|
|
9f9c0059a5 | ||
|
|
4eabd417b9 | ||
|
|
c218de9567 | ||
|
|
4b5ca5ecf4 | ||
|
|
edbf46a751 | ||
|
|
c9c90bb86a | ||
|
|
437a608d2b | ||
|
|
b638eef1c6 | ||
|
|
b7cec8a0c4 | ||
|
|
28578bd6b0 | ||
|
|
160004fa7e | ||
|
|
f4332761f9 | ||
|
|
a4d1a18850 | ||
|
|
c3e1e55e9c | ||
|
|
e20bcd19b9 | ||
|
|
1fbf213ada | ||
|
|
c2d2359a8c | ||
|
|
586a2a065e | ||
|
|
adf43b7e35 | ||
|
|
45a4cddeef | ||
|
|
69f62551c7 | ||
|
|
f1bdf502be | ||
|
|
e89b3795f8 | ||
|
|
20b169e8eb | ||
|
|
1480ee2779 | ||
|
|
41c9741b72 | ||
|
|
f9e5096ceb | ||
|
|
a9b2a4940e | ||
|
|
f66c6ab8fc | ||
|
|
73902d5f92 | ||
|
|
0bb5f9f297 | ||
|
|
16ad8502d2 | ||
|
|
ad68e6057e | ||
|
|
54b4faeeff | ||
|
|
a7f69545f2 | ||
|
|
93ea558ec3 | ||
|
|
d0cdc208e3 | ||
|
|
0d7c483bd5 | ||
|
|
3f211c6277 | ||
|
|
79e93edfef | ||
|
|
44e8efda36 | ||
|
|
9726ac6f12 | ||
|
|
898d8c6449 | ||
|
|
01006ed76d | ||
|
|
2936823d03 | ||
|
|
7d05d53f9e | ||
|
|
f3074461ed | ||
|
|
146f832919 | ||
|
|
a622707608 | ||
|
|
6da43b15c8 | ||
|
|
d0bb7b075e | ||
|
|
c1ecd74644 | ||
|
|
a1aada0777 | ||
|
|
c55a8eeccd | ||
|
|
73cc8adcab | ||
|
|
7bb05f7f26 | ||
|
|
7f0803c3f6 | ||
|
|
1185ea4f96 | ||
|
|
43db51a664 | ||
|
|
d35cdc91f8 | ||
|
|
8d643277c0 | ||
|
|
5be1858b45 | ||
|
|
13d6e16630 | ||
|
|
dcb1cbbdb7 | ||
|
|
f7f077be3e | ||
|
|
3d79416520 | ||
|
|
c559e70270 | ||
|
|
efcc15d89d | ||
|
|
d17fe6bb7a | ||
|
|
01235ff398 | ||
|
|
3d6e490505 | ||
|
|
bd3491d210 | ||
|
|
d139146e0b | ||
|
|
b36da06fad | ||
|
|
d20c5e1773 | ||
|
|
0afc0d59a4 | ||
|
|
26481c547a | ||
|
|
45fe8c182b | ||
|
|
c25ddd0dbc | ||
|
|
efc9a10fdf | ||
|
|
a8eb9dfedf | ||
|
|
87cf5cb932 | ||
|
|
e1ca2c0b98 | ||
|
|
a9295751c8 | ||
|
|
2a46a5c00a | ||
|
|
d3b7af3c5f | ||
|
|
db59f24873 | ||
|
|
5645bf7982 | ||
|
|
6cbf87b52c | ||
|
|
bc642deebd | ||
|
|
e84a9643f8 | ||
|
|
e9af0ebdc5 | ||
|
|
29ee8a035b | ||
|
|
81ac4e8d01 | ||
|
|
ecc68d373f | ||
|
|
3032572f18 | ||
|
|
bcee6abb65 | ||
|
|
7e0b8ddf50 | ||
|
|
91dcb508b3 | ||
|
|
d549e2722d | ||
|
|
3bb29c8308 | ||
|
|
0121228d88 | ||
|
|
cbafa7110a | ||
|
|
06791beabd | ||
|
|
68b9857409 | ||
|
|
112a0df8c2 | ||
|
|
73717278ff | ||
|
|
5fa79926db | ||
|
|
06f97ac2f1 | ||
|
|
c2b4961b8d | ||
|
|
9b3838b912 | ||
|
|
946ea19371 | ||
|
|
419e011d0b | ||
|
|
b0157c9bd2 | ||
|
|
37d146e8fa | ||
|
|
063d982750 | ||
|
|
fbfeaa0f95 | ||
|
|
9b11b02658 | ||
|
|
3e435c419a | ||
|
|
1b37ba8daa | ||
|
|
b529219a0e | ||
|
|
d9b3eff18f | ||
|
|
cb5ada6ec9 | ||
|
|
baf7ffd441 | ||
|
|
2b4ca80a95 | ||
|
|
b5963936fd | ||
|
|
354ed9ede0 | ||
|
|
7ad9b8ff3e | ||
|
|
6dc522a044 | ||
|
|
3e91bc8c1e | ||
|
|
3218c544dc | ||
|
|
1ae11da036 | ||
|
|
84e36d758e | ||
|
|
06ede80435 | ||
|
|
dbc57060ee | ||
|
|
798bd46d0a | ||
|
|
c95f388d8d | ||
|
|
a9024ebc6b | ||
|
|
33bc2d8a6b | ||
|
|
cc60f2f308 | ||
|
|
edaa51593b | ||
|
|
e2265dd6f7 | ||
|
|
e1cf89c3bf | ||
|
|
8cd1541893 | ||
|
|
9d510815b4 | ||
|
|
44d22d93da | ||
|
|
f7405a82e6 | ||
|
|
04f3e44c3a | ||
|
|
6cc207a10c | ||
|
|
6b5e615a23 | ||
|
|
46268a7cf3 | ||
|
|
3682fbf531 | ||
|
|
0928b54d90 | ||
|
|
5a10339adc | ||
|
|
7c412cbec8 | ||
|
|
d235ca8ed8 | ||
|
|
97511be64a | ||
|
|
3bd5aaa251 | ||
|
|
ae2d9d8387 | ||
|
|
33c9694d26 | ||
|
|
dbede7f81a | ||
|
|
c8ad2bb454 | ||
|
|
18c52a5e23 | ||
|
|
ca1954ff80 | ||
|
|
5a3574734c | ||
|
|
5c6d10b2db | ||
|
|
7e96ced4c4 | ||
|
|
8da259cabc | ||
|
|
f978d739bb | ||
|
|
7b2d50e93e | ||
|
|
8bec50663f | ||
|
|
f4f5063efe | ||
|
|
11782ac34d | ||
|
|
bfec3fff36 | ||
|
|
d8c0a56577 | ||
|
|
ff1326a44f | ||
|
|
1fa4fccbcc | ||
|
|
323b41fd58 | ||
|
|
3d2b881b0e | ||
|
|
def41af469 | ||
|
|
4750aba763 | ||
|
|
5a9249dee1 | ||
|
|
064fc0a8e2 | ||
|
|
67de70432c | ||
|
|
facd71bd71 | ||
|
|
96e6270520 | ||
|
|
51c45e86ce | ||
|
|
445214f0b5 | ||
|
|
859d4f5372 | ||
|
|
0541280b20 | ||
|
|
ec7ced9fd3 | ||
|
|
4840b435f5 | ||
|
|
3acee3a686 | ||
|
|
d849a249c2 | ||
|
|
38656eca72 | ||
|
|
9b438d0caa | ||
|
|
f30debd1b3 | ||
|
|
d32b32842a | ||
|
|
2fad8f2ad7 | ||
|
|
7d17bd7dd1 | ||
|
|
357eded2c3 | ||
|
|
f7532cf5b4 | ||
|
|
bd7203dd9c | ||
|
|
9e98351923 | ||
|
|
b46997bc1a | ||
|
|
477d698eac | ||
|
|
96ab3d1c7e | ||
|
|
0dd41ab18a | ||
|
|
47b7780c96 | ||
|
|
ac35f002f1 | ||
|
|
8dec24693c | ||
|
|
e3803702c5 | ||
|
|
b9c8fed01f | ||
|
|
e97fec802c | ||
|
|
0234b0f6ce | ||
|
|
4fa3708c2f | ||
|
|
bede658d94 | ||
|
|
6f85e4506b | ||
|
|
9d21aa36de | ||
|
|
3c02286a08 | ||
|
|
6f2a2fd9e6 | ||
|
|
22169c64db | ||
|
|
b8e128e0a9 | ||
|
|
2729b37b76 | ||
|
|
0a5b0eb6d5 | ||
|
|
295b7a0701 | ||
|
|
fea3bd6aa4 | ||
|
|
05724ae64f | ||
|
|
8d7afe4f46 | ||
|
|
77c716bd6c | ||
|
|
f6c5aa9f84 | ||
|
|
945e5ca11c | ||
|
|
2f58e593e5 | ||
|
|
32fad08ef5 | ||
|
|
9606dd3501 | ||
|
|
f09b055872 | ||
|
|
4433da1e4a | ||
|
|
e3f02d02a2 | ||
|
|
a4ff2c7701 | ||
|
|
de510129bc | ||
|
|
ed171e5761 | ||
|
|
747d8a6031 | ||
|
|
36a5039c12 | ||
|
|
ac075c5bae | ||
|
|
e650c2f534 | ||
|
|
48b3998443 | ||
|
|
ef17da48c7 | ||
|
|
c97fff320b | ||
|
|
255954dd56 | ||
|
|
3c748bca39 | ||
|
|
c18b3e9114 | ||
|
|
66b4388e64 | ||
|
|
116adb1167 | ||
|
|
3db83db5d2 | ||
|
|
efc63b5230 | ||
|
|
c45cd56c78 | ||
|
|
f94a617d94 | ||
|
|
153ecf4d13 | ||
|
|
825bc87ca3 | ||
|
|
d1b652b013 | ||
|
|
46d7212d1b | ||
|
|
ea350c30c8 | ||
|
|
45871aa1c8 | ||
|
|
d3dedca4a8 | ||
|
|
1177263c8f | ||
|
|
a82b63e88b | ||
|
|
2f66c93bfd | ||
|
|
6991fa4907 | ||
|
|
b86d76fcd4 | ||
|
|
4f1ee03fe8 | ||
|
|
e3267f2e0c | ||
|
|
c265aad6d7 | ||
|
|
b512fe2003 | ||
|
|
46648e2547 | ||
|
|
54e945bf14 | ||
|
|
7c01fced68 | ||
|
|
64871b4c37 | ||
|
|
e3e2def809 | ||
|
|
ea7d1ce0e2 | ||
|
|
f5ddf1bc0e | ||
|
|
f6a6316b7a | ||
|
|
35f62d4e45 | ||
|
|
77efbe39a9 | ||
|
|
fcdf538368 | ||
|
|
248f24d4b9 | ||
|
|
32422646e4 | ||
|
|
a90e4e9c8d | ||
|
|
74188415dd | ||
|
|
11a4fdfcd5 | ||
|
|
7a119facdf | ||
|
|
4e6cc5ffa0 | ||
|
|
5a37e3e275 | ||
|
|
1edc32c6b0 | ||
|
|
a01a5a737b | ||
|
|
0c22064a94 | ||
|
|
9ef68d226a | ||
|
|
bf361f6824 | ||
|
|
74ee210514 | ||
|
|
2b7f21fee4 | ||
|
|
6ad32e487f | ||
|
|
97fd3eaf64 | ||
|
|
d9b4647cf5 | ||
|
|
03e0c02640 | ||
|
|
398f8c4318 | ||
|
|
1c7709a18b | ||
|
|
06c3a588bf | ||
|
|
80526c0e06 | ||
|
|
86528334d1 | ||
|
|
1cc4f7eaaa | ||
|
|
af2a05d0b5 | ||
|
|
701daadff5 | ||
|
|
7442d1c4a5 | ||
|
|
f247545fc4 | ||
|
|
e8817ec9ea | ||
|
|
44d2466422 | ||
|
|
eb7a0143da | ||
|
|
069e656cde | ||
|
|
f1aa3f5c68 | ||
|
|
acc3d7610b | ||
|
|
b2565bedd3 | ||
|
|
80c36ca846 | ||
|
|
00e5e75092 | ||
|
|
c8b30b6714 | ||
|
|
2c4418e6e6 | ||
|
|
d0e7e1bbb5 | ||
|
|
70ce762b5a | ||
|
|
e879153df7 | ||
|
|
c9db9566cb | ||
|
|
a1283bfc0f | ||
|
|
378de09ccd | ||
|
|
20febbc3bc | ||
|
|
3b0ba43e94 | ||
|
|
c189a6b489 | ||
|
|
2082c479f1 | ||
|
|
b70e868b5c | ||
|
|
24a50346db | ||
|
|
b84a03082e | ||
|
|
e40e10da61 | ||
|
|
6a858dace7 | ||
|
|
b0fbaa71bf | ||
|
|
18a2b686c1 | ||
|
|
a2f23bd056 | ||
|
|
bb5a9826bc | ||
|
|
9904eb0b0d | ||
|
|
f89f215813 | ||
|
|
d01bd487f7 | ||
|
|
3be31dbf90 | ||
|
|
bb1bce879f | ||
|
|
dd6082c8a1 | ||
|
|
be6d208b8b | ||
|
|
f547523c3e | ||
|
|
7de19f8087 | ||
|
|
dfdf8b881e | ||
|
|
da6755f703 | ||
|
|
602bde7bc5 | ||
|
|
e9d1297c17 | ||
|
|
8bbee7fe06 | ||
|
|
8b4c86c8ba | ||
|
|
6c1ee24101 | ||
|
|
26ed6aa840 | ||
|
|
ef3802f7c2 | ||
|
|
3c9e38d7ad | ||
|
|
2e4aeca0df | ||
|
|
fd6bf931fc | ||
|
|
751b795417 | ||
|
|
8b07b189d4 | ||
|
|
6c6fb117ea | ||
|
|
6fffe10c32 | ||
|
|
a2d5b97467 | ||
|
|
1cda446063 | ||
|
|
a5af583a29 | ||
|
|
4d4638feea | ||
|
|
ef3d76fb9f | ||
|
|
5e12979f09 | ||
|
|
cd64b60ece | ||
|
|
13951e5806 | ||
|
|
6cfc8c7a52 | ||
|
|
fd6610f966 | ||
|
|
aaa63a7f5d | ||
|
|
f786c4db50 | ||
|
|
87a0c0b0b6 | ||
|
|
8cfae368c3 | ||
|
|
f19b8a88d5 | ||
|
|
ac384c5d95 | ||
|
|
83c326fb39 | ||
|
|
be31d03733 | ||
|
|
0fcba5f1ee | ||
|
|
d1041c30db | ||
|
|
1642c61b7f | ||
|
|
2ff5f2eb46 | ||
|
|
af4ba976d9 | ||
|
|
3fc5a167a4 | ||
|
|
933449f16b | ||
|
|
dd170ec7ef | ||
|
|
2d3b01ba34 | ||
|
|
6a8737547f | ||
|
|
ae8997b4f3 | ||
|
|
65e3384a96 | ||
|
|
945fb5ed55 | ||
|
|
ca2949dcaf | ||
|
|
7b22c6232d | ||
|
|
3ec5894249 | ||
|
|
77462888ff | ||
|
|
0ee05687d9 | ||
|
|
d8dbce7cc9 | ||
|
|
adea5a5674 | ||
|
|
443b4a193c | ||
|
|
46c31e1abb | ||
|
|
46cdfe992f | ||
|
|
752cc88270 | ||
|
|
d1f13ddec0 | ||
|
|
5af856a2a0 | ||
|
|
ea9c6f4d44 | ||
|
|
631b2342b9 | ||
|
|
189ae6fcdb | ||
|
|
7d70edc0ff | ||
|
|
9bfbf85b4b | ||
|
|
ab50b32f60 | ||
|
|
fc4709fe27 | ||
|
|
2cf789d7bf | ||
|
|
8aad439e99 | ||
|
|
0f1f124eb5 | ||
|
|
bb06e193bc | ||
|
|
4377716474 | ||
|
|
cab9850fe3 | ||
|
|
5ae15bfb71 | ||
|
|
1ca57df0c0 | ||
|
|
86cfa5dcb2 | ||
|
|
3c42dd69d5 | ||
|
|
39620f1aab | ||
|
|
60cbf7b8b9 | ||
|
|
a630022bf0 | ||
|
|
cd53ba04b0 | ||
|
|
b55e9c5c0d | ||
|
|
6887ddd570 | ||
|
|
f2be996e3d | ||
|
|
664c9d9953 | ||
|
|
0fa39c4ace | ||
|
|
9e604aed5e | ||
|
|
6afcce4b7c | ||
|
|
3da8955f8a | ||
|
|
49bb7ecba9 | ||
|
|
99e58039a2 | ||
|
|
d2edbe207d | ||
|
|
05d16e7c15 | ||
|
|
253d0ea4c8 | ||
|
|
397c2cc488 | ||
|
|
4f0c55460d | ||
|
|
8f2c424657 | ||
|
|
b10f599a87 | ||
|
|
c1cdba4395 | ||
|
|
bc725f46e8 | ||
|
|
6b99d3e5f1 | ||
|
|
92cc494087 | ||
|
|
3bb7b05d80 | ||
|
|
ed65842e3d | ||
|
|
be4abefd55 | ||
|
|
9e7209ff47 | ||
|
|
71d47eacaa | ||
|
|
ebc87f46f7 | ||
|
|
558e4f4dd0 | ||
|
|
3109ee9c2a | ||
|
|
bb5d003430 | ||
|
|
058cc3aac9 | ||
|
|
43ff0fa41a | ||
|
|
ab8f1a4ea6 | ||
|
|
9ef1c3b5bf | ||
|
|
ea2615aeae | ||
|
|
0a927768f5 | ||
|
|
1470feb958 | ||
|
|
5a54d6e0c5 | ||
|
|
dc6a2b654e | ||
|
|
a3da6b7df5 | ||
|
|
2c417d28c5 | ||
|
|
71e09423fe | ||
|
|
0070333b35 | ||
|
|
49bb3e0a3c | ||
|
|
787ee0220a | ||
|
|
0093f769f0 | ||
|
|
46d0b50c52 | ||
|
|
3e0cc358d0 | ||
|
|
0a8d34a21f | ||
|
|
def65282dd | ||
|
|
4359dc764f | ||
|
|
28c590f079 | ||
|
|
989f12e65b | ||
|
|
ce8ddded92 | ||
|
|
5d55af8183 | ||
|
|
358c333c70 | ||
|
|
d391d12ab5 | ||
|
|
f5a559efa6 | ||
|
|
0c8b944b12 | ||
|
|
7ff02e51f5 | ||
|
|
a40d3f5f9c | ||
|
|
3eb8f6a1a4 | ||
|
|
132388fe3f | ||
|
|
0d14918946 | ||
|
|
7c3b6b9fb3 | ||
|
|
37b5991dcc | ||
|
|
09044016cd | ||
|
|
577badf4d8 | ||
|
|
de1539ac1d | ||
|
|
6e8cfe5ec9 | ||
|
|
9dfcbf1797 | ||
|
|
74b7aa5340 | ||
|
|
0441b062bd | ||
|
|
24bdd10f7f | ||
|
|
8669582e8f | ||
|
|
d0f66ece98 | ||
|
|
1107e9f36a | ||
|
|
95c15df184 | ||
|
|
c3e1cf8681 | ||
|
|
d393e4d124 | ||
|
|
bce418bee8 | ||
|
|
052e3cd997 | ||
|
|
9eb5535c75 | ||
|
|
e9e7d462f7 | ||
|
|
88ab232ccd | ||
|
|
714f829f3e | ||
|
|
7a549ce211 | ||
|
|
63bdc16e2f | ||
|
|
7e9aada919 | ||
|
|
4805097a0c | ||
|
|
86e4a4344b | ||
|
|
9f3e7ba11c | ||
|
|
3301fc3d9d | ||
|
|
653e06dd03 | ||
|
|
a8aed1bf02 | ||
|
|
d10ff590ec | ||
|
|
b86cfb595c | ||
|
|
6733eb93f2 | ||
|
|
e822515403 | ||
|
|
b6a1188bc7 | ||
|
|
d401a69560 | ||
|
|
798cc3bbb3 | ||
|
|
e1644d3c08 | ||
|
|
36a706b7b6 | ||
|
|
36d6221b3b | ||
|
|
99bff1a4f9 | ||
|
|
7dc1a2ba72 | ||
|
|
4d99fe7230 | ||
|
|
dc9acbc3c9 | ||
|
|
d121358ad2 | ||
|
|
0295314dce | ||
|
|
5da59e6f0a | ||
|
|
07296f14d7 | ||
|
|
0a8a843f6e | ||
|
|
3bc317e7b2 | ||
|
|
a83812d11a | ||
|
|
16451550b5 | ||
|
|
c2dc28c2bd | ||
|
|
c48ac9f596 | ||
|
|
dfba78a4cb | ||
|
|
a9eed7c31c | ||
|
|
a9a7719096 | ||
|
|
5038fbadb0 | ||
|
|
a85ca2c984 | ||
|
|
e6e7f10a05 | ||
|
|
212f6ee773 | ||
|
|
53d38cc54c | ||
|
|
a53c8d5c64 | ||
|
|
94a02c9a2e | ||
|
|
07699fa651 | ||
|
|
0aaf02f208 | ||
|
|
0dd9bc1cda | ||
|
|
ccfce843be | ||
|
|
cb3bc755a6 | ||
|
|
719081a77e | ||
|
|
d1c4efa30d | ||
|
|
12fbaa4361 | ||
|
|
abcd586daa | ||
|
|
2f0a3eaadd | ||
|
|
1814d52680 | ||
|
|
d3ed6bb139 | ||
|
|
8eaa58040e | ||
|
|
04e2a212d1 | ||
|
|
fe7ca65f22 | ||
|
|
89ab87b6dd | ||
|
|
e933fbe1bd | ||
|
|
cb9a9282dd | ||
|
|
14f1a91eeb | ||
|
|
1756031eda | ||
|
|
bccb321ce1 | ||
|
|
920f091a85 | ||
|
|
c1103a52f0 | ||
|
|
4f128ebbef | ||
|
|
3f5b2bdcee | ||
|
|
288e82fbc3 | ||
|
|
feb073d159 | ||
|
|
505df87014 | ||
|
|
f6221c1c34 | ||
|
|
0a97c1dc62 | ||
|
|
05cea84dcc | ||
|
|
1ac544511c | ||
|
|
292f14bf87 | ||
|
|
ef17ea6231 | ||
|
|
75c49497ac | ||
|
|
f9b9dddbc8 | ||
|
|
5a8b9fc344 | ||
|
|
e9dae0d633 | ||
|
|
1c866a52e5 | ||
|
|
2f5edb6329 | ||
|
|
30e5410906 | ||
|
|
4f2a0b8260 | ||
|
|
882a457484 | ||
|
|
ed5531d44b | ||
|
|
b2989a8bab | ||
|
|
c032a27d63 | ||
|
|
353ceefd4e | ||
|
|
9a7ea3b6d0 | ||
|
|
6a79d9f244 | ||
|
|
2151fbb6c0 | ||
|
|
3945a681a3 | ||
|
|
592382a5d3 | ||
|
|
72bfe63ebf | ||
|
|
6d883821a8 | ||
|
|
415786d67e | ||
|
|
d8aa3a5f14 | ||
|
|
f5fc941916 | ||
|
|
8254a8ab0f | ||
|
|
fadbaf429d | ||
|
|
a80507078d | ||
|
|
d13549ff6a | ||
|
|
0f89a9e1e8 | ||
|
|
c8f2521670 | ||
|
|
32135d5647 | ||
|
|
dc5b37d560 | ||
|
|
e873902e1b | ||
|
|
fe21aa0aa9 | ||
|
|
19842ebc35 | ||
|
|
ee1e128c5a | ||
|
|
d099bc562b | ||
|
|
69dfd5645a | ||
|
|
5db7225bc4 | ||
|
|
80374333b6 | ||
|
|
885ec70d28 | ||
|
|
8d00468412 | ||
|
|
5d9ac614c2 | ||
|
|
0f8a418efd | ||
|
|
ed2e9a993d | ||
|
|
f689f048b2 | ||
|
|
906bc01b91 | ||
|
|
4641e4701c | ||
|
|
88e40080fb | ||
|
|
e0fa23359f | ||
|
|
4ab71bcf36 | ||
|
|
652a27eb38 | ||
|
|
d56fe82bfd | ||
|
|
6c20df7839 | ||
|
|
423eb97e0f | ||
|
|
0b43dd2747 | ||
|
|
f2fccd4a64 | ||
|
|
a7292c3a2c | ||
|
|
0c1072f7cf | ||
|
|
cea80f98e8 | ||
|
|
985e69c529 | ||
|
|
a2b3e6fa83 | ||
|
|
ee986970fe | ||
|
|
345fa122c5 | ||
|
|
fae5693db8 | ||
|
|
093f368545 | ||
|
|
a41fc22899 | ||
|
|
5f51f7f9b0 | ||
|
|
de2a0403d2 | ||
|
|
e2d13034a8 | ||
|
|
e55006f662 | ||
|
|
64b46a88c9 | ||
|
|
69b7c3077f | ||
|
|
f158858262 | ||
|
|
7aa7de75a2 | ||
|
|
6cc22a3b63 | ||
|
|
649ce1c147 | ||
|
|
1281843d45 | ||
|
|
e31aea3492 | ||
|
|
26e3403ff4 | ||
|
|
e5922bf3e7 | ||
|
|
2b9baaf0ea | ||
|
|
8ad4e20cab | ||
|
|
1511c5737b | ||
|
|
57bf414d59 | ||
|
|
16a0a3364a | ||
|
|
d09512373b | ||
|
|
dfd1e311d1 | ||
|
|
26c9ba0c3b | ||
|
|
d7d1d0b58d | ||
|
|
a0ab16eaa7 | ||
|
|
cae4b47538 | ||
|
|
dd445dbac5 | ||
|
|
4b26732f51 | ||
|
|
bf38fc9819 | ||
|
|
aff6b0925f | ||
|
|
a7f259ea3c | ||
|
|
3a1ee58339 | ||
|
|
6b0c46b634 | ||
|
|
6b36a030f6 | ||
|
|
df92c43578 | ||
|
|
f481741bb5 | ||
|
|
77b0dd725c | ||
|
|
f850c0ead6 | ||
|
|
7ad9b2ed58 | ||
|
|
695d76dcf4 | ||
|
|
19ea6707fe | ||
|
|
649bccb0d0 | ||
|
|
73f1c08366 | ||
|
|
b98120192a | ||
|
|
1cd7181d26 | ||
|
|
fb35e7dd5d | ||
|
|
1c4275ce37 | ||
|
|
3ff9a28fa7 | ||
|
|
04f13ab090 | ||
|
|
e42b9db159 | ||
|
|
deb3a3bd48 | ||
|
|
6708947332 | ||
|
|
1f0fcb119d | ||
|
|
bdb74d4719 | ||
|
|
19ab8b89f5 | ||
|
|
10fa9e5465 | ||
|
|
1fe259eb7a | ||
|
|
cd56dc7f98 | ||
|
|
8cf9601af4 | ||
|
|
b39c02154a | ||
|
|
a2e41f31ed | ||
|
|
5d8b049a45 | ||
|
|
336adf9530 | ||
|
|
708cfc23b6 | ||
|
|
06b2a89646 | ||
|
|
b782225dde | ||
|
|
85640f88b2 | ||
|
|
a372ca34e6 | ||
|
|
4acc0b63fd | ||
|
|
edf6f7560b | ||
|
|
66e0cc33bf | ||
|
|
498e3eb35c | ||
|
|
2aa7e37e13 | ||
|
|
09c5b8727a | ||
|
|
02a67e330a | ||
|
|
37364d6c86 | ||
|
|
86166a58e1 | ||
|
|
935e494705 | ||
|
|
94387045e4 | ||
|
|
20ae2dbeea | ||
|
|
d1b522b534 | ||
|
|
89802e23e2 | ||
|
|
cb4b5d1c71 | ||
|
|
472bfa51da | ||
|
|
162dbaed0f | ||
|
|
6f9fc26ab5 | ||
|
|
b199568ec3 | ||
|
|
ff258e0cbf | ||
|
|
68dd18067e | ||
|
|
799e11c36c | ||
|
|
f274d47c81 | ||
|
|
ca3b7f2172 | ||
|
|
22c9fca915 | ||
|
|
e4d312a11f | ||
|
|
a3f0de1c84 | ||
|
|
4826056bbe | ||
|
|
6f2f99dda0 | ||
|
|
d06ec5e452 | ||
|
|
94cb118a7e | ||
|
|
bebc70634b | ||
|
|
186c9189ca | ||
|
|
324b69cba1 | ||
|
|
802af464cd | ||
|
|
0c8b46acee | ||
|
|
182219f00d | ||
|
|
828f5ad173 | ||
|
|
95da5a4535 | ||
|
|
324bcd9b91 | ||
|
|
98ed75e4e0 | ||
|
|
3d5bb334f6 | ||
|
|
c74f43a1ad | ||
|
|
f5451b7d59 | ||
|
|
3dbaf061ed | ||
|
|
19ac0e6ba6 | ||
|
|
a509b0e9d3 | ||
|
|
5c63e9779e | ||
|
|
9ef9ffd16f | ||
|
|
93e223b2cc | ||
|
|
c4a0ae64aa | ||
|
|
933a7ffc69 | ||
|
|
b0253f9913 | ||
|
|
7eb1d43201 | ||
|
|
1f843bc3a2 | ||
|
|
c17bc7d332 | ||
|
|
c308121c47 | ||
|
|
d0d9868b5f | ||
|
|
8f3dce4ee9 | ||
|
|
de0a6dd3ee | ||
|
|
5d06341612 | ||
|
|
470b29c229 | ||
|
|
c915bb8312 | ||
|
|
f8869c177f | ||
|
|
c0a7b276b4 | ||
|
|
fa35fd9e45 | ||
|
|
3f8077d615 | ||
|
|
3b9e85e976 | ||
|
|
b024b45e02 | ||
|
|
a3cf3401bb | ||
|
|
bc12e0d100 | ||
|
|
96be29ef63 | ||
|
|
0f2029a32d | ||
|
|
aa14c1bc1f | ||
|
|
d052af9207 | ||
|
|
ad2ed37d0a | ||
|
|
1943ce884a | ||
|
|
b23fa36543 | ||
|
|
887f8f3e0c | ||
|
|
227b554488 | ||
|
|
20064f36ef | ||
|
|
decdddb9ec | ||
|
|
1b0fac78ae | ||
|
|
d864a2391e | ||
|
|
b08aead536 | ||
|
|
cca04468de | ||
|
|
e997c32c6c | ||
|
|
a1d5eaa846 | ||
|
|
4e9333e823 | ||
|
|
b75e7470ae | ||
|
|
484cbccc1b | ||
|
|
5d4d4d3498 | ||
|
|
82e34a5b02 | ||
|
|
a9b1ebb063 | ||
|
|
c942feb868 | ||
|
|
7003311b7e | ||
|
|
2549e23fd2 | ||
|
|
40af51fc05 | ||
|
|
06d3d8a18f | ||
|
|
992e6bce86 | ||
|
|
6e59087f6d | ||
|
|
e94473b21b | ||
|
|
8da49ba796 | ||
|
|
bc8f073f3f | ||
|
|
9589924235 | ||
|
|
fed21a7cb9 | ||
|
|
a97783ed86 | ||
|
|
7982e33823 | ||
|
|
7cf549ba88 | ||
|
|
0386d52e7c | ||
|
|
e7b763c8ea | ||
|
|
c805b17929 | ||
|
|
877bf7905b | ||
|
|
c45b03b1d8 | ||
|
|
f4d84dbd52 | ||
|
|
28d73a33ab | ||
|
|
9c9247b9c1 | ||
|
|
50684e9ca0 | ||
|
|
b5e4bebd75 | ||
|
|
b9de8e6d13 | ||
|
|
939344816e | ||
|
|
441015d6a5 | ||
|
|
841832846f | ||
|
|
eb0bf07d2c | ||
|
|
fc622dcde2 | ||
|
|
e77be3350f | ||
|
|
b4637a825e | ||
|
|
a2fc694c8d | ||
|
|
06c0b4cc11 | ||
|
|
ea2ae0b5c3 | ||
|
|
1bf9cfa422 | ||
|
|
3d699e612a | ||
|
|
a202d6168b | ||
|
|
786a5f9325 | ||
|
|
1910b76b13 | ||
|
|
bda72f28ed | ||
|
|
27e60ef85b | ||
|
|
58dc45d344 | ||
|
|
082dcebf9b | ||
|
|
a652fcd026 | ||
|
|
717c2d2869 | ||
|
|
3124712cfb | ||
|
|
081b5f6728 | ||
|
|
71c14ab07b | ||
|
|
900d58a6f4 | ||
|
|
70756c2a2e | ||
|
|
5b40f2e2e9 | ||
|
|
3d60c057ea | ||
|
|
105b8b5a91 | ||
|
|
9278ca4d27 | ||
|
|
d97e97ae5f | ||
|
|
5cbee8a4ab | ||
|
|
fe9db6c9ad | ||
|
|
a4845abc45 | ||
|
|
470b29eeca | ||
|
|
f87f7f6feb | ||
|
|
5e8a8aac53 | ||
|
|
2672e218f4 | ||
|
|
02a728bdea | ||
|
|
3a812612de | ||
|
|
4fdbce24d7 | ||
|
|
52458041f0 | ||
|
|
4a1e5a0dcc | ||
|
|
f6c7ac6d98 | ||
|
|
76675422ea | ||
|
|
7dee6db362 | ||
|
|
e8030c59f1 | ||
|
|
4b642d4953 | ||
|
|
346b7862af | ||
|
|
3ec661cc02 | ||
|
|
d7f066b07e | ||
|
|
e54500fa90 | ||
|
|
a2c83425f2 | ||
|
|
41ce19b835 | ||
|
|
9c11a6ffb0 | ||
|
|
e36cd8109d | ||
|
|
ee83e93269 | ||
|
|
0b4692e303 | ||
|
|
e99b5a4abf | ||
|
|
a419c4d4fe | ||
|
|
ca80a7d463 | ||
|
|
716e6296e5 | ||
|
|
6382bec05a | ||
|
|
20248212ae | ||
|
|
86e373b493 | ||
|
|
b4b0bbd081 | ||
|
|
17bacbf9d6 | ||
|
|
b869fb0ca5 | ||
|
|
c70a23dd5c | ||
|
|
f9e7ae22f2 | ||
|
|
30fb2770a6 | ||
|
|
11e1dc7ec8 | ||
|
|
5645c29dd8 | ||
|
|
44e954efeb | ||
|
|
4ffb20f3bb |
4
.gitattributes
vendored
Normal file
4
.gitattributes
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
* text=auto
|
||||||
|
|
||||||
|
*.png binary
|
||||||
|
*.wav binary
|
||||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -24,7 +24,7 @@
|
|||||||
/world
|
/world
|
||||||
|
|
||||||
# Mac filesystem dust
|
# Mac filesystem dust
|
||||||
/.DS_Store
|
*.DS_Store
|
||||||
|
|
||||||
# intellij
|
# intellij
|
||||||
*.iml
|
*.iml
|
||||||
@@ -34,3 +34,9 @@
|
|||||||
|
|
||||||
# Project Stuff
|
# Project Stuff
|
||||||
/src/main/resources/mcMMO
|
/src/main/resources/mcMMO
|
||||||
|
|
||||||
|
# Other Libraries
|
||||||
|
*.jar
|
||||||
|
|
||||||
|
# Atlassian Stuff
|
||||||
|
/atlassian-ide-plugin.xml
|
||||||
|
|||||||
812
Changelog.txt
812
Changelog.txt
@@ -1,5 +1,815 @@
|
|||||||
Changelog:
|
Changelog:
|
||||||
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code
|
Versions without changelogs probably had very small misc fixes, like tweaks to the source code
|
||||||
|
|
||||||
|
Key:
|
||||||
|
+ Addition
|
||||||
|
= Fix
|
||||||
|
! Change
|
||||||
|
- Removal
|
||||||
|
|
||||||
|
Version 1.4.08-dev
|
||||||
|
+ Added the possibility to gain experience when using Fishing "Shake"
|
||||||
|
= Fixed IllegalArgumentException caused by an empty Fishing treasure category
|
||||||
|
|
||||||
|
Version 1.4.07
|
||||||
|
+ Added XP boost to Acrobatics when wearing Boots of Feather Falling
|
||||||
|
+ Added SQL Database can now recover from a dropped connection without losing data. (Thanks Riking!)
|
||||||
|
+ Added more tiers to Fishing, Repair and Smelting!
|
||||||
|
+ Added Carrot on a Stick and Flint & Steel to repair.vanilla.yml
|
||||||
|
+ Added horses to the "Shake" ability
|
||||||
|
+ Added ability to summon horses via "Call of the Wild" using apples
|
||||||
|
+ Added XP gain to Taming for horses
|
||||||
|
+ Added new permission nodes to allow more control over Taming and "Call of the Wild"
|
||||||
|
+ Added new experience.yml config file! Moved all experience related settings from config.yml to experience.yml
|
||||||
|
+ Added support for EXPONENTIAL formula curves to experience.yml
|
||||||
|
+ Added new /mcconvert command to convert players levels and experience from one formula curve to another.
|
||||||
|
+ Added snow to Excavation blocks
|
||||||
|
+ Added new experience curve option. Cumulative curve, calculates experience needed for next level using power level.
|
||||||
|
+ Added extra settings to config.yml for "Call of the Wild" (Taming)
|
||||||
|
+ Added a 5 second cooldown after teleporting before Acrobatics XP can be earned. Plus a config option to disable
|
||||||
|
+ Added new API methods to ExperienceAPI to get a players rank on the leaderboards
|
||||||
|
+ Added new McMMOPlayerDeathPenaltyEvent, fired when a player dies and would lose levels
|
||||||
|
+ Added new McMMOPlayerLevelChangeEvent, fired when a players level changes
|
||||||
|
+ Added new McMMOPlayerLevelDownEvent, fired when a player loses levels
|
||||||
|
+ Added ability to give custom names to items in treasures.yml - use the key "Custom_Name" to set, expects a string.
|
||||||
|
+ Added ability to give lore to items in treasures.yml - use the key "Lore" to set, expects a list of strings.
|
||||||
|
+ Added Quartz and Name Tags to the default Excavation treasures
|
||||||
|
+ Added a warning message if the server is running NoCheatPlus without CompatNoCheatPlus
|
||||||
|
+ Added cooldown to commands with heavy database access to prevent denial of service
|
||||||
|
+ Added /mcscoreboard keep, to keep the scoreboard up forever
|
||||||
|
+ Added Rainbow Mode to scoreboards
|
||||||
|
+ Added new /mccooldowns command to show all ability cooldowns
|
||||||
|
+ Commands may now both print text and display a scoreboard
|
||||||
|
+ Killing a custom entity will automatically add it to the custom entity config file with default values.
|
||||||
|
= Fixed bug which allowed players to bypass fishing's exploit prevention
|
||||||
|
= Fixed bug where FakeEntityDamageByEntityEvent wasn't being fired
|
||||||
|
= Fixed bug with "Skull Splitter" not finding the locale string
|
||||||
|
= Fixed issue where locale strings could cause the scoreboard header to be longer than 16 characters.
|
||||||
|
= Fixed a bug with "Beast Lore" when the entity had no owner but was tamed.
|
||||||
|
= Fixed a bug where AbilityDeactivateEvent would throw an error if the player logged out before his ability ran out.
|
||||||
|
= Fixed a bug where LevelUpEvent would be called for an offline player.
|
||||||
|
= Fixed a bug where teleport location was never reset if warmup was set to 0 for "Chimaera Wing".
|
||||||
|
= Fixed a bug where the "Dodge" DamageModifier wasn't being read from advanced.yml
|
||||||
|
= Fixed a bug where squid were not awarding XP.
|
||||||
|
= Fixed a bug where Combat XP was granted within 5 seconds for respawned players
|
||||||
|
= Fixed a bug where wrong feedback messages were being send when using a command on an offline player
|
||||||
|
= Fixed a bug where players were able to gain Herbalism XP in mine carts, even though Prevent_AFK_Leveling was enabled
|
||||||
|
= Fixed a bug where players would get hit by fireworks if they leveled up while in a boat
|
||||||
|
! Changed Fishing "Treasure Hunter" and "Magic Hunter" drop percentages
|
||||||
|
! Changed format of mod config files. (blocks.yml, tools.yml, armor.yml and entities.yml) **YOU WILL NEED TO UPDATE YOUR FILE TO THE NEW FORMAT**
|
||||||
|
! Changed format of treasures.yml. **YOU WILL NEED TO UPDATE YOUR FILE TO THE NEW FORMAT**
|
||||||
|
! Changed format of repair.vanilla.yml. **YOU WILL NEED TO UPDATE YOUR FILE TO THE NEW FORMAT**
|
||||||
|
! Changed default XP multiplier for repairing shears
|
||||||
|
! Changed "Shake" drops for Witches. They no longer drop water bottles, since they no longer drop them in Vanilla.
|
||||||
|
! Changed fishing exploit prevention, by default it will no longer send global sounds, effects and messages.
|
||||||
|
! Changed Hardcore modes, they will also subtract experience
|
||||||
|
! Changed various values to double in advanced.yml for the sake of consistency.
|
||||||
|
! Nerfed Fishing "Master Angler" (removed skill level based bonus) and also made the modifiers configurable
|
||||||
|
! Nerfed Archery damage to eliminate constant one-hit kills.
|
||||||
|
! Changed the way Repair hands out XP, also added config options to control Repair XP
|
||||||
|
! Changed Swords "Counter Attack" ability from passive to active. Blocking is required to activate.
|
||||||
|
! Hardcore modes can now be toggled for each skill individually
|
||||||
|
! Vampirism can now be enabled without having Skill Death Penalty enabled
|
||||||
|
! Admin and Party chat prefixes are now customizable
|
||||||
|
! Changed the color of party leader names in Party chat
|
||||||
|
! Improved "Tree Feller" algorithm (Thanks Riking!)
|
||||||
|
! Improved AFK Acrobatics prevention mechanism
|
||||||
|
! Improved profile saving
|
||||||
|
! Improved partial name matcher
|
||||||
|
! Improved update checker
|
||||||
|
! Updated localization files
|
||||||
|
! Party item share category states are now saved when the server shuts down.
|
||||||
|
! When using "Super Breaker" or "Giga Driller" abilities extra tool durability is used (again)
|
||||||
|
! Mob healthbars are automatically disabled when the plugin "HealthBar" is found
|
||||||
|
! Massively improved scoreboard handling
|
||||||
|
! Reworked scoreboard configuration (config.yml) - **you will need to update**
|
||||||
|
- The /mmoupdate command has been removed. It is replaced by /mcconvert database
|
||||||
|
- Removed Abilities.Tools.Durability_Loss_Enabled, set Abilities.Tools.Durability_Loss to 0 to disable instead.
|
||||||
|
- Removed Skills.Fishing.Shake_UnlockLevel from advanced.yml, now using Skills.Fishing.Rank_Levels.Rank_1 instead.
|
||||||
|
- Removed SpoutPlugin support
|
||||||
|
|
||||||
|
Version 1.4.06
|
||||||
|
+ Added "Ice Fishing" ability to Fishing
|
||||||
|
+ Added global scoreboards to track skill rankings (display using /mctop)
|
||||||
|
+ Added per-player scoreboard displays for the /inspect, /mcrank, /mcstats, and /<skillname> commands
|
||||||
|
+ Added tab-complete support for all commands
|
||||||
|
+ Added ability to configure drops from Shake in treasures.yml
|
||||||
|
+ Added "Master Angler" ability to Fishing.
|
||||||
|
+ Added health display for mobs during combat.
|
||||||
|
+ Added new API method to McMMOPlayerLevelUpEvent to set levels gained
|
||||||
|
+ Added new permission node for /ptp; mcmmo.commands.ptp.send (enabled by default)
|
||||||
|
+ Added configurable cooldown and warmup times when using /ptp
|
||||||
|
+ Added a new Party item share category "Misc" which contains a list of configurable items. (By default all tools and armor)
|
||||||
|
+ Added fishing exploit prevention
|
||||||
|
+ Added permission node to bypass the fishing exploit prevention
|
||||||
|
+ Added boosts to Fishing chance depending on conditions
|
||||||
|
+ Added McMMOAbilityActivateEvent and McMMOAbilityDeactivateEvent
|
||||||
|
+ Added config option to toggle the size of fireworks
|
||||||
|
+ Added config option to multiply xp gains from mob spawner mobs
|
||||||
|
+ Added multiplier to Archery XP based on bow force
|
||||||
|
+ Added information about /party itemshare and /party expshare to the party help page
|
||||||
|
+ Added option to use scoreboards for power level display instead of Spout.
|
||||||
|
+ Added permission node to prevent inspecting hidden players
|
||||||
|
+ Added SQL to Flatfile database conversion
|
||||||
|
+ Added ability to use custom database managers and convert to/from them
|
||||||
|
= Fixed bug which could cause the server to hang for a minute when checking for updates. (Thanks to Riking)
|
||||||
|
= Fixed bug where spawned arrows could throw ArrayIndexOutOfBoundsException
|
||||||
|
= Fixed bug where custom Spout titles were overwritten by mcMMO.
|
||||||
|
= Fixed bug where Nether Quartz wasn't included in Smelting or item sharing
|
||||||
|
= Fixed bug where players were able to join the same party multiple times
|
||||||
|
= Fixed displaying partial names when trying to use /ptp
|
||||||
|
= Fixed wolves from Call of the Wild only having 8 health
|
||||||
|
= Fixed bug where /party chat was not working
|
||||||
|
= Fixed bug where experience commands were adding levels to all skills when they shouldn't
|
||||||
|
= Fixed mcmmo.commands.ptp.send not being set by default
|
||||||
|
= Fixed NPE when trying to tab-complete /mctop
|
||||||
|
= Fixed Fishing treasures always having the same enchants
|
||||||
|
= Fixed Smelting returning ink sacs instead of Lapis when double-dropping
|
||||||
|
= Fixed bug where players could remain in party chat after leaving or being kicked from a party.
|
||||||
|
= Fixed bug where non-player arrows couldn't be deflected.
|
||||||
|
= Fixed experience being applied even when the permission for a skill was denied
|
||||||
|
= Fixed possible item duplication bug with infinity bows
|
||||||
|
= Fixed bug with removing players from mySQL database
|
||||||
|
= Fixed bug with empty metadata lists and Smelting
|
||||||
|
= Fixed bug where Blast Mining would drop wrong items
|
||||||
|
= Fixed bug with Blast Mining where the Ability refreshed message was being send too early
|
||||||
|
= Fixed bug where the chance of a successful Gracefull Roll was twice as high as displayed
|
||||||
|
= Fixed bug where lucky perks where not working
|
||||||
|
= Fixed bug with Ice Fishing on a single block of ice
|
||||||
|
= Fixed bug with Ice Fishing which allowed players to break ice in protected areas
|
||||||
|
= Fixed a small bug with mob healthbars and bosses, such as EnderDragons and Withers
|
||||||
|
! Changed Spout notification tiers to be stored in SpoutConfig instead of AdvancedConfig
|
||||||
|
! Changed Berserk to add items to inventory rather than denying pickup
|
||||||
|
! Changed Call of the Wild, newly summoned pet's will have a custom name. (added permission node to disable this)
|
||||||
|
! Changed Chimaera Wing's recipe result to use the ingredient Material
|
||||||
|
! Changed Repair to ask a confirmation of the player when he tries to repair an enchanted item
|
||||||
|
! Players will no longer pickup items to their hotbar while using Unarmed
|
||||||
|
! ExperienceAPI methods will now throw InvalidSkillException if the skill name passed in is invalid.
|
||||||
|
! Changed default value for recently-hurt cooldown between teleports, this is also fully configurable now
|
||||||
|
! Changed the amount of info messages in the console when enabling/disabling, enable Verbose_Logging to enable them again
|
||||||
|
! Items dropped by players are now being tracked and are not being shared with party members
|
||||||
|
! Optimized tracking of tool & ability cooldowns.
|
||||||
|
! Updated the localization files
|
||||||
|
|
||||||
|
Version 1.4.05
|
||||||
|
+ Added option to allow refreshing of chunks after block-breaking abilities. (Disabled by default)
|
||||||
|
+ Added fireworks effects when a player levels-up, for every 100 levels (configurable)
|
||||||
|
= Fixed bug where /addxp was setting instead of adding experience
|
||||||
|
= Fixed bug where /addxp was not processessing level-ups for online players
|
||||||
|
= Fixed bug which allowed players to share experience with nearby dead players
|
||||||
|
= Fixed bug with ChimaeraWings not taking Wings from a players inventory properly
|
||||||
|
= Fixed bug which caused a NPE when trying to use /mctop smelting
|
||||||
|
= Fixed Berserk misbehaving when /reload was used
|
||||||
|
= Fixed parties misbehaving when /reload was used
|
||||||
|
= Fixed Berserk getting "stuck" when /mcrefresh was used
|
||||||
|
= Fixed ClassCastException with Taming
|
||||||
|
= Fixed huge mushroom blocks not being properly tracked
|
||||||
|
= Fixed potion buff option not using the appropriate # of ticks
|
||||||
|
= Fixed Chimera Wing spamming console if Metrics was disabled
|
||||||
|
= Fixed Chimera Wing displaying warmup message if warmup was set to 0
|
||||||
|
= Fixed party & admin chat errors when not aysnc
|
||||||
|
! Updated localization files
|
||||||
|
|
||||||
|
Version 1.4.04
|
||||||
|
+ Added functions to ExperienceAPI for use with offline players
|
||||||
|
+ Added Nether Quartz Ore to Mining
|
||||||
|
+ Added Dropper, Hopper, and Trapped Chest to blocks that shouldn't activate abilities
|
||||||
|
+ Added partial name matching
|
||||||
|
= Fixed bug where trying to activate a Chimaera Wing would require one item too much
|
||||||
|
= Fixed bug where Treefeller would try to cut too many leaves and reach the threshold when it shouldn't
|
||||||
|
= Fixed bug where Mining wasn't awarding double drops
|
||||||
|
= Fixed bug where Shake wouldn't damage mobs whose max health was less than 4
|
||||||
|
= Fixed bug where the API would fail if the name of a player's current party is requested when the player isn't in one (Thanks @dualspiral!)
|
||||||
|
= Fixed bug with retrieving a player's party members
|
||||||
|
= Fixed bug which caused a NPE when trying to join the party of a non-existing player or when ptp to a non-existing player
|
||||||
|
= Fixed bug which causes a NPE when trying to use /mcrefresh from the console
|
||||||
|
= Fixed bug where Carrots and Potatoes weren't awarding Herbalism XP.
|
||||||
|
= Fixed bug where some herbalism drops weren't properly shared within parties.
|
||||||
|
= Fixed bug where players wouldn't be able to pick up items if they logged our while Berserk was still active.
|
||||||
|
! Changed config node name for the skill experience modifiers from "Experience.Formula.Multiplier.[Skill]" to "Experience.Formula.Modifier.[Skill]"
|
||||||
|
! Updated localization files
|
||||||
|
! mcMMO abilities can no longer be activated while in Creative mode
|
||||||
|
! Expanded ChatAPI to allow toggling of chat states for users
|
||||||
|
! Updated to EMetrics 0.0.4-SNAPSHOT
|
||||||
|
- Removed deprecated functions from API classes.
|
||||||
|
- Removed functions for getting the PlayerProfile - using API classes is preferred, but if not the McMMOPlayer should be used instead
|
||||||
|
- Removed Ender Dragon, Wither, and Witch from granting combat experience and related configuration options
|
||||||
|
|
||||||
|
Version 1.4.03
|
||||||
|
+ Added option to advanced.yml to determine the # of enchant levels used when buffing Super Breaker & Giga Drill Breaker
|
||||||
|
+ Improved stats display for child skills
|
||||||
|
+ Added cooldown between using Chimaera Wings
|
||||||
|
= Fixed bug with '/party chat (on|off)' and '/partychat (on|off)' not working
|
||||||
|
= Fixed bug with Repair not decreasing enchanting levels properly
|
||||||
|
= Fixed bug with Smelting not properly tracking furnaces
|
||||||
|
= Fixed bug with Blast Mining not dropping blocks correctly
|
||||||
|
= Fixed bug with custom blocks not working
|
||||||
|
= Fixed bug with Blast Mining increasing TNT damage.
|
||||||
|
= Fixed bug where Blast Mining was awarding too much XP
|
||||||
|
= Fixed bug where triple drops would award twice the amount of experience in Herbalism and Mining
|
||||||
|
= Fixed bug where Green Thumb would consume wheat instead of seeds
|
||||||
|
= Fixed bug where Green Terra would consume twice the amount of seed when used on crops
|
||||||
|
= Fixed bug where experience would be awarded in Herbalism for some player-placed blocks
|
||||||
|
= Fixed bug where players were unable to salvage leather armor
|
||||||
|
= Fixed bug with repairing using materials with byte metadata
|
||||||
|
= Fixed bug where Fishing was becoming less successful at higher levels
|
||||||
|
= Fixed bug with using Salvage on stacked items.
|
||||||
|
= Fixed bug where the 'mcmmo.commands.ptp.world.all' was registered twice
|
||||||
|
= Fixed bug where Beast Lore wouldn't work on friendly pets
|
||||||
|
= Fixed bug where Deflect was calculated based on the attacker, not the defender. (We really did this time!)
|
||||||
|
= Fixed bug where Treefeller would not deal durability damage when the axe "splinters into dozens of pieces"
|
||||||
|
! Moved the Salvage unlock level from config.yml to advanced.yml
|
||||||
|
! Changed how Chimaera Wings are acquired, you need to craft them now. (By default, use 5 feathers in a shapeless recipe)
|
||||||
|
! Changed how Chimaera Wings teleport players to the spawnpoint, will now check if the location is safe
|
||||||
|
- Removed option to disable Salvage via the config file. This should be handled via permissions instead.
|
||||||
|
- Removed the option to use Woodcutting without an axe from the config file.
|
||||||
|
|
||||||
|
Version 1.4.02
|
||||||
|
+ Added API to get the skill and power level caps.
|
||||||
|
= Fixed bug where Deflect was calculated based on the attacker, not the defender
|
||||||
|
= Fixed bug where some skills weren't registering as unlocked until one level later
|
||||||
|
= Fixed bug where the PTP cooldown was being read improperly
|
||||||
|
= Fixed bug where /ptp <accept|toggle|acceptall> where broken
|
||||||
|
= Fixed ClassCastException relating to counter-attack with Swords
|
||||||
|
= Fixed issue with some skill activations not activating enough or activating too much
|
||||||
|
|
||||||
|
Version 1.4.01
|
||||||
|
= Fixed bug where trying to use /mctop or /xplock with the Smelting child skill caused NPEs
|
||||||
|
= Fixed bug where /mctop and /mcrank wouldn't show overall power levels for servers using Flatfile
|
||||||
|
= Fixed bug where Smelting would throw consistent errors due to offline players
|
||||||
|
= Fixed bug where repairing an mcMMO ability-buffed item with mcMMO repair could take the enchant but leave the lore tag
|
||||||
|
= Fixed bug where using '/party chat message...' would result in the first word of the message being printed repeatedly
|
||||||
|
= Fixed bug where the wrong flag was being set when taking damage
|
||||||
|
= Fixed bug where the PTP cooldown was set improperly
|
||||||
|
= Fixed bug where ptp permissions weren't being handled properly
|
||||||
|
= Fixed bug where Beast Lore wouldn't work
|
||||||
|
= Fixed bug where Chimaera Wing would always teleport to spawn, even when the player had a valid bed spawn location
|
||||||
|
= Updated locale files
|
||||||
|
|
||||||
|
Version 1.4.00
|
||||||
|
+ Added new Child Skill - Smelting!
|
||||||
|
+ Added a version check, admins will get notified when a new version is available!
|
||||||
|
+ Added new cancellable McMMOPlayerDisarmEvent for Citizens compatibility - fires whenever a player is disarmed.
|
||||||
|
+ Added config options for Hylian Luck skill
|
||||||
|
+ Added display values to Unarmed command for Iron Grip
|
||||||
|
+ Added '/party create <name>' command, use this to create a party
|
||||||
|
+ Added '/party disband' command, kicks out all members and deletes the party
|
||||||
|
+ Added '/ptp toggle' command, to disable party teleportation.
|
||||||
|
+ Added '/ptp accept' and '/ptp acceptall' commands
|
||||||
|
+ Added an automatic party kick when a party member has been offline for 7 days (default)
|
||||||
|
+ Added a permission to allow friendly fire in parties, both attacker and defender must have it for friendly fire to occur
|
||||||
|
+ Added timeout on party teleport requests
|
||||||
|
+ Added XP bonus for Archery based on distance from shooter to target
|
||||||
|
+ Added ability to config Hylian Luck drops through treasures.yml
|
||||||
|
+ Added party XP sharing, when more party members are near the share bonus increases.
|
||||||
|
+ Added vanilla XP boost for Fishing - includes permissions, config options, etc
|
||||||
|
+ Added particle effect for bleeding
|
||||||
|
+ Added methods to check if a player is in party or admin chat to the ChatAPI
|
||||||
|
+ Added /mcpurge functionality for Flatfile users
|
||||||
|
+ Added basic support for Mo' Creatures (and other entity mods) - specify mob info in entities.yml
|
||||||
|
+ Added Shears, Buckets, Fishing Rods, Flint & Steel, Carrot Sticks, and Bows to the list of items that can be Salvaged
|
||||||
|
+ Added the "wait" music disc to the default fishing treasures
|
||||||
|
+ Added "Chinese (Taiwan)" localization files (zh_TW)
|
||||||
|
+ Added '/hardcore' and '/vampirism' commands for toggling these modes on or off.
|
||||||
|
+ Added Block Cracker to Unarmed's Berserk, turn smooth brick into cracked smooth brick
|
||||||
|
+ Added config option to disable automatic zip backups.
|
||||||
|
+ Added particle effects for many abilities.
|
||||||
|
+ Added '/mcnotify' command to toggle ability notifications on/off
|
||||||
|
+ Added ability for config files to automatically update with new keys, and prune out old ones
|
||||||
|
+ Added config option to make .new config files instead over writing over old ones when updating
|
||||||
|
+ Added "Holy Hound" ability to Taming
|
||||||
|
+ Added "Shroom Thumb" ability to Herbalism
|
||||||
|
+ Added child.yml config file to choose parents for child skills
|
||||||
|
+ Added '/party itemshare <NONE | EQUAL | RANDOM>' command to choose party item share mode
|
||||||
|
+ Added '/party itemshare <loot | mining | herbalism | woodcutting> <true | false>' command to control items that are shared
|
||||||
|
+ Added itemweights.yml file to determine which items are more valuable for party itemshare
|
||||||
|
= Fixed Green Thumb on wheat not working properly at rank 4
|
||||||
|
= Fixed Green Thumb and Green Terra consuming twice the amount of seed needed
|
||||||
|
= Fixed Green Terra not also checking Green Thumb permissions
|
||||||
|
= Fixed bug where splash potions could raise a player's unarmed level
|
||||||
|
= Fixed bug where fired arrows could raise skill levels other than Archery
|
||||||
|
= Fixed /ptp telporting the target to the player, rather than the other way around.
|
||||||
|
= Fixed Impact reducing the durability of non-armor equipped blocks
|
||||||
|
= Fixed Impact reducing improperly the durability of armors (as a consequence it is now more effective)
|
||||||
|
= Fixed multiple commands not working properly on offline players
|
||||||
|
= Fixed /mmoedit not giving feedback when modifying another players stats
|
||||||
|
= Fixed the guide usage string showing up every time /skillname was called
|
||||||
|
= Fixed Spout not being able to precache our resources properly, and therefore making our XP bars fail
|
||||||
|
= Fixed Spout config files loading / generating when they shouldn't have
|
||||||
|
= Fixed mod config files loading / generating when they shouldn't have
|
||||||
|
= Fixed bug where Green Terra could activate on crops that weren't fully grown.
|
||||||
|
= Fixed several typos relating to locale string display
|
||||||
|
= Fixed bug where all skill guide headers appeared as "Skillname Guide Guide"
|
||||||
|
= Fixed bug where Impact was applied incorrectly due to an inverted method call
|
||||||
|
= Fixed bug where Impact improperly determined the defender's armor
|
||||||
|
= Fixed a bug which made it impossible to join other players' parties
|
||||||
|
= Fixed ArrayIndexOutOfBoundsException resulting from being unranked in a skill when using FlatFile
|
||||||
|
= Fixed Woodcutting accidentally using Mining double drop values.
|
||||||
|
= Fixed Hylian Luck not removing the block-placed flag from flowers.
|
||||||
|
= Fixed Hylian Luck not checking the block-placed flag on flowers.
|
||||||
|
= Fixed Leaf Blower not respecting the unlock level set in advanced.yml
|
||||||
|
= Fixed abilities activating with the wrong tool in hand
|
||||||
|
= Fixed Experience.Gains.Mobspawners.Enabled not being used correctly (the check was inverted)
|
||||||
|
= Fixed bug where Iron Grip was using the attacker's skill values rather than the defender's.
|
||||||
|
= Fixed a bug where /party kick would trigger the PartyChangeEvent for the wrong player
|
||||||
|
= Fixed /party kick not working on offline players
|
||||||
|
= Fixed a bug where party join messages weren't displayed
|
||||||
|
= Fixed a bug where a new party leader wasn't appointed, after the previous party leader left
|
||||||
|
= Fixed a bug where Disarm and Deflect had wrong values
|
||||||
|
= Fixed Magic Hunter (Fishing ability) favoring certain enchants
|
||||||
|
! Changed our custom chat events to be async
|
||||||
|
! Changed some config value key names regarding double drops and XP - make sure you copy any custom values to your new config after updating.
|
||||||
|
! Changed Green Terra blocks to be determined via permissions instead of the config file
|
||||||
|
! Config files are now backed up even when running in SQL mode
|
||||||
|
! Changed /p and /a to use /partychat and /adminchat as the default command name. The use of /p, /pc, /a, and /ac is still supported.
|
||||||
|
! We're now using Bukkit sounds instead of Spout sounds.
|
||||||
|
! It is now possible to use a negative number for Max_Level in treasures.yml to not use a maximum level, changed default file accordingly
|
||||||
|
! A Fishing catch will now always contains a fish even if a treasure is found
|
||||||
|
! Changed how Berserk handles not picking up items to avoid listening to PlayerPickupItemEvent
|
||||||
|
! Moved Hylian Luck into a separate listener since it actually cancels the event and shouldn't just be on MONITOR.
|
||||||
|
! Changed how Tree Feller is handled, it should now put less stress on the CPU
|
||||||
|
! Changed Tree Feller to work on huge mushrooms
|
||||||
|
! Changed Fisherman's Diet and Farmer's Diet to use two seperate config values
|
||||||
|
! Major refactoring - please take note, this WILL break any mcMMO-related plugin not properly hooking into the API.
|
||||||
|
! Changed the way party commands work, use /party ? to check how to use the new commands
|
||||||
|
! Changed McMMOChatEvent to contain the plugin that the event originated from.
|
||||||
|
! Changed Excavation to have individual XP values for each block type, rather than a base XP value.
|
||||||
|
! Changed the way party teleportation works. When using /ptp, the target player needs to confirm the teleport before it takes place. (Configurable)
|
||||||
|
! Changed BeastLore: Now also displays offline player names
|
||||||
|
! Changed backup task to include ALL config files
|
||||||
|
! Deprecated most functions in ExperienceAPI, replaced them with identical versions that use a String for the SkillName rather than the SkillType enum values
|
||||||
|
! Changed Super Breaker & Giga Drill Breaker to be an enchantment-based boost, rather than an instabreak. Option exists in hidden.yml to change this to an potion-based buff.
|
||||||
|
! Changed locales to fall back on English when translated strings cannot be found.
|
||||||
|
- Removed Party "master/apprentice" system. Replaced with the new party XP share feature.
|
||||||
|
- Removed unused "healthbar" files from the resources
|
||||||
|
- Removed config options for disabling commands from the config.yml. This should instead be done through permissions.
|
||||||
|
- Removed /mcc command. Replaced with /mcmmo [?|help|commands]
|
||||||
|
- Removed options to allow Mining & Excavation without a tool due to the changes to their abilities
|
||||||
|
|
||||||
|
Version 1.3.14
|
||||||
|
+ Added new Hylian Luck skill to Herbalism.
|
||||||
|
= Fixed a memory leak involving mob tracking
|
||||||
|
- Removed extra durability loss from Leaf Blower
|
||||||
|
|
||||||
|
Version 1.3.13
|
||||||
|
+ Added task & command to prune old and powerless users from the SQL database.
|
||||||
|
+ Added Craftbukkit 1.4.6 / 1.4.7 compatibility
|
||||||
|
+ Added new /mcrank command for showing a players leader board ranking for all skills in one place
|
||||||
|
+ Added a configurable durability cap for ArmorImpact to advanced.yml
|
||||||
|
+ Added the version number to /mcmmo
|
||||||
|
+ Added bats, giants, witches, withers, and wither skeletons to the mcMMO combat experience list, and makes their experience drops configurable
|
||||||
|
+ Added the ability to track mobs spawned by mob spawners or the Taming ability when the chunks they are in unload and reload
|
||||||
|
+ Added wooden button to the list of items that shouldn't trigger abilities
|
||||||
|
+ Added a new feature to fishing. Players will have +10% chance of finding enchanted items when fishing while it's raining
|
||||||
|
+ Added displaying bonus perks on skill commands
|
||||||
|
+ Added config option to disable gaining Acrobatics XP from dodging lightning
|
||||||
|
+ Added missing skill guides. They're finally here!
|
||||||
|
+ Added more localization
|
||||||
|
+ Added a very secret easter egg
|
||||||
|
= Fix issue with Sand/Gravel tracking
|
||||||
|
= Fix possible NPE when using the PartyAPI to add a player to a party that doesn't exist.
|
||||||
|
= Fix mcremove command for mySQL
|
||||||
|
= Fix a java.io.FileNotFoundException when using SQL
|
||||||
|
= Impact now works with mobs wearing armor
|
||||||
|
= Fixed issue with Tree Feller dropping player-placed blocks
|
||||||
|
= Fixed issue with missing default cases from several switch/case statements
|
||||||
|
= Fixed issue with Mining using actual skill level rather than max skill level
|
||||||
|
= Fixed some issues with static access
|
||||||
|
= Fixed ItemStack deprecation issues
|
||||||
|
= Fixed Async deprecation issues
|
||||||
|
= Fixed a bug with MySQL databases (non-alphanumeric characters preventing MySQL access)
|
||||||
|
= Fixed a bug where the /skillreset command was broken
|
||||||
|
= Fixed a bug where skill commands displaying .x% instead of 0.x%
|
||||||
|
= Fixed a bug Unbreaking enchantments being ignored when using Treefelling and when hit by Armor Impact
|
||||||
|
= Fixed a bug where only 1 diamond was needed to fully repair a broken item: Repaired the Repair skill!
|
||||||
|
= Fixed a bug where a infinite loop of errors caused by mySQL database could cause the server to crash
|
||||||
|
= Fixed a bug where PartyChangeEvent was fired even when a player isn't able to change parties
|
||||||
|
= Fixed a bug which caused advanced.yml not to work for Swords
|
||||||
|
= Fixed a bug which caused advanced.yml not to respect every MaxChance node
|
||||||
|
= Fixed a bug where GreenThumb_StageChange wasn't read from advanced.yml
|
||||||
|
= Fixed a bug where Repair would remove enchantments but the glow effect remained
|
||||||
|
= Fixed a bug where dropped items did not retain custom NBT data
|
||||||
|
= Fixed a bug which caused a potentially infinite recursion in a btree structure
|
||||||
|
= Fixed a NPE with custom blocks
|
||||||
|
= Fixed a bug with Blast Mining never dropping debris blocks
|
||||||
|
= Fixed a bug with Blast Mining incorrectly handling reduced TNT damage
|
||||||
|
= Fixed a bug with conflicting fishing enchantments
|
||||||
|
= Fixed a bug where triple drops wouldn't happen
|
||||||
|
= Fixed a bug which caused fishing to ignore max/min levels in treasures.yml
|
||||||
|
= Fixed a bug where treefeller affected player-placed blocks
|
||||||
|
= Fixed bug where Skull Splitter would be applied twice.
|
||||||
|
! GJ stopped being a lazy slacker and got stuff done
|
||||||
|
! Nossr50 actually committed something
|
||||||
|
! Changed code that uses SpoutPlugin to make it compatible with the latest version
|
||||||
|
! Reimplemented skill level and power level caps.
|
||||||
|
! Moved Arcane Forging and Fishing setting from config.yml to advanced.yml
|
||||||
|
! Overall SQL query improvements
|
||||||
|
! Reduced number of SQL queries for mcTop command from 11 to 1, speeding it up immensely
|
||||||
|
! Changed FFS Leaderboards to hold information in memory rather than doing IO work (optimizations)
|
||||||
|
! Improved chunk conversion (less errors)
|
||||||
|
! Changed Fishing Treasure Hunter, chance has increased and now actually is level dependent
|
||||||
|
! Indexed most used mySQL columns for faster queries
|
||||||
|
- Removed dead code relating to null profiles
|
||||||
|
- Removed unused imports
|
||||||
|
- Removed ChunkletUnloader and dependents, since they are no longer necessary.
|
||||||
|
|
||||||
|
Version 1.3.12
|
||||||
|
+ Added Craftbukkit 1.4.5 compatibility
|
||||||
|
+ Added the new 1.3.2 items, xp and double drops for Cocoa beans & Emeralds, EnderChest to the list of blocks that shouldn't trigger abilities
|
||||||
|
+ Added new items from Minecraft 1.4 to Herbalism (potatoes & carrots)
|
||||||
|
+ Added new configuration file for advanced users.
|
||||||
|
+ Added new permission nodes to greenthumb for the 1.4 items
|
||||||
|
+ Added new mobs from Minecraft 1.4 checks for every ability
|
||||||
|
+ Added new active ability for Repair: Salvage
|
||||||
|
+ Added options to 'config.yml' configure shake chance
|
||||||
|
+ Added the option to negate experience earned for Herbalism while in a minecart to prevent afk leveling
|
||||||
|
+ Added Green thumb now converts cobble walls to mossy cobble walls
|
||||||
|
+ Added beacons and anvils to list of blocks that don't trigger abilities
|
||||||
|
+ Added a configuration option to disable experience gains when in a minecraft for Acrobatics and Herbalism, to prevent AFK leveling
|
||||||
|
+ Added a new passive ability for Fishing, Fishermans diet. Increases hunger restored from fish
|
||||||
|
+ Added a feature to display all active perks on login
|
||||||
|
! Changed Fishing, Shake drops changed from guaranteed to based upon fishing level and perks
|
||||||
|
! Changed Woodcutting, the amount of experience earned when using Tree Feller on jungle trees has increased
|
||||||
|
! Changed Herbalism double drop rates for melons and netherwart
|
||||||
|
! Changed filesystem usage, it's reduced a lot. Should help reduce lag on larger servers
|
||||||
|
! Changed database connection handling. Support for aggressive connection timeouts, with exponential backoff for multiple failures
|
||||||
|
! Changed Cobblestone walls are now mossy-able with Greenthumb
|
||||||
|
! Changed the skull drop rates of the shake ability to 3%
|
||||||
|
= Fixed a NPE when Citizens perform certain tasks
|
||||||
|
= Fixed a NPE with Woodcutting, excessive null chunk before earning Woodcutting experience
|
||||||
|
= Fixed a NPE related to skill cooldowns
|
||||||
|
= Fixed a NPE when a players profile was null
|
||||||
|
= Fixed a NPE involving certain explosions
|
||||||
|
= Fixed a dupe bug when for players who were using a 'nuker' client
|
||||||
|
= Fixed a dupe bug where pistons were used to dupe ores
|
||||||
|
= Fixed a dupe bug with Salvage when players were in Creative mode
|
||||||
|
= Fixed a bug where the player was displayed an incorrect cooldown time
|
||||||
|
= Fixed a bug where players could earn experience when they were dealing 0 damage
|
||||||
|
= Fixed a bug where players could get double drops from mossified Cobblestone
|
||||||
|
= Fixed a bug where Herablism magically converted potatoes to carrots
|
||||||
|
= Fixed a bug where you couldn't modify the stats of offline players
|
||||||
|
= Fixed a bug where treefeller didn't work properly on tree's with side-way logs
|
||||||
|
= Fixed a bug where the Arcane forging downgrade chance should've been 0, but actually wasn't
|
||||||
|
= Fixed a bug where Fishing would sometimes give items with empty enchantments
|
||||||
|
= Fixed a bug where the lucky perk for Fishing was actually an unlucky perk
|
||||||
|
- Removed nothing
|
||||||
|
|
||||||
|
Version 1.3.11
|
||||||
|
! Changed axes to start with 1 durability damage instead of 5, gain 1 durability damage every 50 levels instead of 30, and only have a 25% chance on hit to damage armor (per armor piece)
|
||||||
|
+ Added compatibility with bow-wielding NPCs from Citizens/NPC mods
|
||||||
|
+ Added compatibility for pvp-prevention plugins for Serrated Strikes
|
||||||
|
= Fixed bug where mcMMO could throw NPE errors if trees cut down were from a custom mod and had an id of 17
|
||||||
|
= Fixed dupe bug where mcMMO would ignore other block-protection plugins for various abilities
|
||||||
|
= Fixed NPE with hardcore mode's vampirism
|
||||||
|
|
||||||
|
Version 1.3.10
|
||||||
|
+ Added 1.3.1 compatibility
|
||||||
|
+ Added permission node for Iron Grip ability (mcmmo.ability.unarmed.irongrip)
|
||||||
|
+ Added ability for custom blocks to drop a range of items.
|
||||||
|
+ Added Ability API functions
|
||||||
|
+ Added 50% & 150% XP boost perks
|
||||||
|
+ Added "lucky" perk for donors
|
||||||
|
= Fixed /inspect not working on offline players
|
||||||
|
= Fixed custom blocks, tools and armors not loading properly
|
||||||
|
= Fixed duplication bug with sticky pistons
|
||||||
|
= Fixed "GenericLabel belonging to mcMMO..." message
|
||||||
|
= Fixed menu exit button not working
|
||||||
|
= Fixed Repair enchant downgrade not working
|
||||||
|
= Fixed NPE caused by Spout players after a /reload
|
||||||
|
= Fixed ConcurrentModificationException on world unload
|
||||||
|
= Fixed players never being removed from memory (memory leak)
|
||||||
|
= Fixed admin chat being seen by everyone
|
||||||
|
= Fixed issue with UTFDataFormatException occurring on occasion when trying to load Chunklets
|
||||||
|
= Fixed ArrayIndexOutOfBounds error caused when trying to use /xplock after logging in but before gaining XP
|
||||||
|
= Fixed custom tools not properly respecting the Ability_Enabled flag.
|
||||||
|
= Fixed "lower tool" messages still being displayed even when ability messages are disabled.
|
||||||
|
= Fixed custom blocks not dropping the proper item with Super Breaker when Silk Touch is used
|
||||||
|
= Fixed custom woodcutting blocks throwing errors.
|
||||||
|
= Fixed possible ClassCastException from catching something other than a mob when using the Shake Mob skill
|
||||||
|
! Changed the format by which Chunklets are stored to be much smaller, and much faster to load
|
||||||
|
! Optimized how player placed blocks are tracked
|
||||||
|
|
||||||
|
Version 1.3.09
|
||||||
|
+ Added compatibility with AntiCheat (Which I highly recommend to prevent cheating)
|
||||||
|
+ Added several permission nodes to give individual users special perks (Double/Triple/Quadruple XP)
|
||||||
|
+ Added reduced cooldown permission nodes as special perks (1/4, 1/3, 1/2 cooldown)
|
||||||
|
+ Added increased activation time permissions nodes as special perks (+4, +8, and +12 seconds)
|
||||||
|
+ Added API for plugins to add custom tools directly via Spout - repair / abilities do not work ATM
|
||||||
|
+ Added offline party members to the list displayed by /party
|
||||||
|
+ Added possibility to kick offline members from parties
|
||||||
|
= Fixed bug that would cause a NPE for players that had no parties
|
||||||
|
= Fixed Vampirism not notifying the correct amount of stolen levels
|
||||||
|
= Fixed bug with Acrobatics not saving you from deadly falls
|
||||||
|
= Fixed /mcremove being applied only after a reload
|
||||||
|
= Fixed Archery PVE disablement not working properly
|
||||||
|
= Fixed possible NPE when a projectile is shot by a dispenser or doesn't have any shooter
|
||||||
|
= Fixed issue with NoCheatPlus and Serrated Strikes / Skull Splitter (fight.noswing)
|
||||||
|
= Fixed tiny memory leak concerning Archery
|
||||||
|
= Fixed bug where you could receive Archery XP from Potions
|
||||||
|
= Fixed bug where Chunklets for the < 64 y coordinates would not be properly loaded
|
||||||
|
= Fixed exploit with block duplication via piston pushing
|
||||||
|
= Fixed bug with falling sand/gravel not being tracked
|
||||||
|
= Fixed bug with Tree Feller not working with custom axes
|
||||||
|
= Fixed bug with locale strings when trying to teleport to a non-existent player
|
||||||
|
= Fixed bug with Tree Feller changing durability before checking for axe splintering
|
||||||
|
= Fixed bug with Repair Mastery permission due to typo
|
||||||
|
= Fixed bug with repairing items that use metadata
|
||||||
|
= Fixed bug with Chunklets not being reloaded on /reload
|
||||||
|
= Fixed possible NPE when falling with no item in hand
|
||||||
|
! API methods can now only be used in a static way
|
||||||
|
! Arrows shot from a bow having the Infinity enchantment can no longer be retrieved
|
||||||
|
! Arrows that aren't shot by an entity are now able to be dodged (currently only from dispensers)
|
||||||
|
! Changed Spout settings to be in their own config file (spout.yml)
|
||||||
|
! Changed file format for parties (parties.yml), previous files are no longer used
|
||||||
|
! Changed mcMMO to inform on corrupt Chunklets and make new ones
|
||||||
|
|
||||||
|
Version 1.3.08
|
||||||
|
+ Added more notifications about Vampirism and Hardcore mode on player death
|
||||||
|
+ Added information about Hardcore mode when joining a server running Hardcore mode
|
||||||
|
+ Added new hidden.yml inside the jar for very sensitive config options for advanced users
|
||||||
|
+ Added option to disable Chunklets for servers which do not have doubledrops and do not care about xp farming
|
||||||
|
+ Added new "Max_Seconds" setting in config.yml to limit the max time of abilities
|
||||||
|
+ Added new repair configs to allow customization of the repair skill
|
||||||
|
+ Added message to inform users about hardcore mode on login
|
||||||
|
= Fixed exploit where you could gain tons of Acrobatics XP from spamming Ender Pearls
|
||||||
|
= Fixed normal pistons marking a block as user-placed on retract if it wasn't a sticky piston (thanks turt2live!)
|
||||||
|
= Fixed handling of the Unbreaking enchantment so that tools are actually damaged as they should now
|
||||||
|
= Fixed hurting pet cats with serrated strikes
|
||||||
|
! Changed Hardcore Vampirism to require the victim to have at least half the skill level of the killer in order for vampirism to proc (this is to avoid exploitation)
|
||||||
|
! Changed Hardcore Vampirism to steal a minimum of 1 skill level from a player no matter the percentage
|
||||||
|
! Changed Hardcore & Vampirism to not be executed if percentages were set to zero or below
|
||||||
|
! Changed Vampirism to actually remove stats from the victim
|
||||||
|
! Changed Vampirism to inform the victim of their stat loss
|
||||||
|
! Changed Mining to allow Silk Touch to work again since the dupe exploit has been fixed.
|
||||||
|
! Changed Metrics to also report if the server uses plugin profiling
|
||||||
|
- Removed level and item settings from Repair skill in config.yml
|
||||||
|
|
||||||
|
Version 1.3.07
|
||||||
|
+ Added ability to gain XP from custom blocks. Enable custom blocks in the config file, then enter the data in the blocks.yml file.
|
||||||
|
+ Added ability to gain XP with custom tools. Enable custom tools in the config file, then enter the data in the tools.yml file.
|
||||||
|
+ Added ability to repair custom tools. Enable custom tools in the config file, then enter the data in the tools.yml file.
|
||||||
|
+ Added ability to repair custom armor. Enable custom armor in the config file, then enter the data in the armor.yml file.
|
||||||
|
+ Added functionality which makes a new folder in all world files "mcmmo_data" to store player placed block information in
|
||||||
|
+ Added new configurable Hardcore mode functionality to mcMMO
|
||||||
|
+ Added new configurable Vampirism PVP stat leech for Hardcore mode
|
||||||
|
+ Added new bypass permission node for the negative penalties of Hardcore mode 'mcmmo.bypass.hardcoremode'
|
||||||
|
+ Added configurable level curve multiplier which allows for tweaking the steepness of the XP needed to level formula
|
||||||
|
+ Added a permission node for Archery bonus damage
|
||||||
|
+ Added a permission node for Greater Impact ability
|
||||||
|
+ Added permission nodes for Treasure & Magic Hunter for Fishing
|
||||||
|
+ Added a permission node for Farmer's Diet
|
||||||
|
+ Added config options for enabling/disabling specific double drops
|
||||||
|
+ Added automatic zip backup of flatfile database & config files
|
||||||
|
+ Added config options to enable/disable specific skills for PVP & PVE
|
||||||
|
= Fixed bug where Tree Feller was looking at the wrong blocks for determining how much to take down.
|
||||||
|
= Fixed bug where Green Terra consumed seeds even on Mossy Stone Brick
|
||||||
|
= Fixed bug where the client didn't reflect the Stone Brick to Mossy Stone Brick change
|
||||||
|
= Fixed bug where an arrow could bounce off entities on daze proc
|
||||||
|
= Fixed bug where a player could gain Acrobatics experience while riding a cart
|
||||||
|
= Fixed /party not working properly with 2 arguments
|
||||||
|
= Fixed /party not showing properly the member list
|
||||||
|
= Fixed /ability not checking the right permission
|
||||||
|
= Fixed rare NPE on /party command
|
||||||
|
= Fixed Arrow Retrieval dropping only one arrow
|
||||||
|
= Fixed /p and /a incompatibilities with bChatManager
|
||||||
|
= Fixed Iron Grip working reversely
|
||||||
|
= Fixed NPE when user clicked the HUD button with Spout
|
||||||
|
= Fixed bug where the permission node for Impact didn't work
|
||||||
|
= Fixed some bypass nodes defaulting true for Ops
|
||||||
|
= Fixed bug with trying to use Chimera Wing while standing on a half-block
|
||||||
|
= Fixed duplication bug when a placed block was mined after a server restart
|
||||||
|
= Fixed exploit where shooting yourself with an arrow gave Archery XP
|
||||||
|
! Changed the mcMMO motd to link to the new website rather than the wiki
|
||||||
|
! Changed bleeding ticks damage to 1 from 2
|
||||||
|
! Changed Mining to ignore blocks when the pick is enchanted with Silk Touch
|
||||||
|
! Changed Super Breaker to be non-functional when used with a Silk Touch enchanted pick
|
||||||
|
! Changed MySQL to save player information 50ms apart from each other to reduce the load on the MySQL server
|
||||||
|
! Changed the permission node for Blast Mining detonation to mcmmo.ability.blastmining.detonate (was mcmmo.skills.blastmining) for the sake of consistency
|
||||||
|
! Changed skill commands to only display what you have permissions for
|
||||||
|
! Changed mcMMO to use a new storage system for player placed blocks
|
||||||
|
- Removed some unused permission nodes
|
||||||
|
- Removed a few config options in favor of permissions nodes (Hunger Bonus, Armor/Tool Repair, Instant Wheat Regrowth)
|
||||||
|
- Removed level requirement for repairing string tools from the config file
|
||||||
|
|
||||||
|
Version 1.3.06
|
||||||
|
+ Added Iron Golem XP for aggressive golems
|
||||||
|
+ Added permissions check to skill functions
|
||||||
|
+ Added API functions for obtaining offline profiles & profiles via player names
|
||||||
|
+ Added API functions for admin & party chat
|
||||||
|
+ Added Iron Grip skill to Unarmed which gives players an chance to keep from being disarmed.
|
||||||
|
+ Added some new languages to the locale files.
|
||||||
|
= Fixed Green Thumb consuming 2 seeds instead of 1
|
||||||
|
= Fixed exploit where you could teleport to yourself with PTP to prevent things like fall damage
|
||||||
|
= Fixed NPE error with Metrics on startup
|
||||||
|
= Fixed bug where Herbalism required double drops permission to give XP
|
||||||
|
= Fixed bug where {0} would be displayed in front of your power level in mcstats
|
||||||
|
= Fixed mmoupdate not being useable from console
|
||||||
|
= Fixed bug with repairing wooden tools
|
||||||
|
= Fixed bug with Nether Wart not awarding XP
|
||||||
|
= Fixed bug with fishing treasures when treasures list is empty
|
||||||
|
= Fixed bug with only getting one level when there was enough XP for multiple levels.
|
||||||
|
= Fixed bugs with the way /mctop displayed
|
||||||
|
= Fixed issues with custom characters & locale files.
|
||||||
|
= Fixed double explosion for Blast Mining
|
||||||
|
= Fixed Blast Mining not giving triple drops when it should
|
||||||
|
! Changed Bleeding to now stack to a finite number on Monsters and will wear off eventually
|
||||||
|
! Changed how we handled the config file to prevent any bugs when returning values
|
||||||
|
! Changed locale files to use a new naming scheme. This breaks ALL old locale files. If you want to assist with re-translating anything, go to getlocalization.com/mcMMO
|
||||||
|
! Changed /mcremove to check for users in the MySQL DB before sending queries to remove them
|
||||||
|
! Changed how the tree feller threshold worked for the better
|
||||||
|
! Changed /mcremove to no longer kick players when they are removed from database
|
||||||
|
! Changed /mcremove to work on offline users for FlatFile
|
||||||
|
! Changed PlayerProfile constructor to always take a boolean
|
||||||
|
! Changed getPlayerProfile function to work for online & offline users
|
||||||
|
! Changed Archery's Daze to deal 4 DMG on proc (2 Hearts)
|
||||||
|
! Changed /addlevel command to work for offline users
|
||||||
|
! Changed party & admin chat handling to be nicer to developers
|
||||||
|
! Changed /mcrefresh to work from console
|
||||||
|
! Changed /mcrefresh to work for offline players
|
||||||
|
! Changed UpdateXPBar function to hopefully avoid errors
|
||||||
|
! Changed /party to show offline party members
|
||||||
|
! Changed Blast Mining requirements, now asks for the player to be crouching
|
||||||
|
|
||||||
|
Version 1.3.05
|
||||||
|
+ Added Skill Shot to Archery which increases damage dealt by 10% every 50 skill levels (caps at 200%)
|
||||||
|
+ Added ExperienceAPI and PartyAPI classes for developer use
|
||||||
|
+ Added ability to cap overall power level
|
||||||
|
+ Added showing powerlevel below a persons name if you run Spout (optional)
|
||||||
|
= Fixed errors when Spout would disable itself after start-up
|
||||||
|
= Fixed XP bar not updating when XP was gained
|
||||||
|
= Fixed bug with repairing wooden tools
|
||||||
|
= Fixed bug where spawned wolves only had 8 health.
|
||||||
|
= Fixed bug where rare Treasures from Excavation were dropping too often
|
||||||
|
= Fixed bug where Skull Splitter & Serrated Strikes could be used without permissions.
|
||||||
|
= Fixed bug where API functions were set to static
|
||||||
|
= Fixed bug where mmoedit threw errors when modifying an offline user
|
||||||
|
= Fixed dupe exploit with Blast Mining
|
||||||
|
! Changed Tree Feller to account for ability durability loss but not leaves.
|
||||||
|
! Changed bypass node for Arcane Forging to not default to true for OPs
|
||||||
|
- Removed Ignition from Archery
|
||||||
|
- Removed McMMOPlayerRepairEvent - was basically a duplicate of McMMOPlayerRepairCheck but couldn't be cancelled.
|
||||||
|
|
||||||
|
Version 1.3.04
|
||||||
|
+ Added McMMOPlayerRepairEvent for API usage - fires after completion of a repair.
|
||||||
|
+ Added McMMOPlayerRepairCheckEvent for API usage - fires before repair process begins, can be cancelled.
|
||||||
|
+ Added ability to get skill level from McMMOPlayerExperience events
|
||||||
|
+ Added McMMOPartyTeleportEvent for API usage - fires before a successful teleportation would occur.
|
||||||
|
+ Added McMMOPartyChangeEvent for API usage - fires whenever a player joins or leaves a party
|
||||||
|
= Fixed Shake ability dropping bonemeal instead of ink for squids.
|
||||||
|
= Fixed Green Terra & Super Breaker awarding 4x drops at high levels.
|
||||||
|
= Fixed summoned ocelots never changing skins.
|
||||||
|
= Fixed bug with Disarm not working
|
||||||
|
= Fixed some API functions not being visible
|
||||||
|
= Fixed bug where /ptp worked on dead party members
|
||||||
|
! Changed MySQL to reload all player information on reconnection
|
||||||
|
! Changed event package structure - be sure to update these if you're using the API in your plugin
|
||||||
|
|
||||||
|
Version 1.3.03
|
||||||
|
+ Added Ocelots to Taming XP tables
|
||||||
|
+ Added ability to summon Ocelots with Call of the Wild
|
||||||
|
+ Added offline user functionality to mmoedit
|
||||||
|
+ Added bookshelves to list of blocks that don't trigger abilities.
|
||||||
|
+ Added 'mcmmo.repair.arcanebypass' permission node to bypass Arcane Repair and keep your enchantments
|
||||||
|
+ Added config option to disable Herbalism's instant wheat replanting
|
||||||
|
+ Added LOTS of new permissions nodes. *CHECK PLUGIN.YML FOR UPDATES*
|
||||||
|
+ Added Italian locale file - thanks Luxius96!
|
||||||
|
+ Added ability to inspect Ocelots with Beast Lore
|
||||||
|
+ Added console functionality to mctop
|
||||||
|
= Fixed Green Terra not awarding Triple Drops
|
||||||
|
= Fixed ClassCastException from Taming preventDamage checks
|
||||||
|
= Fixed issue with Blast Mining not seeing TNT for detonation due to snow
|
||||||
|
= Fixed issue with block interaction returning NPEs
|
||||||
|
= Fixed issue where every block broken had a mining check applied
|
||||||
|
= Fixed issue where every block broken had a herbalism check applied
|
||||||
|
= Fixed issue where blocks weren't being removed from the watchlist
|
||||||
|
= Fixed exploit where you could use /ptp to teleport to anyone
|
||||||
|
= Fixed bug where Green Terra didn't work on Stone Brick
|
||||||
|
= Fixed bug where Tree Feller could be used without permissions
|
||||||
|
= Fixed exploit where falling sand & gravel weren't tracked
|
||||||
|
= Fixed exploit where Acrobatics could be leveled via Dodge on party members.
|
||||||
|
= Fixed exploit where you could gain combat XP on animals summoned by Call of the Wild
|
||||||
|
! Changed mcMMO to save profiles only when the profile is about to be discarded rather than on player quit
|
||||||
|
! Changed MySQL to try to reconnect every 60 seconds rather than infinitely which caused server hangs
|
||||||
|
! Changed mcMMO to be better about saving player information on server shutdown
|
||||||
|
! Changed PTP to prevent teleporting if you've been hurt in the last 30 seconds (configurable)
|
||||||
|
! Changed Chimera Wing failure check to use the maxWorldHeight.
|
||||||
|
! Changed inspect failed message to say inspect rather than whois
|
||||||
|
! Changed Call of the Wild to activate on left-click rather than right-click
|
||||||
|
! Changed Blast Mining to track based on Entity ID vs. Location
|
||||||
|
! Changed mmoedit to save a profile when used (this will make mctop update)
|
||||||
|
! Changed a few Runnable tasks to have their own classes
|
||||||
|
! Changed parties so that a player will leave their existing party if they enter a world where they don't have party permissions.
|
||||||
|
! Changed Call of the Wild to summon animals already tamed.
|
||||||
|
! Changed mob spawner tracking to use new Metadata API
|
||||||
|
! Changed block watch list to use new Metadata API
|
||||||
|
! Changed around a few config options, including the ones for mySQL. *YOU NEED TO REDO YOUR CONFIG FILE*
|
||||||
|
- Removed 'true/false' debug message from Inspect command
|
||||||
|
|
||||||
|
Version 1.3.02
|
||||||
|
+ Added in game guides for Mining, Excavation, and Acrobatics. Simply type /skillname ? to access them
|
||||||
|
! Changed Tree Feller to hand out 1/4 of normal XP for each JUNGLE LOG block it fells
|
||||||
|
! Changed Tree Feller to only fell trees if you have enough durability
|
||||||
|
! Changed Tree Feller to cause injury if your axe splinters from a failed Tree Feller attempt
|
||||||
|
! Changed invincibility checks in EntityDamage listeners to accommodate for vanilla MC behaviour
|
||||||
|
! Changed Ignition to add fire ticks rather than replacing them.
|
||||||
|
! Changed Axes critical to have a max critical rate of 37.5% down from 75%
|
||||||
|
= Fixed bug where Taming defensive checks got called twice
|
||||||
|
= Fixed Shake not working correctly
|
||||||
|
= Fixed bug with Axes command displaying wrong Greater Impact bonus damage
|
||||||
|
= Fixed bug where Impact didn't apply bonus damage
|
||||||
|
= Fixed Impact proccing multiple times in a row
|
||||||
|
= Fixed bug where PVE skills didn't level
|
||||||
|
|
||||||
|
Version 1.3.01
|
||||||
|
= Fixed bug where Tree Feller had no cooldown
|
||||||
|
= Fixed bug with activating Skull Splitter after using Tree Feller
|
||||||
|
|
||||||
|
Version 1.3.00
|
||||||
|
+ Added ability to customize drops for Excavation skill (treasures.yml)
|
||||||
|
+ Added ability to customize drops for Fishing skill (treasures.yml)
|
||||||
|
+ Added messages to nearby players when your abilities wear off
|
||||||
|
+ Added jungle trees to Woodcutting XP tables
|
||||||
|
+ Added player notification for when they stop Bleeding
|
||||||
|
+ Added configuration option to control mcMMO reporting damage events
|
||||||
|
+ Added hunger regain bonuses to Herbalism skill
|
||||||
|
+ Added Blast Mining subskills to Mining
|
||||||
|
+ Added Fast Food Service subskill to Taming
|
||||||
|
+ Added size limit to Tree Feller in config as Tree Feller Threshold
|
||||||
|
+ Added /inspect (works on offline players)
|
||||||
|
+ Added /addlevels commands
|
||||||
|
+ Added /mcremove command which lets you remove users from MySQL or FlatFile
|
||||||
|
+ Added config values for XP multipliers for different hostile mobs
|
||||||
|
+ Added 'mcmmo.commands.inspect' permission node for the new /inspect command
|
||||||
|
+ Added Impact & Greater Impact subskills to Axes
|
||||||
|
+ Re-added mcMMO reporting damage events
|
||||||
|
= Fixed bug with updating MySQL tables to include fishing on servers using custom table prefixes
|
||||||
|
= Fixed bug where Disarm didn't work at all ever
|
||||||
|
= Fixed bug where Swords command showed Bleed Length twice instead of Bleed Chance
|
||||||
|
= Fixed bug where Tree Feller wasn't checking for Tree Feller permission
|
||||||
|
= Fixed bug where Leaf Blower required Tree Feller permissions rather than Woodcutting permissions
|
||||||
|
= Fixed Leaf Blower preventing the use of shears to collect leaves
|
||||||
|
= Fixed Green Thumb & Green Terra not consuming or requiring seeds to replant Wheat
|
||||||
|
= Fixed Super Breaker & Giga Drill Breaker failing to damage tools
|
||||||
|
= Fixed Tree Feller not giving proper XP for different kinds of trees
|
||||||
|
= Fixed Skill Abilities conflicting with NoCheat
|
||||||
|
= Fixed memory leak with mob spawner tracking
|
||||||
|
= Fixed /mcability not respecting permissions
|
||||||
|
= Prettied up new config files
|
||||||
|
= Various skill function optimizations
|
||||||
|
! Changed how mcMMO calculates distance between two points (optimizations)
|
||||||
|
! Changed how mcMMO handles MySQL connections (optimizations)
|
||||||
|
! Changed the description /mcmmo provides to be more up to date and relevant
|
||||||
|
! Changed mcMMO user information to be stored for 2 minutes after log out to reduce lag on rejoins
|
||||||
|
! Changed Food+ to be named Farmer's Diet in Herbalism
|
||||||
|
! Changed default values of Woodcutting XP tables
|
||||||
|
! Changed 'Pine' to be renamed 'Oak' in Woodcutting XP tables
|
||||||
|
! Changed the name of Unarmed Apprentice/Mastery to Iron Arm Style
|
||||||
|
! Changed Axes to gain bonus damage every 50 skill levels
|
||||||
|
! Changed Unarmed to start with a +3 DMG (1 Heart = 2 DMG) bonus from Iron Arm Style to make leveling it more viable
|
||||||
|
! Changed Unarmed to gain bonus damage every 50 skill levels
|
||||||
|
! Changed Unarmed to gain more bonus damage total than before
|
||||||
|
! Changed Unarmed to have a max disarm chance of 33.3% rather than 25%
|
||||||
|
! Changed Tree Feller to take down entire trees
|
||||||
|
! Changed mob spawn tracking to use Unique Entity ID instead of Entity Object
|
||||||
|
! Changed stats command name to mcstats for better plugin compatibility
|
||||||
|
! Changed god mode to turn off if player enters world where he does not have mcgod permission
|
||||||
|
! Changed Taming to also gain XP from animal taming
|
||||||
|
! Changed Swords Bleeding effect to never kill
|
||||||
|
! Changed Bleeding to never go beyond 10 ticks
|
||||||
|
! Changed to use Bukkit's built-in ignoreCancelledEvents system
|
||||||
|
! Changed chat logging for /p & /a
|
||||||
|
! Changed Tree Feller to use per-use ArrayList
|
||||||
|
- Removed /mcstats console functionality
|
||||||
|
- Removed /whois command (replaced with /inspect which has similar functionality)
|
||||||
|
- Removed Master/Apprentice chat notifications to reduce spam
|
||||||
|
- Removed MySpawn system (You can still use Chimaera Wings) due to being outdated and unwanted
|
||||||
|
- Removed duplicate settings in config.yml
|
||||||
|
- Removed unused settings from config.yml (HP Regen)
|
||||||
|
- Removed Nether Brick from Mining XP Tables
|
||||||
|
- Removed Stone Brick from Mining XP Tables
|
||||||
|
|
||||||
|
Version 1.2.12
|
||||||
|
- Fixed issue that caused terrible MySQL performance and negative XP on levelup (Issue #134)
|
||||||
|
- Fixed addxp command taking xprate and skill modifiers into account
|
||||||
|
- Added anonymous usage statistics (you can opt out in plugins/PluginMetrics/config.yml)
|
||||||
|
- Modified onEntityDamage priority to have better compatibility with other plugins (Factions, WorldGuard, etc...)
|
||||||
|
- Fixed /mcgod & /mmoedit permissions defaulting to true
|
||||||
|
- Fixed Fishing not working or handing out XP
|
||||||
|
- Fixed error with Skull Splitter / Serrated Strikes that caused server instability and log spam
|
||||||
|
- Fixed config.yml not having values for End Stone & other new mining blocks
|
||||||
|
- Fixed Green Thumb/Green Terra not correctly planting wheat (Issue #133)
|
||||||
|
|
||||||
|
Version 1.2.11
|
||||||
|
- Removed legacy Permission & PEX dependency. (PEX still works fine with mcMMO)
|
||||||
|
- Made Smooth Brick to Mossy Brick and Dirt to Grass for green thumb configurable (Issue #120)
|
||||||
|
- Added MagmaCube to XP tables
|
||||||
|
- Made optimizations to Skull Splitter/Serrated Strikes
|
||||||
|
- Made it so players take damage if they try to log out with Serrated Strikes stacked onto them (Issue #131)
|
||||||
|
- Changed mcMMO to save data periodically to optimize performance with FlatFile & MySQL (Issue #138)
|
||||||
|
- Added a configurable save interval for the new save system
|
||||||
|
- Fixed a bug with the odds calculations for Serrated Strikes
|
||||||
|
- Fixed several commands not working from console (mmoedit, etc..) (Issue #150)
|
||||||
|
- Added a success message when executing xprate from console
|
||||||
|
|
||||||
Version 1.2.10
|
Version 1.2.10
|
||||||
- Fixed issue with receiving Woodcutting XP for all blocks broken (Issue #103)
|
- Fixed issue with receiving Woodcutting XP for all blocks broken (Issue #103)
|
||||||
|
|||||||
346
LICENSE
Normal file
346
LICENSE
Normal file
@@ -0,0 +1,346 @@
|
|||||||
|
TERMS AND CONDITIONS
|
||||||
|
0. Definitions.
|
||||||
|
“This License” refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
|
||||||
|
|
||||||
|
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”.
|
||||||
|
“Licensees” and “recipients” may be individuals or organizations.
|
||||||
|
|
||||||
|
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission,
|
||||||
|
other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work
|
||||||
|
“based on” the earlier work.
|
||||||
|
|
||||||
|
A “covered work” means either the unmodified Program or a work based on the Program.
|
||||||
|
|
||||||
|
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily
|
||||||
|
liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy.
|
||||||
|
Propagation includes copying, distribution (with or without modification), making available to the public, and in some
|
||||||
|
countries other activities as well.
|
||||||
|
|
||||||
|
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction
|
||||||
|
with a user through a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and
|
||||||
|
prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no
|
||||||
|
warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this
|
||||||
|
License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any
|
||||||
|
non-source form of a work.
|
||||||
|
|
||||||
|
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or,
|
||||||
|
in the case of interfaces specified for a particular programming language, one that is widely used among developers
|
||||||
|
working in that language.
|
||||||
|
|
||||||
|
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in
|
||||||
|
the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to
|
||||||
|
enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is
|
||||||
|
available to the public in source code form. A “Major Component”, in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a
|
||||||
|
compiler used to produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and
|
||||||
|
(for an executable work) run the object code and to modify the work, including scripts to control those activities.
|
||||||
|
However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs
|
||||||
|
which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding
|
||||||
|
Source includes interface definition files associated with source files for the work, and the source code for shared
|
||||||
|
libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data
|
||||||
|
communication or control flow between those subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the
|
||||||
|
Corresponding Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided
|
||||||
|
the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program.
|
||||||
|
The output from running a covered work is covered by this License only if the output, given its content, constitutes a
|
||||||
|
covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not convey, without conditions so long as your license
|
||||||
|
otherwise remains in force. You may convey covered works to others for the sole purpose of having them make
|
||||||
|
modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do not control copyright. Those thus making or running
|
||||||
|
the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that
|
||||||
|
prohibit them from making any copies of your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not
|
||||||
|
allowed; section 10 makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling
|
||||||
|
obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or
|
||||||
|
restricting circumvention of such measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the
|
||||||
|
extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you
|
||||||
|
disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users,
|
||||||
|
your or third parties' legal rights to forbid circumvention of technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating
|
||||||
|
that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices
|
||||||
|
of the absence of any warranty; and give all recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for
|
||||||
|
a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source
|
||||||
|
code under the terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
|
||||||
|
b) The work must carry prominent notices stating that it is released under this License and any conditions added under
|
||||||
|
section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
|
||||||
|
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all
|
||||||
|
its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way,
|
||||||
|
but it does not invalidate such permission if you have separately received it.
|
||||||
|
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has
|
||||||
|
interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
|
||||||
|
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of
|
||||||
|
the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or
|
||||||
|
distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the
|
||||||
|
access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License, in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied
|
||||||
|
by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
|
||||||
|
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied
|
||||||
|
by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for
|
||||||
|
that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all
|
||||||
|
the software in the product that is covered by this License, on a durable physical medium customarily used for software
|
||||||
|
interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2)
|
||||||
|
access to copy the Corresponding Source from a network server at no charge.
|
||||||
|
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source.
|
||||||
|
This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an
|
||||||
|
offer, in accord with subsection 6b.
|
||||||
|
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent
|
||||||
|
access to the Corresponding Source in the same way through the same place at no further charge. You need not require
|
||||||
|
recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a
|
||||||
|
network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports
|
||||||
|
equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it
|
||||||
|
is available for as long as needed to satisfy these requirements.
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and
|
||||||
|
Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
|
||||||
|
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library,
|
||||||
|
need not be included in conveying the object code work.
|
||||||
|
|
||||||
|
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used
|
||||||
|
for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In
|
||||||
|
determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a
|
||||||
|
particular product received by a particular user, “normally used” refers to a typical or common use of that class of
|
||||||
|
product, regardless of the status of the particular user or of the way in which the particular user actually uses, or
|
||||||
|
expects or is expected to use, the product. A product is a consumer product regardless of whether the product has
|
||||||
|
substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of
|
||||||
|
the product.
|
||||||
|
|
||||||
|
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information
|
||||||
|
required to install and execute modified versions of a covered work in that User Product from a modified version of its
|
||||||
|
Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code
|
||||||
|
is in no case prevented or interfered with solely because modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the
|
||||||
|
conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to
|
||||||
|
the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding
|
||||||
|
Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not
|
||||||
|
apply if neither you nor any third party retains the ability to install modified object code on the User Product (for
|
||||||
|
example, the work has been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a requirement to continue to provide support
|
||||||
|
service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product
|
||||||
|
in which it has been modified or installed. Access to a network may be denied when the modification itself materially
|
||||||
|
and adversely affects the operation of the network or violates the rules and protocols for communication across the
|
||||||
|
network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format
|
||||||
|
that is publicly documented (and with an implementation available to the public in source code form), and must require
|
||||||
|
no special password or key for unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its
|
||||||
|
conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were
|
||||||
|
included in this License, to the extent that they are valid under applicable law. If additional permissions apply only
|
||||||
|
to part of the Program, that part may be used separately under those permissions, but the entire Program remains
|
||||||
|
governed by this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or
|
||||||
|
from any part of it. (Additional permissions may be written to require their own removal in certain cases when you
|
||||||
|
modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have
|
||||||
|
or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by
|
||||||
|
the copyright holders of that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the
|
||||||
|
Appropriate Legal Notices displayed by works containing it; or
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be
|
||||||
|
marked in reasonable ways as different from the original version; or
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
|
||||||
|
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
|
||||||
|
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified
|
||||||
|
versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual
|
||||||
|
assumptions directly impose on those licensors and authors.
|
||||||
|
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the
|
||||||
|
Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with
|
||||||
|
a term that is a further restriction, you may remove that term. If a license document contains a further restriction but
|
||||||
|
permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of
|
||||||
|
that license document, provided that the further restriction does not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a
|
||||||
|
statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as
|
||||||
|
exceptions; the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to
|
||||||
|
propagate or modify it is void, and will automatically terminate your rights under this License (including any patent
|
||||||
|
licenses granted under the third paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated
|
||||||
|
(a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and
|
||||||
|
(b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days
|
||||||
|
after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you
|
||||||
|
of the violation by some reasonable means, this is the first time you have received notice of violation of this License
|
||||||
|
(for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the licenses of parties who have received copies or
|
||||||
|
rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not
|
||||||
|
qualify to receive new licenses for the same material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a
|
||||||
|
covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not
|
||||||
|
require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered
|
||||||
|
work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run,
|
||||||
|
modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third
|
||||||
|
parties with this License.
|
||||||
|
|
||||||
|
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or
|
||||||
|
subdividing an organization, or merging organizations. If propagation of a covered work results from an entity
|
||||||
|
transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work
|
||||||
|
the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with
|
||||||
|
reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For
|
||||||
|
example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License,
|
||||||
|
and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent
|
||||||
|
claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program
|
||||||
|
is based. The work thus licensed is called the contributor's “contributor version”.
|
||||||
|
|
||||||
|
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already
|
||||||
|
acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or
|
||||||
|
selling its contributor version, but do not include claims that would be infringed only as a consequence of further
|
||||||
|
modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent
|
||||||
|
sublicenses in a manner consistent with the requirements of this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential
|
||||||
|
patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its
|
||||||
|
contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to
|
||||||
|
enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To
|
||||||
|
“grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against
|
||||||
|
the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not
|
||||||
|
available for anyone to copy, free of charge and under the terms of this License, through a publicly available network
|
||||||
|
server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available,
|
||||||
|
or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a
|
||||||
|
manner consistent with the requirements of this License, to extend the patent license to downstream recipients.
|
||||||
|
“Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in
|
||||||
|
a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in
|
||||||
|
that country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring
|
||||||
|
conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing
|
||||||
|
them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is
|
||||||
|
automatically extended to all recipients of the covered work and works based on it.
|
||||||
|
|
||||||
|
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of,
|
||||||
|
or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You
|
||||||
|
may not convey a covered work if you are a party to an arrangement with a third party that is in the business of
|
||||||
|
distributing software, under which you make payment to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a
|
||||||
|
discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from
|
||||||
|
those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered
|
||||||
|
work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to
|
||||||
|
infringement that may otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this
|
||||||
|
License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to
|
||||||
|
satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence
|
||||||
|
you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further
|
||||||
|
conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License
|
||||||
|
would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work
|
||||||
|
licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the
|
||||||
|
resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special
|
||||||
|
requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply
|
||||||
|
to the combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to
|
||||||
|
time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new
|
||||||
|
problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the
|
||||||
|
GNU General Public License “or any later version” applies to it, you have the option of following the terms and
|
||||||
|
conditions either of that numbered version or of any later version published by the Free Software Foundation. If the
|
||||||
|
Program does not specify a version number of the GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used,
|
||||||
|
that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the
|
||||||
|
Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different permissions. However, no additional obligations are imposed
|
||||||
|
on any author or copyright holder as a result of your choosing to follow a later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING
|
||||||
|
THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
|
||||||
|
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU
|
||||||
|
ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO
|
||||||
|
MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
|
||||||
|
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO
|
||||||
|
LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||||
|
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to
|
||||||
|
their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil
|
||||||
|
liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program
|
||||||
|
in return for a fee.
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
== mcMMO
|
|
||||||
**The RPG lovers mod**
|
|
||||||
|
|
||||||
=== Brief Description
|
|
||||||
mcMMO takes core Minecraft game mechanics and expands them to add an extensive RPG experience, the goal of the project has always been a quality RPG experience. Everything in mcMMO is carefully thought out and is constantly improving. mcMMO adds eleven skills to train in and level in, while also offering a high level of customization for server admins. There are countless features, including custom sounds, graphical elements, and more added when running mcMMO in conjunction with Spout. I carefully read feedback and evaluate the mechanics of mcMMO in every update to provide an ever-evolving experience.
|
|
||||||
|
|
||||||
If you want an original RPG experience like no other mod out there, mcMMO is for you.
|
|
||||||
|
|
||||||
=== About the Developer
|
|
||||||
I've always wanted to make games and in the last year I decided to take a swing at developing Minecraft mods as a platform to teach myself programming, the biggest project I have made to date is mcMMO. I went from knowing nothing about Java to what I know now purely from modding Minecraft, and I plan to move onto game development in the not so distant future.
|
|
||||||
|
|
||||||
I take design very seriously, I am not the kind of person who can be satisfied giving a project anything less than my all. As you will see reflected in the quality of the mods I make, I take great care in my work.
|
|
||||||
|
|
||||||
Hearing that people enjoy mcMMO and seeing the daily youtube videos about my mod has become a joy, I really can't believe how popular my mod has gotten!
|
|
||||||
|
|
||||||
=== Compiling
|
|
||||||
|
|
||||||
Required Libraries:
|
|
||||||
* CraftBukkit
|
|
||||||
* Spout API
|
|
||||||
* Permissions
|
|
||||||
* PermissionsEx
|
|
||||||
|
|
||||||
Required to Run:
|
|
||||||
* Bukkit
|
|
||||||
|
|
||||||
http://dev.bukkit.org/server-mods/mcmmo for more up to date information.
|
|
||||||
46
README.md
Normal file
46
README.md
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# mcMMO
|
||||||
|
## The RPG lovers mod
|
||||||
|
|
||||||
|
### Dev builds
|
||||||
|
Our latest development builds are available ~~[here](http://ci.mcmmo.info)~~. Unfortunately, the mcMMO site is down; a temporary dev build location is hosted [here](http://ci.ecocitycraft.com/job/mcMMO/).
|
||||||
|
|
||||||
|
### Brief Description
|
||||||
|
The goal of mcMMO is to take core Minecraft game mechanics and expand them into add an extensive and quality RPG experience. Everything in mcMMO has been carefully thought out and is constantly being improved upon. Currently, mcMMO adds thirteen unique skills to train and level in. Each of these skills is highly customizable through our configuration files, allowing server admins to tweak mcMMO to best suit the needs of his or her server. Know that the mcMMO team is dedicated to providing an ever-evolving experience, and that we carefully read all feedback and bug reports in order to evaluate and balance the mechanics of mcMMO in every update.
|
||||||
|
|
||||||
|
## About the Team
|
||||||
|
|
||||||
|
mcMMO is currently developed by a team of individuals from all over the world.
|
||||||
|
### Glorious Leader
|
||||||
|
[]
|
||||||
|
(https://github.com/gmcferrin)
|
||||||
|
|
||||||
|
### Developers
|
||||||
|
[]
|
||||||
|
(https://github.com/bm01)
|
||||||
|
[]
|
||||||
|
(https://github.com/Glitchfinder)
|
||||||
|
[]
|
||||||
|
(https://github.com/nossr50)
|
||||||
|
[]
|
||||||
|
(https://github.com/NuclearW)
|
||||||
|
[]
|
||||||
|
(https://github.com/shatteredbeam)
|
||||||
|
[]
|
||||||
|
(https://github.com/TfT-02)
|
||||||
|
[]
|
||||||
|
(https://github.com/t00thpick1)
|
||||||
|
[]
|
||||||
|
(https://github.com/riking)
|
||||||
|
|
||||||
|
## Compiling
|
||||||
|
|
||||||
|
mcMMO uses Maven 3 to manage dependancies, packaging, and shading of necessary classes; Maven 3 is required to compile mcMMO.
|
||||||
|
|
||||||
|
The typical command used to build mcMMO is: `mvn clean package install`
|
||||||
|
|
||||||
|
Required Libraries:
|
||||||
|
* JUnit
|
||||||
|
* EMetrics
|
||||||
|
* Bukkit
|
||||||
|
|
||||||
|
http://dev.bukkit.org/server-mods/mcmmo for more up to date information.
|
||||||
60
extras/repair.chain.yml
Normal file
60
extras/repair.chain.yml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
#
|
||||||
|
# Repair configuration
|
||||||
|
# Last updated on ${project.version}-b${BUILD_NUMBER}
|
||||||
|
#
|
||||||
|
# Any file named repair.*.yml in the mcmmmo folder will be loaded as a repair config
|
||||||
|
# All repair configs have a main section titled "Repairables"
|
||||||
|
# Afterwards, all sub-items are considered a Repairable to be loaded. The names of each subitem should be the exact material name.
|
||||||
|
# The bare minimum of a Repairable is that it have a RepairMaterial and a MaximumDurability
|
||||||
|
#
|
||||||
|
# ItemType: This is the type of item to be repaired, this is only important to permissions.
|
||||||
|
## Valid values are ARMOR, TOOL, and OTHER.
|
||||||
|
## This defaults to OTHER.
|
||||||
|
#
|
||||||
|
# MaterialType: This is the type of the material of the item to be repaired, this is only important for permissions.
|
||||||
|
## Valid values are STRING, LEATHER, WOOD, STONE, IRON, GOLD, DIAMOND, and OTHER
|
||||||
|
## This defaults to OTHER.
|
||||||
|
#
|
||||||
|
# RepairMaterial: This is the material name of the item used to repair this repairable.
|
||||||
|
## This is required to be set.
|
||||||
|
#
|
||||||
|
# RepairMaterialMetadata: This is the metadata of the item used to repair this repairable.
|
||||||
|
## A value of -1 means to ignore all metadata when repairing.
|
||||||
|
## This defaults to -1
|
||||||
|
#
|
||||||
|
# MaximumDurability: This is the maximum durability of the item.
|
||||||
|
## This is required to be set.
|
||||||
|
#
|
||||||
|
# MinimumLevel: This is the minimum repair level needed to repair this item.
|
||||||
|
## Valid values are => 0
|
||||||
|
## This defaults to 0
|
||||||
|
#
|
||||||
|
# MinimumQuantity: This is the minimum number of items needed to repair this item ignoring all other repair bonuses.
|
||||||
|
## This is typically the number of the repair material needed to create a new item, for example for a sword it is 2, for an axe it is 3
|
||||||
|
## This defaults to 2
|
||||||
|
#
|
||||||
|
# XpMultiplier: This is the amount to multiply the xp bonus by.
|
||||||
|
## This defaults to 1
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# The following is an example of a repair.*.yml config which adds the ability to repair Chainmail armor using fire.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
###
|
||||||
|
Repairables:
|
||||||
|
#
|
||||||
|
# Chainmail repairables
|
||||||
|
###
|
||||||
|
# Armor
|
||||||
|
CHAINMAIL_HELMET:
|
||||||
|
RepairMaterial: FIRE
|
||||||
|
XpMultiplier: 2
|
||||||
|
CHAINMAIL_CHESTPLATE:
|
||||||
|
RepairMaterial: FIRE
|
||||||
|
XpMultiplier: 2
|
||||||
|
CHAINMAIL_LEGGINGS:
|
||||||
|
RepairMaterial: FIRE
|
||||||
|
XpMultiplier: 2
|
||||||
|
CHAINMAIL_BOOTS:
|
||||||
|
RepairMaterial: FIRE
|
||||||
|
XpMultiplier: 2
|
||||||
127
pom.xml
Normal file → Executable file
127
pom.xml
Normal file → Executable file
@@ -2,12 +2,12 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||||
<artifactId>mcMMO</artifactId>
|
<artifactId>mcMMO</artifactId>
|
||||||
<version>1.2.10</version>
|
<version>1.4.08-dev1</version>
|
||||||
<name>mcMMO</name>
|
<name>mcMMO</name>
|
||||||
<url>https://github.com/TheYeti/mcMMO</url>
|
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||||
<issueManagement>
|
<issueManagement>
|
||||||
|
<url>https://github.com/mcMMO-Dev/mcMMO/issues</url>
|
||||||
<system>GitHub</system>
|
<system>GitHub</system>
|
||||||
<url>https://github.com/TheYeti/mcMMO/issues</url>
|
|
||||||
</issueManagement>
|
</issueManagement>
|
||||||
<build>
|
<build>
|
||||||
<finalName>mcMMO</finalName>
|
<finalName>mcMMO</finalName>
|
||||||
@@ -19,48 +19,25 @@
|
|||||||
<directory>${basedir}/src/main/resources/</directory>
|
<directory>${basedir}/src/main/resources/</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>*.yml</include>
|
<include>*.yml</include>
|
||||||
|
<include>.jenkins</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
<resource>
|
<resource>
|
||||||
<targetPath>resources</targetPath>
|
<targetPath>com/gmail/nossr50/locale</targetPath>
|
||||||
<filtering>false</filtering>
|
<filtering>true</filtering>
|
||||||
<directory>${basedir}/src/main/resources/xpbar/</directory>
|
<directory>${basedir}/src/main/resources/locale/</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>xpbar*.png</include>
|
<include>locale*.properties</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
<resource>
|
<resource>
|
||||||
<targetPath>resources</targetPath>
|
<targetPath>mods</targetPath>
|
||||||
<filtering>false</filtering>
|
<filtering>true</filtering>
|
||||||
<directory>${basedir}/src/main/resources/healthbar/</directory>
|
<directory>${basedir}/src/main/resources/mods</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>health*.png</include>
|
<include>*.yml</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
<resource>
|
|
||||||
<targetPath>resources</targetPath>
|
|
||||||
<filtering>false</filtering>
|
|
||||||
<directory>${basedir}/src/main/resources/skillicon/</directory>
|
|
||||||
<includes>
|
|
||||||
<include>*.png</include>
|
|
||||||
</includes>
|
|
||||||
</resource>
|
|
||||||
<resource>
|
|
||||||
<targetPath>resources</targetPath>
|
|
||||||
<filtering>false</filtering>
|
|
||||||
<directory>${basedir}/src/main/resources/sound/</directory>
|
|
||||||
<includes>
|
|
||||||
<include>*.wav</include>
|
|
||||||
</includes>
|
|
||||||
</resource>
|
|
||||||
<resource>
|
|
||||||
<targetPath>com/gmail/nossr50/locale</targetPath>
|
|
||||||
<filtering>true</filtering>
|
|
||||||
<directory>${basedir}/src/main/resources/locale/</directory>
|
|
||||||
<includes>
|
|
||||||
<include>locale*.properties</include>
|
|
||||||
</includes>
|
|
||||||
</resource>
|
|
||||||
</resources>
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -91,7 +68,40 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
|
<version>1.5</version>
|
||||||
|
<configuration>
|
||||||
|
<artifactSet>
|
||||||
|
<includes>
|
||||||
|
<include>com.turt2live.metrics:MetricsExtension</include>
|
||||||
|
</includes>
|
||||||
|
</artifactSet>
|
||||||
|
<relocations>
|
||||||
|
<relocation>
|
||||||
|
<pattern>com.turt2live.metrics</pattern>
|
||||||
|
<shadedPattern>com.gmail.nossr50.metrics.mcstats</shadedPattern>
|
||||||
|
</relocation>
|
||||||
|
</relocations>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>shade</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
|
<extensions>
|
||||||
|
<extension>
|
||||||
|
<groupId>org.apache.maven.wagon</groupId>
|
||||||
|
<artifactId>wagon-file</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
</extension>
|
||||||
|
</extensions>
|
||||||
</build>
|
</build>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
@@ -99,48 +109,41 @@
|
|||||||
<url>http://repo.bukkit.org/content/groups/public/</url>
|
<url>http://repo.bukkit.org/content/groups/public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>spout-repo</id>
|
<id>Plugin MetricsExtension</id>
|
||||||
<url>http://nexus.getspout.org/content/groups/public/</url>
|
<url>http://repo.turt2live.com</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>bukkit</artifactId>
|
||||||
<version>1.1-R4-SNAPSHOT</version>
|
<version>LATEST</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>craftbukkit</artifactId>
|
<artifactId>junit-dep</artifactId>
|
||||||
<version>1.1-R3</version>
|
<version>4.10</version>
|
||||||
<type>jar</type>
|
<scope>test</scope>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.nijikokun.bukkit</groupId>
|
<groupId>com.turt2live.metrics</groupId>
|
||||||
<artifactId>Permissions</artifactId>
|
<artifactId>MetricsExtension</artifactId>
|
||||||
<version>3.1.6</version>
|
<version>0.0.5-SNAPSHOT</version>
|
||||||
<type>jar</type>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ru.tehkode.permissions</groupId>
|
|
||||||
<artifactId>bukkit</artifactId>
|
|
||||||
<version>1.18</version>
|
|
||||||
<type>jar</type>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.getspout</groupId>
|
|
||||||
<artifactId>spoutpluginapi</artifactId>
|
|
||||||
<version>dev-SNAPSHOT</version>
|
|
||||||
<type>jar</type>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>mcmmo-repo</id>
|
||||||
|
<url>file:///var/lib/jenkins/repo</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
<ciManagement>
|
||||||
|
<system>Jenkins</system>
|
||||||
|
<url>http://ci.ecocitycraft.com/job/mcMMO</url>
|
||||||
|
</ciManagement>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,450 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of mcMMO.
|
|
||||||
|
|
||||||
mcMMO is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
mcMMO is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.gmail.nossr50;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.World;
|
|
||||||
import org.bukkit.entity.*;
|
|
||||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
|
||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
|
||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
|
||||||
import org.bukkit.plugin.Plugin;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
import com.gmail.nossr50.party.Party;
|
|
||||||
import com.gmail.nossr50.skills.Acrobatics;
|
|
||||||
import com.gmail.nossr50.skills.Archery;
|
|
||||||
import com.gmail.nossr50.skills.Axes;
|
|
||||||
import com.gmail.nossr50.skills.Skills;
|
|
||||||
import com.gmail.nossr50.skills.Swords;
|
|
||||||
import com.gmail.nossr50.skills.Taming;
|
|
||||||
import com.gmail.nossr50.skills.Unarmed;
|
|
||||||
|
|
||||||
public class Combat
|
|
||||||
{
|
|
||||||
public static void combatChecks(EntityDamageEvent event, mcMMO pluginx)
|
|
||||||
{
|
|
||||||
if(event.isCancelled() || event.getDamage() == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(event instanceof EntityDamageByEntityEvent)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* OFFENSIVE CHECKS FOR PLAYERS VERSUS ENTITIES
|
|
||||||
*/
|
|
||||||
if(((EntityDamageByEntityEvent) event).getDamager() instanceof Player)
|
|
||||||
{
|
|
||||||
//Declare Things
|
|
||||||
EntityDamageByEntityEvent eventb = (EntityDamageByEntityEvent) event;
|
|
||||||
Player attacker = (Player)((EntityDamageByEntityEvent) event).getDamager();
|
|
||||||
PlayerProfile PPa = Users.getProfile(attacker);
|
|
||||||
|
|
||||||
//Damage modifiers
|
|
||||||
if(mcPermissions.getInstance().unarmed(attacker) && attacker.getItemInHand().getTypeId() == 0) //Unarmed
|
|
||||||
Unarmed.unarmedBonus(attacker, eventb);
|
|
||||||
if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker) && Users.getProfile(attacker).getSkillLevel(SkillType.AXES) >= 500)
|
|
||||||
event.setDamage(event.getDamage()+4);
|
|
||||||
|
|
||||||
//If there are any abilities to activate
|
|
||||||
combatAbilityChecks(attacker, PPa, pluginx);
|
|
||||||
|
|
||||||
//Check for offensive procs
|
|
||||||
if(!(((EntityDamageByEntityEvent) event).getDamager() instanceof Arrow))
|
|
||||||
{
|
|
||||||
if(mcPermissions.getInstance().axes(attacker))
|
|
||||||
Axes.axeCriticalCheck(attacker, eventb, pluginx); //Axe Criticals
|
|
||||||
|
|
||||||
if(!pluginx.misc.bleedTracker.contains((LivingEntity) event.getEntity())) //Swords Bleed
|
|
||||||
Swords.bleedCheck(attacker, (LivingEntity)event.getEntity(), pluginx);
|
|
||||||
|
|
||||||
if(event.getEntity() instanceof Player && mcPermissions.getInstance().unarmed(attacker))
|
|
||||||
{
|
|
||||||
Player defender = (Player)event.getEntity();
|
|
||||||
Unarmed.disarmProcCheck(attacker, defender);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Modify the event damage if Attacker is Berserk
|
|
||||||
if(PPa.getBerserkMode())
|
|
||||||
event.setDamage(event.getDamage() + (event.getDamage() / 2));
|
|
||||||
|
|
||||||
//Handle Ability Interactions
|
|
||||||
if(PPa.getSkullSplitterMode() && m.isAxes(attacker.getItemInHand()))
|
|
||||||
Axes.applyAoeDamage(attacker, eventb, pluginx);
|
|
||||||
if(PPa.getSerratedStrikesMode() && m.isSwords(attacker.getItemInHand()))
|
|
||||||
Swords.applySerratedStrikes(attacker, eventb, pluginx);
|
|
||||||
|
|
||||||
//Experience
|
|
||||||
if(event.getEntity() instanceof Player)
|
|
||||||
{
|
|
||||||
Player defender = (Player)event.getEntity();
|
|
||||||
PlayerProfile PPd = Users.getProfile(defender);
|
|
||||||
if(attacker != null && defender != null && LoadProperties.pvpxp)
|
|
||||||
{
|
|
||||||
if(System.currentTimeMillis() >= (PPd.getRespawnATS()*1000) + 5000
|
|
||||||
&& ((PPd.getLastLogin()+5)*1000) < System.currentTimeMillis()
|
|
||||||
&& defender.getHealth() >= 1)
|
|
||||||
{
|
|
||||||
//Prevent a ridiculous amount of XP being granted by capping it at the remaining health of the mob
|
|
||||||
int hpLeft = defender.getHealth(), xpinc = 0;
|
|
||||||
|
|
||||||
if(hpLeft < event.getDamage())
|
|
||||||
xpinc = hpLeft;
|
|
||||||
else
|
|
||||||
xpinc = event.getDamage();
|
|
||||||
|
|
||||||
int xp = (int) (xpinc * 2 * LoadProperties.pvpxprewardmodifier);
|
|
||||||
|
|
||||||
if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker))
|
|
||||||
PPa.addXP(SkillType.AXES, xp*10, attacker);
|
|
||||||
if(m.isSwords(attacker.getItemInHand()) && mcPermissions.getInstance().swords(attacker))
|
|
||||||
PPa.addXP(SkillType.SWORDS, xp*10, attacker);
|
|
||||||
if(attacker.getItemInHand().getTypeId() == 0 && mcPermissions.getInstance().unarmed(attacker))
|
|
||||||
PPa.addXP(SkillType.UNARMED, xp*10, attacker);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!pluginx.misc.mobSpawnerList.contains(event.getEntity()))
|
|
||||||
{
|
|
||||||
int xp = getXp(event.getEntity(), event);
|
|
||||||
|
|
||||||
if(m.isSwords(attacker.getItemInHand()) && mcPermissions.getInstance().swords(attacker))
|
|
||||||
PPa.addXP(SkillType.SWORDS, xp*10, attacker);
|
|
||||||
else if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker))
|
|
||||||
PPa.addXP(SkillType.AXES, xp*10, attacker);
|
|
||||||
else if(attacker.getItemInHand().getTypeId() == 0 && mcPermissions.getInstance().unarmed(attacker))
|
|
||||||
PPa.addXP(SkillType.UNARMED, xp*10, attacker);
|
|
||||||
}
|
|
||||||
Skills.XpCheckAll(attacker);
|
|
||||||
|
|
||||||
if(event.getEntity() instanceof Wolf)
|
|
||||||
{
|
|
||||||
Wolf theWolf = (Wolf)event.getEntity();
|
|
||||||
|
|
||||||
if(attacker.getItemInHand().getTypeId() == 352 && mcPermissions.getInstance().taming(attacker))
|
|
||||||
{
|
|
||||||
event.setCancelled(true);
|
|
||||||
if(theWolf.isTamed())
|
|
||||||
{
|
|
||||||
attacker.sendMessage(mcLocale.getString("Combat.BeastLore")+" "+
|
|
||||||
mcLocale.getString("Combat.BeastLoreOwner", new Object[] {Taming.getOwnerName(theWolf)})+" "+
|
|
||||||
mcLocale.getString("Combat.BeastLoreHealthWolfTamed", new Object[] {theWolf.getHealth()}));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
attacker.sendMessage(mcLocale.getString("Combat.BeastLore")+" "+
|
|
||||||
mcLocale.getString("Combat.BeastLoreHealthWolf", new Object[] {theWolf.getHealth()}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* OFFENSIVE CHECKS FOR WOLVES VERSUS ENTITIES
|
|
||||||
*/
|
|
||||||
if(event instanceof EntityDamageByEntityEvent && ((EntityDamageByEntityEvent) event).getDamager() instanceof Wolf)
|
|
||||||
{
|
|
||||||
EntityDamageByEntityEvent eventb = (EntityDamageByEntityEvent) event;
|
|
||||||
Wolf theWolf = (Wolf) eventb.getDamager();
|
|
||||||
if(theWolf.isTamed() && Taming.ownerOnline(theWolf, pluginx))
|
|
||||||
{
|
|
||||||
if(Taming.getOwner(theWolf, pluginx) == null)
|
|
||||||
return;
|
|
||||||
Player master = Taming.getOwner(theWolf, pluginx);
|
|
||||||
PlayerProfile PPo = Users.getProfile(master);
|
|
||||||
|
|
||||||
if(mcPermissions.getInstance().taming(master))
|
|
||||||
{
|
|
||||||
//Sharpened Claws
|
|
||||||
if(PPo.getSkillLevel(SkillType.TAMING) >= 750)
|
|
||||||
{
|
|
||||||
event.setDamage(event.getDamage() + 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Gore
|
|
||||||
if(Math.random() * 1000 <= PPo.getSkillLevel(SkillType.TAMING))
|
|
||||||
{
|
|
||||||
event.setDamage(event.getDamage() * 2);
|
|
||||||
|
|
||||||
if(event.getEntity() instanceof Player)
|
|
||||||
{
|
|
||||||
Player target = (Player)event.getEntity();
|
|
||||||
target.sendMessage(mcLocale.getString("Combat.StruckByGore")); //$NON-NLS-1$
|
|
||||||
Users.getProfile(target).setBleedTicks(2);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pluginx.misc.addToBleedQue((LivingEntity) event.getEntity());
|
|
||||||
|
|
||||||
master.sendMessage(mcLocale.getString("Combat.Gore")); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
if(!event.getEntity().isDead() && !pluginx.misc.mobSpawnerList.contains(event.getEntity()))
|
|
||||||
{
|
|
||||||
int xp = getXp(event.getEntity(), event);
|
|
||||||
Users.getProfile(master).addXP(SkillType.TAMING, xp*10, master);
|
|
||||||
|
|
||||||
if(event.getEntity() instanceof Player)
|
|
||||||
{
|
|
||||||
xp = (event.getDamage() * 2);
|
|
||||||
Users.getProfile(master).addXP(SkillType.TAMING, (int)((xp*10)*1.5), master);
|
|
||||||
}
|
|
||||||
Skills.XpCheckSkill(SkillType.TAMING, master);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//Another offensive check for Archery
|
|
||||||
if(event instanceof EntityDamageByEntityEvent && event.getCause() == DamageCause.PROJECTILE && ((EntityDamageByEntityEvent) event).getDamager() instanceof Arrow)
|
|
||||||
archeryCheck((EntityDamageByEntityEvent)event, pluginx);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* DEFENSIVE CHECKS
|
|
||||||
*/
|
|
||||||
if(event instanceof EntityDamageByEntityEvent && event.getEntity() instanceof Player)
|
|
||||||
{
|
|
||||||
Swords.counterAttackChecks((EntityDamageByEntityEvent)event);
|
|
||||||
Acrobatics.dodgeChecks((EntityDamageByEntityEvent)event);
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* DEFENSIVE CHECKS FOR WOLVES
|
|
||||||
*/
|
|
||||||
|
|
||||||
if(event.getEntity() instanceof Wolf)
|
|
||||||
{
|
|
||||||
Wolf theWolf = (Wolf) event.getEntity();
|
|
||||||
|
|
||||||
if(theWolf.isTamed() && Taming.ownerOnline(theWolf, pluginx))
|
|
||||||
{
|
|
||||||
if(Taming.getOwner(theWolf, pluginx) == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Player master = Taming.getOwner(theWolf, pluginx);
|
|
||||||
PlayerProfile PPo = Users.getProfile(master);
|
|
||||||
if(mcPermissions.getInstance().taming(master))
|
|
||||||
{
|
|
||||||
//Shock-Proof
|
|
||||||
if((event.getCause() == DamageCause.ENTITY_EXPLOSION || event.getCause() == DamageCause.BLOCK_EXPLOSION) && PPo.getSkillLevel(SkillType.TAMING) >= 500)
|
|
||||||
{
|
|
||||||
event.setDamage(2);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Thick Fur
|
|
||||||
if(PPo.getSkillLevel(SkillType.TAMING) >= 250)
|
|
||||||
event.setDamage(event.getDamage() / 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void combatAbilityChecks(Player attacker, PlayerProfile PPa, Plugin pluginx)
|
|
||||||
{
|
|
||||||
//Check to see if any abilities need to be activated
|
|
||||||
if(PPa.getAxePreparationMode())
|
|
||||||
Axes.skullSplitterCheck(attacker);
|
|
||||||
if(PPa.getSwordsPreparationMode())
|
|
||||||
Swords.serratedStrikesActivationCheck(attacker);
|
|
||||||
if(PPa.getFistsPreparationMode())
|
|
||||||
Unarmed.berserkActivationCheck(attacker);
|
|
||||||
}
|
|
||||||
public static void archeryCheck(EntityDamageByEntityEvent event, mcMMO pluginx)
|
|
||||||
{
|
|
||||||
Arrow arrow = (Arrow)event.getDamager();
|
|
||||||
Entity y = arrow.getShooter();
|
|
||||||
Entity x = event.getEntity();
|
|
||||||
if(x instanceof Player)
|
|
||||||
{
|
|
||||||
Player defender = (Player)x;
|
|
||||||
PlayerProfile PPd = Users.getProfile(defender);
|
|
||||||
if(PPd == null)
|
|
||||||
Users.addUser(defender);
|
|
||||||
if(mcPermissions.getInstance().unarmed(defender) && defender.getItemInHand().getTypeId() == 0)
|
|
||||||
{
|
|
||||||
if(defender != null && PPd.getSkillLevel(SkillType.UNARMED) >= 1000)
|
|
||||||
{
|
|
||||||
if(Math.random() * 1000 <= 500)
|
|
||||||
{
|
|
||||||
event.setCancelled(true);
|
|
||||||
defender.sendMessage(mcLocale.getString("Combat.ArrowDeflect")); //$NON-NLS-1$
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else if(defender != null && Math.random() * 1000 <= (PPd.getSkillLevel(SkillType.UNARMED) / 2))
|
|
||||||
{
|
|
||||||
event.setCancelled(true);
|
|
||||||
defender.sendMessage(mcLocale.getString("Combat.ArrowDeflect")); //$NON-NLS-1$
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* If attacker is player
|
|
||||||
*/
|
|
||||||
if(y instanceof Player)
|
|
||||||
{
|
|
||||||
Player attacker = (Player)y;
|
|
||||||
PlayerProfile PPa = Users.getProfile(attacker);
|
|
||||||
if(mcPermissions.getInstance().archery(attacker))
|
|
||||||
{
|
|
||||||
Archery.trackArrows(pluginx, x, event, attacker);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* IGNITION
|
|
||||||
*/
|
|
||||||
Archery.ignitionCheck(x, event, attacker);
|
|
||||||
/*
|
|
||||||
* Defender is Monster
|
|
||||||
*/
|
|
||||||
if(!pluginx.misc.mobSpawnerList.contains(x))
|
|
||||||
{
|
|
||||||
int xp = getXp(event.getEntity(), event);
|
|
||||||
PPa.addXP(SkillType.ARCHERY, xp*10, attacker);
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* Attacker is Player
|
|
||||||
*/
|
|
||||||
if(x instanceof Player){
|
|
||||||
Player defender = (Player)x;
|
|
||||||
PlayerProfile PPd = Users.getProfile(defender);
|
|
||||||
/*
|
|
||||||
* Stuff for the daze proc
|
|
||||||
*/
|
|
||||||
if(PPa.inParty() && PPd.inParty())
|
|
||||||
{
|
|
||||||
if(Party.getInstance().inSameParty(defender, attacker))
|
|
||||||
{
|
|
||||||
event.setCancelled(true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* PVP XP
|
|
||||||
*/
|
|
||||||
if(LoadProperties.pvpxp && !Party.getInstance().inSameParty(attacker, defender)
|
|
||||||
&& ((PPd.getLastLogin()+5)*1000) < System.currentTimeMillis() && !attacker.getName().equals(defender.getName()))
|
|
||||||
{
|
|
||||||
int xp = (int) ((event.getDamage() * 2) * 10);
|
|
||||||
PPa.addXP(SkillType.ARCHERY, xp, attacker);
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* DAZE PROC
|
|
||||||
*/
|
|
||||||
Archery.dazeCheck(defender, attacker);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Skills.XpCheckSkill(SkillType.ARCHERY, attacker);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attempt to damage target for value dmg with reason CUSTOM
|
|
||||||
*
|
|
||||||
* @param target LivingEntity which to attempt to damage
|
|
||||||
* @param dmg Amount of damage to attempt to do
|
|
||||||
*/
|
|
||||||
public static void dealDamage(LivingEntity target, int dmg){
|
|
||||||
dealDamage(target, dmg, EntityDamageEvent.DamageCause.CUSTOM);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attempt to damage target for value dmg with reason cause
|
|
||||||
*
|
|
||||||
* @param target LivingEntity which to attempt to damage
|
|
||||||
* @param dmg Amount of damage to attempt to do
|
|
||||||
* @param cause DamageCause to pass to damage event
|
|
||||||
*/
|
|
||||||
public static void dealDamage(LivingEntity target, int dmg, DamageCause cause) {
|
|
||||||
EntityDamageEvent ede = new EntityDamageEvent(target, cause, dmg);
|
|
||||||
Bukkit.getPluginManager().callEvent(ede);
|
|
||||||
if(ede.isCancelled()) return;
|
|
||||||
|
|
||||||
target.damage(ede.getDamage());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attempt to damage target for value dmg with reason ENTITY_ATTACK with damager attacker
|
|
||||||
*
|
|
||||||
* @param target LivingEntity which to attempt to damage
|
|
||||||
* @param dmg Amount of damage to attempt to do
|
|
||||||
* @param attacker Player to pass to event as damager
|
|
||||||
*/
|
|
||||||
public static void dealDamage(LivingEntity target, int dmg, Player attacker) {
|
|
||||||
EntityDamageEvent ede = new EntityDamageByEntityEvent(attacker, target, EntityDamageEvent.DamageCause.ENTITY_ATTACK, dmg);
|
|
||||||
Bukkit.getPluginManager().callEvent(ede);
|
|
||||||
|
|
||||||
target.damage(ede.getDamage());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean pvpAllowed(EntityDamageByEntityEvent event, World world)
|
|
||||||
{
|
|
||||||
if(!event.getEntity().getWorld().getPVP())
|
|
||||||
return false;
|
|
||||||
//If it made it this far, pvp is enabled
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
public static int getXp(Entity entity, EntityDamageEvent event)
|
|
||||||
{
|
|
||||||
int xp = 0;
|
|
||||||
if(entity instanceof LivingEntity)
|
|
||||||
{
|
|
||||||
LivingEntity le = (LivingEntity)entity;
|
|
||||||
//Prevent a ridiculous amount of XP being granted by capping it at the remaining health of the entity
|
|
||||||
int hpLeft = le.getHealth(), xpinc = 0;
|
|
||||||
|
|
||||||
if(hpLeft < event.getDamage())
|
|
||||||
xpinc = hpLeft;
|
|
||||||
else
|
|
||||||
xpinc = event.getDamage();
|
|
||||||
|
|
||||||
if(entity instanceof Animals)
|
|
||||||
{
|
|
||||||
xp = (int) (xpinc * 1);
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
if(entity instanceof Enderman)
|
|
||||||
xp = (xpinc * 2);
|
|
||||||
else if(entity instanceof Creeper)
|
|
||||||
xp = (xpinc * 4);
|
|
||||||
else if(entity instanceof Silverfish)
|
|
||||||
xp = (xpinc * 3);
|
|
||||||
else if(entity instanceof CaveSpider)
|
|
||||||
xp = (xpinc * 3);
|
|
||||||
else if(entity instanceof Spider)
|
|
||||||
xp = (xpinc * 3);
|
|
||||||
else if(entity instanceof Skeleton)
|
|
||||||
xp = (xpinc * 2);
|
|
||||||
else if(entity instanceof Zombie)
|
|
||||||
xp = (xpinc * 2);
|
|
||||||
else if(entity instanceof PigZombie)
|
|
||||||
xp = (xpinc * 3);
|
|
||||||
else if(entity instanceof Slime)
|
|
||||||
xp = (xpinc * 2);
|
|
||||||
else if(entity instanceof Ghast)
|
|
||||||
xp = (xpinc * 3);
|
|
||||||
else if(entity instanceof Blaze)
|
|
||||||
xp = (xpinc * 3);
|
|
||||||
else if(entity instanceof EnderDragon)
|
|
||||||
xp = (xpinc * 8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return xp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,211 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of mcMMO.
|
|
||||||
|
|
||||||
mcMMO is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
mcMMO is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.gmail.nossr50;
|
|
||||||
|
|
||||||
import java.sql.Connection;
|
|
||||||
import java.sql.DriverManager;
|
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.sql.PreparedStatement;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
|
|
||||||
public class Database {
|
|
||||||
|
|
||||||
private mcMMO plugin;
|
|
||||||
private String connectionString;
|
|
||||||
|
|
||||||
public Database(mcMMO instance) {
|
|
||||||
this.plugin = instance;
|
|
||||||
this.connectionString = "jdbc:mysql://" + LoadProperties.MySQLserverName + ":" + LoadProperties.MySQLport + "/" + LoadProperties.MySQLdbName + "?user=" + LoadProperties.MySQLuserName + "&password=" + LoadProperties.MySQLdbPass;
|
|
||||||
// Load the driver instance
|
|
||||||
try {
|
|
||||||
Class.forName("com.mysql.jdbc.Driver");
|
|
||||||
DriverManager.getConnection(connectionString);
|
|
||||||
} catch (ClassNotFoundException e) {
|
|
||||||
plugin.getServer().getLogger().warning(e.getLocalizedMessage());
|
|
||||||
} catch (SQLException e) {
|
|
||||||
plugin.getServer().getLogger().warning(e.getLocalizedMessage());
|
|
||||||
System.out.println("SQLException: " + e.getMessage());
|
|
||||||
System.out.println("SQLState: " + e.getSQLState());
|
|
||||||
System.out.println("VendorError: " + e.getErrorCode());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//Create the DB structure
|
|
||||||
public void createStructure() {
|
|
||||||
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "huds` (`user_id` int(10) unsigned NOT NULL,"
|
|
||||||
+ "`hudtype` varchar(50) NOT NULL DEFAULT '',"
|
|
||||||
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
|
||||||
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "users` (`id` int(10) unsigned NOT NULL AUTO_INCREMENT,"
|
|
||||||
+ "`user` varchar(40) NOT NULL,"
|
|
||||||
+ "`lastlogin` int(32) unsigned NOT NULL,"
|
|
||||||
+ "`party` varchar(100) NOT NULL DEFAULT '',"
|
|
||||||
+ "PRIMARY KEY (`id`),"
|
|
||||||
+ "UNIQUE KEY `user` (`user`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;");
|
|
||||||
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "cooldowns` (`user_id` int(10) unsigned NOT NULL,"
|
|
||||||
+ "`taming` int(32) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`mining` int(32) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`woodcutting` int(32) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`repair` int(32) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`unarmed` int(32) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`herbalism` int(32) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`excavation` int(32) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`archery` int(32) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`swords` int(32) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`axes` int(32) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`acrobatics` int(32) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
|
||||||
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "skills` (`user_id` int(10) unsigned NOT NULL,"
|
|
||||||
+ "`taming` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`mining` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`woodcutting` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`repair` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`unarmed` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`herbalism` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`excavation` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`archery` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`swords` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
|
||||||
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "experience` (`user_id` int(10) unsigned NOT NULL,"
|
|
||||||
+ "`taming` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`mining` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`woodcutting` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`repair` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`unarmed` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`herbalism` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`excavation` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`archery` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`swords` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
|
||||||
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
|
||||||
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "spawn` (`user_id` int(10) NOT NULL,"
|
|
||||||
+ "`x` int(64) NOT NULL DEFAULT '0',"
|
|
||||||
+ "`y` int(64) NOT NULL DEFAULT '0',"
|
|
||||||
+ "`z` int(64) NOT NULL DEFAULT '0',"
|
|
||||||
+ "`world` varchar(50) NOT NULL DEFAULT '',"
|
|
||||||
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
|
||||||
|
|
||||||
Write("DROP TABLE IF EXISTS `"+LoadProperties.MySQLtablePrefix+"skills2`");
|
|
||||||
Write("DROP TABLE IF EXISTS `"+LoadProperties.MySQLtablePrefix+"experience2`");
|
|
||||||
|
|
||||||
checkDatabaseStructure();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void checkDatabaseStructure()
|
|
||||||
{
|
|
||||||
String sql = "SELECT * FROM `mcmmo_experience` ORDER BY `"+LoadProperties.MySQLtablePrefix+"experience`.`fishing` ASC LIMIT 0 , 30";
|
|
||||||
|
|
||||||
ResultSet rs = null;
|
|
||||||
HashMap<Integer, ArrayList<String>> Rows = new HashMap<Integer, ArrayList<String>>();
|
|
||||||
try {
|
|
||||||
Connection conn = DriverManager.getConnection(connectionString);
|
|
||||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
|
||||||
if (stmt.executeQuery() != null) {
|
|
||||||
stmt.executeQuery();
|
|
||||||
rs = stmt.getResultSet();
|
|
||||||
while (rs.next()) {
|
|
||||||
ArrayList<String> Col = new ArrayList<String>();
|
|
||||||
for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) {
|
|
||||||
Col.add(rs.getString(i));
|
|
||||||
}
|
|
||||||
Rows.put(rs.getRow(), Col);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
conn.close();
|
|
||||||
} catch (SQLException ex) {
|
|
||||||
System.out.println("Updating mcMMO MySQL tables...");
|
|
||||||
Write("ALTER TABLE `"+LoadProperties.MySQLtablePrefix + "skills` ADD `fishing` int(10) NOT NULL DEFAULT '0' ;");
|
|
||||||
Write("ALTER TABLE `"+LoadProperties.MySQLtablePrefix + "experience` ADD `fishing` int(10) NOT NULL DEFAULT '0' ;");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// write query
|
|
||||||
public boolean Write(String sql) {
|
|
||||||
try {
|
|
||||||
Connection conn = DriverManager.getConnection(connectionString);
|
|
||||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
|
||||||
stmt.executeUpdate();
|
|
||||||
conn.close();
|
|
||||||
return true;
|
|
||||||
} catch (SQLException ex) {
|
|
||||||
System.out.println("SQLException: " + ex.getMessage());
|
|
||||||
System.out.println("SQLState: " + ex.getSQLState());
|
|
||||||
System.out.println("VendorError: " + ex.getErrorCode());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get Int
|
|
||||||
// only return first row / first field
|
|
||||||
public Integer GetInt(String sql) {
|
|
||||||
ResultSet rs = null;
|
|
||||||
Integer result = 0;
|
|
||||||
try {
|
|
||||||
Connection conn = DriverManager.getConnection(connectionString);
|
|
||||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
|
||||||
stmt = conn.prepareStatement(sql);
|
|
||||||
if (stmt.executeQuery() != null) {
|
|
||||||
stmt.executeQuery();
|
|
||||||
rs = stmt.getResultSet();
|
|
||||||
if (rs.next()) {
|
|
||||||
result = rs.getInt(1);
|
|
||||||
} else {
|
|
||||||
result = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
conn.close();
|
|
||||||
} catch (SQLException ex) {
|
|
||||||
System.out.println("SQLException: " + ex.getMessage());
|
|
||||||
System.out.println("SQLState: " + ex.getSQLState());
|
|
||||||
System.out.println("VendorError: " + ex.getErrorCode());
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
// read query
|
|
||||||
public HashMap<Integer, ArrayList<String>> Read(String sql) {
|
|
||||||
ResultSet rs = null;
|
|
||||||
HashMap<Integer, ArrayList<String>> Rows = new HashMap<Integer, ArrayList<String>>();
|
|
||||||
try {
|
|
||||||
Connection conn = DriverManager.getConnection(connectionString);
|
|
||||||
PreparedStatement stmt = conn.prepareStatement(sql);
|
|
||||||
if (stmt.executeQuery() != null) {
|
|
||||||
stmt.executeQuery();
|
|
||||||
rs = stmt.getResultSet();
|
|
||||||
while (rs.next()) {
|
|
||||||
ArrayList<String> Col = new ArrayList<String>();
|
|
||||||
for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) {
|
|
||||||
Col.add(rs.getString(i));
|
|
||||||
}
|
|
||||||
Rows.put(rs.getRow(), Col);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
conn.close();
|
|
||||||
} catch (SQLException ex) {
|
|
||||||
System.out.println("SQLException: " + ex.getMessage());
|
|
||||||
System.out.println("SQLState: " + ex.getSQLState());
|
|
||||||
System.out.println("VendorError: " + ex.getErrorCode());
|
|
||||||
}
|
|
||||||
return Rows;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of mcMMO.
|
|
||||||
|
|
||||||
mcMMO is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
mcMMO is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.gmail.nossr50;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
import org.bukkit.plugin.Plugin;
|
|
||||||
import com.gmail.nossr50.config.*;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
import com.gmail.nossr50.skills.*;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
|
|
||||||
public class Item {
|
|
||||||
|
|
||||||
public static void itemchecks(Player player, Plugin plugin)
|
|
||||||
{
|
|
||||||
ItemStack inhand = player.getItemInHand();
|
|
||||||
if(LoadProperties.chimaeraWingEnable && inhand.getTypeId() == LoadProperties.chimaeraId)
|
|
||||||
{
|
|
||||||
chimaerawing(player, plugin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public static void chimaerawing(Player player, Plugin plugin)
|
|
||||||
{
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
ItemStack is = player.getItemInHand();
|
|
||||||
Block block = player.getLocation().getBlock();
|
|
||||||
if(mcPermissions.getInstance().chimaeraWing(player) && is.getTypeId() == LoadProperties.chimaeraId)
|
|
||||||
{
|
|
||||||
if(Skills.cooldownOver(player, PP.getRecentlyHurt(), 60) && is.getAmount() >= LoadProperties.feathersConsumedByChimaeraWing)
|
|
||||||
{
|
|
||||||
Block derp = player.getLocation().getBlock();
|
|
||||||
int y = derp.getY();
|
|
||||||
ItemStack[] inventory = player.getInventory().getContents();
|
|
||||||
for(ItemStack x : inventory){
|
|
||||||
if(x != null && x.getTypeId() == LoadProperties.chimaeraId){
|
|
||||||
if(x.getAmount() >= LoadProperties.feathersConsumedByChimaeraWing + 1)
|
|
||||||
{
|
|
||||||
x.setAmount(x.getAmount() - LoadProperties.feathersConsumedByChimaeraWing);
|
|
||||||
player.getInventory().setContents(inventory);
|
|
||||||
player.updateInventory();
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
x.setAmount(0);
|
|
||||||
x.setTypeId(0);
|
|
||||||
player.getInventory().setContents(inventory);
|
|
||||||
player.updateInventory();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while(y < 127)
|
|
||||||
{
|
|
||||||
y++;
|
|
||||||
if(player != null)
|
|
||||||
{
|
|
||||||
if(player.getLocation().getWorld().getBlockAt(block.getX(), y, block.getZ()).getType() != Material.AIR)
|
|
||||||
{
|
|
||||||
player.sendMessage(mcLocale.getString("Item.ChimaeraWingFail")); //$NON-NLS-1$
|
|
||||||
player.teleport(player.getLocation().getWorld().getBlockAt(block.getX(), (y - 1), block.getZ()).getLocation());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(PP.getMySpawn(player) != null)
|
|
||||||
{
|
|
||||||
Location mySpawn = PP.getMySpawn(player);
|
|
||||||
if(mySpawn != null){
|
|
||||||
player.teleport(mySpawn); //Do it twice to prevent weird stuff
|
|
||||||
player.teleport(mySpawn);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.teleport(player.getWorld().getSpawnLocation());
|
|
||||||
}
|
|
||||||
player.sendMessage(mcLocale.getString("Item.ChimaeraWingPass")); //$NON-NLS-1$
|
|
||||||
} else if (!Skills.cooldownOver(player, PP.getRecentlyHurt(), 60) && is.getAmount() >= 10)
|
|
||||||
{
|
|
||||||
player.sendMessage(mcLocale.getString("Item.InjuredWait", new Object[] {Skills.calculateTimeLeft(player, PP.getRecentlyHurt(), 60)})); //$NON-NLS-1$
|
|
||||||
} else if (is.getTypeId() == LoadProperties.chimaeraId && is.getAmount() <= 9){
|
|
||||||
player.sendMessage(mcLocale.getString("Item.NeedFeathers")); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,279 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of mcMMO.
|
|
||||||
|
|
||||||
mcMMO is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
mcMMO is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.gmail.nossr50;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileReader;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerStat;
|
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
|
||||||
import com.gmail.nossr50.datatypes.Tree;
|
|
||||||
|
|
||||||
public class Leaderboard
|
|
||||||
{
|
|
||||||
static String location = "plugins/mcMMO/FlatFileStuff/mcmmo.users"; //$NON-NLS-1$
|
|
||||||
protected static final Logger log = Logger.getLogger("Minecraft"); //$NON-NLS-1$
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Read from the file
|
|
||||||
*/
|
|
||||||
public static void makeLeaderboards()
|
|
||||||
{
|
|
||||||
//Make Trees
|
|
||||||
Tree Mining = new Tree();
|
|
||||||
Tree WoodCutting = new Tree();
|
|
||||||
Tree Herbalism = new Tree();
|
|
||||||
Tree Excavation = new Tree();
|
|
||||||
Tree Acrobatics = new Tree();
|
|
||||||
Tree Repair = new Tree();
|
|
||||||
Tree Swords = new Tree();
|
|
||||||
Tree Axes = new Tree();
|
|
||||||
Tree Archery = new Tree();
|
|
||||||
Tree Unarmed = new Tree();
|
|
||||||
Tree Taming = new Tree();
|
|
||||||
Tree Fishing = new Tree();
|
|
||||||
Tree Enchanting = new Tree();
|
|
||||||
Tree Alchemy = new Tree();
|
|
||||||
Tree PowerLevel = new Tree();
|
|
||||||
|
|
||||||
//Add Data To Trees
|
|
||||||
try {
|
|
||||||
//Open the user file
|
|
||||||
FileReader file = new FileReader(location);
|
|
||||||
BufferedReader in = new BufferedReader(file);
|
|
||||||
String line = ""; //$NON-NLS-1$
|
|
||||||
ArrayList<String> players = new ArrayList<String>();
|
|
||||||
while((line = in.readLine()) != null)
|
|
||||||
{
|
|
||||||
String[] character = line.split(":"); //$NON-NLS-1$
|
|
||||||
String p = character[0];
|
|
||||||
|
|
||||||
//Prevent the same player from being added multiple times
|
|
||||||
if(players.contains(p))
|
|
||||||
continue;
|
|
||||||
else
|
|
||||||
players.add(p);
|
|
||||||
|
|
||||||
int Plvl = 0;
|
|
||||||
|
|
||||||
if(character.length > 1 && m.isInt(character[1]))
|
|
||||||
{
|
|
||||||
Mining.add(p, Integer.valueOf(character[1]));
|
|
||||||
Plvl += Integer.valueOf(character[1]);
|
|
||||||
}
|
|
||||||
if(character.length > 5 && m.isInt(character[5])){
|
|
||||||
WoodCutting.add(p, Integer.valueOf(character[5]));
|
|
||||||
Plvl += Integer.valueOf(character[5]);
|
|
||||||
}
|
|
||||||
if(character.length > 7 && m.isInt(character[7])){
|
|
||||||
Repair.add(p, Integer.valueOf(character[7]));
|
|
||||||
Plvl += Integer.valueOf(character[7]);
|
|
||||||
}
|
|
||||||
if(character.length > 8 && m.isInt(character[8])){
|
|
||||||
Unarmed.add(p, Integer.valueOf(character[8]));
|
|
||||||
Plvl += Integer.valueOf(character[8]);
|
|
||||||
}
|
|
||||||
if(character.length > 9 && m.isInt(character[9])){
|
|
||||||
Herbalism.add(p, Integer.valueOf(character[9]));
|
|
||||||
Plvl += Integer.valueOf(character[9]);
|
|
||||||
}
|
|
||||||
if(character.length > 10 && m.isInt(character[10])){
|
|
||||||
Excavation.add(p, Integer.valueOf(character[10]));
|
|
||||||
Plvl += Integer.valueOf(character[10]);
|
|
||||||
}
|
|
||||||
if(character.length > 11 && m.isInt(character[11])){
|
|
||||||
Archery.add(p, Integer.valueOf(character[11]));
|
|
||||||
Plvl += Integer.valueOf(character[11]);
|
|
||||||
}
|
|
||||||
if(character.length > 12 && m.isInt(character[12])){
|
|
||||||
Swords.add(p, Integer.valueOf(character[12]));
|
|
||||||
Plvl += Integer.valueOf(character[12]);
|
|
||||||
}
|
|
||||||
if(character.length > 13 && m.isInt(character[13])){
|
|
||||||
Axes.add(p, Integer.valueOf(character[13]));
|
|
||||||
Plvl += Integer.valueOf(character[13]);
|
|
||||||
}
|
|
||||||
if(character.length > 14 && m.isInt(character[14])){
|
|
||||||
Acrobatics.add(p, Integer.valueOf(character[14]));
|
|
||||||
Plvl += Integer.valueOf(character[14]);
|
|
||||||
}
|
|
||||||
if(character.length > 24 && m.isInt(character[24])){
|
|
||||||
Taming.add(p, Integer.valueOf(character[24]));
|
|
||||||
Plvl += Integer.valueOf(character[24]);
|
|
||||||
}
|
|
||||||
if(character.length > 34 && m.isInt(character[34]))
|
|
||||||
{
|
|
||||||
Fishing.add(p, Integer.valueOf(character[34]));
|
|
||||||
Plvl += Integer.valueOf(character[34]);
|
|
||||||
}
|
|
||||||
|
|
||||||
PowerLevel.add(p, Plvl);
|
|
||||||
}
|
|
||||||
in.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.log(Level.SEVERE, "Exception while reading " //$NON-NLS-1$
|
|
||||||
+ location + " (Are you sure you formatted it correctly?)", e); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
//Write the leader board files
|
|
||||||
leaderWrite(Mining.inOrder(), SkillType.MINING); //$NON-NLS-1$
|
|
||||||
leaderWrite(WoodCutting.inOrder(), SkillType.WOODCUTTING); //$NON-NLS-1$
|
|
||||||
leaderWrite(Repair.inOrder(), SkillType.REPAIR); //$NON-NLS-1$
|
|
||||||
leaderWrite(Unarmed.inOrder(), SkillType.UNARMED); //$NON-NLS-1$
|
|
||||||
leaderWrite(Herbalism.inOrder(), SkillType.HERBALISM); //$NON-NLS-1$
|
|
||||||
leaderWrite(Excavation.inOrder(), SkillType.EXCAVATION); //$NON-NLS-1$
|
|
||||||
leaderWrite(Archery.inOrder(), SkillType.ARCHERY); //$NON-NLS-1$
|
|
||||||
leaderWrite(Swords.inOrder(), SkillType.SWORDS); //$NON-NLS-1$
|
|
||||||
leaderWrite(Axes.inOrder(), SkillType.AXES); //$NON-NLS-1$
|
|
||||||
leaderWrite(Acrobatics.inOrder(), SkillType.ACROBATICS); //$NON-NLS-1$
|
|
||||||
leaderWrite(Taming.inOrder(), SkillType.TAMING); //$NON-NLS-1$
|
|
||||||
leaderWrite(Fishing.inOrder(), SkillType.FISHING); //$NON-NLS-1$
|
|
||||||
leaderWrite(Alchemy.inOrder(), SkillType.ALCHEMY); //$NON-NLS-1$
|
|
||||||
leaderWrite(Enchanting.inOrder(), SkillType.ENCHANTING); //$NON-NLS-1$
|
|
||||||
leaderWrite(PowerLevel.inOrder(), SkillType.ALL); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
public static void leaderWrite(PlayerStat[] ps, SkillType skillType)
|
|
||||||
{
|
|
||||||
String theLocation = "plugins/mcMMO/FlatFileStuff/Leaderboards/" + skillType + ".mcmmo"; //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
//CHECK IF THE FILE EXISTS
|
|
||||||
File theDir = new File(theLocation);
|
|
||||||
if(!theDir.exists())
|
|
||||||
{
|
|
||||||
//properties = new PropertiesFile(location);
|
|
||||||
FileWriter writer = null;
|
|
||||||
try {
|
|
||||||
writer = new FileWriter(theLocation);
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.log(Level.SEVERE, "Exception while creating " + theLocation, e); //$NON-NLS-1$
|
|
||||||
} finally {
|
|
||||||
try {
|
|
||||||
if (writer != null) {
|
|
||||||
writer.close();
|
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
|
||||||
log.log(Level.SEVERE, "Exception while closing writer for " + theLocation, e); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
FileReader file = new FileReader(theLocation);
|
|
||||||
|
|
||||||
//HERP
|
|
||||||
BufferedReader in = new BufferedReader(file);
|
|
||||||
StringBuilder writer = new StringBuilder();
|
|
||||||
|
|
||||||
for(PlayerStat p : ps)
|
|
||||||
{
|
|
||||||
if(p.name.equals("$mcMMO_DummyInfo")) //$NON-NLS-1$
|
|
||||||
continue;
|
|
||||||
if(p.statVal == 0)
|
|
||||||
continue;
|
|
||||||
writer.append(p.name + ":" + p.statVal); //$NON-NLS-1$
|
|
||||||
writer.append("\r\n"); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
|
|
||||||
in.close();
|
|
||||||
//Write the new file
|
|
||||||
FileWriter out = new FileWriter(theLocation);
|
|
||||||
out.write(writer.toString());
|
|
||||||
out.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.log(Level.SEVERE, "Exception while writing to " + theLocation + " (Are you sure you formatted it correctly?)", e); //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//Create/open the file
|
|
||||||
//Loop through backward writing each player
|
|
||||||
//Close the file
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String[] retrieveInfo(String skillName, int pagenumber)
|
|
||||||
{
|
|
||||||
String theLocation = "plugins/mcMMO/FlatFileStuff/Leaderboards/" + skillName + ".mcmmo"; //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
try {
|
|
||||||
FileReader file = new FileReader(theLocation);
|
|
||||||
BufferedReader in = new BufferedReader(file);
|
|
||||||
|
|
||||||
int destination = (pagenumber - 1) * 10; //How many lines to skip through
|
|
||||||
int x = 0; //how many lines we've gone through
|
|
||||||
int y = 0; //going through the lines
|
|
||||||
String line = ""; //$NON-NLS-1$
|
|
||||||
String[] info = new String[10]; //what to return
|
|
||||||
while((line = in.readLine()) != null && y < 10)
|
|
||||||
{
|
|
||||||
x++;
|
|
||||||
if(x >= destination && y < 10){
|
|
||||||
info[y] = line.toString();
|
|
||||||
y++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
in.close();
|
|
||||||
return info;
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.log(Level.SEVERE, "Exception while reading " //$NON-NLS-1$
|
|
||||||
+ theLocation + " (Are you sure you formatted it correctly?)", e); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
return null; //Shouldn't get here
|
|
||||||
}
|
|
||||||
public static void updateLeaderboard(PlayerStat ps, SkillType skillType)
|
|
||||||
{
|
|
||||||
if(LoadProperties.useMySQL)
|
|
||||||
return;
|
|
||||||
String theLocation = "plugins/mcMMO/FlatFileStuff/Leaderboards/" + skillType + ".mcmmo"; //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
try {
|
|
||||||
//Open the file
|
|
||||||
FileReader file = new FileReader(theLocation);
|
|
||||||
BufferedReader in = new BufferedReader(file);
|
|
||||||
StringBuilder writer = new StringBuilder();
|
|
||||||
String line = ""; //$NON-NLS-1$
|
|
||||||
Boolean inserted = false;
|
|
||||||
//While not at the end of the file
|
|
||||||
while((line = in.readLine()) != null)
|
|
||||||
{
|
|
||||||
//Insert the player into the line before it finds a smaller one
|
|
||||||
if(Integer.valueOf(line.split(":")[1]) < ps.statVal && !inserted) //$NON-NLS-1$
|
|
||||||
{
|
|
||||||
writer.append(ps.name + ":" + ps.statVal).append("\r\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
inserted = true;
|
|
||||||
}
|
|
||||||
//Write anything that isn't the player already in the file so we remove the duplicate
|
|
||||||
if(!line.split(":")[0].equalsIgnoreCase(ps.name)) //$NON-NLS-1$
|
|
||||||
{
|
|
||||||
writer.append(line).append("\r\n"); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!inserted)
|
|
||||||
{
|
|
||||||
writer.append(ps.name + ":" + ps.statVal).append("\r\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
}
|
|
||||||
|
|
||||||
in.close();
|
|
||||||
//Write the new file
|
|
||||||
FileWriter out = new FileWriter(theLocation);
|
|
||||||
out.write(writer.toString());
|
|
||||||
out.close();
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.log(Level.SEVERE, "Exception while writing to " + theLocation + " (Are you sure you formatted it correctly?)", e); //$NON-NLS-1$ //$NON-NLS-2$
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of mcMMO.
|
|
||||||
|
|
||||||
mcMMO is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
mcMMO is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with mcMMO. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.gmail.nossr50;
|
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
import java.util.Properties;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import org.bukkit.entity.*;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
|
|
||||||
|
|
||||||
public class Users {
|
|
||||||
private static volatile Users instance;
|
|
||||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
|
||||||
String location = "plugins/mcMMO/FlatFileStuff/mcmmo.users";
|
|
||||||
String directory = "plugins/mcMMO/FlatFileStuff/";
|
|
||||||
String directoryb = "plugins/mcMMO/FlatFileStuff/Leaderboards/";
|
|
||||||
|
|
||||||
//public static ArrayList<PlayerProfile> players;
|
|
||||||
public static HashMap<Player, PlayerProfile> players = new HashMap<Player, PlayerProfile>();
|
|
||||||
private Properties properties = new Properties();
|
|
||||||
|
|
||||||
//To load
|
|
||||||
public void load() throws IOException {
|
|
||||||
properties.load(new FileInputStream(location));
|
|
||||||
}
|
|
||||||
//To save
|
|
||||||
public void save()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
properties.store(new FileOutputStream(location), null);
|
|
||||||
}catch(IOException ex) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void loadUsers()
|
|
||||||
{
|
|
||||||
new File(directory).mkdir();
|
|
||||||
new File(directoryb).mkdir();
|
|
||||||
File theDir = new File(location);
|
|
||||||
if(!theDir.exists())
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
FileWriter writer = new FileWriter(theDir);
|
|
||||||
writer.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
// TODO Auto-generated catch block
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static void addUser(Player player)
|
|
||||||
{
|
|
||||||
players.put(player, new PlayerProfile(player));
|
|
||||||
}
|
|
||||||
public static void clearUsers()
|
|
||||||
{
|
|
||||||
players.clear();
|
|
||||||
}
|
|
||||||
public static HashMap<Player, PlayerProfile> getProfiles(){
|
|
||||||
return players;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void removeUser(Player player)
|
|
||||||
{
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
if(PP != null)
|
|
||||||
{
|
|
||||||
PP.save();
|
|
||||||
if(players.containsKey(player))
|
|
||||||
players.remove(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static PlayerProfile getProfile(Player player){
|
|
||||||
if(players.get(player) != null)
|
|
||||||
return players.get(player);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
players.put(player, new PlayerProfile(player));
|
|
||||||
return players.get(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Users getInstance() {
|
|
||||||
if (instance == null) {
|
|
||||||
instance = new Users();
|
|
||||||
}
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
83
src/main/java/com/gmail/nossr50/api/AbilityAPI.java
Normal file
83
src/main/java/com/gmail/nossr50/api/AbilityAPI.java
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
package com.gmail.nossr50.api;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public final class AbilityAPI {
|
||||||
|
private AbilityAPI() {}
|
||||||
|
|
||||||
|
public static boolean berserkEnabled(Player player) {
|
||||||
|
return UserManager.getPlayer(player).getAbilityMode(AbilityType.BERSERK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean gigaDrillBreakerEnabled(Player player) {
|
||||||
|
return UserManager.getPlayer(player).getAbilityMode(AbilityType.GIGA_DRILL_BREAKER);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean greenTerraEnabled(Player player) {
|
||||||
|
return UserManager.getPlayer(player).getAbilityMode(AbilityType.GREEN_TERRA);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean serratedStrikesEnabled(Player player) {
|
||||||
|
return UserManager.getPlayer(player).getAbilityMode(AbilityType.SERRATED_STRIKES);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean skullSplitterEnabled(Player player) {
|
||||||
|
return UserManager.getPlayer(player).getAbilityMode(AbilityType.SKULL_SPLITTER);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean superBreakerEnabled(Player player) {
|
||||||
|
return UserManager.getPlayer(player).getAbilityMode(AbilityType.SUPER_BREAKER);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean treeFellerEnabled(Player player) {
|
||||||
|
return UserManager.getPlayer(player).getAbilityMode(AbilityType.TREE_FELLER);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isAnyAbilityEnabled(Player player) {
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
|
for (AbilityType ability : AbilityType.values()) {
|
||||||
|
if (mcMMOPlayer.getAbilityMode(ability)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void resetCooldowns(Player player) {
|
||||||
|
UserManager.getPlayer(player).getProfile().resetCooldowns();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setBerserkCooldown(Player player, long cooldown) {
|
||||||
|
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.BERSERK, cooldown);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setGigaDrillBreakerCooldown(Player player, long cooldown) {
|
||||||
|
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.GIGA_DRILL_BREAKER, cooldown);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setGreenTerraCooldown(Player player, long cooldown) {
|
||||||
|
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.GREEN_TERRA, cooldown);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setSerratedStrikesCooldown(Player player, long cooldown) {
|
||||||
|
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.SERRATED_STRIKES, cooldown);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setSkullSplitterCooldown(Player player, long cooldown) {
|
||||||
|
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.SKULL_SPLITTER, cooldown);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setSuperBreakerCooldown(Player player, long cooldown) {
|
||||||
|
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.SUPER_BREAKER, cooldown);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setTreeFellerCooldown(Player player, long cooldown) {
|
||||||
|
UserManager.getPlayer(player).getProfile().setSkillDATS(AbilityType.TREE_FELLER, cooldown);
|
||||||
|
}
|
||||||
|
}
|
||||||
154
src/main/java/com/gmail/nossr50/api/ChatAPI.java
Normal file
154
src/main/java/com/gmail/nossr50/api/ChatAPI.java
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
package com.gmail.nossr50.api;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.chat.ChatManager;
|
||||||
|
import com.gmail.nossr50.chat.ChatManagerFactory;
|
||||||
|
import com.gmail.nossr50.chat.PartyChatManager;
|
||||||
|
import com.gmail.nossr50.datatypes.chat.ChatMode;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public final class ChatAPI {
|
||||||
|
private ChatAPI() {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a message to all members of a party
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param plugin The plugin sending the message
|
||||||
|
* @param sender The name of the sender
|
||||||
|
* @param displayName The display name of the sender
|
||||||
|
* @param party The name of the party to send to
|
||||||
|
* @param message The message to send
|
||||||
|
*/
|
||||||
|
public static void sendPartyChat(Plugin plugin, String sender, String displayName, String party, String message) {
|
||||||
|
getPartyChatManager(plugin, party).handleChat(sender, displayName, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a message to all members of a party
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param plugin The plugin sending the message
|
||||||
|
* @param sender The name of the sender to display in the chat
|
||||||
|
* @param party The name of the party to send to
|
||||||
|
* @param message The message to send
|
||||||
|
*/
|
||||||
|
public static void sendPartyChat(Plugin plugin, String sender, String party, String message) {
|
||||||
|
getPartyChatManager(plugin, party).handleChat(sender, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a message to administrators
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param plugin The plugin sending the message
|
||||||
|
* @param sender The name of the sender
|
||||||
|
* @param displayName The display name of the sender
|
||||||
|
* @param message The message to send
|
||||||
|
*/
|
||||||
|
public static void sendAdminChat(Plugin plugin, String sender, String displayName, String message) {
|
||||||
|
ChatManagerFactory.getChatManager(plugin, ChatMode.ADMIN).handleChat(sender, displayName, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a message to administrators
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param plugin The plugin sending the message
|
||||||
|
* @param sender The name of the sender to display in the chat
|
||||||
|
* @param message The message to send
|
||||||
|
*/
|
||||||
|
public static void sendAdminChat(Plugin plugin, String sender, String message) {
|
||||||
|
ChatManagerFactory.getChatManager(plugin, ChatMode.ADMIN).handleChat(sender, message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a player is currently talking in party chat.
|
||||||
|
*
|
||||||
|
* @param player The player to check
|
||||||
|
* @return true if the player is using party chat, false otherwise
|
||||||
|
*/
|
||||||
|
public static boolean isUsingPartyChat(Player player) {
|
||||||
|
return UserManager.getPlayer(player).getPartyChatMode();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a player is currently talking in party chat.
|
||||||
|
*
|
||||||
|
* @param playerName The name of the player to check
|
||||||
|
* @return true if the player is using party chat, false otherwise
|
||||||
|
*/
|
||||||
|
public static boolean isUsingPartyChat(String playerName) {
|
||||||
|
return UserManager.getPlayer(playerName).getPartyChatMode();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a player is currently talking in admin chat.
|
||||||
|
*
|
||||||
|
* @param player The player to check
|
||||||
|
* @return true if the player is using admin chat, false otherwise
|
||||||
|
*/
|
||||||
|
public static boolean isUsingAdminChat(Player player) {
|
||||||
|
return UserManager.getPlayer(player).getAdminChatMode();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a player is currently talking in admin chat.
|
||||||
|
*
|
||||||
|
* @param playerName The name of the player to check
|
||||||
|
* @return true if the player is using admin chat, false otherwise
|
||||||
|
*/
|
||||||
|
public static boolean isUsingAdminChat(String playerName) {
|
||||||
|
return UserManager.getPlayer(playerName).getAdminChatMode();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle the party chat mode of a player.
|
||||||
|
*
|
||||||
|
* @param player The player to toggle party chat on.
|
||||||
|
*/
|
||||||
|
public static void togglePartyChat(Player player) {
|
||||||
|
UserManager.getPlayer(player).togglePartyChat();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle the party chat mode of a player.
|
||||||
|
*
|
||||||
|
* @param playerName The name of the player to toggle party chat on.
|
||||||
|
*/
|
||||||
|
public static void togglePartyChat(String playerName) {
|
||||||
|
UserManager.getPlayer(playerName).togglePartyChat();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle the admin chat mode of a player.
|
||||||
|
*
|
||||||
|
* @param player The player to toggle admin chat on.
|
||||||
|
*/
|
||||||
|
public static void toggleAdminChat(Player player) {
|
||||||
|
UserManager.getPlayer(player).toggleAdminChat();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle the admin chat mode of a player.
|
||||||
|
*
|
||||||
|
* @param playerName The name of the player to toggle party chat on.
|
||||||
|
*/
|
||||||
|
public static void toggleAdminChat(String playerName) {
|
||||||
|
UserManager.getPlayer(playerName).toggleAdminChat();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ChatManager getPartyChatManager(Plugin plugin, String party) {
|
||||||
|
ChatManager chatManager = ChatManagerFactory.getChatManager(plugin, ChatMode.PARTY);
|
||||||
|
((PartyChatManager) chatManager).setParty(PartyManager.getParty(party));
|
||||||
|
|
||||||
|
return chatManager;
|
||||||
|
}
|
||||||
|
}
|
||||||
629
src/main/java/com/gmail/nossr50/api/ExperienceAPI.java
Normal file
629
src/main/java/com/gmail/nossr50/api/ExperienceAPI.java
Normal file
@@ -0,0 +1,629 @@
|
|||||||
|
package com.gmail.nossr50.api;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.api.exceptions.InvalidPlayerException;
|
||||||
|
import com.gmail.nossr50.api.exceptions.InvalidSkillException;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.skills.child.FamilyTree;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public final class ExperienceAPI {
|
||||||
|
private ExperienceAPI() {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether given string is a valid type of skill suitable for the
|
||||||
|
* other API calls in this class.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param skillType A string that may or may not be a skill
|
||||||
|
* @return true if this is a valid mcMMO skill
|
||||||
|
*/
|
||||||
|
public static boolean isValidSkillType(String skillType) {
|
||||||
|
return SkillType.getSkill(skillType) != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether the given skill type string is both valid and not a
|
||||||
|
* child skill. (Child skills have no XP of their own, and their level is
|
||||||
|
* derived from the parent(s).)
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param skillType the skill to check
|
||||||
|
* @return true if this is a valid, non-child mcMMO skill
|
||||||
|
*/
|
||||||
|
public static boolean isNonChildSkill(String skillType) {
|
||||||
|
SkillType skill = SkillType.getSkill(skillType);
|
||||||
|
|
||||||
|
if (skill == null) return false;
|
||||||
|
|
||||||
|
return !skill.isChildSkill();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static void addRawXP(Player player, String skillType, int XP) {
|
||||||
|
addRawXP(player, skillType, (float) XP);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds raw XP to the player.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to add XP to
|
||||||
|
* @param skillType The skill to add XP to
|
||||||
|
* @param XP The amount of XP to add
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
*/
|
||||||
|
public static void addRawXP(Player player, String skillType, float XP) {
|
||||||
|
UserManager.getPlayer(player).applyXpGain(getSkillType(skillType), XP);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static void addRawXPOffline(String playerName, String skillType, int XP) {
|
||||||
|
addRawXPOffline(playerName, skillType, (float) XP);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds raw XP to an offline player.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The player to add XP to
|
||||||
|
* @param skillType The skill to add XP to
|
||||||
|
* @param XP The amount of XP to add
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
*/
|
||||||
|
public static void addRawXPOffline(String playerName, String skillType, float XP) {
|
||||||
|
addOfflineXP(playerName, getSkillType(skillType), (int) Math.floor(XP));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds XP to the player, calculates for XP Rate only.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to add XP to
|
||||||
|
* @param skillType The skill to add XP to
|
||||||
|
* @param XP The amount of XP to add
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
*/
|
||||||
|
public static void addMultipliedXP(Player player, String skillType, int XP) {
|
||||||
|
UserManager.getPlayer(player).applyXpGain(getSkillType(skillType), (int) (XP * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds XP to an offline player, calculates for XP Rate only.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The player to add XP to
|
||||||
|
* @param skillType The skill to add XP to
|
||||||
|
* @param XP The amount of XP to add
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
*/
|
||||||
|
public static void addMultipliedXPOffline(String playerName, String skillType, int XP) {
|
||||||
|
addOfflineXP(playerName, getSkillType(skillType), (int) (XP * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds XP to the player, calculates for XP Rate and skill modifier.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to add XP to
|
||||||
|
* @param skillType The skill to add XP to
|
||||||
|
* @param XP The amount of XP to add
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
*/
|
||||||
|
public static void addModifiedXP(Player player, String skillType, int XP) {
|
||||||
|
SkillType skill = getSkillType(skillType);
|
||||||
|
|
||||||
|
UserManager.getPlayer(player).applyXpGain(skill, (int) (XP / skill.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds XP to an offline player, calculates for XP Rate and skill modifier.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The player to add XP to
|
||||||
|
* @param skillType The skill to add XP to
|
||||||
|
* @param XP The amount of XP to add
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
*/
|
||||||
|
public static void addModifiedXPOffline(String playerName, String skillType, int XP) {
|
||||||
|
SkillType skill = getSkillType(skillType);
|
||||||
|
|
||||||
|
addOfflineXP(playerName, skill, (int) (XP / skill.getXpModifier() * ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds XP to the player, calculates for XP Rate, skill modifiers, perks, child skills,
|
||||||
|
* and party sharing.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to add XP to
|
||||||
|
* @param skillType The skill to add XP to
|
||||||
|
* @param XP The amount of XP to add
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
*/
|
||||||
|
public static void addXP(Player player, String skillType, int XP) {
|
||||||
|
UserManager.getPlayer(player).beginXpGain(getSkillType(skillType), XP);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the amount of XP a player has in a specific skill.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to get XP for
|
||||||
|
* @param skillType The skill to get XP for
|
||||||
|
* @return the amount of XP in a given skill
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
|
*/
|
||||||
|
public static int getXP(Player player, String skillType) {
|
||||||
|
return UserManager.getPlayer(player).getProfile().getSkillXpLevel(getNonChildSkillType(skillType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the amount of XP an offline player has in a specific skill.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The player to get XP for
|
||||||
|
* @param skillType The skill to get XP for
|
||||||
|
* @return the amount of XP in a given skill
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
|
*/
|
||||||
|
public static int getOfflineXP(String playerName, String skillType) {
|
||||||
|
return getOfflineProfile(playerName).getSkillXpLevel(getNonChildSkillType(skillType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the raw amount of XP a player has in a specific skill.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to get XP for
|
||||||
|
* @param skillType The skill to get XP for
|
||||||
|
* @return the amount of XP in a given skill
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
|
*/
|
||||||
|
public static float getXPRaw(Player player, String skillType) {
|
||||||
|
return UserManager.getPlayer(player).getProfile().getSkillXpLevelRaw(getNonChildSkillType(skillType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the raw amount of XP an offline player has in a specific skill.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The player to get XP for
|
||||||
|
* @param skillType The skill to get XP for
|
||||||
|
* @return the amount of XP in a given skill
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
|
*/
|
||||||
|
public static float getOfflineXPRaw(String playerName, String skillType) {
|
||||||
|
return getOfflineProfile(playerName).getSkillXpLevelRaw(getNonChildSkillType(skillType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the total amount of XP needed to reach the next level.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to get the XP amount for
|
||||||
|
* @param skillType The skill to get the XP amount for
|
||||||
|
* @return the total amount of XP needed to reach the next level
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
|
*/
|
||||||
|
public static int getXPToNextLevel(Player player, String skillType) {
|
||||||
|
return UserManager.getPlayer(player).getProfile().getXpToLevel(getNonChildSkillType(skillType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the total amount of XP an offline player needs to reach the next level.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The player to get XP for
|
||||||
|
* @param skillType The skill to get XP for
|
||||||
|
* @return the total amount of XP needed to reach the next level
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
|
*/
|
||||||
|
public static int getOfflineXPToNextLevel(String playerName, String skillType) {
|
||||||
|
return getOfflineProfile(playerName).getXpToLevel(getNonChildSkillType(skillType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the amount of XP remaining until the next level.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to get the XP amount for
|
||||||
|
* @param skillType The skill to get the XP amount for
|
||||||
|
* @return the amount of XP remaining until the next level
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
|
*/
|
||||||
|
public static int getXPRemaining(Player player, String skillType) {
|
||||||
|
SkillType skill = getNonChildSkillType(skillType);
|
||||||
|
|
||||||
|
PlayerProfile profile = UserManager.getPlayer(player).getProfile();
|
||||||
|
|
||||||
|
return profile.getXpToLevel(skill) - profile.getSkillXpLevel(skill);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the amount of XP an offline player has left before leveling up.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The player to get XP for
|
||||||
|
* @param skillType The skill to get XP for
|
||||||
|
* @return the amount of XP needed to reach the next level
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
|
*/
|
||||||
|
public static int getOfflineXPRemaining(String playerName, String skillType) {
|
||||||
|
SkillType skill = getNonChildSkillType(skillType);
|
||||||
|
|
||||||
|
PlayerProfile profile = getOfflineProfile(playerName);
|
||||||
|
|
||||||
|
return profile.getXpToLevel(skill) - profile.getSkillXpLevel(skill);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add levels to a skill.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to add levels to
|
||||||
|
* @param skillType Type of skill to add levels to
|
||||||
|
* @param levels Number of levels to add
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
*/
|
||||||
|
public static void addLevel(Player player, String skillType, int levels) {
|
||||||
|
UserManager.getPlayer(player).getProfile().addLevels(getSkillType(skillType), levels);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add levels to a skill for an offline player.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The player to add levels to
|
||||||
|
* @param skillType Type of skill to add levels to
|
||||||
|
* @param levels Number of levels to add
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
*/
|
||||||
|
public static void addLevelOffline(String playerName, String skillType, int levels) {
|
||||||
|
PlayerProfile profile = getOfflineProfile(playerName);
|
||||||
|
SkillType skill = getSkillType(skillType);
|
||||||
|
|
||||||
|
if (skill.isChildSkill()) {
|
||||||
|
Set<SkillType> parentSkills = FamilyTree.getParents(skill);
|
||||||
|
|
||||||
|
for (SkillType parentSkill : parentSkills) {
|
||||||
|
profile.addLevels(parentSkill, (levels / parentSkills.size()));
|
||||||
|
}
|
||||||
|
|
||||||
|
profile.save();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
profile.addLevels(skill, levels);
|
||||||
|
profile.save();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the level a player has in a specific skill.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to get the level for
|
||||||
|
* @param skillType The skill to get the level for
|
||||||
|
* @return the level of a given skill
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
*/
|
||||||
|
public static int getLevel(Player player, String skillType) {
|
||||||
|
return UserManager.getPlayer(player).getProfile().getSkillLevel(getSkillType(skillType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the level an offline player has in a specific skill.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The player to get the level for
|
||||||
|
* @param skillType The skill to get the level for
|
||||||
|
* @return the level of a given skill
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
*/
|
||||||
|
public static int getLevelOffline(String playerName, String skillType) {
|
||||||
|
return getOfflineProfile(playerName).getSkillLevel(getSkillType(skillType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the power level of a player.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to get the power level for
|
||||||
|
* @return the power level of the player
|
||||||
|
*/
|
||||||
|
public static int getPowerLevel(Player player) {
|
||||||
|
return UserManager.getPlayer(player).getPowerLevel();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the power level of an offline player.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The player to get the power level for
|
||||||
|
* @return the power level of the player
|
||||||
|
*
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
*/
|
||||||
|
public static int getPowerLevelOffline(String playerName) {
|
||||||
|
int powerLevel = 0;
|
||||||
|
PlayerProfile profile = getOfflineProfile(playerName);
|
||||||
|
|
||||||
|
for (SkillType type : SkillType.NON_CHILD_SKILLS) {
|
||||||
|
powerLevel += profile.getSkillLevel(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
return powerLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the level cap of a specific skill.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param skillType The skill to get the level cap for
|
||||||
|
* @return the level cap of a given skill
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
*/
|
||||||
|
public static int getLevelCap(String skillType) {
|
||||||
|
return Config.getInstance().getLevelCap(getSkillType(skillType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the power level cap.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @return the overall power level cap
|
||||||
|
*/
|
||||||
|
public static int getPowerLevelCap() {
|
||||||
|
return Config.getInstance().getPowerLevelCap();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the position on the leaderboard of a player.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The name of the player to check
|
||||||
|
* @param skillType The skill to check
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
|
*
|
||||||
|
* @return the position on the leaderboard
|
||||||
|
*/
|
||||||
|
public static int getPlayerRankSkill(String playerName, String skillType) {
|
||||||
|
return mcMMO.getDatabaseManager().readRank(getOfflineProfile(playerName).getPlayerName()).get(getNonChildSkillType(skillType));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the position on the power level leaderboard of a player.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The name of the player to check
|
||||||
|
*
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
*
|
||||||
|
* @return the position on the power level leaderboard
|
||||||
|
*/
|
||||||
|
public static int getPlayerRankOverall(String playerName) {
|
||||||
|
return mcMMO.getDatabaseManager().readRank(getOfflineProfile(playerName).getPlayerName()).get(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the level of a player in a specific skill type.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to set the level of
|
||||||
|
* @param skillType The skill to set the level for
|
||||||
|
* @param skillLevel The value to set the level to
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
*/
|
||||||
|
public static void setLevel(Player player, String skillType, int skillLevel) {
|
||||||
|
UserManager.getPlayer(player).getProfile().modifySkill(getSkillType(skillType), skillLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the level of an offline player in a specific skill type.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The player to set the level of
|
||||||
|
* @param skillType The skill to set the level for
|
||||||
|
* @param skillLevel The value to set the level to
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
*/
|
||||||
|
public static void setLevelOffline(String playerName, String skillType, int skillLevel) {
|
||||||
|
getOfflineProfile(playerName).modifySkill(getSkillType(skillType), skillLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the XP of a player in a specific skill type.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to set the XP of
|
||||||
|
* @param skillType The skill to set the XP for
|
||||||
|
* @param newValue The value to set the XP to
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
|
*/
|
||||||
|
public static void setXP(Player player, String skillType, int newValue) {
|
||||||
|
UserManager.getPlayer(player).getProfile().setSkillXpLevel(getNonChildSkillType(skillType), newValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the XP of an offline player in a specific skill type.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The player to set the XP of
|
||||||
|
* @param skillType The skill to set the XP for
|
||||||
|
* @param newValue The value to set the XP to
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
|
*/
|
||||||
|
public static void setXPOffline(String playerName, String skillType, int newValue) {
|
||||||
|
getOfflineProfile(playerName).setSkillXpLevel(getNonChildSkillType(skillType), newValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes XP from a player in a specific skill type.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to change the XP of
|
||||||
|
* @param skillType The skill to change the XP for
|
||||||
|
* @param xp The amount of XP to remove
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
|
*/
|
||||||
|
public static void removeXP(Player player, String skillType, int xp) {
|
||||||
|
UserManager.getPlayer(player).getProfile().removeXp(getNonChildSkillType(skillType), xp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes XP from an offline player in a specific skill type.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playerName The player to change the XP of
|
||||||
|
* @param skillType The skill to change the XP for
|
||||||
|
* @param xp The amount of XP to remove
|
||||||
|
*
|
||||||
|
* @throws InvalidSkillException if the given skill is not valid
|
||||||
|
* @throws InvalidPlayerException if the given player does not exist in the database
|
||||||
|
* @throws UnsupportedOperationException if the given skill is a child skill
|
||||||
|
*/
|
||||||
|
public static void removeXPOffline(String playerName, String skillType, int xp) {
|
||||||
|
getOfflineProfile(playerName).removeXp(getNonChildSkillType(skillType), xp);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Utility methods follow.
|
||||||
|
|
||||||
|
private static void addOfflineXP(String playerName, SkillType skill, int XP) {
|
||||||
|
PlayerProfile profile = getOfflineProfile(playerName);
|
||||||
|
|
||||||
|
if (skill.isChildSkill()) {
|
||||||
|
Set<SkillType> parentSkills = FamilyTree.getParents(skill);
|
||||||
|
|
||||||
|
for (SkillType parentSkill : parentSkills) {
|
||||||
|
profile.setSkillXpLevel(parentSkill, profile.getSkillLevel(parentSkill) + (XP / parentSkills.size()));
|
||||||
|
}
|
||||||
|
|
||||||
|
profile.save();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
profile.setSkillXpLevel(skill, profile.getSkillXpLevel(skill) + XP);
|
||||||
|
profile.save();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static PlayerProfile getOfflineProfile(String playerName) {
|
||||||
|
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false);
|
||||||
|
|
||||||
|
if (!profile.isLoaded()) {
|
||||||
|
throw new InvalidPlayerException();
|
||||||
|
}
|
||||||
|
|
||||||
|
return profile;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static SkillType getSkillType(String skillType) throws InvalidSkillException {
|
||||||
|
SkillType skill = SkillType.getSkill(skillType);
|
||||||
|
|
||||||
|
if (skill == null) {
|
||||||
|
throw new InvalidSkillException();
|
||||||
|
}
|
||||||
|
|
||||||
|
return skill;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static SkillType getNonChildSkillType(String skillType) throws InvalidSkillException, UnsupportedOperationException {
|
||||||
|
SkillType skill = getSkillType(skillType);
|
||||||
|
|
||||||
|
if (skill.isChildSkill()) {
|
||||||
|
throw new UnsupportedOperationException("Child skills do not have XP");
|
||||||
|
}
|
||||||
|
|
||||||
|
return skill;
|
||||||
|
}
|
||||||
|
}
|
||||||
177
src/main/java/com/gmail/nossr50/api/PartyAPI.java
Normal file
177
src/main/java/com/gmail/nossr50/api/PartyAPI.java
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
package com.gmail.nossr50.api;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public final class PartyAPI {
|
||||||
|
private PartyAPI() {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the name of the party a player is in.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to check the party name of
|
||||||
|
* @return the name of the player's party, or null if not in a party
|
||||||
|
*/
|
||||||
|
public static String getPartyName(Player player) {
|
||||||
|
if (!inParty(player)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return UserManager.getPlayer(player).getParty().getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a player is in a party.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to check
|
||||||
|
* @return true if the player is in a party, false otherwise
|
||||||
|
*/
|
||||||
|
public static boolean inParty(Player player) {
|
||||||
|
return UserManager.getPlayer(player).inParty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if two players are in the same party.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param playera The first player to check
|
||||||
|
* @param playerb The second player to check
|
||||||
|
* @return true if the two players are in the same party, false otherwise
|
||||||
|
*/
|
||||||
|
public static boolean inSameParty(Player playera, Player playerb) {
|
||||||
|
return PartyManager.inSameParty(playera, playerb);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of all current parties.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @return the list of parties.
|
||||||
|
*/
|
||||||
|
public static List<Party> getParties() {
|
||||||
|
return PartyManager.getParties();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a player to a party.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to add to the party
|
||||||
|
* @param partyName The party to add the player to
|
||||||
|
*/
|
||||||
|
public static void addToParty(Player player, String partyName) {
|
||||||
|
Party party = PartyManager.getParty(partyName);
|
||||||
|
|
||||||
|
if (party == null) {
|
||||||
|
party = new Party(player.getName(), partyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
PartyManager.addToParty(UserManager.getPlayer(player), party);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a player from a party.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to remove
|
||||||
|
*/
|
||||||
|
public static void removeFromParty(Player player) {
|
||||||
|
PartyManager.removeFromParty(UserManager.getPlayer(player));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the leader of a party.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param partyName The party name
|
||||||
|
* @return the leader of the party
|
||||||
|
*/
|
||||||
|
public static String getPartyLeader(String partyName) {
|
||||||
|
return PartyManager.getPartyLeader(partyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the leader of a party.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param partyName The name of the party to set the leader of
|
||||||
|
* @param player The player to set as leader
|
||||||
|
*/
|
||||||
|
public static void setPartyLeader(String partyName, String player) {
|
||||||
|
PartyManager.setPartyLeader(player, PartyManager.getParty(partyName));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of all players in this player's party.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to check
|
||||||
|
* @return all the players in the player's party
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public static List<OfflinePlayer> getOnlineAndOfflineMembers(Player player) {
|
||||||
|
List<OfflinePlayer> members = new ArrayList<OfflinePlayer>();
|
||||||
|
|
||||||
|
for (String memberName : PartyManager.getAllMembers(player)) {
|
||||||
|
OfflinePlayer member = mcMMO.p.getServer().getOfflinePlayer(memberName);
|
||||||
|
members.add(member);
|
||||||
|
}
|
||||||
|
return members;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of all player names in this player's party.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to check
|
||||||
|
* @return all the player names in the player's party
|
||||||
|
*/
|
||||||
|
public static LinkedHashSet<String> getMembers(Player player) {
|
||||||
|
return PartyManager.getAllMembers(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of all online players in this party.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param partyName The party to check
|
||||||
|
* @return all online players in this party
|
||||||
|
*/
|
||||||
|
public static List<Player> getOnlineMembers(String partyName) {
|
||||||
|
return PartyManager.getOnlineMembers(partyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of all online players in this player's party.
|
||||||
|
* </br>
|
||||||
|
* This function is designed for API usage.
|
||||||
|
*
|
||||||
|
* @param player The player to check
|
||||||
|
* @return all online players in the player's party
|
||||||
|
*/
|
||||||
|
public static List<Player> getOnlineMembers(Player player) {
|
||||||
|
return PartyManager.getOnlineMembers(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.gmail.nossr50.api.exceptions;
|
||||||
|
|
||||||
|
public class InvalidPlayerException extends RuntimeException {
|
||||||
|
private static final long serialVersionUID = 907213002618581385L;
|
||||||
|
|
||||||
|
public InvalidPlayerException() {
|
||||||
|
super("That player does not exist in the database.");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.gmail.nossr50.api.exceptions;
|
||||||
|
|
||||||
|
public class InvalidSkillException extends RuntimeException {
|
||||||
|
private static final long serialVersionUID = 942705284195791157L;
|
||||||
|
|
||||||
|
public InvalidSkillException() {
|
||||||
|
super("That is not a valid skill.");
|
||||||
|
}
|
||||||
|
}
|
||||||
22
src/main/java/com/gmail/nossr50/chat/AdminChatManager.java
Normal file
22
src/main/java/com/gmail/nossr50/chat/AdminChatManager.java
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
package com.gmail.nossr50.chat;
|
||||||
|
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.events.chat.McMMOAdminChatEvent;
|
||||||
|
|
||||||
|
public class AdminChatManager extends ChatManager {
|
||||||
|
protected AdminChatManager(Plugin plugin) {
|
||||||
|
super(plugin, Config.getInstance().getAdminDisplayNames(), Config.getInstance().getAdminChatPrefix());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleChat(String senderName, String displayName, String message, boolean isAsync) {
|
||||||
|
handleChat(new McMMOAdminChatEvent(plugin, senderName, displayName, message, isAsync));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void sendMessage() {
|
||||||
|
plugin.getServer().broadcast(message, "mcmmo.chat.adminchat");
|
||||||
|
}
|
||||||
|
}
|
||||||
53
src/main/java/com/gmail/nossr50/chat/ChatManager.java
Normal file
53
src/main/java/com/gmail/nossr50/chat/ChatManager.java
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
package com.gmail.nossr50.chat;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.events.chat.McMMOChatEvent;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
|
||||||
|
public abstract class ChatManager {
|
||||||
|
protected Plugin plugin;
|
||||||
|
protected boolean useDisplayNames;
|
||||||
|
protected String chatPrefix;
|
||||||
|
|
||||||
|
protected String senderName;
|
||||||
|
protected String displayName;
|
||||||
|
protected String message;
|
||||||
|
|
||||||
|
protected ChatManager(Plugin plugin, boolean useDisplayNames, String chatPrefix) {
|
||||||
|
this.plugin = plugin;
|
||||||
|
this.useDisplayNames = useDisplayNames;
|
||||||
|
this.chatPrefix = chatPrefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void handleChat(McMMOChatEvent event) {
|
||||||
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
|
if (event.isCancelled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
senderName = event.getSender();
|
||||||
|
displayName = useDisplayNames ? event.getDisplayName() : senderName;
|
||||||
|
message = LocaleLoader.formatString(chatPrefix, displayName) + " " + event.getMessage();
|
||||||
|
|
||||||
|
sendMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void handleChat(String senderName, String message) {
|
||||||
|
handleChat(senderName, senderName, message, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void handleChat(Player player, String message, boolean isAsync) {
|
||||||
|
handleChat(player.getName(), player.getDisplayName(), message, isAsync);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void handleChat(String senderName, String displayName, String message) {
|
||||||
|
handleChat(senderName, displayName, message, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract void handleChat(String senderName, String displayName, String message, boolean isAsync);
|
||||||
|
|
||||||
|
protected abstract void sendMessage();
|
||||||
|
}
|
||||||
31
src/main/java/com/gmail/nossr50/chat/ChatManagerFactory.java
Normal file
31
src/main/java/com/gmail/nossr50/chat/ChatManagerFactory.java
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
package com.gmail.nossr50.chat;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.chat.ChatMode;
|
||||||
|
|
||||||
|
public class ChatManagerFactory {
|
||||||
|
private static final HashMap<Plugin, AdminChatManager> adminChatManagers = new HashMap<Plugin, AdminChatManager>();
|
||||||
|
private static final HashMap<Plugin, PartyChatManager> partyChatManagers = new HashMap<Plugin, PartyChatManager>();
|
||||||
|
|
||||||
|
public static ChatManager getChatManager(Plugin plugin, ChatMode mode) {
|
||||||
|
switch (mode) {
|
||||||
|
case ADMIN:
|
||||||
|
if (!adminChatManagers.containsKey(plugin)) {
|
||||||
|
adminChatManagers.put(plugin, new AdminChatManager(plugin));
|
||||||
|
}
|
||||||
|
|
||||||
|
return adminChatManagers.get(plugin);
|
||||||
|
case PARTY:
|
||||||
|
if (!partyChatManagers.containsKey(plugin)) {
|
||||||
|
partyChatManagers.put(plugin, new PartyChatManager(plugin));
|
||||||
|
}
|
||||||
|
|
||||||
|
return partyChatManagers.get(plugin);
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
39
src/main/java/com/gmail/nossr50/chat/PartyChatManager.java
Normal file
39
src/main/java/com/gmail/nossr50/chat/PartyChatManager.java
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
package com.gmail.nossr50.chat;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.events.chat.McMMOPartyChatEvent;
|
||||||
|
|
||||||
|
public class PartyChatManager extends ChatManager {
|
||||||
|
private Party party;
|
||||||
|
|
||||||
|
protected PartyChatManager(Plugin plugin) {
|
||||||
|
super(plugin, Config.getInstance().getPartyDisplayNames(), Config.getInstance().getPartyChatPrefix());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParty(Party party) {
|
||||||
|
this.party = party;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleChat(String senderName, String displayName, String message, boolean isAsync) {
|
||||||
|
handleChat(new McMMOPartyChatEvent(plugin, senderName, displayName, party.getName(), message, isAsync));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void sendMessage() {
|
||||||
|
if (Config.getInstance().getPartyChatColorLeaderName() && senderName.equalsIgnoreCase(party.getLeader())) {
|
||||||
|
message = message.replaceFirst(displayName, ChatColor.GOLD + displayName + ChatColor.RESET);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Player member : party.getOnlineMembers()) {
|
||||||
|
member.sendMessage(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
plugin.getLogger().info("[P]<" + party.getName() + ">" + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
68
src/main/java/com/gmail/nossr50/commands/KrakenCommand.java
Normal file
68
src/main/java/com/gmail/nossr50/commands/KrakenCommand.java
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class KrakenCommand implements TabExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Permissions.kraken(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserManager.getPlayer((Player) sender).getFishingManager().unleashTheKraken();
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
if (!Permissions.krakenOthers(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(args[0], true);
|
||||||
|
|
||||||
|
if (mcMMOPlayer == null) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Offline"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMOPlayer.getFishingManager().unleashTheKraken();
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
Set<String> playerNames = UserManager.getPlayerNames();
|
||||||
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
|
public class McabilityCommand extends ToggleCommand {
|
||||||
|
@Override
|
||||||
|
protected boolean hasOtherPermission(CommandSender sender) {
|
||||||
|
return Permissions.mcabilityOthers(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean hasSelfPermission(CommandSender sender) {
|
||||||
|
return Permissions.mcability(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void applyCommandAction() {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Ability." + (mcMMOPlayer.getAbilityUse() ? "Off" : "On")));
|
||||||
|
mcMMOPlayer.toggleAbilityUse();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void sendSuccessMessage(CommandSender sender) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Ability.Toggle"));
|
||||||
|
}
|
||||||
|
}
|
||||||
29
src/main/java/com/gmail/nossr50/commands/McgodCommand.java
Normal file
29
src/main/java/com/gmail/nossr50/commands/McgodCommand.java
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
|
public class McgodCommand extends ToggleCommand {
|
||||||
|
@Override
|
||||||
|
protected boolean hasOtherPermission(CommandSender sender) {
|
||||||
|
return Permissions.mcgodOthers(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean hasSelfPermission(CommandSender sender) {
|
||||||
|
return Permissions.mcgod(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void applyCommandAction() {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.GodMode." + (mcMMOPlayer.getGodMode() ? "Disabled" : "Enabled")));
|
||||||
|
mcMMOPlayer.toggleGodMode();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void sendSuccessMessage(CommandSender sender) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.GodMode.Success"));
|
||||||
|
}
|
||||||
|
}
|
||||||
108
src/main/java/com/gmail/nossr50/commands/McmmoCommand.java
Normal file
108
src/main/java/com/gmail/nossr50/commands/McmmoCommand.java
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.commands.party.PartySubcommandType;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.HolidayManager;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
|
public class McmmoCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
if (!Permissions.mcmmoDescription(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String description = LocaleLoader.getString("mcMMO.Description");
|
||||||
|
String[] mcSplit = description.split(",");
|
||||||
|
sender.sendMessage(mcSplit);
|
||||||
|
|
||||||
|
if (Config.getInstance().getDonateMessageEnabled()) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("MOTD.Donate"));
|
||||||
|
sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "gjmcferrin@gmail.com" + ChatColor.GOLD + " Paypal");
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion()));
|
||||||
|
HolidayManager.anniversaryCheck(sender);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
if (args[0].equalsIgnoreCase("?") || args[0].equalsIgnoreCase("help") || args[0].equalsIgnoreCase("commands")) {
|
||||||
|
if (!Permissions.mcmmoHelp(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.mcc.Header"));
|
||||||
|
displayPartyCommands(sender);
|
||||||
|
displayOtherCommands(sender);
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void displayPartyCommands(CommandSender sender) {
|
||||||
|
if (Permissions.party(sender)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Party.Commands"));
|
||||||
|
sender.sendMessage(" /party create <" + LocaleLoader.getString("Commands.Usage.PartyName") + "> " + LocaleLoader.getString("Commands.Party1"));
|
||||||
|
sender.sendMessage(" /party join <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party2"));
|
||||||
|
sender.sendMessage(" /party quit " + LocaleLoader.getString("Commands.Party.Quit"));
|
||||||
|
|
||||||
|
if (Permissions.partyChat(sender)) {
|
||||||
|
sender.sendMessage(" /party chat " + LocaleLoader.getString("Commands.Party.Toggle"));
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.sendMessage(" /party invite <" + LocaleLoader.getString("Commands.Usage.Player") + "> " + LocaleLoader.getString("Commands.Party.Invite"));
|
||||||
|
sender.sendMessage(" /party accept " + LocaleLoader.getString("Commands.Party.Accept"));
|
||||||
|
|
||||||
|
if (Permissions.partySubcommand(sender, PartySubcommandType.TELEPORT)) {
|
||||||
|
sender.sendMessage(" /party teleport " + LocaleLoader.getString("Commands.Party.Teleport"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void displayOtherCommands(CommandSender sender) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Other"));
|
||||||
|
sender.sendMessage(" /mcstats " + LocaleLoader.getString("Commands.Stats"));
|
||||||
|
sender.sendMessage(" /mctop " + LocaleLoader.getString("Commands.Leaderboards"));
|
||||||
|
|
||||||
|
if (Permissions.skillreset(sender)) {
|
||||||
|
sender.sendMessage(" /skillreset <skill|all> " + LocaleLoader.getString("Commands.Reset"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Permissions.mcability(sender)) {
|
||||||
|
sender.sendMessage(" /mcability " + LocaleLoader.getString("Commands.ToggleAbility"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Permissions.adminChat(sender)) {
|
||||||
|
sender.sendMessage(" /adminchat " + LocaleLoader.getString("Commands.AdminToggle"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Permissions.inspect(sender)) {
|
||||||
|
sender.sendMessage(" /inspect " + LocaleLoader.getString("Commands.Inspect"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Permissions.mmoedit(sender)) {
|
||||||
|
sender.sendMessage(" /mmoedit " + LocaleLoader.getString("Commands.mmoedit"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Permissions.mcgod(sender)) {
|
||||||
|
sender.sendMessage(" /mcgod " + LocaleLoader.getString("Commands.mcgod"));
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.sendMessage(" /<skill>" + LocaleLoader.getString("Commands.SkillInfo"));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class McnotifyCommand implements TabExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer((Player) sender);
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Notifications." + (mcMMOPlayer.useChatNotifications() ? "Off" : "On")));
|
||||||
|
mcMMOPlayer.toggleChatNotifications();
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
|
public class McrefreshCommand extends ToggleCommand {
|
||||||
|
@Override
|
||||||
|
protected boolean hasOtherPermission(CommandSender sender) {
|
||||||
|
return Permissions.mcrefreshOthers(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean hasSelfPermission(CommandSender sender) {
|
||||||
|
return Permissions.mcrefresh(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void applyCommandAction() {
|
||||||
|
mcMMOPlayer.setRecentlyHurt(0);
|
||||||
|
mcMMOPlayer.getProfile().resetCooldowns();
|
||||||
|
mcMMOPlayer.resetToolPrepMode();
|
||||||
|
mcMMOPlayer.resetAbilityMode();
|
||||||
|
|
||||||
|
player.sendMessage(LocaleLoader.getString("Ability.Generic.Refresh"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void sendSuccessMessage(CommandSender sender) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.mcrefresh.Success", player.getName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class McscoreboardCommand implements TabExecutor {
|
||||||
|
private static final List<String> FIRST_ARGS = ImmutableList.of("keep", "time", "clear");
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
if (args[0].equalsIgnoreCase("clear") || args[0].equalsIgnoreCase("reset")) {
|
||||||
|
ScoreboardManager.clearBoard(sender.getName());
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Clear"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args[0].equalsIgnoreCase("keep")) {
|
||||||
|
if (!Config.getInstance().getAllowKeepBoard()) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Disabled"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ScoreboardManager.isBoardShown(sender.getName())) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Scoreboard.NoBoard"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
ScoreboardManager.keepBoard(sender.getName());
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Keep"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return help(sender);
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
if (args[0].equalsIgnoreCase("time") || args[0].equalsIgnoreCase("timer")) {
|
||||||
|
if (CommandUtils.isInvalidInteger(sender, args[1])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int time = Math.abs(Integer.parseInt(args[1]));
|
||||||
|
|
||||||
|
ScoreboardManager.setRevertTimer(sender.getName(), time);
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Timer", time));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return help(sender);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return help(sender);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
return StringUtil.copyPartialMatches(args[0], FIRST_ARGS, new ArrayList<String>(FIRST_ARGS.size()));
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean help(CommandSender sender) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Help.0"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Help.1"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Help.2"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Scoreboard.Help.3"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.MobHealthbarType;
|
||||||
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class MobhealthCommand implements TabExecutor {
|
||||||
|
private static final List<String> MOB_HEALTHBAR_TYPES;
|
||||||
|
|
||||||
|
static {
|
||||||
|
ArrayList<String> types = new ArrayList<String>();
|
||||||
|
|
||||||
|
for (MobHealthbarType type : MobHealthbarType.values()) {
|
||||||
|
types.add(type.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
Collections.sort(types);
|
||||||
|
MOB_HEALTHBAR_TYPES = ImmutableList.copyOf(types);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
PlayerProfile playerProfile = UserManager.getPlayer((Player) sender).getProfile();
|
||||||
|
|
||||||
|
try {
|
||||||
|
MobHealthbarType type = MobHealthbarType.valueOf(args[0].toUpperCase().trim());
|
||||||
|
playerProfile.setMobHealthbarType(type);
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Healthbars.Changed." + type.name()));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (IllegalArgumentException ex) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Healthbars.Invalid"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
return StringUtil.copyPartialMatches(args[0], MOB_HEALTHBAR_TYPES, new ArrayList<String>(MOB_HEALTHBAR_TYPES.size()));
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
81
src/main/java/com/gmail/nossr50/commands/ToggleCommand.java
Normal file
81
src/main/java/com/gmail/nossr50/commands/ToggleCommand.java
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public abstract class ToggleCommand implements TabExecutor {
|
||||||
|
protected McMMOPlayer mcMMOPlayer;
|
||||||
|
protected Player player;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!hasSelfPermission(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
player = (Player) sender;
|
||||||
|
mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
|
applyCommandAction();
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
if (!hasOtherPermission(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMOPlayer = UserManager.getPlayer(args[0], true);
|
||||||
|
|
||||||
|
if (mcMMOPlayer == null) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Offline"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
player = mcMMOPlayer.getPlayer();
|
||||||
|
|
||||||
|
applyCommandAction();
|
||||||
|
sendSuccessMessage(sender);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
Set<String> playerNames = UserManager.getPlayerNames();
|
||||||
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract boolean hasOtherPermission(CommandSender sender);
|
||||||
|
protected abstract boolean hasSelfPermission(CommandSender sender);
|
||||||
|
protected abstract void applyCommandAction();
|
||||||
|
protected abstract void sendSuccessMessage(CommandSender sender);
|
||||||
|
}
|
||||||
101
src/main/java/com/gmail/nossr50/commands/XprateCommand.java
Normal file
101
src/main/java/com/gmail/nossr50/commands/XprateCommand.java
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
package com.gmail.nossr50.commands;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class XprateCommand implements TabExecutor {
|
||||||
|
private double originalRate;
|
||||||
|
|
||||||
|
public XprateCommand() {
|
||||||
|
originalRate = ExperienceConfig.getInstance().getExperienceGainsGlobalMultiplier();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
if (!args[0].equalsIgnoreCase("reset")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Permissions.xprateReset(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mcMMO.p.isXPEventEnabled()) {
|
||||||
|
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.xprate.over"));
|
||||||
|
mcMMO.p.toggleXpEventEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
ExperienceConfig.getInstance().setExperienceGainsGlobalMultiplier(originalRate);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
if (CommandUtils.isInvalidInteger(sender, args[0])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Permissions.xprateSet(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CommandUtils.shouldDisableToggle(args[1])) {
|
||||||
|
mcMMO.p.setXPEventEnabled(false);
|
||||||
|
}
|
||||||
|
else if (CommandUtils.shouldEnableToggle(args[1])) {
|
||||||
|
mcMMO.p.setXPEventEnabled(true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int newXpRate = Integer.parseInt(args[0]);
|
||||||
|
ExperienceConfig.getInstance().setExperienceGainsGlobalMultiplier(newXpRate);
|
||||||
|
|
||||||
|
if (mcMMO.p.isXPEventEnabled()) {
|
||||||
|
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.xprate.started.0"));
|
||||||
|
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Commands.xprate.started.1", newXpRate));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.xprate.modified", newXpRate));
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
if (StringUtils.isInt(args[0])) {
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
|
||||||
|
return StringUtil.copyPartialMatches(args[0], CommandUtils.RESET_OPTIONS, new ArrayList<String>(CommandUtils.RESET_OPTIONS.size()));
|
||||||
|
case 2:
|
||||||
|
return StringUtil.copyPartialMatches(args[1], CommandUtils.TRUE_FALSE_OPTIONS, new ArrayList<String>(CommandUtils.TRUE_FALSE_OPTIONS.size()));
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.gmail.nossr50.commands.chat;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.chat.ChatMode;
|
||||||
|
|
||||||
|
public class AdminChatCommand extends ChatCommand {
|
||||||
|
public AdminChatCommand() {
|
||||||
|
super(ChatMode.ADMIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handleChatSending(CommandSender sender, String[] args) {
|
||||||
|
chatManager.handleChat(sender.getName(), getDisplayName(sender), buildChatMessage(args, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
130
src/main/java/com/gmail/nossr50/commands/chat/ChatCommand.java
Normal file
130
src/main/java/com/gmail/nossr50/commands/chat/ChatCommand.java
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
package com.gmail.nossr50.commands.chat;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.chat.ChatManager;
|
||||||
|
import com.gmail.nossr50.chat.ChatManagerFactory;
|
||||||
|
import com.gmail.nossr50.datatypes.chat.ChatMode;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public abstract class ChatCommand implements TabExecutor {
|
||||||
|
protected ChatMode chatMode;
|
||||||
|
protected ChatManager chatManager;
|
||||||
|
private McMMOPlayer mcMMOPlayer;
|
||||||
|
|
||||||
|
public ChatCommand(ChatMode chatMode) {
|
||||||
|
this.chatMode = chatMode;
|
||||||
|
this.chatManager = ChatManagerFactory.getChatManager(mcMMO.p, chatMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMOPlayer = UserManager.getPlayer((Player) sender);
|
||||||
|
|
||||||
|
if (chatMode.isEnabled(mcMMOPlayer)) {
|
||||||
|
disableChatMode(sender);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
enableChatMode(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
if (CommandUtils.shouldEnableToggle(args[0])) {
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMOPlayer = UserManager.getPlayer((Player) sender);
|
||||||
|
|
||||||
|
enableChatMode(sender);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CommandUtils.shouldDisableToggle(args[0])) {
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMOPlayer = UserManager.getPlayer((Player) sender);
|
||||||
|
|
||||||
|
disableChatMode(sender);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fallthrough
|
||||||
|
|
||||||
|
default:
|
||||||
|
handleChatSending(sender, args);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
return StringUtil.copyPartialMatches(args[0], CommandUtils.TRUE_FALSE_OPTIONS, new ArrayList<String>(CommandUtils.TRUE_FALSE_OPTIONS.size()));
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected String buildChatMessage(String[] args, int index) {
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append(args[index]);
|
||||||
|
|
||||||
|
for (int i = index + 1; i < args.length; i++) {
|
||||||
|
builder.append(" ");
|
||||||
|
builder.append(args[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected String getDisplayName(CommandSender sender) {
|
||||||
|
return (sender instanceof Player) ? ((Player) sender).getDisplayName() : LocaleLoader.getString("Commands.Chat.Console");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract void handleChatSending(CommandSender sender, String[] args);
|
||||||
|
|
||||||
|
private void enableChatMode(CommandSender sender) {
|
||||||
|
if (chatMode == ChatMode.PARTY && mcMMOPlayer.getParty() == null) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
chatMode.enable(mcMMOPlayer);
|
||||||
|
sender.sendMessage(chatMode.getEnabledMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void disableChatMode(CommandSender sender) {
|
||||||
|
if (chatMode == ChatMode.PARTY && mcMMOPlayer.getParty() == null) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
chatMode.disable(mcMMOPlayer);
|
||||||
|
sender.sendMessage(chatMode.getDisabledMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.gmail.nossr50.commands.chat;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.chat.PartyChatManager;
|
||||||
|
import com.gmail.nossr50.datatypes.chat.ChatMode;
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyChatCommand extends ChatCommand {
|
||||||
|
public PartyChatCommand() {
|
||||||
|
super(ChatMode.PARTY);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handleChatSending(CommandSender sender, String[] args) {
|
||||||
|
Party party;
|
||||||
|
String message;
|
||||||
|
|
||||||
|
if (sender instanceof Player) {
|
||||||
|
party = UserManager.getPlayer((Player) sender).getParty();
|
||||||
|
|
||||||
|
if (party == null) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
message = buildChatMessage(args, 0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (args.length < 2) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Specify"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
party = PartyManager.getParty(args[0]);
|
||||||
|
|
||||||
|
if (party == null) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.InvalidName"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
message = buildChatMessage(args, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
((PartyChatManager) chatManager).setParty(party);
|
||||||
|
chatManager.handleChat(sender.getName(), getDisplayName(sender), message);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.gmail.nossr50.commands.database;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.database.DatabaseManager;
|
||||||
|
import com.gmail.nossr50.database.DatabaseManagerFactory;
|
||||||
|
import com.gmail.nossr50.datatypes.database.DatabaseType;
|
||||||
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.runnables.database.DatabaseConversionTask;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class ConvertDatabaseCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 2:
|
||||||
|
DatabaseType previousType = DatabaseType.getDatabaseType(args[1]);
|
||||||
|
DatabaseType newType = mcMMO.getDatabaseManager().getDatabaseType();
|
||||||
|
|
||||||
|
if (previousType == newType || (newType == DatabaseType.CUSTOM && DatabaseManagerFactory.getCustomDatabaseManagerClass().getSimpleName().equalsIgnoreCase(args[1]))) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.mcconvert.Database.Same", newType.toString()));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
DatabaseManager oldDatabase = DatabaseManagerFactory.createDatabaseManager(previousType);
|
||||||
|
|
||||||
|
if (previousType == DatabaseType.CUSTOM) {
|
||||||
|
Class<?> clazz;
|
||||||
|
|
||||||
|
try {
|
||||||
|
clazz = Class.forName(args[1]);
|
||||||
|
|
||||||
|
if (!DatabaseManager.class.isAssignableFrom(clazz)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.mcconvert.Database.InvalidType", args[1]));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
oldDatabase = DatabaseManagerFactory.createCustomDatabaseManager((Class<? extends DatabaseManager>) clazz);
|
||||||
|
}
|
||||||
|
catch (Throwable e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.mcconvert.Database.InvalidType", args[1]));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.mcconvert.Database.Start", previousType.toString(), newType.toString()));
|
||||||
|
|
||||||
|
UserManager.saveAll();
|
||||||
|
UserManager.clearAll();
|
||||||
|
|
||||||
|
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
||||||
|
PlayerProfile profile = oldDatabase.loadPlayerProfile(player.getName(), false);
|
||||||
|
|
||||||
|
if (profile.isLoaded()) {
|
||||||
|
mcMMO.getDatabaseManager().saveUser(profile);
|
||||||
|
}
|
||||||
|
|
||||||
|
UserManager.addUser(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
new DatabaseConversionTask(oldDatabase, sender, previousType.toString(), newType.toString()).runTaskAsynchronously(mcMMO.p);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
package com.gmail.nossr50.commands.database;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.commands.experience.ConvertExperienceCommand;
|
||||||
|
import com.gmail.nossr50.database.DatabaseManagerFactory;
|
||||||
|
import com.gmail.nossr50.datatypes.database.DatabaseType;
|
||||||
|
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class McconvertCommand implements TabExecutor {
|
||||||
|
private static final List<String> FORMULA_TYPES;
|
||||||
|
private static final List<String> DATABASE_TYPES;
|
||||||
|
private static final List<String> SUBCOMMANDS = ImmutableList.of("database", "experience");
|
||||||
|
|
||||||
|
private CommandExecutor databaseConvertCommand = new ConvertDatabaseCommand();
|
||||||
|
private CommandExecutor experienceConvertCommand = new ConvertExperienceCommand();
|
||||||
|
|
||||||
|
static {
|
||||||
|
ArrayList<String> formulaTypes = new ArrayList<String>();
|
||||||
|
|
||||||
|
for (FormulaType type : FormulaType.values()) {
|
||||||
|
formulaTypes.add(type.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
Collections.sort(formulaTypes);
|
||||||
|
FORMULA_TYPES = ImmutableList.copyOf(formulaTypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
static {
|
||||||
|
ArrayList<String> databaseTypes = new ArrayList<String>();
|
||||||
|
|
||||||
|
for (DatabaseType type : DatabaseType.values()) {
|
||||||
|
databaseTypes.add(type.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Custom stuff
|
||||||
|
databaseTypes.remove(DatabaseType.CUSTOM.toString());
|
||||||
|
|
||||||
|
if (mcMMO.getDatabaseManager().getDatabaseType() == DatabaseType.CUSTOM) {
|
||||||
|
databaseTypes.add(DatabaseManagerFactory.getCustomDatabaseManagerClass().getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
Collections.sort(databaseTypes);
|
||||||
|
DATABASE_TYPES = ImmutableList.copyOf(databaseTypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 2:
|
||||||
|
if (args[0].equalsIgnoreCase("database") || args[0].equalsIgnoreCase("db")) {
|
||||||
|
return databaseConvertCommand.onCommand(sender, command, label, args);
|
||||||
|
}
|
||||||
|
else if (args[0].equalsIgnoreCase("experience") || args[0].equalsIgnoreCase("xp") || args[1].equalsIgnoreCase("exp")) {
|
||||||
|
return experienceConvertCommand.onCommand(sender, command, label, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
return StringUtil.copyPartialMatches(args[0], SUBCOMMANDS, new ArrayList<String>(SUBCOMMANDS.size()));
|
||||||
|
case 2:
|
||||||
|
if (args[0].equalsIgnoreCase("database") || args[0].equalsIgnoreCase("db")) {
|
||||||
|
return StringUtil.copyPartialMatches(args[0], DATABASE_TYPES, new ArrayList<String>(DATABASE_TYPES.size()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args[0].equalsIgnoreCase("experience") || args[0].equalsIgnoreCase("xp") || args[0].equalsIgnoreCase("exp")) {
|
||||||
|
return StringUtil.copyPartialMatches(args[0], FORMULA_TYPES, new ArrayList<String>(FORMULA_TYPES.size()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return ImmutableList.of();
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.gmail.nossr50.commands.database;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class McpurgeCommand implements TabExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
mcMMO.getDatabaseManager().purgePowerlessUsers();
|
||||||
|
|
||||||
|
if (Config.getInstance().getOldUsersCutoff() != -1) {
|
||||||
|
mcMMO.getDatabaseManager().purgeOldUsers();
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.mcpurge.Success"));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.gmail.nossr50.commands.database;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class McremoveCommand implements TabExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||||
|
|
||||||
|
if (UserManager.getPlayer(playerName, true) == null && CommandUtils.unloadedProfile(sender, mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mcMMO.getDatabaseManager().removeUser(playerName)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.mcremove.Success", playerName));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sender.sendMessage(playerName + " could not be removed from the database."); // Pretty sure this should NEVER happen.
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
Set<String> playerNames = UserManager.getPlayerNames();
|
||||||
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gmail.nossr50.commands.database;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.database.DatabaseManagerFactory;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class MmoshowdbCommand implements TabExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (args.length != 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Class<?> clazz = DatabaseManagerFactory.getCustomDatabaseManagerClass();
|
||||||
|
|
||||||
|
if (clazz != null) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.mmoshowdb", clazz.getName()));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.mmoshowdb", (Config.getInstance().getUseMySQL() ? "sql" : "flatfile")));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gmail.nossr50.commands.experience;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.EventUtils;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
|
public class AddlevelsCommand extends ExperienceCommand {
|
||||||
|
@Override
|
||||||
|
protected boolean permissionsCheckSelf(CommandSender sender) {
|
||||||
|
return Permissions.addlevels(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean permissionsCheckOthers(CommandSender sender) {
|
||||||
|
return Permissions.addlevelsOthers(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handleCommand(SkillType skill) {
|
||||||
|
float xpRemoved = profile.getSkillXpLevelRaw(skill);
|
||||||
|
profile.addLevels(skill, value);
|
||||||
|
|
||||||
|
if (player == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handlePlayerMessageAll() {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.1", value));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handlePlayerMessageSkill() {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.1", value, skill.getName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.gmail.nossr50.commands.experience;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
|
public class AddxpCommand extends ExperienceCommand {
|
||||||
|
@Override
|
||||||
|
protected boolean permissionsCheckSelf(CommandSender sender) {
|
||||||
|
return Permissions.addxp(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean permissionsCheckOthers(CommandSender sender) {
|
||||||
|
return Permissions.addxpOthers(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handleCommand(SkillType skill) {
|
||||||
|
if (player != null) {
|
||||||
|
mcMMOPlayer.applyXpGain(skill, value);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
profile.addExperience(skill, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handlePlayerMessageAll() {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.addxp.AwardAll", value));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handlePlayerMessageSkill() {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.addxp.AwardSkill", value, skill.getName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.gmail.nossr50.commands.experience;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.datatypes.experience.FormulaType;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.runnables.database.FormulaConversionTask;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class ConvertExperienceCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 2:
|
||||||
|
FormulaType previousType = mcMMO.getFormulaManager().getPreviousFormulaType();
|
||||||
|
FormulaType newType = FormulaType.getFormulaType(args[1].toUpperCase());
|
||||||
|
|
||||||
|
if (newType == FormulaType.UNKNOWN) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.mcconvert.Experience.Invalid"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (previousType == newType) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.mcconvert.Experience.Same", newType.toString()));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.mcconvert.Experience.Start", previousType.toString(), newType.toString()));
|
||||||
|
|
||||||
|
UserManager.saveAll();
|
||||||
|
UserManager.clearAll();
|
||||||
|
|
||||||
|
new FormulaConversionTask(sender, newType).runTaskLater(mcMMO.p, 1);
|
||||||
|
|
||||||
|
for (Player player : mcMMO.p.getServer().getOnlinePlayers()) {
|
||||||
|
UserManager.addUser(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,178 @@
|
|||||||
|
package com.gmail.nossr50.commands.experience;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public abstract class ExperienceCommand implements TabExecutor {
|
||||||
|
protected McMMOPlayer mcMMOPlayer;
|
||||||
|
protected Player player;
|
||||||
|
protected PlayerProfile profile;
|
||||||
|
|
||||||
|
protected boolean allSkills;
|
||||||
|
protected SkillType skill;
|
||||||
|
protected int value;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 2:
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!permissionsCheckSelf(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!validateArguments(sender, args[0], args[1])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
player = (Player) sender;
|
||||||
|
mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
profile = mcMMOPlayer.getProfile();
|
||||||
|
|
||||||
|
editValues();
|
||||||
|
cleanUp();
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
if (!permissionsCheckOthers(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!validateArguments(sender, args[1], args[2])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||||
|
mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||||
|
|
||||||
|
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||||
|
if (mcMMOPlayer == null) {
|
||||||
|
profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false);
|
||||||
|
|
||||||
|
if (CommandUtils.unloadedProfile(sender, profile)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
editValues();
|
||||||
|
profile.save(); // Since this is a temporary profile, we save it here.
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
profile = mcMMOPlayer.getProfile();
|
||||||
|
player = mcMMOPlayer.getPlayer();
|
||||||
|
editValues();
|
||||||
|
}
|
||||||
|
|
||||||
|
handleSenderMessage(sender, playerName);
|
||||||
|
cleanUp();
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
Set<String> playerNames = UserManager.getPlayerNames();
|
||||||
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
|
case 2:
|
||||||
|
return StringUtil.copyPartialMatches(args[1], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract boolean permissionsCheckSelf(CommandSender sender);
|
||||||
|
protected abstract boolean permissionsCheckOthers(CommandSender sender);
|
||||||
|
protected abstract void handleCommand(SkillType skill);
|
||||||
|
protected abstract void handlePlayerMessageAll();
|
||||||
|
protected abstract void handlePlayerMessageSkill();
|
||||||
|
|
||||||
|
private boolean validateArguments(CommandSender sender, String skillName, String value) {
|
||||||
|
if (isInvalidInteger(sender, value) || isInvalidSkill(sender, skillName)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isInvalidInteger(CommandSender sender, String value) {
|
||||||
|
if (CommandUtils.isInvalidInteger(sender, value)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.value = Integer.parseInt(value);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean isInvalidSkill(CommandSender sender, String skillName) {
|
||||||
|
if (skillName.equalsIgnoreCase("all")) {
|
||||||
|
allSkills = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (CommandUtils.isInvalidSkill(sender, skillName)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
skill = SkillType.getSkill(skillName);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void handleSenderMessage(CommandSender sender, String playerName) {
|
||||||
|
if (allSkills) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardAll.2", playerName));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.addlevels.AwardSkill.2", skill.getName(), playerName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void editValues() {
|
||||||
|
if (allSkills) {
|
||||||
|
for (SkillType skillType : SkillType.values()) {
|
||||||
|
handleCommand(skillType);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (player != null) {
|
||||||
|
handlePlayerMessageAll();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
handleCommand(skill);
|
||||||
|
|
||||||
|
if (player != null) {
|
||||||
|
handlePlayerMessageSkill();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void cleanUp() {
|
||||||
|
allSkills = false;
|
||||||
|
player = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.gmail.nossr50.commands.experience;
|
||||||
|
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.EventUtils;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
|
public class MmoeditCommand extends ExperienceCommand {
|
||||||
|
@Override
|
||||||
|
protected boolean permissionsCheckSelf(CommandSender sender) {
|
||||||
|
return Permissions.mmoedit(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean permissionsCheckOthers(CommandSender sender) {
|
||||||
|
return Permissions.mmoeditOthers(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handleCommand(SkillType skill) {
|
||||||
|
int skillLevel = profile.getSkillLevel(skill);
|
||||||
|
float xpRemoved = profile.getSkillXpLevelRaw(skill);
|
||||||
|
|
||||||
|
profile.modifySkill(skill, value);
|
||||||
|
|
||||||
|
if (player == null || value == skillLevel) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventUtils.handleLevelChangeEvent(player, skill, value, xpRemoved, value > skillLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handlePlayerMessageAll() {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.mmoedit.AllSkills.1", value));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handlePlayerMessageSkill() {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.mmoedit.Modified.1", skill.getName(), value));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
package com.gmail.nossr50.commands.experience;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.EventUtils;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class SkillresetCommand extends ExperienceCommand {
|
||||||
|
private CommandSender sender;
|
||||||
|
private Command command;
|
||||||
|
private int argsLength;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
this.command = command;
|
||||||
|
this.sender = sender;
|
||||||
|
argsLength = args.length;
|
||||||
|
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Permissions.skillreset(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isInvalidSkill(sender, args[0])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
player = (Player) sender;
|
||||||
|
mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
profile = mcMMOPlayer.getProfile();
|
||||||
|
|
||||||
|
editValues();
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
if (!Permissions.skillresetOthers(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isInvalidSkill(sender, args[1])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||||
|
mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||||
|
|
||||||
|
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||||
|
if (mcMMOPlayer == null) {
|
||||||
|
profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false);
|
||||||
|
|
||||||
|
if (CommandUtils.unloadedProfile(sender, profile)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
editValues();
|
||||||
|
profile.save(); // Since this is a temporary profile, we save it here.
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
profile = mcMMOPlayer.getProfile();
|
||||||
|
player = mcMMOPlayer.getPlayer();
|
||||||
|
|
||||||
|
editValues();
|
||||||
|
}
|
||||||
|
|
||||||
|
handleSenderMessage(sender, playerName);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean permissionsCheckSelf(CommandSender sender) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean permissionsCheckOthers(CommandSender sender) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handleCommand(SkillType skill) {
|
||||||
|
if (argsLength == 1 && !Permissions.skillreset(sender, skill) || (argsLength == 2 && !Permissions.skillresetOthers(sender, skill))) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int levelsRemoved = profile.getSkillLevel(skill);
|
||||||
|
float xpRemoved = profile.getSkillXpLevelRaw(skill);
|
||||||
|
|
||||||
|
profile.modifySkill(skill, 0);
|
||||||
|
|
||||||
|
if (player == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
EventUtils.handleLevelChangeEvent(player, skill, levelsRemoved, xpRemoved, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handlePlayerMessageAll() {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Reset.All"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void handlePlayerMessageSkill() {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Reset.Single", skill.getName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.general;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.m;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
import com.gmail.nossr50.skills.Skills;
|
|
||||||
|
|
||||||
public class AddxpCommand implements CommandExecutor {
|
|
||||||
private final mcMMO plugin;
|
|
||||||
|
|
||||||
public AddxpCommand(mcMMO instance) {
|
|
||||||
this.plugin = instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!mcPermissions.permissionsEnabled) {
|
|
||||||
sender.sendMessage("This command requires permissions.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!LoadProperties.addxpEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
if (args.length < 2) {
|
|
||||||
// No console aliasing yet
|
|
||||||
// System.out.println("Usage is /"+LoadProperties.addxp+" playername skillname xp");
|
|
||||||
System.out.println("Usage is /addxp playername skillname xp");
|
|
||||||
return true;
|
|
||||||
} else if (args.length == 3) {
|
|
||||||
if ((plugin.getServer().getPlayer(args[0]) != null) && m.isInt(args[2]) && Skills.isSkill(args[1])) {
|
|
||||||
int newvalue = Integer.valueOf(args[2]);
|
|
||||||
Users.getProfile(plugin.getServer().getPlayer(args[0])).addXP(Skills.getSkillType(args[1]), newvalue, plugin.getServer().getPlayer(args[0]));
|
|
||||||
plugin.getServer().getPlayer(args[0]).sendMessage(ChatColor.GREEN + "Experience granted!");
|
|
||||||
System.out.println(args[1] + " has been modified for " + plugin.getServer().getPlayer(args[0]).getName() + ".");
|
|
||||||
Skills.XpCheckAll(plugin.getServer().getPlayer(args[0]));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// No console aliasing yet
|
|
||||||
// System.out.println("Usage is /"+LoadProperties.addxp+" playername skillname xp");
|
|
||||||
System.out.println("Usage is /addxp playername skillname xp");
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().mmoedit(player)) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (args.length < 2) {
|
|
||||||
player.sendMessage(ChatColor.RED + "Usage is /addxp playername skillname xp");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (args.length == 3) {
|
|
||||||
if ((plugin.getServer().getPlayer(args[0]) != null) && m.isInt(args[2]) && Skills.isSkill(args[1])) {
|
|
||||||
int newvalue = Integer.valueOf(args[2]);
|
|
||||||
Users.getProfile(plugin.getServer().getPlayer(args[0])).addXP(Skills.getSkillType(args[1]), newvalue, plugin.getServer().getPlayer(args[0]));
|
|
||||||
plugin.getServer().getPlayer(args[0]).sendMessage(ChatColor.GREEN + "Experience granted!");
|
|
||||||
player.sendMessage(ChatColor.RED + args[1] + " has been modified.");
|
|
||||||
Skills.XpCheckAll(plugin.getServer().getPlayer(args[0]));
|
|
||||||
}
|
|
||||||
} else if (args.length == 2 && m.isInt(args[1]) && Skills.isSkill(args[0])) {
|
|
||||||
int newvalue = Integer.valueOf(args[1]);
|
|
||||||
Users.getProfile(player).addXP(Skills.getSkillType(args[0]), newvalue, player);
|
|
||||||
player.sendMessage(ChatColor.RED + args[0] + " has been modified.");
|
|
||||||
} else {
|
|
||||||
player.sendMessage(ChatColor.RED + "Usage is /addxp playername skillname xp");
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.general;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
|
|
||||||
public class ClearmyspawnCommand implements CommandExecutor {
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.clearmyspawnEnable || !LoadProperties.enableMySpawn) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().mySpawn(player)) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
double x = Bukkit.getServer().getWorlds().get(0).getSpawnLocation().getX();
|
|
||||||
double y = Bukkit.getServer().getWorlds().get(0).getSpawnLocation().getY();
|
|
||||||
double z = Bukkit.getServer().getWorlds().get(0).getSpawnLocation().getZ();
|
|
||||||
String worldname = Bukkit.getServer().getWorlds().get(0).getName();
|
|
||||||
PP.setMySpawn(x, y, z, worldname);
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.MyspawnCleared"));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.general;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.m;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
import com.gmail.nossr50.skills.Skills;
|
|
||||||
|
|
||||||
public class MmoeditCommand implements CommandExecutor {
|
|
||||||
private final mcMMO plugin;
|
|
||||||
|
|
||||||
public MmoeditCommand(mcMMO instance) {
|
|
||||||
this.plugin = instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!mcPermissions.permissionsEnabled) {
|
|
||||||
sender.sendMessage("This command requires permissions.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!LoadProperties.mmoeditEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
if (args.length < 2) {
|
|
||||||
System.out.println("Usage is /mmoedit playername skillname newvalue");
|
|
||||||
return true;
|
|
||||||
} else if (args.length == 3) {
|
|
||||||
if ((plugin.getServer().getPlayer(args[0]) != null) && m.isInt(args[2]) && Skills.isSkill(args[1])) {
|
|
||||||
int newvalue = Integer.valueOf(args[2]);
|
|
||||||
Users.getProfile(plugin.getServer().getPlayer(args[0])).modifyskill(Skills.getSkillType(args[1]), newvalue);
|
|
||||||
System.out.println(args[1] + " has been modified for " + plugin.getServer().getPlayer(args[0]).getName() + ".");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
System.out.println("Usage is /mmoedit playername skillname newvalue");
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().mmoedit(player)) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (args.length < 2) {
|
|
||||||
player.sendMessage(ChatColor.RED + "Usage is /mmoedit playername skillname newvalue");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (args.length == 3) {
|
|
||||||
if ((plugin.getServer().getPlayer(args[0]) != null) && m.isInt(args[2]) && Skills.isSkill(args[1])) {
|
|
||||||
int newvalue = Integer.valueOf(args[2]);
|
|
||||||
Users.getProfile(plugin.getServer().getPlayer(args[0])).modifyskill(Skills.getSkillType(args[1]), newvalue);
|
|
||||||
player.sendMessage(ChatColor.RED + args[1] + " has been modified.");
|
|
||||||
}
|
|
||||||
} else if (args.length == 2) {
|
|
||||||
if (m.isInt(args[1]) && Skills.isSkill(args[0])) {
|
|
||||||
int newvalue = Integer.valueOf(args[1]);
|
|
||||||
PP.modifyskill(Skills.getSkillType(args[0]), newvalue);
|
|
||||||
player.sendMessage(ChatColor.RED + args[0] + " has been modified.");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.sendMessage(ChatColor.RED + "Usage is /mmoedit playername skillname newvalue");
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.general;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.m;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
|
|
||||||
public class MmoupdateCommand implements CommandExecutor {
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().admin(player)) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
player.sendMessage(ChatColor.GRAY + "Starting conversion...");
|
|
||||||
Users.clearUsers();
|
|
||||||
m.convertToMySQL();
|
|
||||||
for (Player x : Bukkit.getServer().getOnlinePlayers()) {
|
|
||||||
Users.addUser(x);
|
|
||||||
}
|
|
||||||
player.sendMessage(ChatColor.GREEN + "Conversion finished!");
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.general;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
|
|
||||||
public class MyspawnCommand implements CommandExecutor {
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.myspawnEnable || !LoadProperties.enableMySpawn) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().mySpawn(player)) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (System.currentTimeMillis() < (PP.getMySpawnATS() * 1000) + 3600000) {
|
|
||||||
long x = (((PP.getMySpawnATS() * 1000) + 3600000) - System.currentTimeMillis());
|
|
||||||
int y = (int) (x / 60000);
|
|
||||||
int z = (int) ((x / 1000) - (y * 60));
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.MyspawnTimeNotice", new Object[] { y, z }));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
PP.setMySpawnATS(System.currentTimeMillis());
|
|
||||||
if (PP.getMySpawn(player) != null) {
|
|
||||||
Location mySpawn = PP.getMySpawn(player);
|
|
||||||
|
|
||||||
if (mySpawn != null) {
|
|
||||||
// It's done twice because it acts oddly when you are in another world
|
|
||||||
player.teleport(mySpawn);
|
|
||||||
player.teleport(mySpawn);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.MyspawnNotExist"));
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.general;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.m;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
import com.gmail.nossr50.skills.Skills;
|
|
||||||
|
|
||||||
public class StatsCommand implements CommandExecutor {
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.statsEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.YourStats"));
|
|
||||||
|
|
||||||
if (mcPermissions.getEnabled())
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.NoSkillNote"));
|
|
||||||
|
|
||||||
ChatColor header = ChatColor.GOLD;
|
|
||||||
|
|
||||||
if (Skills.hasGatheringSkills(player)) {
|
|
||||||
player.sendMessage(header + "-=GATHERING SKILLS=-");
|
|
||||||
if (mcPermissions.getInstance().excavation(player))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.ExcavationSkill"), PP.getSkillLevel(SkillType.EXCAVATION), PP.getSkillXpLevel(SkillType.EXCAVATION), PP.getXpToLevel(SkillType.EXCAVATION)));
|
|
||||||
if (mcPermissions.getInstance().fishing(player))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.FishingSkill"), PP.getSkillLevel(SkillType.FISHING), PP.getSkillXpLevel(SkillType.FISHING), PP.getXpToLevel(SkillType.FISHING)));
|
|
||||||
if (mcPermissions.getInstance().herbalism(player))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.HerbalismSkill"), PP.getSkillLevel(SkillType.HERBALISM), PP.getSkillXpLevel(SkillType.HERBALISM), PP.getXpToLevel(SkillType.HERBALISM)));
|
|
||||||
if (mcPermissions.getInstance().mining(player))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.MiningSkill"), PP.getSkillLevel(SkillType.MINING), PP.getSkillXpLevel(SkillType.MINING), PP.getXpToLevel(SkillType.MINING)));
|
|
||||||
if (mcPermissions.getInstance().woodcutting(player))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.WoodcuttingSkill"), PP.getSkillLevel(SkillType.WOODCUTTING), PP.getSkillXpLevel(SkillType.WOODCUTTING), PP.getXpToLevel(SkillType.WOODCUTTING)));
|
|
||||||
}
|
|
||||||
if (Skills.hasCombatSkills(player)) {
|
|
||||||
player.sendMessage(header + "-=COMBAT SKILLS=-");
|
|
||||||
if (mcPermissions.getInstance().axes(player))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AxesSkill"), PP.getSkillLevel(SkillType.AXES), PP.getSkillXpLevel(SkillType.AXES), PP.getXpToLevel(SkillType.AXES)));
|
|
||||||
if (mcPermissions.getInstance().archery(player))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.ArcherySkill"), PP.getSkillLevel(SkillType.ARCHERY), PP.getSkillXpLevel(SkillType.ARCHERY), PP.getXpToLevel(SkillType.ARCHERY)));
|
|
||||||
// if(mcPermissions.getInstance().sorcery(player))
|
|
||||||
// player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.SorcerySkill"), PP.getSkill("sorcery"), PP.getSkill("sorceryXP"), PP.getXpToLevel("excavation")));
|
|
||||||
if (mcPermissions.getInstance().swords(player))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.SwordsSkill"), PP.getSkillLevel(SkillType.SWORDS), PP.getSkillXpLevel(SkillType.SWORDS), PP.getXpToLevel(SkillType.SWORDS)));
|
|
||||||
if (mcPermissions.getInstance().taming(player))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.TamingSkill"), PP.getSkillLevel(SkillType.TAMING), PP.getSkillXpLevel(SkillType.TAMING), PP.getXpToLevel(SkillType.TAMING)));
|
|
||||||
if (mcPermissions.getInstance().unarmed(player))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.UnarmedSkill"), PP.getSkillLevel(SkillType.UNARMED), PP.getSkillXpLevel(SkillType.UNARMED), PP.getXpToLevel(SkillType.UNARMED)));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Skills.hasMiscSkills(player)) {
|
|
||||||
player.sendMessage(header + "-=MISC SKILLS=-");
|
|
||||||
if (mcPermissions.getInstance().acrobatics(player))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AcrobaticsSkill"), PP.getSkillLevel(SkillType.ACROBATICS), PP.getSkillXpLevel(SkillType.ACROBATICS), PP.getXpToLevel(SkillType.ACROBATICS)));
|
|
||||||
// if(mcPermissions.getInstance().alchemy(player))
|
|
||||||
// player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AlchemySkill"), PP.getSkillLevel(SkillType.ALCHEMY), PP.getSkillXpLevel(SkillType.ALCHEMY), PP.getXpToLevel(SkillType.ALCHEMY)));
|
|
||||||
// if(mcPermissions.getInstance().enchanting(player))
|
|
||||||
// player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.EnchantingSkill"), PP.getSkillLevel(SkillType.ENCHANTING), PP.getSkillXpLevel(SkillType.ENCHANTING), PP.getXpToLevel(SkillType.ENCHANTING)));
|
|
||||||
if (mcPermissions.getInstance().repair(player))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.RepairSkill"), PP.getSkillLevel(SkillType.REPAIR), PP.getSkillXpLevel(SkillType.REPAIR), PP.getXpToLevel(SkillType.REPAIR)));
|
|
||||||
}
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.PowerLevel") + ChatColor.GREEN + (m.getPowerLevel(player)));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.general;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.m;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
import com.gmail.nossr50.skills.Skills;
|
|
||||||
|
|
||||||
public class WhoisCommand implements CommandExecutor {
|
|
||||||
private final mcMMO plugin;
|
|
||||||
|
|
||||||
public WhoisCommand(mcMMO instance) {
|
|
||||||
this.plugin = instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.whoisEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().whois(player)) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.length < 1) {
|
|
||||||
player.sendMessage(ChatColor.RED + "Proper usage is /whois <playername>");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
// if split[1] is a player
|
|
||||||
if (plugin.getServer().getPlayer(args[0]) != null) {
|
|
||||||
Player target = plugin.getServer().getPlayer(args[0]);
|
|
||||||
PlayerProfile PPt = Users.getProfile(target);
|
|
||||||
|
|
||||||
player.sendMessage(ChatColor.GREEN + "~~WHOIS RESULTS~~");
|
|
||||||
player.sendMessage(target.getName());
|
|
||||||
if (PPt.inParty())
|
|
||||||
player.sendMessage("Party: " + PPt.getParty());
|
|
||||||
player.sendMessage("Health: " + target.getHealth() + ChatColor.GRAY + " (20 is full health)");
|
|
||||||
player.sendMessage("OP: " + target.isOp());
|
|
||||||
player.sendMessage(ChatColor.GREEN + "mcMMO Stats for " + ChatColor.YELLOW + target.getName());
|
|
||||||
|
|
||||||
player.sendMessage(ChatColor.GOLD + "-=GATHERING SKILLS=-");
|
|
||||||
if (mcPermissions.getInstance().excavation(target))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.ExcavationSkill"), PPt.getSkillLevel(SkillType.EXCAVATION), PPt.getSkillXpLevel(SkillType.EXCAVATION), PPt.getXpToLevel(SkillType.EXCAVATION)));
|
|
||||||
if (mcPermissions.getInstance().fishing(target))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.FishingSkill"), PPt.getSkillLevel(SkillType.FISHING), PPt.getSkillXpLevel(SkillType.FISHING), PPt.getXpToLevel(SkillType.FISHING)));
|
|
||||||
if (mcPermissions.getInstance().herbalism(target))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.HerbalismSkill"), PPt.getSkillLevel(SkillType.HERBALISM), PPt.getSkillXpLevel(SkillType.HERBALISM), PPt.getXpToLevel(SkillType.HERBALISM)));
|
|
||||||
if (mcPermissions.getInstance().mining(target))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.MiningSkill"), PPt.getSkillLevel(SkillType.MINING), PPt.getSkillXpLevel(SkillType.MINING), PPt.getXpToLevel(SkillType.MINING)));
|
|
||||||
if (mcPermissions.getInstance().woodcutting(target))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.WoodcuttingSkill"), PPt.getSkillLevel(SkillType.WOODCUTTING), PPt.getSkillXpLevel(SkillType.WOODCUTTING), PPt.getXpToLevel(SkillType.WOODCUTTING)));
|
|
||||||
|
|
||||||
player.sendMessage(ChatColor.GOLD + "-=COMBAT SKILLS=-");
|
|
||||||
if (mcPermissions.getInstance().axes(target))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AxesSkill"), PPt.getSkillLevel(SkillType.AXES), PPt.getSkillXpLevel(SkillType.AXES), PPt.getXpToLevel(SkillType.AXES)));
|
|
||||||
if (mcPermissions.getInstance().archery(player))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.ArcherySkill"), PPt.getSkillLevel(SkillType.ARCHERY), PPt.getSkillXpLevel(SkillType.ARCHERY), PPt.getXpToLevel(SkillType.ARCHERY)));
|
|
||||||
// if(mcPermissions.getInstance().sorcery(target))
|
|
||||||
// player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.SorcerySkill"), PPt.getSkill("sorcery"), PPt.getSkill("sorceryXP"), PPt.getXpToLevel("excavation")));
|
|
||||||
if (mcPermissions.getInstance().swords(target))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.SwordsSkill"), PPt.getSkillLevel(SkillType.SWORDS), PPt.getSkillXpLevel(SkillType.SWORDS), PPt.getXpToLevel(SkillType.SWORDS)));
|
|
||||||
if (mcPermissions.getInstance().taming(target))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.TamingSkill"), PPt.getSkillLevel(SkillType.TAMING), PPt.getSkillXpLevel(SkillType.TAMING), PPt.getXpToLevel(SkillType.TAMING)));
|
|
||||||
if (mcPermissions.getInstance().unarmed(target))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.UnarmedSkill"), PPt.getSkillLevel(SkillType.UNARMED), PPt.getSkillXpLevel(SkillType.UNARMED), PPt.getXpToLevel(SkillType.UNARMED)));
|
|
||||||
|
|
||||||
player.sendMessage(ChatColor.GOLD + "-=MISC SKILLS=-");
|
|
||||||
if (mcPermissions.getInstance().acrobatics(target))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AcrobaticsSkill"), PPt.getSkillLevel(SkillType.ACROBATICS), PPt.getSkillXpLevel(SkillType.ACROBATICS), PPt.getXpToLevel(SkillType.ACROBATICS)));
|
|
||||||
// if(mcPermissions.getInstance().alchemy(target))
|
|
||||||
// player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AlchemySkill"), PPt.getSkillLevel(SkillType.ALCHEMY), PPt.getSkillXpLevel(SkillType.ALCHEMY), PPt.getXpToLevel(SkillType.ALCHEMY)));
|
|
||||||
// if(mcPermissions.getInstance().enchanting(target))
|
|
||||||
// player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.EnchantingSkill"), PPt.getSkillLevel(SkillType.ENCHANTING), PPt.getSkillXpLevel(SkillType.ENCHANTING), PPt.getXpToLevel(SkillType.ENCHANTING)));
|
|
||||||
if (mcPermissions.getInstance().repair(target))
|
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.RepairSkill"), PPt.getSkillLevel(SkillType.REPAIR), PPt.getSkillXpLevel(SkillType.REPAIR), PPt.getXpToLevel(SkillType.REPAIR)));
|
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.PowerLevel") + ChatColor.GREEN + (m.getPowerLevel(target)));
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,126 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.general;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.m;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
|
|
||||||
public class XprateCommand implements CommandExecutor {
|
|
||||||
private static int oldrate = LoadProperties.xpGainMultiplier;
|
|
||||||
|
|
||||||
public static boolean xpevent = false;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.xprateEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
if(args.length <= 0)
|
|
||||||
{
|
|
||||||
System.out.println(mcLocale.getString("Commands.xprate.proper", new Object[] {"/xprate"}));
|
|
||||||
System.out.println(mcLocale.getString("Commands.xprate.proper2", new Object[] {"/xprate"}));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(args.length == 1 && args[0].equalsIgnoreCase("reset"))
|
|
||||||
{
|
|
||||||
if(xpevent)
|
|
||||||
{
|
|
||||||
for(Player x : Bukkit.getServer().getOnlinePlayers())
|
|
||||||
x.sendMessage(mcLocale.getString("Commands.xprate.over"));
|
|
||||||
xpevent = !xpevent;
|
|
||||||
LoadProperties.xpGainMultiplier = oldrate;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
LoadProperties.xpGainMultiplier = oldrate;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(args.length >= 1 && m.isInt(args[0]))
|
|
||||||
{
|
|
||||||
oldrate = LoadProperties.xpGainMultiplier;
|
|
||||||
|
|
||||||
if(args.length >= 2 && (args[1].equalsIgnoreCase("true") || args[1].equalsIgnoreCase("false")))
|
|
||||||
{
|
|
||||||
if(args[1].equalsIgnoreCase("true"))
|
|
||||||
xpevent = true;
|
|
||||||
else
|
|
||||||
xpevent = false;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
System.out.println(mcLocale.getString("Commands.xprate.proper3"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
LoadProperties.xpGainMultiplier = m.getInt(args[0]);
|
|
||||||
if(xpevent = true)
|
|
||||||
for(Player x : Bukkit.getServer().getOnlinePlayers())
|
|
||||||
{
|
|
||||||
x.sendMessage(ChatColor.GOLD+"XP EVENT FOR mcMMO HAS STARTED!");
|
|
||||||
x.sendMessage(ChatColor.GOLD+"mcMMO XP RATE IS NOW "+LoadProperties.xpGainMultiplier+"x!!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
|
|
||||||
if(!mcPermissions.getInstance().admin(player))
|
|
||||||
{
|
|
||||||
player.sendMessage(ChatColor.YELLOW+"[mcMMO] "+ChatColor.DARK_RED +mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if(args.length <= 0)
|
|
||||||
{
|
|
||||||
player.sendMessage(mcLocale.getString("Commands.xprate.proper", new Object[] {"/xprate"}));
|
|
||||||
player.sendMessage(mcLocale.getString("Commands.xprate.proper2", new Object[] {"/xprate"}));
|
|
||||||
}
|
|
||||||
if(args.length == 1 && args[0].equalsIgnoreCase("reset"))
|
|
||||||
{
|
|
||||||
if(xpevent)
|
|
||||||
{
|
|
||||||
for(Player x : Bukkit.getServer().getOnlinePlayers())
|
|
||||||
x.sendMessage(mcLocale.getString("Commands.xprate.over"));
|
|
||||||
xpevent = !xpevent;
|
|
||||||
LoadProperties.xpGainMultiplier = oldrate;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
LoadProperties.xpGainMultiplier = oldrate;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(args.length >= 1 && m.isInt(args[0]))
|
|
||||||
{
|
|
||||||
oldrate = LoadProperties.xpGainMultiplier;
|
|
||||||
|
|
||||||
if(args.length >= 2 && (args[1].equalsIgnoreCase("true") || args[1].equalsIgnoreCase("false")))
|
|
||||||
{
|
|
||||||
if(args[1].equalsIgnoreCase("true"))
|
|
||||||
xpevent = true;
|
|
||||||
else
|
|
||||||
xpevent = false;
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
player.sendMessage(mcLocale.getString("Commands.xprate.proper3"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
LoadProperties.xpGainMultiplier = m.getInt(args[0]);
|
|
||||||
if(xpevent = true)
|
|
||||||
for(Player x : Bukkit.getServer().getOnlinePlayers())
|
|
||||||
{
|
|
||||||
x.sendMessage(mcLocale.getString("Commands.xprate.started"));
|
|
||||||
x.sendMessage(mcLocale.getString("Commands.xprate.started2", new Object[] {LoadProperties.xpGainMultiplier}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.gmail.nossr50.commands.hardcore;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
|
public class HardcoreCommand extends HardcoreModeCommand {
|
||||||
|
@Override
|
||||||
|
protected boolean checkTogglePermissions() {
|
||||||
|
return Permissions.hardcoreToggle(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean checkModifyPermissions() {
|
||||||
|
return Permissions.hardcoreModify(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean checkEnabled(String skill) {
|
||||||
|
if (skill.equalsIgnoreCase("ALL")) {
|
||||||
|
for (SkillType skillType : SkillType.values()) {
|
||||||
|
if (!skillType.getHardcoreStatLossEnabled()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SkillType.getSkill(skill).getHardcoreStatLossEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void enable(String skill) {
|
||||||
|
toggle(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void disable(String skill) {
|
||||||
|
toggle(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void modify() {
|
||||||
|
Config.getInstance().setHardcoreDeathStatPenaltyPercentage(newPercent);
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Hardcore.DeathStatLoss.PercentageChanged", percent.format(newPercent / 100D)));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void toggle(boolean enable) {
|
||||||
|
if (skill.equalsIgnoreCase("ALL")) {
|
||||||
|
for (SkillType skillType : SkillType.NON_CHILD_SKILLS) {
|
||||||
|
skillType.setHardcoreStatLossEnabled(enable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
SkillType.getSkill(skill).setHardcoreStatLossEnabled(enable);
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Hardcore.Mode." + (enable ? "Enabled" : "Disabled"), LocaleLoader.getString("Hardcore.DeathStatLoss.Name"), skill));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
package com.gmail.nossr50.commands.hardcore;
|
||||||
|
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public abstract class HardcoreModeCommand implements TabExecutor {
|
||||||
|
protected CommandSender sender;
|
||||||
|
protected double newPercent;
|
||||||
|
protected DecimalFormat percent;
|
||||||
|
protected String skill;
|
||||||
|
|
||||||
|
public HardcoreModeCommand() {
|
||||||
|
percent = new DecimalFormat("##0.00%");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
this.sender = sender;
|
||||||
|
|
||||||
|
if (!checkTogglePermissions()) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (checkEnabled("ALL")) {
|
||||||
|
disable("ALL");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
enable("ALL");
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
if (CommandUtils.shouldEnableToggle(args[0])) {
|
||||||
|
if (!Permissions.hardcoreToggle(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
enable("ALL");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CommandUtils.shouldDisableToggle(args[0])) {
|
||||||
|
if (!Permissions.hardcoreToggle(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
disable("ALL");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isInvalidPercentage(sender, args[0])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Permissions.hardcoreModify(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
modify();
|
||||||
|
return true;
|
||||||
|
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
if (!args[0].equalsIgnoreCase("ALL") && CommandUtils.isChildSkill(sender, SkillType.getSkill(args[0]))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
skill = args[0];
|
||||||
|
|
||||||
|
if (CommandUtils.shouldEnableToggle(args[1])) {
|
||||||
|
if (!Permissions.hardcoreToggle(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
enable(skill);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CommandUtils.shouldDisableToggle(args[1])) {
|
||||||
|
if (!Permissions.hardcoreToggle(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
disable(skill);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
if (StringUtils.isDouble(args[0])) {
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
|
||||||
|
return StringUtil.copyPartialMatches(args[0], CommandUtils.TRUE_FALSE_OPTIONS, new ArrayList<String>(CommandUtils.TRUE_FALSE_OPTIONS.size()));
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract boolean checkTogglePermissions();
|
||||||
|
protected abstract boolean checkModifyPermissions();
|
||||||
|
protected abstract boolean checkEnabled(String skill);
|
||||||
|
protected abstract void enable(String skill);
|
||||||
|
protected abstract void disable(String skill);
|
||||||
|
protected abstract void modify();
|
||||||
|
|
||||||
|
private boolean isInvalidPercentage(CommandSender sender, String value) {
|
||||||
|
if (CommandUtils.isInvalidDouble(sender, value)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
newPercent = Double.parseDouble(value);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.gmail.nossr50.commands.hardcore;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
|
public class VampirismCommand extends HardcoreModeCommand {
|
||||||
|
@Override
|
||||||
|
protected boolean checkTogglePermissions() {
|
||||||
|
return Permissions.vampirismToggle(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean checkModifyPermissions() {
|
||||||
|
return Permissions.vampirismModify(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean checkEnabled(String skill) {
|
||||||
|
if (skill.equalsIgnoreCase("ALL")) {
|
||||||
|
for (SkillType skillType : SkillType.values()) {
|
||||||
|
if (!skillType.getHardcoreVampirismEnabled()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SkillType.getSkill(skill).getHardcoreVampirismEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void enable(String skill) {
|
||||||
|
toggle(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void disable(String skill) {
|
||||||
|
toggle(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void modify() {
|
||||||
|
Config.getInstance().setHardcoreVampirismStatLeechPercentage(newPercent);
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Hardcore.Vampirism.PercentageChanged", percent.format(newPercent / 100D)));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void toggle(boolean enable) {
|
||||||
|
if (skill.equalsIgnoreCase("ALL")) {
|
||||||
|
for (SkillType skillType : SkillType.NON_CHILD_SKILLS) {
|
||||||
|
skillType.setHardcoreVampirismEnabled(enable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
SkillType.getSkill(skill).setHardcoreVampirismEnabled(enable);
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMO.p.getServer().broadcastMessage(LocaleLoader.getString("Hardcore.Mode." + (enable ? "Enabled" : "Disabled"), LocaleLoader.getString("Hardcore.Vampirism.Name"), skill));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.mc;
|
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
|
|
||||||
public class McabilityCommand implements CommandExecutor {
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!mcPermissions.permissionsEnabled) {
|
|
||||||
sender.sendMessage("This command requires permissions.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!LoadProperties.mcabilityEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
if (PP.getAbilityUse()) {
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.AbilitiesOff"));
|
|
||||||
PP.toggleAbilityUse();
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.AbilitiesOn"));
|
|
||||||
PP.toggleAbilityUse();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.mc;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
|
|
||||||
public class MccCommand implements CommandExecutor {
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.mccEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
|
|
||||||
player.sendMessage(ChatColor.RED + "---[]" + ChatColor.YELLOW + "mcMMO Commands" + ChatColor.RED + "[]---");
|
|
||||||
|
|
||||||
if (mcPermissions.getInstance().party(player)) {
|
|
||||||
player.sendMessage(mcLocale.getString("m.mccPartyCommands"));
|
|
||||||
player.sendMessage("/party " + mcLocale.getString("m.mccParty"));
|
|
||||||
player.sendMessage("/party q " + mcLocale.getString("m.mccPartyQ"));
|
|
||||||
|
|
||||||
if (mcPermissions.getInstance().partyChat(player))
|
|
||||||
player.sendMessage("/p " + mcLocale.getString("m.mccPartyToggle"));
|
|
||||||
|
|
||||||
player.sendMessage("/invite " + mcLocale.getString("m.mccPartyInvite"));
|
|
||||||
player.sendMessage("/invite " + mcLocale.getString("m.mccPartyAccept"));
|
|
||||||
|
|
||||||
if (mcPermissions.getInstance().partyTeleport(player))
|
|
||||||
player.sendMessage("/ptp " + mcLocale.getString("m.mccPartyTeleport"));
|
|
||||||
}
|
|
||||||
player.sendMessage(mcLocale.getString("m.mccOtherCommands"));
|
|
||||||
player.sendMessage("/stats " + ChatColor.RED + " " + mcLocale.getString("m.mccStats"));
|
|
||||||
player.sendMessage("/mctop <skillname> <page> " + ChatColor.RED + mcLocale.getString("m.mccLeaderboards"));
|
|
||||||
|
|
||||||
if (mcPermissions.getInstance().mySpawn(player)) {
|
|
||||||
player.sendMessage("/myspawn " + ChatColor.RED + mcLocale.getString("m.mccMySpawn"));
|
|
||||||
player.sendMessage("/clearmyspawn " + ChatColor.RED + mcLocale.getString("m.mccClearMySpawn"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mcPermissions.getInstance().mcAbility(player))
|
|
||||||
player.sendMessage("/mcability" + ChatColor.RED + " " + mcLocale.getString("m.mccToggleAbility"));
|
|
||||||
|
|
||||||
if (mcPermissions.getInstance().adminChat(player))
|
|
||||||
player.sendMessage("/a " + ChatColor.RED + mcLocale.getString("m.mccAdminToggle"));
|
|
||||||
|
|
||||||
if (mcPermissions.getInstance().whois(player))
|
|
||||||
player.sendMessage("/whois " + mcLocale.getString("m.mccWhois"));
|
|
||||||
|
|
||||||
if (mcPermissions.getInstance().mmoedit(player))
|
|
||||||
player.sendMessage("/mmoedit" + mcLocale.getString("m.mccMmoedit"));
|
|
||||||
|
|
||||||
if (mcPermissions.getInstance().mcgod(player))
|
|
||||||
player.sendMessage("/mcgod" + ChatColor.RED + " " + mcLocale.getString("m.mccMcGod"));
|
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.mccSkillInfo"));
|
|
||||||
player.sendMessage("/mcmmo " + mcLocale.getString("m.mccModDescription"));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.mc;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
|
|
||||||
public class McgodCommand implements CommandExecutor {
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.mcgodEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
if (mcPermissions.permissionsEnabled) {
|
|
||||||
if (!mcPermissions.getInstance().mcgod(player)) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PP.getGodMode()) {
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.GodModeDisabled"));
|
|
||||||
PP.toggleGodMode();
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.GodModeEnabled"));
|
|
||||||
PP.toggleGodMode();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.mc;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.GregorianCalendar;
|
|
||||||
|
|
||||||
public class McmmoCommand implements CommandExecutor {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.mcmmoEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
|
|
||||||
player.sendMessage(ChatColor.RED + "-----[]" + ChatColor.GREEN + "mcMMO" + ChatColor.RED + "[]-----");
|
|
||||||
String description = mcLocale.getString("mcMMO.Description", new Object[] { "/mcc" });
|
|
||||||
String[] mcSplit = description.split(",");
|
|
||||||
|
|
||||||
for (String x : mcSplit) {
|
|
||||||
player.sendMessage(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LoadProperties.spoutEnabled && player instanceof SpoutPlayer) {
|
|
||||||
SpoutPlayer sPlayer = (SpoutPlayer) player;
|
|
||||||
if (LoadProperties.donateMessage)
|
|
||||||
player.sendMessage(ChatColor.GREEN + "[mcMMO] Donate! Paypal theno1yeti@gmail.com");
|
|
||||||
} else {
|
|
||||||
if (LoadProperties.donateMessage)
|
|
||||||
player.sendMessage(ChatColor.GREEN + "If you like my work you can donate via Paypal: theno1yeti@gmail.com");
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.mc;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
|
|
||||||
public class McrefreshCommand implements CommandExecutor {
|
|
||||||
private final mcMMO plugin;
|
|
||||||
|
|
||||||
public McrefreshCommand(mcMMO instance) {
|
|
||||||
this.plugin = instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.mcrefreshEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().mcrefresh(player)) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (args.length >= 1 && (plugin.getServer().getPlayer(args[0]) != null)) {
|
|
||||||
player.sendMessage("You have refreshed " + args[0] + "'s cooldowns!");
|
|
||||||
player = plugin.getServer().getPlayer(args[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* PREP MODES
|
|
||||||
*/
|
|
||||||
PP = Users.getProfile(player);
|
|
||||||
PP.setRecentlyHurt((long) 0);
|
|
||||||
PP.setHoePreparationMode(false);
|
|
||||||
PP.setAxePreparationMode(false);
|
|
||||||
PP.setFistsPreparationMode(false);
|
|
||||||
PP.setSwordsPreparationMode(false);
|
|
||||||
PP.setPickaxePreparationMode(false);
|
|
||||||
/*
|
|
||||||
* GREEN TERRA
|
|
||||||
*/
|
|
||||||
PP.setGreenTerraMode(false);
|
|
||||||
PP.setGreenTerraDeactivatedTimeStamp((long) 0);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* GIGA DRILL BREAKER
|
|
||||||
*/
|
|
||||||
PP.setGigaDrillBreakerMode(false);
|
|
||||||
PP.setGigaDrillBreakerDeactivatedTimeStamp((long) 0);
|
|
||||||
/*
|
|
||||||
* SERRATED STRIKE
|
|
||||||
*/
|
|
||||||
PP.setSerratedStrikesMode(false);
|
|
||||||
PP.setSerratedStrikesDeactivatedTimeStamp((long) 0);
|
|
||||||
/*
|
|
||||||
* SUPER BREAKER
|
|
||||||
*/
|
|
||||||
PP.setSuperBreakerMode(false);
|
|
||||||
PP.setSuperBreakerDeactivatedTimeStamp((long) 0);
|
|
||||||
/*
|
|
||||||
* TREE FELLER
|
|
||||||
*/
|
|
||||||
PP.setTreeFellerMode(false);
|
|
||||||
PP.setTreeFellerDeactivatedTimeStamp((long) 0);
|
|
||||||
/*
|
|
||||||
* BERSERK
|
|
||||||
*/
|
|
||||||
PP.setBerserkMode(false);
|
|
||||||
PP.setBerserkDeactivatedTimeStamp((long) 0);
|
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.AbilitiesRefreshed"));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,199 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.mc;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Leaderboard;
|
|
||||||
import com.gmail.nossr50.m;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
import com.gmail.nossr50.skills.Skills;
|
|
||||||
|
|
||||||
public class MctopCommand implements CommandExecutor {
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.mctopEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
|
|
||||||
if (LoadProperties.useMySQL == false) {
|
|
||||||
/*
|
|
||||||
* POWER LEVEL INFO RETRIEVAL
|
|
||||||
*/
|
|
||||||
if (args.length == 0) {
|
|
||||||
int p = 1;
|
|
||||||
String[] info = Leaderboard.retrieveInfo(SkillType.ALL.toString(), p);
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.PowerLevelLeaderboard"));
|
|
||||||
int n = 1 * p; // Position
|
|
||||||
for (String x : info) {
|
|
||||||
if (x != null) {
|
|
||||||
String digit = String.valueOf(n);
|
|
||||||
if (n < 10)
|
|
||||||
digit = "0" + String.valueOf(n);
|
|
||||||
String[] splitx = x.split(":");
|
|
||||||
// Format: 1. Playername - skill value
|
|
||||||
player.sendMessage(digit + ". " + ChatColor.GREEN + splitx[1] + " - " + ChatColor.WHITE + splitx[0]);
|
|
||||||
n++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (args.length >= 1 && m.isInt(args[0])) {
|
|
||||||
int p = 1;
|
|
||||||
// Grab page value if specified
|
|
||||||
if (args.length >= 1) {
|
|
||||||
if (m.isInt(args[0])) {
|
|
||||||
p = Integer.valueOf(args[0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int pt = p;
|
|
||||||
if (p > 1) {
|
|
||||||
pt -= 1;
|
|
||||||
pt += (pt * 10);
|
|
||||||
pt = 10;
|
|
||||||
}
|
|
||||||
String[] info = Leaderboard.retrieveInfo(SkillType.ALL.toString(), p);
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.PowerLevelLeaderboard"));
|
|
||||||
int n = 1 * pt; // Position
|
|
||||||
for (String x : info) {
|
|
||||||
if (x != null) {
|
|
||||||
String digit = String.valueOf(n);
|
|
||||||
if (n < 10)
|
|
||||||
digit = "0" + String.valueOf(n);
|
|
||||||
String[] splitx = x.split(":");
|
|
||||||
// Format: 1. Playername - skill value
|
|
||||||
player.sendMessage(digit + ". " + ChatColor.GREEN + splitx[1] + " - " + ChatColor.WHITE + splitx[0]);
|
|
||||||
n++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
* SKILL SPECIFIED INFO RETRIEVAL
|
|
||||||
*/
|
|
||||||
if (args.length >= 1 && Skills.isSkill(args[0])) {
|
|
||||||
int p = 1;
|
|
||||||
// Grab page value if specified
|
|
||||||
if (args.length >= 2) {
|
|
||||||
if (m.isInt(args[1])) {
|
|
||||||
p = Integer.valueOf(args[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
int pt = p;
|
|
||||||
if (p > 1) {
|
|
||||||
pt -= 1;
|
|
||||||
pt += (pt * 10);
|
|
||||||
pt = 10;
|
|
||||||
}
|
|
||||||
String firstLetter = args[0].substring(0, 1); // Get first letter
|
|
||||||
String remainder = args[0].substring(1); // Get remainder of word.
|
|
||||||
String capitalized = firstLetter.toUpperCase() + remainder.toLowerCase();
|
|
||||||
|
|
||||||
String[] info = Leaderboard.retrieveInfo(args[0].toUpperCase(), p);
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.SkillLeaderboard", new Object[] { capitalized }));
|
|
||||||
int n = 1 * pt; // Position
|
|
||||||
for (String x : info) {
|
|
||||||
if (x != null) {
|
|
||||||
String digit = String.valueOf(n);
|
|
||||||
if (n < 10)
|
|
||||||
digit = "0" + String.valueOf(n);
|
|
||||||
String[] splitx = x.split(":");
|
|
||||||
// Format: 1. Playername - skill value
|
|
||||||
player.sendMessage(digit + ". " + ChatColor.GREEN + splitx[1] + " - " + ChatColor.WHITE + splitx[0]);
|
|
||||||
n++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/*
|
|
||||||
* MYSQL LEADERBOARDS
|
|
||||||
*/
|
|
||||||
String powerlevel = "taming+mining+woodcutting+repair+unarmed+herbalism+excavation+archery+swords+axes+acrobatics+fishing";
|
|
||||||
if (args.length >= 1 && Skills.isSkill(args[0])) {
|
|
||||||
/*
|
|
||||||
* Create a nice consistent capitalized leaderboard name
|
|
||||||
*/
|
|
||||||
String lowercase = args[0].toLowerCase(); // For the query
|
|
||||||
String firstLetter = args[0].substring(0, 1); // Get first letter
|
|
||||||
String remainder = args[0].substring(1); // Get remainder of word.
|
|
||||||
String capitalized = firstLetter.toUpperCase() + remainder.toLowerCase();
|
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.SkillLeaderboard", new Object[] { capitalized }));
|
|
||||||
if (args.length >= 2 && m.isInt(args[1])) {
|
|
||||||
int n = 1; // For the page number
|
|
||||||
int n2 = Integer.valueOf(args[1]);
|
|
||||||
if (n2 > 1) {
|
|
||||||
// Figure out the 'page' here
|
|
||||||
n = 10;
|
|
||||||
n = n * (n2 - 1);
|
|
||||||
}
|
|
||||||
// If a page number is specified
|
|
||||||
HashMap<Integer, ArrayList<String>> userslist = mcMMO.database.Read("SELECT " + lowercase + ", user_id FROM " + LoadProperties.MySQLtablePrefix + "skills WHERE " + lowercase + " > 0 ORDER BY `" + LoadProperties.MySQLtablePrefix + "skills`.`" + lowercase + "` DESC ");
|
|
||||||
|
|
||||||
for (int i = n; i <= n + 10; i++) {
|
|
||||||
if (i > userslist.size() || mcMMO.database.Read("SELECT user FROM " + LoadProperties.MySQLtablePrefix + "users WHERE id = '" + Integer.valueOf(userslist.get(i).get(1)) + "'") == null)
|
|
||||||
break;
|
|
||||||
HashMap<Integer, ArrayList<String>> username = mcMMO.database.Read("SELECT user FROM " + LoadProperties.MySQLtablePrefix + "users WHERE id = '" + Integer.valueOf(userslist.get(i).get(1)) + "'");
|
|
||||||
player.sendMessage(String.valueOf(i) + ". " + ChatColor.GREEN + userslist.get(i).get(0) + " - " + ChatColor.WHITE + username.get(1).get(0));
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
// If no page number is specified
|
|
||||||
HashMap<Integer, ArrayList<String>> userslist = mcMMO.database.Read("SELECT " + lowercase + ", user_id FROM " + LoadProperties.MySQLtablePrefix + "skills WHERE " + lowercase + " > 0 ORDER BY `" + LoadProperties.MySQLtablePrefix + "skills`.`" + lowercase + "` DESC ");
|
|
||||||
for (int i = 1; i <= 10; i++) { // i<=userslist.size()
|
|
||||||
if (i > userslist.size() || mcMMO.database.Read("SELECT user FROM " + LoadProperties.MySQLtablePrefix + "users WHERE id = '" + Integer.valueOf(userslist.get(i).get(1)) + "'") == null)
|
|
||||||
break;
|
|
||||||
HashMap<Integer, ArrayList<String>> username = mcMMO.database.Read("SELECT user FROM " + LoadProperties.MySQLtablePrefix + "users WHERE id = '" + Integer.valueOf(userslist.get(i).get(1)) + "'");
|
|
||||||
player.sendMessage(String.valueOf(i) + ". " + ChatColor.GREEN + userslist.get(i).get(0) + " - " + ChatColor.WHITE + username.get(1).get(0));
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (args.length >= 0) {
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.PowerLevelLeaderboard"));
|
|
||||||
if (args.length >= 1 && m.isInt(args[0])) {
|
|
||||||
int n = 1; // For the page number
|
|
||||||
int n2 = Integer.valueOf(args[0]);
|
|
||||||
if (n2 > 1) {
|
|
||||||
// Figure out the 'page' here
|
|
||||||
n = 10;
|
|
||||||
n = n * (n2 - 1);
|
|
||||||
}
|
|
||||||
// If a page number is specified
|
|
||||||
HashMap<Integer, ArrayList<String>> userslist = mcMMO.database.Read("SELECT " + powerlevel + ", user_id FROM " + LoadProperties.MySQLtablePrefix + "skills WHERE " + powerlevel + " > 0 ORDER BY " + powerlevel + " DESC ");
|
|
||||||
for (int i = n; i <= n + 10; i++) {
|
|
||||||
if (i > userslist.size() || mcMMO.database.Read("SELECT user FROM " + LoadProperties.MySQLtablePrefix + "users WHERE id = '" + Integer.valueOf(userslist.get(i).get(1)) + "'") == null)
|
|
||||||
break;
|
|
||||||
HashMap<Integer, ArrayList<String>> username = mcMMO.database.Read("SELECT user FROM " + LoadProperties.MySQLtablePrefix + "users WHERE id = '" + Integer.valueOf(userslist.get(i).get(1)) + "'");
|
|
||||||
player.sendMessage(String.valueOf(i) + ". " + ChatColor.GREEN + userslist.get(i).get(0) + " - " + ChatColor.WHITE + username.get(1).get(0));
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
HashMap<Integer, ArrayList<String>> userslist = mcMMO.database.Read("SELECT " + powerlevel + ", user_id FROM " + LoadProperties.MySQLtablePrefix + "skills WHERE " + powerlevel + " > 0 ORDER BY " + powerlevel + " DESC ");
|
|
||||||
for (int i = 1; i <= 10; i++) {
|
|
||||||
if (i > userslist.size() || mcMMO.database.Read("SELECT user FROM " + LoadProperties.MySQLtablePrefix + "users WHERE id = '" + Integer.valueOf(userslist.get(i).get(1)) + "'") == null)
|
|
||||||
break;
|
|
||||||
HashMap<Integer, ArrayList<String>> username = mcMMO.database.Read("SELECT user FROM " + LoadProperties.MySQLtablePrefix + "users WHERE id = '" + Integer.valueOf(userslist.get(i).get(1)) + "'");
|
|
||||||
player.sendMessage(String.valueOf(i) + ". " + ChatColor.GREEN + userslist.get(i).get(0) + " - " + ChatColor.WHITE + username.get(1).get(0));
|
|
||||||
// System.out.println(username.get(1).get(0));
|
|
||||||
// System.out.println("Mining : " + userslist.get(i).get(0) + ", User id : " + userslist.get(i).get(1));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
|
||||||
|
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
|
|
||||||
public class ACommand implements CommandExecutor {
|
|
||||||
private Logger log;
|
|
||||||
|
|
||||||
public ACommand() {
|
|
||||||
this.log = Logger.getLogger("Minecraft");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
|
|
||||||
// Console message?
|
|
||||||
if (!(sender instanceof Player) && args.length >= 1) {
|
|
||||||
String aMessage = args[0];
|
|
||||||
for (int i = 1; i <= args.length - 1; i++) {
|
|
||||||
aMessage = aMessage + " " + args[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
String aPrefix = ChatColor.AQUA + "{" + ChatColor.WHITE + "*Console*" + ChatColor.AQUA + "} ";
|
|
||||||
|
|
||||||
log.log(Level.INFO, "[A]<*Console*> " + aMessage);
|
|
||||||
|
|
||||||
for (Player herp : Bukkit.getServer().getOnlinePlayers()) {
|
|
||||||
if (mcPermissions.getInstance().adminChat(herp) || herp.isOp())
|
|
||||||
herp.sendMessage(aPrefix + aMessage);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().adminChat(player) && !player.isOp()) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Not a toggle, a message
|
|
||||||
|
|
||||||
if (args.length >= 1) {
|
|
||||||
String aMessage = args[0];
|
|
||||||
for (int i = 1; i <= args.length - 1; i++) {
|
|
||||||
aMessage = aMessage + " " + args[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
String name = (LoadProperties.aDisplayNames) ? player.getDisplayName() : player.getName();
|
|
||||||
String aPrefix = ChatColor.AQUA + "{" + ChatColor.WHITE + name + ChatColor.AQUA + "} ";
|
|
||||||
log.log(Level.INFO, "[A]<" + name + "> " + aMessage);
|
|
||||||
for (Player herp : Bukkit.getServer().getOnlinePlayers()) {
|
|
||||||
if (mcPermissions.getInstance().adminChat(herp) || herp.isOp())
|
|
||||||
herp.sendMessage(aPrefix + aMessage);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PP.getPartyChatMode())
|
|
||||||
PP.togglePartyChat();
|
|
||||||
|
|
||||||
PP.toggleAdminChat();
|
|
||||||
|
|
||||||
if (PP.getAdminChatMode()) {
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.AdminChatOn"));
|
|
||||||
// player.sendMessage(ChatColor.AQUA + "Admin chat toggled " + ChatColor.GREEN + "On");
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.AdminChatOff"));
|
|
||||||
// player.sendMessage(ChatColor.AQUA + "Admin chat toggled " + ChatColor.RED + "Off");
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
import com.gmail.nossr50.party.Party;
|
|
||||||
|
|
||||||
public class AcceptCommand implements CommandExecutor {
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.acceptEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().party(player)) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PP.hasPartyInvite()) {
|
|
||||||
Party Pinstance = Party.getInstance();
|
|
||||||
|
|
||||||
if (PP.inParty()) {
|
|
||||||
Pinstance.removeFromParty(player, PP);
|
|
||||||
}
|
|
||||||
PP.acceptInvite();
|
|
||||||
Pinstance.addToParty(player, PP, PP.getParty(), true);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.NoInvites"));
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
import com.gmail.nossr50.party.Party;
|
|
||||||
|
|
||||||
public class InviteCommand implements CommandExecutor {
|
|
||||||
private final mcMMO plugin;
|
|
||||||
|
|
||||||
public InviteCommand(mcMMO instance) {
|
|
||||||
this.plugin = instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.inviteEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().party(player)) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Party Pinstance = Party.getInstance();
|
|
||||||
|
|
||||||
if (!PP.inParty()) {
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.NotInParty"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (args.length < 1) {
|
|
||||||
player.sendMessage(ChatColor.RED + "Usage is /invite <playername>");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (PP.inParty() && args.length >= 1 && (plugin.getServer().getPlayer(args[0]) != null)) {
|
|
||||||
if (Pinstance.canInvite(player, PP)) {
|
|
||||||
Player target = plugin.getServer().getPlayer(args[0]);
|
|
||||||
PlayerProfile PPt = Users.getProfile(target);
|
|
||||||
PPt.modifyInvite(PP.getParty());
|
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.InviteSuccess"));
|
|
||||||
// target.sendMessage(ChatColor.RED+"ALERT: "+ChatColor.GREEN+"You have received a party invite for "+PPt.getInvite()+" from "+player.getName());
|
|
||||||
target.sendMessage(mcLocale.getString("mcPlayerListener.ReceivedInvite1", new Object[] { PPt.getInvite(), player.getName() }));
|
|
||||||
// target.sendMessage(ChatColor.YELLOW+"Type "+ChatColor.GREEN+LoadProperties.accept+ChatColor.YELLOW+" to accept the invite");
|
|
||||||
target.sendMessage(mcLocale.getString("mcPlayerListener.ReceivedInvite2", new Object[] { "/accept" }));
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.Locked"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
|
||||||
|
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
import com.gmail.nossr50.party.Party;
|
|
||||||
|
|
||||||
public class PCommand implements CommandExecutor {
|
|
||||||
private Logger log;
|
|
||||||
|
|
||||||
public PCommand() {
|
|
||||||
this.log = Logger.getLogger("Minecraft");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.partyEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Console message?
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
if (args.length < 2)
|
|
||||||
return true;
|
|
||||||
String pMessage = args[1];
|
|
||||||
for (int i = 2; i <= args.length - 1; i++) {
|
|
||||||
pMessage = pMessage + " " + args[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
String pPrefix = ChatColor.GREEN + "(" + ChatColor.WHITE + "*Console*" + ChatColor.GREEN + ") ";
|
|
||||||
|
|
||||||
log.log(Level.INFO, "[P](" + args[0] + ")" + "<*Console*> " + pMessage);
|
|
||||||
|
|
||||||
for (Player herp : Bukkit.getServer().getOnlinePlayers()) {
|
|
||||||
if (Users.getProfile(herp).inParty()) {
|
|
||||||
if (Users.getProfile(herp).getParty().equalsIgnoreCase(args[0])) {
|
|
||||||
herp.sendMessage(pPrefix + pMessage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().party(player)) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Not a toggle, a message
|
|
||||||
|
|
||||||
if (args.length >= 1) {
|
|
||||||
String pMessage = args[0];
|
|
||||||
for (int i = 1; i <= args.length - 1; i++) {
|
|
||||||
pMessage = pMessage + " " + args[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
String name = (LoadProperties.pDisplayNames) ? player.getDisplayName() : player.getName();
|
|
||||||
String pPrefix = ChatColor.GREEN + "(" + ChatColor.WHITE + name + ChatColor.GREEN + ") ";
|
|
||||||
log.log(Level.INFO, "[P](" + PP.getParty() + ")" + "<" + name + "> " + pMessage);
|
|
||||||
|
|
||||||
for (Player herp : Bukkit.getServer().getOnlinePlayers()) {
|
|
||||||
if (Users.getProfile(herp).inParty()) {
|
|
||||||
if (Party.getInstance().inSameParty(herp, player))
|
|
||||||
herp.sendMessage(pPrefix + pMessage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PP.getAdminChatMode())
|
|
||||||
PP.toggleAdminChat();
|
|
||||||
|
|
||||||
PP.togglePartyChat();
|
|
||||||
|
|
||||||
if (PP.getPartyChatMode()) {
|
|
||||||
// player.sendMessage(ChatColor.GREEN + "Party Chat Toggled On");
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.PartyChatOn"));
|
|
||||||
} else {
|
|
||||||
// player.sendMessage(ChatColor.GREEN + "Party Chat Toggled " + ChatColor.RED + "Off");
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.PartyChatOff"));
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyAcceptCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
Player player = (Player) sender;
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
|
if (!mcMMOPlayer.hasPartyInvite()) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("mcMMO.NoInvites"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changing parties
|
||||||
|
if (!PartyManager.changeOrJoinParty(mcMMOPlayer, mcMMOPlayer.getPartyInvite().getName())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
PartyManager.joinInvitedParty(mcMMOPlayer);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.1", "party", "accept"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyChangeOwnerCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 2:
|
||||||
|
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||||
|
String targetName = Misc.getMatchedPlayerName(args[1]);
|
||||||
|
|
||||||
|
if (!playerParty.getMembers().contains(targetName)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
PartyManager.setPartyLeader(targetName, playerParty);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "owner", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyChangePasswordCommand implements CommandExecutor {
|
||||||
|
private Party playerParty;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||||
|
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
unprotectParty(sender);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
if (args[1].equalsIgnoreCase("clear") || args[1].equalsIgnoreCase("reset")) {
|
||||||
|
unprotectParty(sender);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protectParty(sender, args[1]);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "password", "[clear|reset]"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "password", "<" + LocaleLoader.getString("Commands.Usage.Password") + ">"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void unprotectParty(CommandSender sender) {
|
||||||
|
playerParty.setLocked(true);
|
||||||
|
playerParty.setPassword(null);
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Password.Removed"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void protectParty(CommandSender sender, String password) {
|
||||||
|
playerParty.setLocked(true);
|
||||||
|
playerParty.setPassword(password);
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Password.Set", password));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,192 +1,235 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import java.util.ArrayList;
|
||||||
import org.bukkit.ChatColor;
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.mcPermissions;
|
import com.gmail.nossr50.commands.chat.PartyChatCommand;
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
import com.gmail.nossr50.commands.party.teleport.PtpCommand;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.party.Party;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
public class PartyCommand implements CommandExecutor {
|
import com.google.common.collect.ImmutableList;
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.partyEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
public class PartyCommand implements TabExecutor {
|
||||||
sender.sendMessage("This command does not support console useage.");
|
private McMMOPlayer mcMMOPlayer;
|
||||||
return true;
|
private Player player;
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
private static final List<String> PARTY_SUBCOMMANDS;
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
private static final List<String> EXPSHARE_COMPLETIONS = ImmutableList.of("none", "equal");
|
||||||
|
private static final List<String> ITEMSHARE_COMPLETIONS = ImmutableList.of("none", "equal", "random", "loot", "mining", "herbalism", "woodcutting", "misc");
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().party(player)) {
|
static {
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
ArrayList<String> subcommands = new ArrayList<String>();
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Party Pinstance = Party.getInstance();
|
for (PartySubcommandType subcommand : PartySubcommandType.values()) {
|
||||||
|
subcommands.add(subcommand.toString());
|
||||||
|
}
|
||||||
|
|
||||||
if (PP.inParty() && (!Pinstance.isParty(PP.getParty()) || !Pinstance.isInParty(player, PP))) {
|
Collections.sort(subcommands);
|
||||||
Pinstance.addToParty(player, PP, PP.getParty(), false);
|
PARTY_SUBCOMMANDS = ImmutableList.copyOf(subcommands);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.length == 0 && !PP.inParty()) {
|
private CommandExecutor partyJoinCommand = new PartyJoinCommand();
|
||||||
player.sendMessage(mcLocale.getString("Party.Help1", new Object[] { "/party "}));
|
private CommandExecutor partyAcceptCommand = new PartyAcceptCommand();
|
||||||
player.sendMessage(mcLocale.getString("Party.Help2", new Object[] { "/party "}));
|
private CommandExecutor partyCreateCommand = new PartyCreateCommand();
|
||||||
player.sendMessage(mcLocale.getString("Party.Help3", new Object[] { "/party " }));
|
private CommandExecutor partyQuitCommand = new PartyQuitCommand();
|
||||||
return true;
|
private CommandExecutor partyExpShareCommand = new PartyExpShareCommand();
|
||||||
} else if (args.length == 0 && PP.inParty()) {
|
private CommandExecutor partyItemShareCommand = new PartyItemShareCommand();
|
||||||
String tempList = "";
|
private CommandExecutor partyInviteCommand = new PartyInviteCommand();
|
||||||
int x = 0;
|
private CommandExecutor partyKickCommand = new PartyKickCommand();
|
||||||
for (Player p : Bukkit.getServer().getOnlinePlayers()) {
|
private CommandExecutor partyDisbandCommand = new PartyDisbandCommand();
|
||||||
if (PP.getParty().equals(Users.getProfile(p).getParty())) {
|
private CommandExecutor partyChangeOwnerCommand = new PartyChangeOwnerCommand();
|
||||||
if (p != null && x + 1 >= Pinstance.partyCount(player, Bukkit.getServer().getOnlinePlayers())) {
|
private CommandExecutor partyLockCommand = new PartyLockCommand();
|
||||||
if (Pinstance.isPartyLeader(p.getName(), PP.getParty())) {
|
private CommandExecutor partyChangePasswordCommand = new PartyChangePasswordCommand();
|
||||||
tempList += ChatColor.GOLD + p.getName();
|
private CommandExecutor partyRenameCommand = new PartyRenameCommand();
|
||||||
x++;
|
private CommandExecutor partyInfoCommand = new PartyInfoCommand();
|
||||||
} else {
|
private CommandExecutor partyHelpCommand = new PartyHelpCommand();
|
||||||
tempList += ChatColor.WHITE + p.getName();
|
private CommandExecutor partyTeleportCommand = mcMMO.p.getCommand("ptp").getExecutor();
|
||||||
x++;
|
private CommandExecutor partyChatCommand = new PartyChatCommand();
|
||||||
}
|
|
||||||
}
|
|
||||||
if (p != null && x < Pinstance.partyCount(player, Bukkit.getServer().getOnlinePlayers())) {
|
|
||||||
if (Pinstance.isPartyLeader(p.getName(), PP.getParty())) {
|
|
||||||
tempList += ChatColor.GOLD + p.getName() + ", ";
|
|
||||||
x++;
|
|
||||||
} else {
|
|
||||||
tempList += ChatColor.WHITE + p.getName() + ", ";
|
|
||||||
x++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.YouAreInParty", new Object[] { PP.getParty() }));
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.PartyMembers") + " (" + tempList + ChatColor.GREEN + ")");
|
|
||||||
return true;
|
|
||||||
} else if (args.length == 1) {
|
|
||||||
if (args[0].equals("q") && PP.inParty()) {
|
|
||||||
Pinstance.removeFromParty(player, PP);
|
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.LeftParty"));
|
@Override
|
||||||
return true;
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
} else if (args[0].equalsIgnoreCase("?")) {
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
player.sendMessage(mcLocale.getString("Party.Help4", new Object[] { "/party " }));
|
return true;
|
||||||
player.sendMessage(mcLocale.getString("Party.Help2", new Object[] { "/party " }));
|
}
|
||||||
player.sendMessage(mcLocale.getString("Party.Help5", new Object[] { "/party " }));
|
|
||||||
player.sendMessage(mcLocale.getString("Party.Help6", new Object[] { "/party " }));
|
|
||||||
player.sendMessage(mcLocale.getString("Party.Help7", new Object[] { "/party " }));
|
|
||||||
player.sendMessage(mcLocale.getString("Party.Help8", new Object[] { "/party " }));
|
|
||||||
player.sendMessage(mcLocale.getString("Party.Help9", new Object[] { "/party " }));
|
|
||||||
} else if (args[0].equalsIgnoreCase("lock")) {
|
|
||||||
if (PP.inParty()) {
|
|
||||||
if (Pinstance.isPartyLeader(player.getName(), PP.getParty())) {
|
|
||||||
Pinstance.lockParty(PP.getParty());
|
|
||||||
player.sendMessage(mcLocale.getString("Party.Locked"));
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.NotOwner"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.InvalidName"));
|
|
||||||
}
|
|
||||||
} else if (args[0].equalsIgnoreCase("unlock")) {
|
|
||||||
if (PP.inParty()) {
|
|
||||||
if (Pinstance.isPartyLeader(player.getName(), PP.getParty())) {
|
|
||||||
Pinstance.unlockParty(PP.getParty());
|
|
||||||
player.sendMessage(mcLocale.getString("Party.Unlocked"));
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.NotOwner"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.InvalidName"));
|
|
||||||
}
|
|
||||||
// Party debugging command.
|
|
||||||
// } else if (args[0].equalsIgnoreCase("dump")) {
|
|
||||||
// Pinstance.dump(player);
|
|
||||||
} else {
|
|
||||||
if (PP.inParty()) {
|
|
||||||
Pinstance.removeFromParty(player, PP);
|
|
||||||
}
|
|
||||||
Pinstance.addToParty(player, PP, args[0], false);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else if (args.length == 2 && PP.inParty()) {
|
|
||||||
if (args[0].equalsIgnoreCase("password")) {
|
|
||||||
if (Pinstance.isPartyLeader(player.getName(), PP.getParty())) {
|
|
||||||
if (Pinstance.isPartyLocked(PP.getParty())) {
|
|
||||||
Pinstance.setPartyPassword(PP.getParty(), args[1]);
|
|
||||||
player.sendMessage(mcLocale.getString("Party.PasswordSet", new Object[] { args[1] }));
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.IsntLocked"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.NotOwner"));
|
|
||||||
}
|
|
||||||
} else if (args[0].equalsIgnoreCase("kick")) {
|
|
||||||
if (Pinstance.isPartyLeader(player.getName(), PP.getParty())) {
|
|
||||||
if (Pinstance.isPartyLocked(PP.getParty())) {
|
|
||||||
Player tPlayer = null;
|
|
||||||
if (Bukkit.getServer().getPlayer(args[1]) != null)
|
|
||||||
tPlayer = Bukkit.getServer().getPlayer(args[1]);
|
|
||||||
if (tPlayer == null) {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.CouldNotKick", new Object[] { args[1] }));
|
|
||||||
}
|
|
||||||
if (!Pinstance.inSameParty(player, tPlayer)) {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.NotInYourParty", new Object[] { tPlayer.getName() }));
|
|
||||||
} else {
|
|
||||||
// Not an admin
|
|
||||||
if (!mcPermissions.getInstance().admin(player)) {
|
|
||||||
// Can't kick an admin
|
|
||||||
if (mcPermissions.getInstance().admin(tPlayer)) {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.CouldNotKick", new Object[] { tPlayer.getName() }));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
PlayerProfile tPP = Users.getProfile(tPlayer);
|
|
||||||
|
|
||||||
Pinstance.removeFromParty(tPlayer, tPP);
|
if (!Permissions.party(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
tPlayer.sendMessage(mcLocale.getString("mcPlayerListener.LeftParty"));
|
player = (Player) sender;
|
||||||
}
|
mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.IsntLocked"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.NotOwner"));
|
|
||||||
}
|
|
||||||
} else if (args[0].equalsIgnoreCase("owner")) {
|
|
||||||
if (Pinstance.isPartyLeader(player.getName(), PP.getParty())) {
|
|
||||||
Player tPlayer = null;
|
|
||||||
if (Bukkit.getServer().getPlayer(args[1]) != null)
|
|
||||||
tPlayer = Bukkit.getServer().getPlayer(args[1]);
|
|
||||||
if (tPlayer == null) {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.CouldNotSetOwner", new Object[] { args[1] }));
|
|
||||||
}
|
|
||||||
if (!Pinstance.inSameParty(player, tPlayer)) {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.CouldNotSetOwner", new Object[] { tPlayer.getName() }));
|
|
||||||
} else {
|
|
||||||
Pinstance.setPartyLeader(PP.getParty(), tPlayer.getName());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("Party.NotOwner"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Pinstance.removeFromParty(player, PP);
|
|
||||||
Pinstance.addToParty(player, PP, args[0], false, args[1]);
|
|
||||||
}
|
|
||||||
} else if (args.length == 2 && !PP.inParty()) {
|
|
||||||
Pinstance.addToParty(player, PP, args[0], false, args[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
if (args.length < 1) {
|
||||||
}
|
if (!mcMMOPlayer.inParty()) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
||||||
|
return printUsage();
|
||||||
|
}
|
||||||
|
|
||||||
|
return partyInfoCommand.onCommand(sender, command, label, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
PartySubcommandType subcommand = PartySubcommandType.getSubcommand(args[0]);
|
||||||
|
|
||||||
|
if (subcommand == null) {
|
||||||
|
return printUsage();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Can't use this for lock/unlock since they're handled by the same command
|
||||||
|
if (subcommand != PartySubcommandType.LOCK && subcommand != PartySubcommandType.UNLOCK && !Permissions.partySubcommand(sender, subcommand)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (subcommand) {
|
||||||
|
case JOIN:
|
||||||
|
return partyJoinCommand.onCommand(sender, command, label, args);
|
||||||
|
case ACCEPT:
|
||||||
|
return partyAcceptCommand.onCommand(sender, command, label, args);
|
||||||
|
case CREATE:
|
||||||
|
return partyCreateCommand.onCommand(sender, command, label, args);
|
||||||
|
case HELP:
|
||||||
|
return partyHelpCommand.onCommand(sender, command, label, args);
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Party member commands
|
||||||
|
if (!mcMMOPlayer.inParty()) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
||||||
|
return printUsage();
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (subcommand) {
|
||||||
|
case INFO:
|
||||||
|
return partyInfoCommand.onCommand(sender, command, label, args);
|
||||||
|
case QUIT:
|
||||||
|
return partyQuitCommand.onCommand(sender, command, label, args);
|
||||||
|
case INVITE:
|
||||||
|
return partyInviteCommand.onCommand(sender, command, label, args);
|
||||||
|
case TELEPORT:
|
||||||
|
return partyTeleportCommand.onCommand(sender, command, label, extractArgs(args));
|
||||||
|
case CHAT:
|
||||||
|
return partyChatCommand.onCommand(sender, command, label, extractArgs(args));
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Party leader commands
|
||||||
|
if (!mcMMOPlayer.getParty().getLeader().equalsIgnoreCase(player.getName())) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.NotOwner"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (subcommand) {
|
||||||
|
case EXPSHARE:
|
||||||
|
return partyExpShareCommand.onCommand(sender, command, label, args);
|
||||||
|
case ITEMSHARE:
|
||||||
|
return partyItemShareCommand.onCommand(sender, command, label, args);
|
||||||
|
case KICK:
|
||||||
|
return partyKickCommand.onCommand(sender, command, label, args);
|
||||||
|
case DISBAND:
|
||||||
|
return partyDisbandCommand.onCommand(sender, command, label, args);
|
||||||
|
case OWNER:
|
||||||
|
return partyChangeOwnerCommand.onCommand(sender, command, label, args);
|
||||||
|
case LOCK:
|
||||||
|
case UNLOCK:
|
||||||
|
return partyLockCommand.onCommand(sender, command, label, args);
|
||||||
|
case PASSWORD:
|
||||||
|
return partyChangePasswordCommand.onCommand(sender, command, label, args);
|
||||||
|
case RENAME:
|
||||||
|
return partyRenameCommand.onCommand(sender, command, label, args);
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
return StringUtil.copyPartialMatches(args[0], PARTY_SUBCOMMANDS, new ArrayList<String>(PARTY_SUBCOMMANDS.size()));
|
||||||
|
case 2:
|
||||||
|
PartySubcommandType subcommand = PartySubcommandType.getSubcommand(args[0]);
|
||||||
|
|
||||||
|
if (subcommand == null) {
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (subcommand) {
|
||||||
|
case JOIN:
|
||||||
|
case INVITE:
|
||||||
|
case KICK:
|
||||||
|
case OWNER:
|
||||||
|
Set<String> playerNames = UserManager.getPlayerNames();
|
||||||
|
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
|
case EXPSHARE:
|
||||||
|
return StringUtil.copyPartialMatches(args[1], EXPSHARE_COMPLETIONS, new ArrayList<String>(EXPSHARE_COMPLETIONS.size()));
|
||||||
|
case ITEMSHARE:
|
||||||
|
return StringUtil.copyPartialMatches(args[1], ITEMSHARE_COMPLETIONS, new ArrayList<String>(ITEMSHARE_COMPLETIONS.size()));
|
||||||
|
case LOCK:
|
||||||
|
case CHAT:
|
||||||
|
return StringUtil.copyPartialMatches(args[1], CommandUtils.TRUE_FALSE_OPTIONS, new ArrayList<String>(CommandUtils.TRUE_FALSE_OPTIONS.size()));
|
||||||
|
case PASSWORD:
|
||||||
|
return StringUtil.copyPartialMatches(args[1], CommandUtils.RESET_OPTIONS, new ArrayList<String>(CommandUtils.RESET_OPTIONS.size()));
|
||||||
|
case TELEPORT:
|
||||||
|
List<String> matches = StringUtil.copyPartialMatches(args[1], PtpCommand.TELEPORT_SUBCOMMANDS, new ArrayList<String>(PtpCommand.TELEPORT_SUBCOMMANDS.size()));
|
||||||
|
|
||||||
|
if (matches.size() == 0) {
|
||||||
|
playerNames = UserManager.getPlayerNames();
|
||||||
|
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return matches;
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
case 3:
|
||||||
|
if (PartySubcommandType.getSubcommand(args[0]) == PartySubcommandType.ITEMSHARE && isItemShareCategory(args[1])) {
|
||||||
|
return StringUtil.copyPartialMatches(args[2], CommandUtils.TRUE_FALSE_OPTIONS, new ArrayList<String>(CommandUtils.TRUE_FALSE_OPTIONS.size()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return ImmutableList.of();
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean printUsage() {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Party.Help.0", "/party join"));
|
||||||
|
player.sendMessage(LocaleLoader.getString("Party.Help.1", "/party create"));
|
||||||
|
player.sendMessage(LocaleLoader.getString("Party.Help.2", "/party ?"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String[] extractArgs(String[] args) {
|
||||||
|
String[] newArgs = new String[args.length - 1];
|
||||||
|
|
||||||
|
for (int i = 1; i < args.length; i++) {
|
||||||
|
newArgs[i - 1] = args[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return newArgs;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isItemShareCategory(String category) {
|
||||||
|
return category.equalsIgnoreCase("loot") || category.equalsIgnoreCase("mining") || category.equalsIgnoreCase("herbalism") || category.equalsIgnoreCase("woodcutting") || category.equalsIgnoreCase("misc");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyCreateCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
Player player = (Player) sender;
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
|
// Check to see if the party exists, and if it does cancel creating a new party
|
||||||
|
if (PartyManager.checkPartyExistence(player, args[1])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changing parties
|
||||||
|
if (!PartyManager.changeOrJoinParty(mcMMOPlayer, args[1])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
PartyManager.createParty(mcMMOPlayer, args[1], getPassword(args));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.3", "party", "create", "<" + LocaleLoader.getString("Commands.Usage.PartyName") + ">", "[" + LocaleLoader.getString("Commands.Usage.Password") + "]"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getPassword(String[] args) {
|
||||||
|
if (args.length == 3) {
|
||||||
|
return args[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyDisbandCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||||
|
String partyName = playerParty.getName();
|
||||||
|
|
||||||
|
for (Player member : playerParty.getOnlineMembers()) {
|
||||||
|
if (!PartyManager.handlePartyChangeEvent(member, partyName, null, EventReason.KICKED_FROM_PARTY)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
member.sendMessage(LocaleLoader.getString("Party.Disband"));
|
||||||
|
}
|
||||||
|
|
||||||
|
PartyManager.disbandParty(playerParty);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.1", "party", "disband"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.datatypes.party.ShareMode;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyExpShareCommand implements CommandExecutor {
|
||||||
|
private Party playerParty;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (!Config.getInstance().getExpShareEnabled()) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.ExpShare.Disabled"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (args.length) {
|
||||||
|
case 2:
|
||||||
|
playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||||
|
|
||||||
|
if (args[1].equalsIgnoreCase("none") || CommandUtils.shouldDisableToggle(args[1])) {
|
||||||
|
handleChangingShareMode(ShareMode.NONE);
|
||||||
|
}
|
||||||
|
else if (args[1].equalsIgnoreCase("equal") || args[1].equalsIgnoreCase("even") || CommandUtils.shouldEnableToggle(args[1])) {
|
||||||
|
handleChangingShareMode(ShareMode.EQUAL);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "expshare", "<NONE | EQUAL>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "expshare", "<NONE | EQUAL>"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleChangingShareMode(ShareMode mode) {
|
||||||
|
playerParty.setXpShareMode(mode);
|
||||||
|
|
||||||
|
String changeModeMessage = LocaleLoader.getString("Commands.Party.SetSharing", LocaleLoader.getString("Party.ShareType.Exp"), LocaleLoader.getString("Party.ShareMode." + StringUtils.getCapitalized(mode.toString())));
|
||||||
|
|
||||||
|
for (Player member : playerParty.getOnlineMembers()) {
|
||||||
|
member.sendMessage(changeModeMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
|
||||||
|
public class PartyHelpCommand implements CommandExecutor {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Help.3", "/party join", "/party quit"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Help.1", "/party create"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Help.4", "/party <lock|unlock>"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Help.5", "/party password"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Help.6", "/party kick"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Help.7", "/party leader"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Help.8", "/party disband"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Help.9", "/party itemshare"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Help.10", "/party expshare"));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.1", "party", "help"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.datatypes.party.ShareMode;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyInfoCommand implements CommandExecutor {
|
||||||
|
private McMMOPlayer mcMMOPlayer;
|
||||||
|
private Player player;
|
||||||
|
private Party playerParty;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
player = (Player) sender;
|
||||||
|
mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
playerParty = mcMMOPlayer.getParty();
|
||||||
|
|
||||||
|
displayPartyHeader();
|
||||||
|
displayShareModeInfo();
|
||||||
|
displayMemberInfo();
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.1", "party", "info"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String createMembersList() {
|
||||||
|
StringBuilder memberList = new StringBuilder();
|
||||||
|
|
||||||
|
for (String memberName : playerParty.getMembers()) {
|
||||||
|
Player member = mcMMO.p.getServer().getPlayerExact(memberName);
|
||||||
|
|
||||||
|
if (playerParty.getLeader().equalsIgnoreCase(memberName)) {
|
||||||
|
memberList.append(ChatColor.GOLD);
|
||||||
|
}
|
||||||
|
else if (member != null) {
|
||||||
|
memberList.append(ChatColor.WHITE);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
memberList.append(ChatColor.GRAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
memberList.append(memberName).append(" ");
|
||||||
|
}
|
||||||
|
|
||||||
|
return memberList.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void displayShareModeInfo() {
|
||||||
|
boolean xpShareEnabled = Config.getInstance().getExpShareEnabled();
|
||||||
|
boolean itemShareEnabled = Config.getInstance().getItemShareEnabled();
|
||||||
|
boolean itemSharingActive = (playerParty.getItemShareMode() != ShareMode.NONE);
|
||||||
|
|
||||||
|
if (!xpShareEnabled && !itemShareEnabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
String expShareInfo = "";
|
||||||
|
String itemShareInfo = "";
|
||||||
|
String separator = "";
|
||||||
|
|
||||||
|
if (xpShareEnabled) {
|
||||||
|
expShareInfo = LocaleLoader.getString("Commands.Party.ExpShare", playerParty.getXpShareMode().toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itemShareEnabled) {
|
||||||
|
itemShareInfo = LocaleLoader.getString("Commands.Party.ItemShare", playerParty.getItemShareMode().toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xpShareEnabled && itemShareEnabled) {
|
||||||
|
separator = ChatColor.DARK_GRAY + " || ";
|
||||||
|
}
|
||||||
|
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Party.ShareMode") + expShareInfo + separator + itemShareInfo);
|
||||||
|
if (itemSharingActive) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Party.ItemShareCategories", playerParty.getItemShareCategories()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void displayPartyHeader() {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Party.Header"));
|
||||||
|
|
||||||
|
if (playerParty.isLocked()) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Party.Status", playerParty.getName(), LocaleLoader.getString("Party.Status.Locked")));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Party.Status", playerParty.getName(), LocaleLoader.getString("Party.Status.Unlocked")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void displayMemberInfo() {
|
||||||
|
int membersNear = PartyManager.getNearMembers(mcMMOPlayer).size();
|
||||||
|
int membersOnline = playerParty.getOnlineMembers().size() - 1;
|
||||||
|
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Party.Members.Header"));
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Party.MembersNear", membersNear, membersOnline));
|
||||||
|
player.sendMessage(createMembersList());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyInviteCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
switch (args.length) {
|
||||||
|
case 2:
|
||||||
|
Player player = (Player) sender;
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
String playerName = player.getName();
|
||||||
|
|
||||||
|
if (playerName.equalsIgnoreCase(args[1])) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Party.Invite.Self"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!PartyManager.canInvite(mcMMOPlayer)) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Party.Locked"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
McMMOPlayer mcMMOTarget = UserManager.getPlayer(args[1], true);
|
||||||
|
|
||||||
|
if (mcMMOTarget == null) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Offline"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player target = mcMMOTarget.getPlayer();
|
||||||
|
|
||||||
|
if (PartyManager.inSameParty(player, target)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Player.InSameParty", target.getName()));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Party playerParty = mcMMOPlayer.getParty();
|
||||||
|
mcMMOTarget.setPartyInvite(playerParty);
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Invite.Success"));
|
||||||
|
target.sendMessage(LocaleLoader.getString("Commands.Party.Invite.0", playerParty.getName(), playerName));
|
||||||
|
target.sendMessage(LocaleLoader.getString("Commands.Party.Invite.1"));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "invite", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.party.ItemShareType;
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.datatypes.party.ShareMode;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyItemShareCommand implements CommandExecutor {
|
||||||
|
private Party playerParty;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (!Config.getInstance().getItemShareEnabled()) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.ItemShare.Disabled"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (args.length) {
|
||||||
|
case 2:
|
||||||
|
playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||||
|
ShareMode mode = ShareMode.getShareMode(args[1].toUpperCase());
|
||||||
|
|
||||||
|
if (mode == null) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "itemshare", "<NONE | EQUAL | RANDOM>"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChangingShareMode(mode);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||||
|
boolean toggle = false;
|
||||||
|
|
||||||
|
if (CommandUtils.shouldEnableToggle(args[2])) {
|
||||||
|
toggle = true;
|
||||||
|
}
|
||||||
|
else if (CommandUtils.shouldDisableToggle(args[2])) {
|
||||||
|
toggle = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "itemshare", "<loot | mining | herbalism | woodcutting | misc> <true | false>"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
handleToggleItemShareCategory(ItemShareType.valueOf(args[1].toUpperCase()), toggle);
|
||||||
|
}
|
||||||
|
catch (IllegalArgumentException ex) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "itemshare", "<loot | mining | herbalism | woodcutting | misc> <true | false>"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "itemshare", "<NONE | EQUAL | RANDOM>"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "itemshare", "<loot | mining | herbalism | woodcutting | misc> <true | false>"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleChangingShareMode(ShareMode mode) {
|
||||||
|
playerParty.setItemShareMode(mode);
|
||||||
|
|
||||||
|
String changeModeMessage = LocaleLoader.getString("Commands.Party.SetSharing", LocaleLoader.getString("Party.ShareType.Item"), LocaleLoader.getString("Party.ShareMode." + StringUtils.getCapitalized(mode.toString())));
|
||||||
|
|
||||||
|
for (Player member : playerParty.getOnlineMembers()) {
|
||||||
|
member.sendMessage(changeModeMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleToggleItemShareCategory(ItemShareType type, boolean toggle) {
|
||||||
|
playerParty.setSharingDrops(type, toggle);
|
||||||
|
|
||||||
|
String toggleMessage = LocaleLoader.getString("Commands.Party.ToggleShareCategory", StringUtils.getCapitalized(type.toString()), toggle ? "enabled" : "disabled");
|
||||||
|
|
||||||
|
for (Player member : playerParty.getOnlineMembers()) {
|
||||||
|
member.sendMessage(toggleMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyJoinCommand implements CommandExecutor {
|
||||||
|
private McMMOPlayer mcMMOPlayer;
|
||||||
|
private Player player;
|
||||||
|
private Party targetParty;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
player = (Player) sender;
|
||||||
|
mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
|
// Verify target exists and is in a different party than the player
|
||||||
|
if (!canJoinParty(sender, args[1])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String password = getPassword(args);
|
||||||
|
|
||||||
|
// Make sure party passwords match
|
||||||
|
if (!PartyManager.checkPartyPassword(player, targetParty, password)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String partyName = targetParty.getName();
|
||||||
|
|
||||||
|
// Changing parties
|
||||||
|
if (!PartyManager.changeOrJoinParty(mcMMOPlayer, partyName)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Party.Join", partyName));
|
||||||
|
PartyManager.addToParty(mcMMOPlayer, targetParty);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.3", "party", "join", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">", "[" + LocaleLoader.getString("Commands.Usage.Password") + "]"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getPassword(String[] args) {
|
||||||
|
if (args.length == 3) {
|
||||||
|
return args[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean canJoinParty(CommandSender sender, String targetName) {
|
||||||
|
// Short-circuit for joining your own party
|
||||||
|
if (sender.getName().equalsIgnoreCase(targetName)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Join.Self"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
targetParty = PartyManager.getPlayerParty(targetName);
|
||||||
|
|
||||||
|
if (targetParty == null) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.PlayerNotInParty", targetName));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Can't join your own party
|
||||||
|
if (mcMMOPlayer.inParty() && mcMMOPlayer.getParty().equals(targetParty)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Join.Self"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyKickCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 2:
|
||||||
|
Party playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||||
|
OfflinePlayer target = mcMMO.p.getServer().getOfflinePlayer(args[1]);
|
||||||
|
|
||||||
|
if (!playerParty.getMembers().contains(target.getName())) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.NotInYourParty", target.getName()));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (target.isOnline()) {
|
||||||
|
Player onlineTarget = target.getPlayer();
|
||||||
|
String partyName = playerParty.getName();
|
||||||
|
|
||||||
|
if (!PartyManager.handlePartyChangeEvent(onlineTarget, partyName, null, EventReason.KICKED_FROM_PARTY)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
PartyManager.processPartyLeaving(UserManager.getPlayer(onlineTarget));
|
||||||
|
onlineTarget.sendMessage(LocaleLoader.getString("Commands.Party.Kick", partyName));
|
||||||
|
}
|
||||||
|
|
||||||
|
PartyManager.removeFromParty(target, playerParty);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "kick", "<" + LocaleLoader.getString("Commands.Usage.Player") + ">"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyLockCommand implements CommandExecutor {
|
||||||
|
private Party playerParty;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
playerParty = UserManager.getPlayer((Player) sender).getParty();
|
||||||
|
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
if (args[0].equalsIgnoreCase("lock")) {
|
||||||
|
lockParty(sender, command.getPermissionMessage());
|
||||||
|
}
|
||||||
|
else if (args[0].equalsIgnoreCase("unlock")) {
|
||||||
|
unlockParty(sender, command.getPermissionMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
if (!args[0].equalsIgnoreCase("lock")) {
|
||||||
|
sendUsageStrings(sender);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CommandUtils.shouldEnableToggle(args[1])) {
|
||||||
|
lockParty(sender, command.getPermissionMessage());
|
||||||
|
}
|
||||||
|
else if (CommandUtils.shouldDisableToggle(args[1])) {
|
||||||
|
unlockParty(sender, command.getPermissionMessage());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sendUsageStrings(sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sendUsageStrings(sender);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle locking a party.
|
||||||
|
*/
|
||||||
|
private void lockParty(CommandSender sender, String permissionMessage) {
|
||||||
|
if (!Permissions.partySubcommand(sender, PartySubcommandType.LOCK)) {
|
||||||
|
sender.sendMessage(permissionMessage);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (playerParty.isLocked()) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.IsLocked"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
playerParty.setLocked(true);
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Locked"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle unlocking a party.
|
||||||
|
*/
|
||||||
|
private void unlockParty(CommandSender sender, String permissionMessage) {
|
||||||
|
if (!Permissions.partySubcommand(sender, PartySubcommandType.UNLOCK)) {
|
||||||
|
sender.sendMessage(permissionMessage);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!playerParty.isLocked()) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.IsntLocked"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
playerParty.setLocked(false);
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Unlocked"));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendUsageStrings(CommandSender sender) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "lock", "[on|off]"));
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.1", "party", "unlock"));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyQuitCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
Player player = (Player) sender;
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
Party playerParty = mcMMOPlayer.getParty();
|
||||||
|
|
||||||
|
if (!PartyManager.handlePartyChangeEvent(player, playerParty.getName(), null, EventReason.LEFT_PARTY)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
PartyManager.removeFromParty(mcMMOPlayer);
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Party.Leave"));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.1", "party", "quit"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.party.Party;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PartyRenameCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 2:
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer((Player) sender);
|
||||||
|
Party playerParty = mcMMOPlayer.getParty();
|
||||||
|
|
||||||
|
String oldPartyName = playerParty.getName();
|
||||||
|
String newPartyName = args[1];
|
||||||
|
|
||||||
|
// This is to prevent party leaders from spamming other players with the rename message
|
||||||
|
if (oldPartyName.equalsIgnoreCase(newPartyName)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Party.Rename.Same"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player player = mcMMOPlayer.getPlayer();
|
||||||
|
|
||||||
|
// Check to see if the party exists, and if it does cancel renaming the party
|
||||||
|
if (PartyManager.checkPartyExistence(player, newPartyName)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String leaderName = playerParty.getLeader();
|
||||||
|
|
||||||
|
for (Player member : playerParty.getOnlineMembers()) {
|
||||||
|
if (!PartyManager.handlePartyChangeEvent(member, oldPartyName, newPartyName, EventReason.CHANGED_PARTIES)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!member.getName().equalsIgnoreCase(leaderName)) {
|
||||||
|
member.sendMessage(LocaleLoader.getString("Party.InformedOnNameChange", leaderName, newPartyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
playerParty.setName(newPartyName);
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Party.Rename", newPartyName));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "rename", "<" + LocaleLoader.getString("Commands.Usage.PartyName") + ">"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.gmail.nossr50.commands.party;
|
||||||
|
|
||||||
|
public enum PartySubcommandType {
|
||||||
|
JOIN,
|
||||||
|
ACCEPT,
|
||||||
|
CREATE,
|
||||||
|
HELP,
|
||||||
|
INFO,
|
||||||
|
QUIT,
|
||||||
|
EXPSHARE,
|
||||||
|
ITEMSHARE,
|
||||||
|
INVITE,
|
||||||
|
KICK,
|
||||||
|
DISBAND,
|
||||||
|
OWNER,
|
||||||
|
LOCK,
|
||||||
|
UNLOCK,
|
||||||
|
PASSWORD,
|
||||||
|
RENAME,
|
||||||
|
TELEPORT,
|
||||||
|
CHAT;
|
||||||
|
|
||||||
|
public static PartySubcommandType getSubcommand(String commandName) {
|
||||||
|
for (PartySubcommandType command : values()) {
|
||||||
|
if (command.name().equalsIgnoreCase(commandName)) {
|
||||||
|
return command;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (commandName.equalsIgnoreCase("?")) {
|
||||||
|
return HELP;
|
||||||
|
}
|
||||||
|
else if (commandName.equalsIgnoreCase("q") || commandName.equalsIgnoreCase("leave")) {
|
||||||
|
return QUIT;
|
||||||
|
}
|
||||||
|
else if (commandName.equalsIgnoreCase("leader")) {
|
||||||
|
return OWNER;
|
||||||
|
}
|
||||||
|
else if (commandName.equalsIgnoreCase("xpshare") || commandName.equalsIgnoreCase("shareexp") || commandName.equalsIgnoreCase("sharexp")) {
|
||||||
|
return EXPSHARE;
|
||||||
|
}
|
||||||
|
else if (commandName.equalsIgnoreCase("shareitem") || commandName.equalsIgnoreCase("shareitems")) {
|
||||||
|
return ITEMSHARE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
package com.gmail.nossr50.commands.party;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
|
||||||
import com.gmail.nossr50.mcMMO;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
|
|
||||||
public class PtpCommand implements CommandExecutor {
|
|
||||||
private final mcMMO plugin;
|
|
||||||
|
|
||||||
public PtpCommand(mcMMO instance) {
|
|
||||||
this.plugin = instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!LoadProperties.ptpEnable) {
|
|
||||||
sender.sendMessage("This command is not enabled.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().partyTeleport(player)) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (args.length < 1) {
|
|
||||||
player.sendMessage(ChatColor.RED + "Usage is /ptp <playername>");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (plugin.getServer().getPlayer(args[0]) == null) {
|
|
||||||
player.sendMessage("That is not a valid player");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (plugin.getServer().getPlayer(args[0]) != null) {
|
|
||||||
Player target = plugin.getServer().getPlayer(args[0]);
|
|
||||||
PlayerProfile PPt = Users.getProfile(target);
|
|
||||||
if (PP.getParty().equals(PPt.getParty())) {
|
|
||||||
player.teleport(target);
|
|
||||||
player.sendMessage(ChatColor.GREEN + "You have teleported to " + target.getName());
|
|
||||||
target.sendMessage(ChatColor.GREEN + player.getName() + " has teleported to you.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.gmail.nossr50.commands.party.teleport;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PtpAcceptAnyCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (!Permissions.partyTeleportAcceptAll(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player player = (Player) sender;
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
|
if (mcMMOPlayer.getPtpConfirmRequired()) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.ptp.AcceptAny.Disabled"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.ptp.AcceptAny.Enabled"));
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMOPlayer.togglePtpConfirmRequired();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.gmail.nossr50.commands.party.teleport;
|
||||||
|
|
||||||
|
import org.bukkit.World;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PtpAcceptCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (!Permissions.partyTeleportAccept(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player player = (Player) sender;
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
|
if (!mcMMOPlayer.hasPtpRequest()) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.ptp.NoRequests"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((mcMMOPlayer.getPtpTimeout() + Config.getInstance().getPTPCommandTimeout()) * Misc.TIME_CONVERSION_FACTOR < System.currentTimeMillis()) {
|
||||||
|
mcMMOPlayer.removePtpRequest();
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.ptp.RequestExpired"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player target = mcMMOPlayer.getPtpRequest();
|
||||||
|
mcMMOPlayer.removePtpRequest();
|
||||||
|
|
||||||
|
if (!PtpCommand.canTeleport(player, target.getName())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Config.getInstance().getPTPCommandWorldPermissions()) {
|
||||||
|
World targetWorld = target.getWorld();
|
||||||
|
World playerWorld = player.getWorld();
|
||||||
|
|
||||||
|
if (!Permissions.partyTeleportAllWorlds(target)) {
|
||||||
|
if (!Permissions.partyTeleportWorld(target, targetWorld)) {
|
||||||
|
target.sendMessage(LocaleLoader.getString("Commands.ptp.NoWorldPermissions", targetWorld.getName()));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (targetWorld != playerWorld && !Permissions.partyTeleportWorld(target, playerWorld)) {
|
||||||
|
target.sendMessage(LocaleLoader.getString("Commands.ptp.NoWorldPermissions", playerWorld.getName()));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PtpCommand.handleTeleportWarmup(target, player);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
package com.gmail.nossr50.commands.party.teleport;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
|
import com.gmail.nossr50.runnables.items.TeleportationWarmup;
|
||||||
|
import com.gmail.nossr50.util.EventUtils;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class PtpCommand implements TabExecutor {
|
||||||
|
private static Player target;
|
||||||
|
private static McMMOPlayer mcMMOTarget;
|
||||||
|
|
||||||
|
public static final List<String> TELEPORT_SUBCOMMANDS = ImmutableList.of("toggle", "accept", "acceptany", "acceptall");
|
||||||
|
|
||||||
|
private CommandExecutor ptpToggleCommand = new PtpToggleCommand();
|
||||||
|
private CommandExecutor ptpAcceptAnyCommand = new PtpAcceptAnyCommand();
|
||||||
|
private CommandExecutor ptpAcceptCommand = new PtpAcceptCommand();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
if (args[0].equalsIgnoreCase("toggle")) {
|
||||||
|
return ptpToggleCommand.onCommand(sender, command, label, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args[0].equalsIgnoreCase("acceptany") || args[0].equalsIgnoreCase("acceptall")) {
|
||||||
|
return ptpAcceptAnyCommand.onCommand(sender, command, label, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
Player player = (Player) sender;
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
|
long recentlyHurt = mcMMOPlayer.getRecentlyHurt();
|
||||||
|
int hurtCooldown = Config.getInstance().getPTPCommandRecentlyHurtCooldown();
|
||||||
|
|
||||||
|
if (hurtCooldown > 0) {
|
||||||
|
int timeRemaining = SkillUtils.calculateTimeLeft(recentlyHurt * Misc.TIME_CONVERSION_FACTOR, hurtCooldown, player);
|
||||||
|
|
||||||
|
if (timeRemaining > 0) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Item.Injured.Wait", timeRemaining));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args[0].equalsIgnoreCase("accept")) {
|
||||||
|
return ptpAcceptCommand.onCommand(sender, command, label, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Permissions.partyTeleportSend(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ptpCooldown = Config.getInstance().getPTPCommandCooldown();
|
||||||
|
long ptpLastUse = mcMMOPlayer.getPtpLastUse();
|
||||||
|
|
||||||
|
if (ptpCooldown > 0) {
|
||||||
|
int timeRemaining = SkillUtils.calculateTimeLeft(ptpLastUse * Misc.TIME_CONVERSION_FACTOR, ptpCooldown, player);
|
||||||
|
|
||||||
|
if (timeRemaining > 0) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Item.Generic.Wait", timeRemaining));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sendTeleportRequest(player, Misc.getMatchedPlayerName(args[0]));
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
List<String> matches = StringUtil.copyPartialMatches(args[0], TELEPORT_SUBCOMMANDS, new ArrayList<String>(TELEPORT_SUBCOMMANDS.size()));
|
||||||
|
|
||||||
|
if (matches.size() == 0) {
|
||||||
|
Set<String> playerNames = UserManager.getPlayerNames();
|
||||||
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return matches;
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendTeleportRequest(Player player, String targetName) {
|
||||||
|
if (!canTeleport(player, targetName)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mcMMOTarget.getPtpConfirmRequired()) {
|
||||||
|
handleTeleportWarmup(player, target);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMOTarget.setPtpRequest(player);
|
||||||
|
mcMMOTarget.actualizePtpTimeout();
|
||||||
|
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Invite.Success"));
|
||||||
|
|
||||||
|
target.sendMessage(LocaleLoader.getString("Commands.ptp.Request1", player.getName()));
|
||||||
|
target.sendMessage(LocaleLoader.getString("Commands.ptp.Request2", Config.getInstance().getPTPCommandTimeout()));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static boolean canTeleport(Player player, String targetName) {
|
||||||
|
target = mcMMO.p.getServer().getPlayerExact(targetName);
|
||||||
|
|
||||||
|
if (target == null) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Offline"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (player.equals(target)) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Party.Teleport.Self"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMOTarget = UserManager.getPlayer(target);
|
||||||
|
|
||||||
|
if (!PartyManager.inSameParty(player, target)) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Party.NotInYourParty", targetName));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mcMMOTarget.getPtpEnabled()) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Party.Teleport.Disabled", targetName));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!target.isValid()) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Party.Teleport.Dead"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static void handleTeleportWarmup(Player teleportingPlayer, Player targetPlayer) {
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(teleportingPlayer);
|
||||||
|
mcMMOTarget = UserManager.getPlayer(targetPlayer);
|
||||||
|
|
||||||
|
long warmup = Config.getInstance().getPTPCommandWarmup();
|
||||||
|
|
||||||
|
mcMMOPlayer.actualizeTeleportCommenceLocation(teleportingPlayer);
|
||||||
|
|
||||||
|
if (warmup > 0) {
|
||||||
|
teleportingPlayer.sendMessage(LocaleLoader.getString("Teleport.Commencing", warmup));
|
||||||
|
new TeleportationWarmup(mcMMOPlayer, mcMMOTarget).runTaskLater(mcMMO.p, 20 * warmup);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
EventUtils.handlePartyTeleportEvent(teleportingPlayer, targetPlayer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.gmail.nossr50.commands.party.teleport;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
|
public class PtpToggleCommand implements CommandExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (!Permissions.partyTeleportToggle(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player player = (Player) sender;
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
|
if (mcMMOPlayer.getPtpEnabled()) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.ptp.Disabled"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.ptp.Enabled"));
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMOPlayer.togglePtpUse();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class InspectCommand implements TabExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||||
|
|
||||||
|
// If the mcMMOPlayer doesn't exist, create a temporary profile and check if it's present in the database. If it's not, abort the process.
|
||||||
|
if (mcMMOPlayer == null) {
|
||||||
|
PlayerProfile profile = mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false); // Temporary Profile
|
||||||
|
|
||||||
|
if (CommandUtils.inspectOffline(sender, profile, Permissions.inspectOffline(sender))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sender instanceof Player && Config.getInstance().getInspectUseBoard()) {
|
||||||
|
ScoreboardManager.enablePlayerInspectScoreboard((Player) sender, profile);
|
||||||
|
|
||||||
|
if (!Config.getInstance().getInspectUseChat()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Inspect.OfflineStats", playerName));
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Stats.Header.Gathering"));
|
||||||
|
for (SkillType skill : SkillType.GATHERING_SKILLS) {
|
||||||
|
sender.sendMessage(CommandUtils.displaySkill(profile, skill));
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Stats.Header.Combat"));
|
||||||
|
for (SkillType skill : SkillType.COMBAT_SKILLS) {
|
||||||
|
sender.sendMessage(CommandUtils.displaySkill(profile, skill));
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Stats.Header.Misc"));
|
||||||
|
for (SkillType skill : SkillType.MISC_SKILLS) {
|
||||||
|
sender.sendMessage(CommandUtils.displaySkill(profile, skill));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Player target = mcMMOPlayer.getPlayer();
|
||||||
|
|
||||||
|
if (CommandUtils.hidden(sender, target, Permissions.inspectHidden(sender))) {
|
||||||
|
if (!Permissions.inspectOffline(sender)) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Inspect.Offline"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (CommandUtils.tooFar(sender, target, Permissions.inspectFar(sender))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sender instanceof Player && Config.getInstance().getInspectUseBoard()) {
|
||||||
|
ScoreboardManager.enablePlayerInspectScoreboard((Player) sender, mcMMOPlayer.getProfile());
|
||||||
|
|
||||||
|
if (!Config.getInstance().getInspectUseChat()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Inspect.Stats", target.getName()));
|
||||||
|
CommandUtils.printGatheringSkills(target, sender);
|
||||||
|
CommandUtils.printCombatSkills(target, sender);
|
||||||
|
CommandUtils.printMiscSkills(target, sender);
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel", mcMMOPlayer.getPowerLevel()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
Set<String> playerNames = UserManager.getPlayerNames();
|
||||||
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.AbilityType;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class MccooldownCommand implements TabExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
Player player = (Player) sender;
|
||||||
|
|
||||||
|
if (Config.getInstance().getCooldownUseBoard()) {
|
||||||
|
ScoreboardManager.enablePlayerCooldownScoreboard(player);
|
||||||
|
|
||||||
|
if (!Config.getInstance().getCooldownUseChat()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Header"));
|
||||||
|
player.sendMessage(LocaleLoader.getString("mcMMO.NoSkillNote"));
|
||||||
|
|
||||||
|
for (AbilityType ability : AbilityType.NORMAL_ABILITIES) {
|
||||||
|
if (!ability.getPermissions(player)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
int seconds = mcMMOPlayer.calculateTimeRemaining(ability);
|
||||||
|
|
||||||
|
if (seconds <= 0) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Row.Y", ability.getName()));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.Cooldowns.Row.N", ability.getName(), seconds));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.runnables.commands.McrankCommandAsyncTask;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class McrankCommand implements TabExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Permissions.mcrank(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
display(sender, sender.getName());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
if (!Permissions.mcrankOthers(sender)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String playerName = Misc.getMatchedPlayerName(args[0]);
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
|
||||||
|
|
||||||
|
if (mcMMOPlayer != null) {
|
||||||
|
Player player = mcMMOPlayer.getPlayer();
|
||||||
|
playerName = player.getName();
|
||||||
|
|
||||||
|
if (CommandUtils.tooFar(sender, player, Permissions.mcrankFar(sender))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (CommandUtils.inspectOffline(sender, mcMMO.getDatabaseManager().loadPlayerProfile(playerName, false), Permissions.mcrankOffline(sender))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
display(sender, playerName);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
Set<String> playerNames = UserManager.getPlayerNames();
|
||||||
|
return StringUtil.copyPartialMatches(args[0], playerNames, new ArrayList<String>(playerNames.size()));
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void display(CommandSender sender, String playerName) {
|
||||||
|
if (sender instanceof Player) {
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
||||||
|
|
||||||
|
if (mcMMOPlayer.getDatabaseATS() + Misc.PLAYER_DATABASE_COOLDOWN_MILLIS > System.currentTimeMillis()) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Database.Cooldown"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMOPlayer.actualizeDatabaseATS();
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean useBoard = (sender instanceof Player) && (Config.getInstance().getRankUseBoard());
|
||||||
|
boolean useChat = useBoard ? Config.getInstance().getRankUseChat() : true;
|
||||||
|
|
||||||
|
new McrankCommandAsyncTask(playerName, sender, useBoard, useChat).runTaskAsynchronously(mcMMO.p);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class McstatsCommand implements TabExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (CommandUtils.noConsoleUsage(sender)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
Player player = (Player) sender;
|
||||||
|
|
||||||
|
if (Config.getInstance().getStatsUseBoard()) {
|
||||||
|
ScoreboardManager.enablePlayerStatsScoreboard(player);
|
||||||
|
|
||||||
|
if (!Config.getInstance().getStatsUseChat()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
player.sendMessage(LocaleLoader.getString("Stats.Own.Stats"));
|
||||||
|
player.sendMessage(LocaleLoader.getString("mcMMO.NoSkillNote"));
|
||||||
|
|
||||||
|
CommandUtils.printGatheringSkills(player);
|
||||||
|
CommandUtils.printCombatSkills(player);
|
||||||
|
CommandUtils.printMiscSkills(player);
|
||||||
|
|
||||||
|
int powerLevelCap = Config.getInstance().getPowerLevelCap();
|
||||||
|
|
||||||
|
if (powerLevelCap != Integer.MAX_VALUE) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.PowerLevel.Capped", UserManager.getPlayer(player).getPowerLevel(), powerLevelCap));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Commands.PowerLevel", UserManager.getPlayer(player).getPowerLevel()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
package com.gmail.nossr50.commands.player;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.util.StringUtil;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
|
import com.gmail.nossr50.runnables.commands.MctopCommandAsyncTask;
|
||||||
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
import com.gmail.nossr50.util.commands.CommandUtils;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
|
public class MctopCommand implements TabExecutor {
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
SkillType skill = null;
|
||||||
|
|
||||||
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
display(1, skill, sender, command);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
if (StringUtils.isInt(args[0])) {
|
||||||
|
display(Math.abs(Integer.parseInt(args[0])), skill, sender, command);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
skill = extractSkill(sender, args[0]);
|
||||||
|
|
||||||
|
if (skill == null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
display(1, skill, sender, command);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
if (CommandUtils.isInvalidInteger(sender, args[1])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
skill = extractSkill(sender, args[0]);
|
||||||
|
|
||||||
|
if (skill == null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
display(Math.abs(Integer.parseInt(args[1])), skill, sender, command);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
switch (args.length) {
|
||||||
|
case 1:
|
||||||
|
return StringUtil.copyPartialMatches(args[0], SkillType.SKILL_NAMES, new ArrayList<String>(SkillType.SKILL_NAMES.size()));
|
||||||
|
default:
|
||||||
|
return ImmutableList.of();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void display(int page, SkillType skill, CommandSender sender, Command command) {
|
||||||
|
if (skill != null && !Permissions.mctop(sender, skill)) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sender instanceof Player) {
|
||||||
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
||||||
|
|
||||||
|
if (mcMMOPlayer.getDatabaseATS() + Misc.PLAYER_DATABASE_COOLDOWN_MILLIS > System.currentTimeMillis()) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Database.Cooldown"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mcMMOPlayer.actualizeDatabaseATS();
|
||||||
|
}
|
||||||
|
|
||||||
|
display(page, skill, sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void display(int page, SkillType skill, CommandSender sender) {
|
||||||
|
boolean useBoard = (sender instanceof Player) && (Config.getInstance().getTopUseBoard());
|
||||||
|
boolean useChat = useBoard ? Config.getInstance().getTopUseChat() : true;
|
||||||
|
|
||||||
|
new MctopCommandAsyncTask(page, skill, sender, useBoard, useChat).runTaskAsynchronously(mcMMO.p);
|
||||||
|
}
|
||||||
|
|
||||||
|
private SkillType extractSkill(CommandSender sender, String skillName) {
|
||||||
|
if (CommandUtils.isInvalidSkill(sender, skillName)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
SkillType skill = SkillType.getSkill(skillName);
|
||||||
|
|
||||||
|
if (CommandUtils.isChildSkill(sender, skill)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return skill;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,52 +1,96 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import org.bukkit.command.CommandSender;
|
import com.gmail.nossr50.skills.acrobatics.Acrobatics;
|
||||||
import org.bukkit.entity.Player;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
public class AcrobaticsCommand extends SkillCommand {
|
||||||
import com.gmail.nossr50.mcPermissions;
|
private String dodgeChance;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
private String dodgeChanceLucky;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
private String rollChance;
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
private String rollChanceLucky;
|
||||||
|
private String gracefulRollChance;
|
||||||
|
private String gracefulRollChanceLucky;
|
||||||
|
|
||||||
public class AcrobaticsCommand implements CommandExecutor {
|
private boolean canDodge;
|
||||||
@Override
|
private boolean canRoll;
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
private boolean canGracefulRoll;
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
public AcrobaticsCommand() {
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
super(SkillType.ACROBATICS);
|
||||||
|
}
|
||||||
|
|
||||||
String dodgepercentage;
|
@Override
|
||||||
float skillvalue = (float) PP.getSkillLevel(SkillType.ACROBATICS);
|
protected void dataCalculations() {
|
||||||
String percentage = String.valueOf((skillvalue / 1000) * 100);
|
// DODGE
|
||||||
String gracepercentage = String.valueOf(((skillvalue / 1000) * 100) * 2);
|
if (canDodge) {
|
||||||
|
String[] dodgeStrings = calculateAbilityDisplayValues(Acrobatics.dodgeMaxBonusLevel, Acrobatics.dodgeMaxChance);
|
||||||
|
dodgeChance = dodgeStrings[0];
|
||||||
|
dodgeChanceLucky = dodgeStrings[1];
|
||||||
|
}
|
||||||
|
|
||||||
if (PP.getSkillLevel(SkillType.ACROBATICS) <= 800)
|
// ROLL
|
||||||
dodgepercentage = String.valueOf((skillvalue / 4000 * 100));
|
if (canRoll) {
|
||||||
else
|
String[] rollStrings = calculateAbilityDisplayValues(Acrobatics.rollMaxBonusLevel, Acrobatics.rollMaxChance);
|
||||||
dodgepercentage = "20";
|
rollChance = rollStrings[0];
|
||||||
|
rollChanceLucky = rollStrings[1];
|
||||||
|
}
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillAcrobatics") }));
|
// GRACEFUL ROLL
|
||||||
player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainAcrobatics") }));
|
if (canGracefulRoll) {
|
||||||
|
String[] gracefulRollStrings = calculateAbilityDisplayValues(Acrobatics.gracefulRollMaxBonusLevel, Acrobatics.gracefulRollMaxChance);
|
||||||
|
gracefulRollChance = gracefulRollStrings[0];
|
||||||
|
gracefulRollChanceLucky = gracefulRollStrings[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mcPermissions.getInstance().acrobatics(player))
|
@Override
|
||||||
player.sendMessage(mcLocale.getString("m.LVL", new Object[] { PP.getSkillLevel(SkillType.ACROBATICS), PP.getSkillXpLevel(SkillType.ACROBATICS), PP.getXpToLevel(SkillType.ACROBATICS) }));
|
protected void permissionsCheck() {
|
||||||
|
canDodge = Permissions.dodge(player);
|
||||||
|
canRoll = Permissions.roll(player);
|
||||||
|
canGracefulRoll = Permissions.gracefulRoll(player);
|
||||||
|
}
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.Effects") }));
|
@Override
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAcrobatics1_0"), mcLocale.getString("m.EffectsAcrobatics1_1") }));
|
protected boolean effectsHeaderPermissions() {
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAcrobatics2_0"), mcLocale.getString("m.EffectsAcrobatics2_1") }));
|
return canDodge || canGracefulRoll || canRoll;
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAcrobatics3_0"), mcLocale.getString("m.EffectsAcrobatics3_1") }));
|
}
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
|
||||||
player.sendMessage(mcLocale.getString("m.AcrobaticsRollChance", new Object[] { percentage }));
|
|
||||||
player.sendMessage(mcLocale.getString("m.AcrobaticsGracefulRollChance", new Object[] { gracepercentage }));
|
|
||||||
player.sendMessage(mcLocale.getString("m.AcrobaticsDodgeChance", new Object[] { dodgepercentage }));
|
|
||||||
|
|
||||||
return true;
|
@Override
|
||||||
}
|
protected void effectsDisplay() {
|
||||||
|
luckyEffectsDisplay();
|
||||||
|
|
||||||
|
if (canRoll) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Acrobatics.Effect.0"), LocaleLoader.getString("Acrobatics.Effect.1")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canGracefulRoll) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Acrobatics.Effect.2"), LocaleLoader.getString("Acrobatics.Effect.3")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canDodge) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Acrobatics.Effect.4"), LocaleLoader.getString("Acrobatics.Effect.5")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean statsHeaderPermissions() {
|
||||||
|
return canDodge || canGracefulRoll || canRoll;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void statsDisplay() {
|
||||||
|
if (canRoll) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.Chance", rollChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", rollChanceLucky) : ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canGracefulRoll) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Acrobatics.Roll.GraceChance", gracefulRollChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", gracefulRollChanceLucky) : ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canDodge) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Acrobatics.DodgeChance", dodgeChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", dodgeChanceLucky) : ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,63 +1,94 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import org.bukkit.command.CommandSender;
|
import com.gmail.nossr50.skills.archery.Archery;
|
||||||
import org.bukkit.entity.Player;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
public class ArcheryCommand extends SkillCommand {
|
||||||
import com.gmail.nossr50.mcPermissions;
|
private String skillShotBonus;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
private String dazeChance;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
private String dazeChanceLucky;
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
private String retrieveChance;
|
||||||
|
private String retrieveChanceLucky;
|
||||||
|
|
||||||
public class ArcheryCommand implements CommandExecutor {
|
private boolean canSkillShot;
|
||||||
@Override
|
private boolean canDaze;
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
private boolean canRetrieve;
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
public ArcheryCommand() {
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
super(SkillType.ARCHERY);
|
||||||
|
}
|
||||||
|
|
||||||
float skillvalue = (float) PP.getSkillLevel(SkillType.ARCHERY);
|
@Override
|
||||||
String percentage = String.valueOf((skillvalue / 1000) * 100);
|
protected void dataCalculations() {
|
||||||
|
// SKILL SHOT
|
||||||
|
if (canSkillShot) {
|
||||||
|
double bonus = (skillValue / Archery.skillShotIncreaseLevel) * Archery.skillShotIncreasePercentage;
|
||||||
|
skillShotBonus = percent.format(Math.min(bonus, Archery.skillShotMaxBonusPercentage));
|
||||||
|
}
|
||||||
|
|
||||||
int ignition = 20;
|
// DAZE
|
||||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 200)
|
if (canDaze) {
|
||||||
ignition += 20;
|
String[] dazeStrings = calculateAbilityDisplayValues(Archery.dazeMaxBonusLevel, Archery.dazeMaxBonus);
|
||||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 400)
|
dazeChance = dazeStrings[0];
|
||||||
ignition += 20;
|
dazeChanceLucky = dazeStrings[1];
|
||||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 600)
|
}
|
||||||
ignition += 20;
|
|
||||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 800)
|
|
||||||
ignition += 20;
|
|
||||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 1000)
|
|
||||||
ignition += 20;
|
|
||||||
|
|
||||||
String percentagedaze;
|
// RETRIEVE
|
||||||
if (PP.getSkillLevel(SkillType.ARCHERY) < 1000)
|
if (canRetrieve) {
|
||||||
percentagedaze = String.valueOf((skillvalue / 2000) * 100);
|
String[] retrieveStrings = calculateAbilityDisplayValues(Archery.retrieveMaxBonusLevel, Archery.retrieveMaxChance);
|
||||||
else
|
retrieveChance = retrieveStrings[0];
|
||||||
percentagedaze = "50";
|
retrieveChanceLucky = retrieveStrings[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillArchery") }));
|
@Override
|
||||||
player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainArchery") }));
|
protected void permissionsCheck() {
|
||||||
|
canSkillShot = Permissions.bonusDamage(player, skill);
|
||||||
|
canDaze = Permissions.daze(player);
|
||||||
|
canRetrieve = Permissions.arrowRetrieval(player);
|
||||||
|
}
|
||||||
|
|
||||||
if (mcPermissions.getInstance().archery(player))
|
@Override
|
||||||
player.sendMessage(mcLocale.getString("m.LVL", new Object[] { PP.getSkillLevel(SkillType.ARCHERY), PP.getSkillXpLevel(SkillType.ARCHERY), PP.getXpToLevel(SkillType.ARCHERY) }));
|
protected boolean effectsHeaderPermissions() {
|
||||||
|
return canSkillShot || canDaze || canRetrieve;
|
||||||
|
}
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.Effects") }));
|
@Override
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsArchery1_0"), mcLocale.getString("m.EffectsArchery1_1") }));
|
protected void effectsDisplay() {
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsArchery2_0"), mcLocale.getString("m.EffectsArchery2_1") }));
|
luckyEffectsDisplay();
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsArchery4_0"), mcLocale.getString("m.EffectsArchery4_1") }));
|
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
|
||||||
player.sendMessage(mcLocale.getString("m.ArcheryDazeChance", new Object[] { percentagedaze }));
|
|
||||||
player.sendMessage(mcLocale.getString("m.ArcheryRetrieveChance", new Object[] { percentage }));
|
|
||||||
player.sendMessage(mcLocale.getString("m.ArcheryIgnitionLength", new Object[] { (ignition / 20) }));
|
|
||||||
|
|
||||||
return true;
|
if (canSkillShot) {
|
||||||
}
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.0"), LocaleLoader.getString("Archery.Effect.1")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canDaze) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.2"), LocaleLoader.getString("Archery.Effect.3", Archery.dazeModifier)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canRetrieve) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Archery.Effect.4"), LocaleLoader.getString("Archery.Effect.5")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean statsHeaderPermissions() {
|
||||||
|
return canSkillShot || canDaze || canRetrieve;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void statsDisplay() {
|
||||||
|
if (canSkillShot) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Archery.Combat.SkillshotBonus", skillShotBonus));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canDaze) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Archery.Combat.DazeChance", dazeChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", dazeChanceLucky) : ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canRetrieve) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Archery.Combat.RetrieveChance", retrieveChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", retrieveChanceLucky) : ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,62 +1,119 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import org.bukkit.command.CommandSender;
|
import com.gmail.nossr50.skills.axes.Axes;
|
||||||
import org.bukkit.entity.Player;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
public class AxesCommand extends SkillCommand {
|
||||||
import com.gmail.nossr50.mcPermissions;
|
private String critChance;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
private String critChanceLucky;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
private double bonusDamage;
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
private double impactDamage;
|
||||||
|
private String skullSplitterLength;
|
||||||
|
private String skullSplitterLengthEndurance;
|
||||||
|
|
||||||
public class AxesCommand implements CommandExecutor {
|
private boolean canSkullSplitter;
|
||||||
@Override
|
private boolean canCritical;
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
private boolean canBonusDamage;
|
||||||
if (!(sender instanceof Player)) {
|
private boolean canImpact;
|
||||||
sender.sendMessage("This command does not support console useage.");
|
private boolean canGreaterImpact;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
public AxesCommand() {
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
super(SkillType.AXES);
|
||||||
|
}
|
||||||
|
|
||||||
String percentage;
|
@Override
|
||||||
|
protected void dataCalculations() {
|
||||||
|
// IMPACT
|
||||||
|
if (canImpact) {
|
||||||
|
impactDamage = 1 + (skillValue / Axes.impactIncreaseLevel);
|
||||||
|
}
|
||||||
|
|
||||||
float skillvalue = (float) PP.getSkillLevel(SkillType.AXES);
|
// SKULL SPLITTER
|
||||||
if (PP.getSkillLevel(SkillType.AXES) < 750)
|
if (canSkullSplitter) {
|
||||||
percentage = String.valueOf((skillvalue / 1000) * 100);
|
String[] skullSplitterStrings = calculateLengthDisplayValues();
|
||||||
else
|
skullSplitterLength = skullSplitterStrings[0];
|
||||||
percentage = "75";
|
skullSplitterLengthEndurance = skullSplitterStrings[1];
|
||||||
|
}
|
||||||
|
|
||||||
int ticks = 2;
|
// CRITICAL STRIKES
|
||||||
int x = PP.getSkillLevel(SkillType.AXES);
|
if (canCritical) {
|
||||||
while (x >= 50) {
|
String[] criticalStrikeStrings = calculateAbilityDisplayValues(Axes.criticalHitMaxBonusLevel, Axes.criticalHitMaxChance);
|
||||||
x -= 50;
|
critChance = criticalStrikeStrings[0];
|
||||||
ticks++;
|
critChanceLucky = criticalStrikeStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillAxes") }));
|
// AXE MASTERY
|
||||||
player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainAxes") }));
|
if (canBonusDamage) {
|
||||||
|
bonusDamage = Math.min(skillValue / (Axes.bonusDamageMaxBonusLevel / Axes.bonusDamageMaxBonus), Axes.bonusDamageMaxBonus);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mcPermissions.getInstance().axes(player))
|
@Override
|
||||||
player.sendMessage(mcLocale.getString("m.LVL", new Object[] { PP.getSkillLevel(SkillType.AXES), PP.getSkillXpLevel(SkillType.AXES), PP.getXpToLevel(SkillType.AXES) }));
|
protected void permissionsCheck() {
|
||||||
|
canSkullSplitter = Permissions.skullSplitter(player);
|
||||||
|
canCritical = Permissions.criticalStrikes(player);
|
||||||
|
canBonusDamage = Permissions.bonusDamage(player, skill);
|
||||||
|
canImpact = Permissions.armorImpact(player);
|
||||||
|
canGreaterImpact = Permissions.greaterImpact(player);
|
||||||
|
}
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.Effects") }));
|
@Override
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAxes1_0"), mcLocale.getString("m.EffectsAxes1_1") }));
|
protected boolean effectsHeaderPermissions() {
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAxes2_0"), mcLocale.getString("m.EffectsAxes2_1") }));
|
return canSkullSplitter || canCritical || canBonusDamage || canImpact || canGreaterImpact;
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAxes3_0"), mcLocale.getString("m.EffectsAxes3_1") }));
|
}
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
|
||||||
player.sendMessage(mcLocale.getString("m.AxesCritChance", new Object[] { percentage }));
|
|
||||||
|
|
||||||
if (PP.getSkillLevel(SkillType.AXES) < 500)
|
@Override
|
||||||
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockAxes1") }));
|
protected void effectsDisplay() {
|
||||||
else
|
luckyEffectsDisplay();
|
||||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes1_0"), mcLocale.getString("m.AbilBonusAxes1_1") }));
|
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.AxesSkullLength", new Object[] { ticks }));
|
if (canSkullSplitter) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.0"), LocaleLoader.getString("Axes.Effect.1")));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
if (canCritical) {
|
||||||
}
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.2"), LocaleLoader.getString("Axes.Effect.3")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canBonusDamage) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.4"), LocaleLoader.getString("Axes.Effect.5")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canImpact) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.6"), LocaleLoader.getString("Axes.Effect.7")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canGreaterImpact) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Axes.Effect.8"), LocaleLoader.getString("Axes.Effect.9")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean statsHeaderPermissions() {
|
||||||
|
return canSkullSplitter || canCritical || canBonusDamage || canImpact || canGreaterImpact;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void statsDisplay() {
|
||||||
|
if (canBonusDamage) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.0"), LocaleLoader.getString("Axes.Ability.Bonus.1", bonusDamage)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canImpact) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.2"), LocaleLoader.getString("Axes.Ability.Bonus.3", impactDamage)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canGreaterImpact) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Axes.Ability.Bonus.4"), LocaleLoader.getString("Axes.Ability.Bonus.5", Axes.greaterImpactBonusDamage)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canCritical) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Axes.Combat.CritChance", critChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", critChanceLucky) : ""));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canSkullSplitter) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Axes.Combat.SS.Length", skullSplitterLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", skullSplitterLengthEndurance) : ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,46 +1,63 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import org.bukkit.command.CommandSender;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
public class ExcavationCommand extends SkillCommand {
|
||||||
import com.gmail.nossr50.mcPermissions;
|
private String gigaDrillBreakerLength;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
private String gigaDrillBreakerLengthEndurance;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
|
||||||
|
|
||||||
public class ExcavationCommand implements CommandExecutor {
|
private boolean canGigaDrill;
|
||||||
@Override
|
private boolean canTreasureHunt;
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
public ExcavationCommand() {
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
super(SkillType.EXCAVATION);
|
||||||
|
}
|
||||||
|
|
||||||
int ticks = 2;
|
@Override
|
||||||
int x = PP.getSkillLevel(SkillType.EXCAVATION);
|
protected void dataCalculations() {
|
||||||
while (x >= 50) {
|
// GIGA DRILL BREAKER
|
||||||
x -= 50;
|
if (canGigaDrill) {
|
||||||
ticks++;
|
String gigaDrillStrings[] = calculateLengthDisplayValues();
|
||||||
}
|
gigaDrillBreakerLength = gigaDrillStrings[0];
|
||||||
|
gigaDrillBreakerLengthEndurance = gigaDrillStrings[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillExcavation") }));
|
@Override
|
||||||
player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainExcavation") }));
|
protected void permissionsCheck() {
|
||||||
|
canGigaDrill = Permissions.gigaDrillBreaker(player);
|
||||||
|
canTreasureHunt = Permissions.excavationTreasureHunter(player);
|
||||||
|
}
|
||||||
|
|
||||||
if (mcPermissions.getInstance().excavation(player))
|
@Override
|
||||||
player.sendMessage(mcLocale.getString("m.LVL", new Object[] { PP.getSkillLevel(SkillType.EXCAVATION), PP.getSkillXpLevel(SkillType.EXCAVATION), PP.getXpToLevel(SkillType.EXCAVATION) }));
|
protected boolean effectsHeaderPermissions() {
|
||||||
|
return canGigaDrill || canTreasureHunt;
|
||||||
|
}
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.Effects") }));
|
@Override
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsExcavation1_0"), mcLocale.getString("m.EffectsExcavation1_1") }));
|
protected void effectsDisplay() {
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsExcavation2_0"), mcLocale.getString("m.EffectsExcavation2_1") }));
|
luckyEffectsDisplay();
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
|
||||||
player.sendMessage(mcLocale.getString("m.ExcavationGreenTerraLength", new Object[] { ticks }));
|
|
||||||
|
|
||||||
return true;
|
if (canGigaDrill) {
|
||||||
}
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Excavation.Effect.0"), LocaleLoader.getString("Excavation.Effect.1")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canTreasureHunt) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Excavation.Effect.2"), LocaleLoader.getString("Excavation.Effect.3")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean statsHeaderPermissions() {
|
||||||
|
return canGigaDrill;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void statsDisplay() {
|
||||||
|
if (canGigaDrill) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", gigaDrillBreakerLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", gigaDrillBreakerLengthEndurance) : ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,47 +1,200 @@
|
|||||||
package com.gmail.nossr50.commands.skills;
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.block.Biome;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.mcPermissions;
|
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
import com.gmail.nossr50.datatypes.skills.SkillType;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.treasure.Rarity;
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.skills.Fishing;
|
import com.gmail.nossr50.skills.fishing.Fishing;
|
||||||
|
import com.gmail.nossr50.skills.fishing.Fishing.Tier;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
|
||||||
public class FishingCommand implements CommandExecutor {
|
public class FishingCommand extends SkillCommand {
|
||||||
@Override
|
private int lootTier;
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
private String shakeChance;
|
||||||
if (!(sender instanceof Player)) {
|
private String shakeChanceLucky;
|
||||||
sender.sendMessage("This command does not support console useage.");
|
private int fishermansDietRank;
|
||||||
return true;
|
private String biteChance;
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
private String trapTreasure;
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
private String commonTreasure;
|
||||||
|
private String uncommonTreasure;
|
||||||
|
private String rareTreasure;
|
||||||
|
private String epicTreasure;
|
||||||
|
private String legendaryTreasure;
|
||||||
|
private String recordTreasure;
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillFishing") }));
|
private String magicChance;
|
||||||
player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainFishing") }));
|
|
||||||
|
|
||||||
if (mcPermissions.getInstance().fishing(player))
|
private boolean canTreasureHunt;
|
||||||
player.sendMessage(mcLocale.getString("m.LVL", new Object[] { PP.getSkillLevel(SkillType.FISHING), PP.getSkillXpLevel(SkillType.FISHING), PP.getXpToLevel(SkillType.FISHING) }));
|
private boolean canMagicHunt;
|
||||||
|
private boolean canShake;
|
||||||
|
private boolean canFishermansDiet;
|
||||||
|
private boolean canMasterAngler;
|
||||||
|
private boolean canIceFish;
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.Effects") }));
|
public FishingCommand() {
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsFishing1_0"), mcLocale.getString("m.EffectsFishing1_1") }));
|
super(SkillType.FISHING);
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsFishing2_0"), mcLocale.getString("m.EffectsFishing2_1") }));
|
}
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsFishing3_0"), mcLocale.getString("m.EffectsFishing3_1") }));
|
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
|
||||||
player.sendMessage(mcLocale.getString("m.FishingRank", new Object[] { Fishing.getFishingLootTier(PP) }));
|
|
||||||
player.sendMessage(mcLocale.getString("m.FishingMagicInfo"));
|
|
||||||
|
|
||||||
if (PP.getSkillLevel(SkillType.FISHING) < 150)
|
@Override
|
||||||
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockFishing1") }));
|
protected void dataCalculations() {
|
||||||
else
|
boolean isStorming = player.getWorld().hasStorm();
|
||||||
player.sendMessage(mcLocale.getString("m.ShakeInfo", new Object[] { Fishing.getFishingLootTier(PP) }));
|
|
||||||
|
|
||||||
return true;
|
// TREASURE HUNTER
|
||||||
}
|
if (canTreasureHunt) {
|
||||||
|
lootTier = mcMMOPlayer.getFishingManager().getLootTier();
|
||||||
|
|
||||||
|
// Item drop rates
|
||||||
|
trapTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.TRAP))[0];
|
||||||
|
commonTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.COMMON))[0];
|
||||||
|
uncommonTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.UNCOMMON))[0];
|
||||||
|
rareTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.RARE))[0];
|
||||||
|
epicTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.EPIC))[0];
|
||||||
|
legendaryTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.LEGENDARY))[0];
|
||||||
|
recordTreasure = calculateAbilityDisplayValues(TreasureConfig.getInstance().getItemDropRate(lootTier, Rarity.RECORD))[0];
|
||||||
|
|
||||||
|
// Magic hunter drop rates
|
||||||
|
double commonEnchantment = TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, Rarity.COMMON);
|
||||||
|
double uncommonEnchantment = TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, Rarity.UNCOMMON);
|
||||||
|
double rareEnchantment = TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, Rarity.RARE);
|
||||||
|
double epicEnchantment = TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, Rarity.EPIC);
|
||||||
|
double legendaryEnchantment = TreasureConfig.getInstance().getEnchantmentDropRate(lootTier, Rarity.LEGENDARY);
|
||||||
|
|
||||||
|
magicChance = calculateAbilityDisplayValues(commonEnchantment + uncommonEnchantment + rareEnchantment + epicEnchantment + legendaryEnchantment)[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
// SHAKE
|
||||||
|
if (canShake) {
|
||||||
|
String[] shakeStrings = calculateAbilityDisplayValues(UserManager.getPlayer(player).getFishingManager().getShakeProbability());
|
||||||
|
shakeChance = shakeStrings[0];
|
||||||
|
shakeChanceLucky = shakeStrings[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
// FISHERMAN'S DIET
|
||||||
|
if (canFishermansDiet) {
|
||||||
|
fishermansDietRank = calculateRank(Fishing.fishermansDietMaxLevel, Fishing.fishermansDietRankLevel1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// MASTER ANGLER
|
||||||
|
if (canMasterAngler) {
|
||||||
|
double rawBiteChance = 1.0 / (isStorming ? 300 : 500);
|
||||||
|
Location location = (mcMMOPlayer.getHookLocation() != null) ? mcMMOPlayer.getHookLocation() : player.getLocation();
|
||||||
|
|
||||||
|
Biome biome = location.getBlock().getBiome();
|
||||||
|
|
||||||
|
if (biome == Biome.RIVER || biome == Biome.OCEAN) {
|
||||||
|
rawBiteChance = rawBiteChance * AdvancedConfig.getInstance().getMasterAnglerBiomeModifier();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (player.isInsideVehicle() && player.getVehicle().getType() == EntityType.BOAT) {
|
||||||
|
rawBiteChance = rawBiteChance * AdvancedConfig.getInstance().getMasterAnglerBoatModifier();
|
||||||
|
}
|
||||||
|
|
||||||
|
biteChance = calculateAbilityDisplayValues(rawBiteChance * 100.0)[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void permissionsCheck() {
|
||||||
|
canTreasureHunt = Permissions.fishingTreasureHunter(player);
|
||||||
|
canMagicHunt = Permissions.magicHunter(player);
|
||||||
|
canShake = Permissions.shake(player);
|
||||||
|
canFishermansDiet = Permissions.fishermansDiet(player);
|
||||||
|
canMasterAngler = Permissions.masterAngler(player);
|
||||||
|
canIceFish = Permissions.iceFishing(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean effectsHeaderPermissions() {
|
||||||
|
return canTreasureHunt || canMagicHunt || canShake || canMasterAngler || canFishermansDiet || canIceFish;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void effectsDisplay() {
|
||||||
|
luckyEffectsDisplay();
|
||||||
|
|
||||||
|
if (canTreasureHunt) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.0"), LocaleLoader.getString("Fishing.Effect.1")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canMagicHunt) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.2"), LocaleLoader.getString("Fishing.Effect.3")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canIceFish) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.10"), LocaleLoader.getString("Fishing.Effect.11")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canMasterAngler) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.8"), LocaleLoader.getString("Fishing.Effect.9")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canShake) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.4"), LocaleLoader.getString("Fishing.Effect.5")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canFishermansDiet) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Fishing.Effect.6"), LocaleLoader.getString("Fishing.Effect.7")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean statsHeaderPermissions() {
|
||||||
|
return canTreasureHunt || canMagicHunt || canShake || canMasterAngler || canFishermansDiet || canIceFish;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void statsDisplay() {
|
||||||
|
if (canTreasureHunt) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Rank", lootTier, Tier.EIGHT.toNumerical()));
|
||||||
|
player.sendMessage(LocaleLoader.getString("Fishing.Ability.TH.DropRate", trapTreasure, commonTreasure, uncommonTreasure, rareTreasure, epicTreasure, legendaryTreasure, recordTreasure));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canMagicHunt) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Fishing.Ability.TH.MagicRate", magicChance));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canIceFish) {
|
||||||
|
int unlockLevel = AdvancedConfig.getInstance().getIceFishingUnlockLevel();
|
||||||
|
|
||||||
|
if (skillValue < unlockLevel) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Fishing.Ability.Locked.1", unlockLevel)));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Fishing.Ability.IceFishing"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canMasterAngler) {
|
||||||
|
int unlockLevel = AdvancedConfig.getInstance().getMasterAnglerUnlockLevel();
|
||||||
|
|
||||||
|
if (skillValue < unlockLevel) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Fishing.Ability.Locked.2", unlockLevel)));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Chance", biteChance));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canShake) {
|
||||||
|
int unlockLevel = AdvancedConfig.getInstance().getFishingTierLevel(Tier.ONE);
|
||||||
|
|
||||||
|
if (skillValue < unlockLevel) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Fishing.Ability.Locked.0", unlockLevel)));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Shake", shakeChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", shakeChanceLucky) : ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canFishermansDiet) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("Fishing.Ability.FD", fishermansDietRank));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user