From 92f7845249e49d383f072776079f39fb9add50bc Mon Sep 17 00:00:00 2001 From: Zeshan Aslam Date: Sun, 4 Aug 2019 00:38:21 -0400 Subject: [PATCH] Refractor and WG 6/7 support - Refactored code - Added support for both WG 6/7 - Fixed 'Show Player' setting toggle not working - Added ability to change 'Delay Tick' amount --- config.yml | 10 +- .../actionhealth/HealthCommand.class | Bin 3291 -> 0 bytes .../actionhealth/HealthListeners.class | Bin 4829 -> 0 bytes .../actionhealth/HealthUtil$1.class | Bin 1346 -> 0 bytes .../zeshanaslam/actionhealth/HealthUtil.class | Bin 10341 -> 0 bytes .../zeshanaslam/actionhealth/LookThread.class | Bin 3398 -> 3418 bytes .../com/zeshanaslam/actionhealth/Main.class | Bin 2189 -> 2385 bytes .../actionhealth/SettingsManager.class | Bin 6454 -> 0 bytes .../actionhealth/TargetHelper.class | Bin 8688 -> 0 bytes .../actionhealth/commands/HealthCommand.class | Bin 0 -> 3323 bytes .../actionhealth/config/ConfigStore.class | Bin 0 -> 6599 bytes .../actionhealth/events/HealthListeners.class | Bin 0 -> 4902 bytes .../{ => support}/PreAction.class | Bin 3002 -> 3018 bytes .../actionhealth/support/WorldGuardAPI.class | Bin 0 -> 10483 bytes .../{ => utils}/FileHandler.class | Bin 6109 -> 6121 bytes .../actionhealth/utils/HealthUtil$1.class | Bin 0 -> 1382 bytes .../actionhealth/utils/HealthUtil.class | Bin 0 -> 9291 bytes .../actionhealth/utils/TargetHelper.class | Bin 0 -> 8791 bytes plugin.yml | 4 +- .../zeshanaslam/actionhealth/LookThread.java | 9 +- src/com/zeshanaslam/actionhealth/Main.java | 13 +- .../{ => commands}/HealthCommand.java | 13 +- .../ConfigStore.java} | 15 +- .../{ => events}/HealthListeners.java | 49 ++-- .../actionhealth/{ => support}/PreAction.java | 2 +- .../actionhealth/support/WorldGuardAPI.java | 222 ++++++++++++++++++ .../actionhealth/{ => utils}/FileHandler.java | 2 +- .../actionhealth/{ => utils}/HealthUtil.java | 84 +++---- .../{ => utils}/TargetHelper.java | 9 +- 29 files changed, 338 insertions(+), 94 deletions(-) delete mode 100644 out/production/ActionHealth/com/zeshanaslam/actionhealth/HealthCommand.class delete mode 100644 out/production/ActionHealth/com/zeshanaslam/actionhealth/HealthListeners.class delete mode 100644 out/production/ActionHealth/com/zeshanaslam/actionhealth/HealthUtil$1.class delete mode 100644 out/production/ActionHealth/com/zeshanaslam/actionhealth/HealthUtil.class delete mode 100644 out/production/ActionHealth/com/zeshanaslam/actionhealth/SettingsManager.class delete mode 100644 out/production/ActionHealth/com/zeshanaslam/actionhealth/TargetHelper.class create mode 100644 out/production/ActionHealth/com/zeshanaslam/actionhealth/commands/HealthCommand.class create mode 100644 out/production/ActionHealth/com/zeshanaslam/actionhealth/config/ConfigStore.class create mode 100644 out/production/ActionHealth/com/zeshanaslam/actionhealth/events/HealthListeners.class rename out/production/ActionHealth/com/zeshanaslam/actionhealth/{ => support}/PreAction.class (79%) create mode 100644 out/production/ActionHealth/com/zeshanaslam/actionhealth/support/WorldGuardAPI.class rename out/production/ActionHealth/com/zeshanaslam/actionhealth/{ => utils}/FileHandler.class (88%) create mode 100644 out/production/ActionHealth/com/zeshanaslam/actionhealth/utils/HealthUtil$1.class create mode 100644 out/production/ActionHealth/com/zeshanaslam/actionhealth/utils/HealthUtil.class create mode 100644 out/production/ActionHealth/com/zeshanaslam/actionhealth/utils/TargetHelper.class rename src/com/zeshanaslam/actionhealth/{ => commands}/HealthCommand.java (82%) rename src/com/zeshanaslam/actionhealth/{SettingsManager.java => config/ConfigStore.java} (93%) rename src/com/zeshanaslam/actionhealth/{ => events}/HealthListeners.java (69%) rename src/com/zeshanaslam/actionhealth/{ => support}/PreAction.java (97%) create mode 100644 src/com/zeshanaslam/actionhealth/support/WorldGuardAPI.java rename src/com/zeshanaslam/actionhealth/{ => utils}/FileHandler.java (99%) rename src/com/zeshanaslam/actionhealth/{ => utils}/HealthUtil.java (68%) rename src/com/zeshanaslam/actionhealth/{ => utils}/TargetHelper.java (98%) diff --git a/config.yml b/config.yml index acaf4ee..74ba355 100644 --- a/config.yml +++ b/config.yml @@ -34,18 +34,19 @@ Use Permissions: false Show Mob: true # If set to false player will not see health messages from other players. - Show Player: true + # If set to true player will get the message in a delay to get 100% accurate health. Useful for plugins that add damage by reading item lore. -# This also uses more resources :( Delay Message: false +# Amount delayed by +Delay Tick: 1 # Style Health Full Health Icon: "&4\u2764" Half Health Icon: "&c\u2764" Empty Health Icon: "&7\u2764" -# Set names. Case sensitive! +# Translate names. Case sensitive! Name Change: false Name: - Snow Golem = New name @@ -64,6 +65,7 @@ Region PvP: true Limit Health: 10 # Saves players /actionhealth toggle state. +# Uses flat file. If interested in SQL support ask in discussion. Remember Toggle: false # Blacklist by entity name or entity display name. @@ -71,7 +73,7 @@ Blacklist: - 'CCPD Officer' # Show the health of the entity that the player is looking at. -Show On Look: false +Show On Look: true Look Distance: 10 # Check if player can see entity before sending health. diff --git a/out/production/ActionHealth/com/zeshanaslam/actionhealth/HealthCommand.class b/out/production/ActionHealth/com/zeshanaslam/actionhealth/HealthCommand.class deleted file mode 100644 index 01beaf39173ad130fb736ca4db741a8c3fdac3d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3291 zcmbtX?Nd}$82_E!g}W>l#08Z#&Gmf&Wz{kjd_#PJ0$)HRu(Hc?Sgzi^7w^4GqS=e3 zm1$+~SoUUxCDmkzk~5BdYNi=y`rgMr^r1hXCYz?`++E-<;7&7r;Osf)`JLxHFTdwG zm!JOm{w9F?@pS+z(3poPc1qY4fLAPbV~?0M`Oz$X_llt&Fv*90_14`T{tLV`BEC7>@h#l!T`xJR{**hTI-48CP|Ng$*$y z5k1PSZbertO-V$Rn5`OmH&-;fJKCtIdNska{ZaAp)Dp5_*fWq?F{){s>bU`xyDU~ z^6VCGAIFL)_Gn6;`>lkq%G$~c7=7-rTuyi4f{rxRyY3F(V6UczY!FUvTCvoc=6NrsYW#sQOS zhSE7{+cx5HVPkGeF5y)fui+fI>ONiB4|D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Os>b2xv3i^tJ*0xerlpmpnUv;{+HTt{_J z#g)eO!8gz-jU~siw6`_5ER7q+Q7gALNTUpvd$6T&ptD&I=>IOtF-Cf_7t3)MDbPNG zxZh1yGhtXx2Yoy4a5ZNjmjnz@61EfKa!Lg!P$t0#aUKyOIyt?!Ld()SKzA0gHllZ9 zmR=sCD=ZU%-&6ve#SgfL!XKcsyqD_ieiv|~^qPm+Mlc6mn2RRDY`rMVD7p4v=>Lsy BMYsR} diff --git a/out/production/ActionHealth/com/zeshanaslam/actionhealth/HealthUtil$1.class b/out/production/ActionHealth/com/zeshanaslam/actionhealth/HealthUtil$1.class deleted file mode 100644 index 36c6c506c40ff97a93dcc5fb7677c727e272be50..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1346 zcma)6ZBNrs6n^eHRyK;8h%cZb$dt7M3cg1Oz5oW3VT>r>FWq&klv~o?F5tg10pC9O z(GUJ6V?4La2&9@V*||OUyglcfr~UEk>o)**@Suo(Olncp;zkKY+#J9ZY9&m-*1|DS zH!;mn>hPc{r1I51!+0Z%TJBb|z3nUa=+bTY9bdLqQ;!7(OZ!K{6MjcT45JwlF9W_W zBJwS$wjWpL80>}@?zrzo+~$(U0pD@Cr~FX11rJo)T}zKQ$`5qVqAz{5#PGJ(b5sV1 z6R@=V|0nVwrD1Sh}@?se_kb09*wbbx-W*Q9*a=7v5?K9CK;A$|K4PV zap z=wqM+%+2Yk1%yD1G?5wif55>E#WF2!N%ibb)9bA5$a$Rm#N+ris=XY c3EL!p17oD;aE&Gb$~1xNgcvjnMqcUfH`Oy{xc~qF diff --git a/out/production/ActionHealth/com/zeshanaslam/actionhealth/HealthUtil.class b/out/production/ActionHealth/com/zeshanaslam/actionhealth/HealthUtil.class deleted file mode 100644 index 82bbdc7e59f735452eb49b30c79f99e029a88314..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10341 zcmd5?dwf*&l|N@*cV=?)gg{2+AqaU8GQ3on2m%2lN+6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{#C8mmeiJxgZF;LR%HurqI2>R6fH0 z1x-O85ooJGc=92zV*J0AX#6KM&UUi*D3n_`1W+H_?RHT4Da{^p>gV9~Q#!@=Ioag% zD59@2Xb)s84zmL-(wFlMoL&keTU9c-c0Zlfly#xGW%H0Hwo|2L=Ij*B-%jP0nFW|Z z_Bcoj+aw<}tnRnxTz78Sq7*IO&PmILCGh&~+@ALOvUA`bxm66xmZE_J?5D=%Q>Ucp z+<+qkd)^?}Wm(vO>)23DIVk1WP|I^r?qfr($Uz~jI$ogWHhbClmK2?j{>nCcExIj; z#V)6@gQxu|5STRtJiG#l9l*aGw)17q0H-8!`<1{}JzHIl-Nq?D7Xh+rr4Y8&4|PfqcGZz0*GiA9RF#Wi(=$l+Cx!#1`%j4yz)83zZ88y z`&p#}JcFJ`96reF=mox>UgSII5bvOu`B8d>574W8gkIyf=ym>>4)Z7UhHV@ju`Q-I zZENW*+nw}%+avS?+uQWE?GyTu-AV7*%jhTevGh}WCH>5P7X94bM85)Mzp$TAzqDU~ zpE4o-@@yJMck`KaAMHfU+s@PIetLi$prI9cr4u4i`i{b0G{77DFEl+HYouAPta4q=YITSKu-!!L|*jvAVb-pL!u6p^QQFn z0^XF=-mIkdW+k;ZE2+JZl*ui2q&dTmG-ue6<_tU1oMDHNV~WW&SN)8y|BSC)sL-{AFF`p|%J(-%;v8(^+5AC~fj#;GCfPF%V;e|3(`YmoeA0Qq7jwy}oI@|b%q+R)w`eTc+?x7=QHGsMA8P$M|-UNh=-l8}@y?{bK HmA}6O(UD8Y diff --git a/out/production/ActionHealth/com/zeshanaslam/actionhealth/LookThread.class b/out/production/ActionHealth/com/zeshanaslam/actionhealth/LookThread.class index a2a446b5f46c8f4f88fa601b72e609342524da6a..e345a2e250639b5f49f90f6120282892b07bbf10 100644 GIT binary patch delta 247 zcmX>mbxUf40~HMmaHvkiIiQ#+s2qe{wFPtPrNu7f*#Sq6J&5+9=!%)K@yZH@QBcrP#kfQ`tqRbG$pu$khpvln0pvBP5pv|z7 yL5E=e839DwoX-^i;%B6ZbrRP;J$S>? zeLVD^n(9|yN`LtsPrP=Mxm;b?SNMn!z~GuF7B`f+rA>?uao#W)l3+q|9h}K?nk4sL sVbSFQmn?H^7UWox=bHjM9@$gkK!snbVo{SCb!pI$7EO7grMIEaf0TVRRR910 diff --git a/out/production/ActionHealth/com/zeshanaslam/actionhealth/Main.class b/out/production/ActionHealth/com/zeshanaslam/actionhealth/Main.class index 155f9a283f09f0a56499a33208dacec5a0e61077..884ce07b46758366ea9b2afedc5a6f43f6718663 100644 GIT binary patch delta 946 zcmZvaO;6K75XOJo0tsw0seO|OHd&!(?w`W+nC8PE*oa^0bT8}=Bo@Zo%JGNQTVP(oimqm1P;ZZo$v z6AoqcIo#o{!@UlMbGdIJ5A5+!^T^H!Y92dOyE8(XuqL9&55;4X(W#MCJRx4w`bK53 z8wqspCDy<76csGR6SLu-gXB7cK zW-rJ!xjCe=l^RTsdFtw0X)`nuP?XFB7lQ!{2y`YA!R3KyGG#bPlVOrJMML_Hx1u7` zAke$p*NDDTh7&Z%1dAyBm$$)3UAn;ARMyJ0Aa4e({#yA*kb|-d$xR`}87q*C6&*5G6wO$XPf*Qr z_s}9APacdmIZvevwXfr}#0w<~MPyM*9tUX`&jh@Pku7RA1ntF6Y9wFI3h7YAK58hJE$klkvS63+ z9udwFdGHnCye4cdlLPLw9VR|Poa4MOx*)mSe$-FaG#4dsX_ulagwVE=J(c}R~YstF3kNF zZj2$C;KCS}?)(C7+?n_djB(Drgs6)%b7tm0GygerzBayWSpM?+!$;r%&s=tKvX&&L zG^br+kul_oXIL}hq8YW}Gn%t5Ze)yU#uJ=#*~ob-E?9WBjtMSmF1c)Bw2sSMNpRIh zCN!H^$L%*WSmTMYc zPc@{uZ|GvLqSwZ@{@2RT!S0|O%QUCS86Gfe$m3}q8s?Z^%j%0NW(!r{D|wZwreJu) zV}%)-^$X=vMAlGbK?x~ol#WtH$_op*QeIOslzF0gs&J>vm12HuF;~eODpUsB&&zsOARS$7WZ z7yl;lf+0==wX({A&{86|$%i>8T5%}Kk^6VSIijBj9f|yMODgrAhE*CBjjgNfaQMW| zceKA1L=0O!C4UH-B&&tZw9!htFip}UyocreCuLclpq7NE?YupzzSg;uX%2Hl7#x*Y o0`-d}%`veDEu%p);_i`S=_=dR3A@&Wj?7=PsP$Qnho}>O09=%OqW}N^ diff --git a/out/production/ActionHealth/com/zeshanaslam/actionhealth/SettingsManager.class b/out/production/ActionHealth/com/zeshanaslam/actionhealth/SettingsManager.class deleted file mode 100644 index 17b99483e18b31916bf245eed116105463545de9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6454 zcma)A3wRvWb^g!nN;6uGC0TxeZLk-RZCN&68xw4h0o$^TWh6^j!p0$BM!O^JTBBL9 z4;w>Bc!eZwQt~KCOp~VR%Wad=(4sYlHcgv8(lqHSr7e9oZQ7=fq^~qB(9r+fS*><0 zp)c0wJ@=eB_uO;OIrqP3=1bpw@pAyKmnRdrAJ5wOxdbdc+k$C)*2Z%QG)2tMtK=8- z=lNF5prQ{dEx3Re61a#LTk#TpQAfYz;B&3`Wqe*$f5pMCD*Zx&iofRI*Aw^+{H992 z=-{`Me#yaatMJPXzM}MZRQS6NeoyJ|JNN^oUv=<@N?&&HM@s+L!JjC7#lfE{{WAxD zuJkV){H4;ra`4v<{zmP6O`ZMQR{R~lu0MZo;~yOSV*)qe8@hvka`4X%{zV=CSKa?N z6ZjVXErEZ>f2g7VbnsuQ`)&RCZwKE|`acf-S0BFW;5DVMJNQ3c<-47L#9O6FniFD+ zqoWpE5_~4Dj=0p7C62VwEooP#!G zUn*-2a#OhygUy2C($s3+oeOiNTLc@r2h#be)PsI8>xCWzHkI_9H`kCaVas6Sem`Lq`t^9niTMjNJWxVk@c7<2Yw;7ucpF$#Y@>7=WSiw-x0r5;@Kz;ayJuxf%BTDgYra;SL!V)n%F{g2hE!S!Sy{WN`*A@C_y0)3X%{!2r7TRoLBwsG1{ew9T*78gI z+p0EPd`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{y_b?S{91irj?SGDdcZWJ#l#BnvWY?W}f{QSvmE je3mVP9Zk`<7N#d(n0%NwUWG8CwAeRuwZd5oxljKJ{t^Nb diff --git a/out/production/ActionHealth/com/zeshanaslam/actionhealth/commands/HealthCommand.class b/out/production/ActionHealth/com/zeshanaslam/actionhealth/commands/HealthCommand.class new file mode 100644 index 0000000000000000000000000000000000000000..2ab686f029e759fe1381f3454554d756c1523eb6 GIT binary patch literal 3323 zcmbtX*>e;{82|O|CbQWLF)UYB0xqDiNhE_H2niq|oEi=j115NNHl5AD>`a)MjReFS zR1_8Opm-}PQA>nCq>9oftE{rhcOQN5!9PGtEX%KFHe@ylTUPn7J>C5s{T;vW>)s## z`Svn^Tk&NKOR%jB8n!Fg5kpumcH%BMYmK5!e(#n;dpUMtx1`+@MMo5!QS6D~UfdVO z{gU)R3=e`U=!#()(q**hjzUDy6GcWruiVhfk-*+^?1LePY#DKyG16#7(I;v9r9xZI zc1s3FGPrWcDd>;lp(qZ-um}S&9K<0xdsq&Kqj*HYqY55V@Hj(hpOMSxCc}c3w3XEk z3a6Kw+%b4o<7rp7%wE9_w^!T7b+eJ!SL>$ku4P!5`VagyyBH$PR<~fdu0=P+_FT40 z*mv_TgLdLAR+<~TxUI`|elz0s>JG#5;>yX=EH}FyZHs4Iv%e(s$}BU#VCYG;SawG1 z%I({yyINjE%ahxL*)8nGA{>n^dwD$>n%9Gt3WiP3{+ik|!`!7hxy0B?j*j zhD^rA_if{SUhW9B46!yVXQzd9k2Dr!r(UX8sfM0Vu@uV~ zW{p2@eNHzhDGHuc@f41zIEtqkW;S^+^mQfk>2n$+^%)h<;+TTxR6LL4Dqg@5hUr>? zfGrG*cTd=MtxQJRSnAUiyr|+OoFG?&()F#Lw2GH;LcuF4Ud0m(5=+-El(c2`=o!M9 z{It22Eu_=SRlJ7RDP}?SNs3V~camK~m`UFd(LIlh8nvz}0N?^RsL0?A6>nlt!ATWw z;cXSClv06 zHI0aqls`k|7@~G`?GgW}UhXzqhD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th/com/zeshanaslam/actionhealth/events/HealthListeners.class b/out/production/ActionHealth/com/zeshanaslam/actionhealth/events/HealthListeners.class new file mode 100644 index 0000000000000000000000000000000000000000..7aa97eba3f06f1045ed048c514912ada71a10b63 GIT binary patch literal 4902 zcma)A2XqwI6}?|tX;!-?=bQLjlBK%Wzn}_6HG%6F>qZvN|fm13}!0u^-^LjD)20tDX!N+CG8~u2bA8(fNnCN?pNIVh1IF8BkTQ$5*!`lOBM8uDG z$orl0c+!t|$@{4Q8t`sEo|gA}1pG4rycfsh>wOyDui;q@A5bVAj*bjkF@?o#{q|7! zpy@=6nBhc?p|H`Pu=yw~W9awgPf_Z!ijM%za48e zhKxa~UtQB?#|OiGBm4GQiLkpP%w1MuEWFu$d4kPj-e|L^Y!bkF)Ec#7gWj~lf;=^z zg0>t93CeKP7&GGvv!{^la@Qyo7>?U}O~zE5pEs3cW}VU{E@Fihd4dA+%3dgF18x)s zriSFXMkD1t38Q~syD{uWU&9BJ3^Cu&6gSXX) z4Mfd2)%u6ymK|rLFOQxJ-xcmkNl;pA@9fyt+u5xUbj;X5yXiP?0;}^A=tVviP03TK z9oudTbL;a3T_avb!k)N@W%C={!wjUrDqLTfX(LRR6W)^DLBPu<2jE4_(K$QTW*Vc+ z_!Uv!G-4&PD6eEBD@|tg*dy_NQ&1{QzpN@6_Zp*yj*a+`j`i4};lnyUf{$uAuH$1k zq2Z*C=P;q;6h5vaiPNNkjx+d#hEM7^i%;n|hx0lPQO8$sLdRF}H4R_a@eN!c2R3!LcXr>=)4Qpo zRl_%Rdnw*jGrhJ zcXYMr_^Cku8Gfz+((JC7F=QUn@eBM?$FJ~f4ZqRxTl`MP@5TGZf^BmWe-vg)Lc&oa zHW=okqz`CFlZ*c^NF;WTa(`masg2` zNLe{br9G2f`NHW1$~6>>&E+77!E#zHN6uz?H7l>jX0(c{r3dVIbbtp#MVreR(G(VD z(59c*cF8jPQa&(umJ$^?0Z&P4+|>dk||z?%Cp*Jal>7%20D=ixo4X>1$O$&gitv`aD*oocE&C zly^val+A6uO|8-uf=orbnJ@;7gu%pkO)PT*2<4R5(VV_2|G=}DNBPM3nQCtJ8Bwi zImN~RQC%SjnfnSIp=b7}iG}JR%*u-ZuM_V{w#CM?f6jW{9 zb0|8_Q4w1BoQ7gPr^AOCC_^P$IjZ!ev6(yNU%=JM&W@L1E7z#A*bfb*JlIdyoK5pq|2kch`-3v`zSDN93hbjU6n*d z5sq<i9DG>)q?Ca+1)x7Q~zUChh~RZd{0sFL01F>4%0t8-LDz{qJ>Lj)eG3FeAuP}*siWc zr)or(T8(bC89izXcBwAhtZu_@bvtfV7Vn&UVW

Q+L8tk6@2_41?-%>{G`ORZn6_ zB{A%BwVU(`5c@W4C+p9nA1^0vA2A&y_6`(Ny2@Sk(cTevm5f)X)9mI~C%VY(`_)R^ zgl_V?hta4(#f-`Yb7o#brH0-Yuv)_o4Ld95{u@g!VIeSy;VM+0A%p~@@3s{vMgqD!7$FSI&DXq&{Sz4Dwjj(#z1ZuPC@=DfW zk`fH^Ximv)Ogn{*uA|Czr5I`h!Q75J2t**AWqf>m_mXvW?HPmh<7hpDhTUh-xcd~s zq3b8GoOM8+PT+>n3XUeQ@)TBeG=x@9V9huxy{*-rP!cy5VOJLBZ0QfoLJ98XA72iU zBli&2VM03MLarr-HJFQ6!f<;~Zw7oXGtx)IC45UZy^Q#wE}@5kpDN;ti62P0CvHkp ztD<`^Nx7H7xHg3`xBERnOAqpIOb@xZ7I>R8XsU?9bkR&tp_wA%3VUd=2!sCvHpW-b literal 0 HcmV?d00001 diff --git a/out/production/ActionHealth/com/zeshanaslam/actionhealth/PreAction.class b/out/production/ActionHealth/com/zeshanaslam/actionhealth/support/PreAction.class similarity index 79% rename from out/production/ActionHealth/com/zeshanaslam/actionhealth/PreAction.class rename to out/production/ActionHealth/com/zeshanaslam/actionhealth/support/PreAction.class index 4d72b874038889ec71f5e49e4da119b2ce8ea882..ece44a12ae7356f2f8a9bda33623be57a8bc865e 100644 GIT binary patch delta 45 ucmdlbeoB19TSi8M$?q8D*o#XG3i69eHghw1GBfH;e$OZi7b;}+WCH+va1Xrz delta 29 lcmX>lzDs<=TSi8W$?q8DHj6NMFf*!6e$Oboxrx<-4FI0m34H(n diff --git a/out/production/ActionHealth/com/zeshanaslam/actionhealth/support/WorldGuardAPI.class b/out/production/ActionHealth/com/zeshanaslam/actionhealth/support/WorldGuardAPI.class new file mode 100644 index 0000000000000000000000000000000000000000..f94e1b4bf99f8fa1d69c1bfda187fc867b2e147b GIT binary patch literal 10483 zcmb_i33y!9bw20KNbhO%Y}w;g7_S&COY#i1Yy*}t-ehBtWZAL}vH|lXJxgPaX5?AC zg&oY2ge;JdW>4Etm&CL{Y+H&U(dsn) z__*)tE@%1Aa?icvumAGPXNhPze=I`N=#MJscKTy!UXtdVH0P!H6KVcbny*Xq4QXDM z=Fg;gMVfC)^Q{Vcm0q&wwFph2Z(H;olm1+~-!&|lIIBJ@}E*Ae;~ z`di`qcNV>2(GM;9dyD?TqJOmLM;85)N&jrpk1hI%MgL;aznb(@lYVB=n-=|>(ERrZ z{Rh2e(tir$w=H@{zW-&>f6Mph5eV`>74$Cs!lGYB=mHbCFNjcf1(;s)ba*1@R*L9M)-gpZZHA1&T=}fYFbKc2xGew*C zI|rS3(n_QyN(eSL{s{3f5GUJn{o z8Mg6WJuyr#`Glz_9c5^Lmt~U)SE(u7HarY%5MqJN<(&Vm;>*U;Rc{g*!-=Jx! zu^nzU*Pg?Q!sL`>y2}y0*L6DsJ`b%_$ryKpP-022jVdzICfF9;f+n zVE~bhX)V7W?uAv;mBpL76FD(~XzCe$ia()}hc`OSA60?sX1wu9fq3_ZBFf9XKMeOU z)3kswn+|um1HukCR(fHkJ#Jz)-JMRkhZ4D7?NgI{>Agh2)Ldd#CE!JvvtQ?tY+PgE zQG);zeXSHJrZP34f~4p@nhktR>*@=0^|+QFg)vSlrt0l^cxAu4E0ImWk=CVBY2-=( zgJ_zi06QFa{K0r@KADt&h19l>OS_8{REkN#nim1fx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com/zeshanaslam/actionhealth/FileHandler.class b/out/production/ActionHealth/com/zeshanaslam/actionhealth/utils/FileHandler.class similarity index 88% rename from out/production/ActionHealth/com/zeshanaslam/actionhealth/FileHandler.class rename to out/production/ActionHealth/com/zeshanaslam/actionhealth/utils/FileHandler.class index bb1bd273bba5715980f1472315fb759ae32f05e9..8c4fd672ce7704302d0e1225cc6af553e8598a95 100644 GIT binary patch delta 41 scmcbs|5AU$T1G~L$?F*9SW8PXbBZ^gX3S(~)SJAXQ5Gr?$l1dO07kqHr2qf` delta 29 lcmaEx%>J1+jju>@hFc$Olwir;#L89+#bRmR0^0v zRSVlh&BP2tq09ZUkjhj043o_uY&+ZW&W@*?qeG|Zbv@Z$OFR}CEbSi(S9o0!GK{B0 zy!83L2+236I$l(sXKI5wla~2%TTR4ZJg#v~wSQxfY!kCG= zg}bUSGp2*BPdd(I|2|q80lhbXF2xy^5tgYH8_obquq8rJ~9sAzMcU zGb~rmo^6Wd1S=Z4@e{{jr?8(P-xlg`Hkws~0C3k85s`eJX#SyJt~OF&^~jiFIRUtu z$_?F)r^%0GY2CV4#hml`qIOYd=uz8I9T}m^zmMoogh)^O){h#C0s8iYLeN+P%DERKYl| jQod^xGYIwzRg?S;Opud3apab^o1NG;c;vt1Y7eykl#zrLn<)JqBZ27Ffozg(YOf67w{Ak_L}v#LURp z7-JT*g#_b3z!FQq5Y)vnOF-CAh_e(52@TCwlC%i{LbJ4KL))Y*!TH_yW_e@Ff_`8B zs6V)K?!D)pd-ikg)2kmp_acBrG8#Y(F9y(#ulWfb_T%gLh9BR=w|w~9Vie&eHF;S< ze;2?jcvZu<1DJ{LsO8uE_i?(^-cZAj)$kKF z{8XX*Q!)M-KU2`p19%g^P|#Zeyp4C%@Jk=wRV)9Z?*5gAU#n|>qgH+!z`x?(6!g0Q z{vH3JhTp5{dkW=0HT;)`|5o51H2hJ+|0wW%A3g}+G$rLX@nO+&3a|dD*+**qPYU{2 z4M#W?kRcIH#ifZ`6Ax*KSCb;2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+~^AHL46DtS6(uPOT#6>5;eOlTpBD@i=VNt z4f=?AQMfEv7A&(vjiYj7R)GIM>fMxA+^1G=<>d|qUqr3?RYkI8%}QvH?tK1V z*==8-G@!hucmfj?AI}8Tdfo(7d(H&ZyqaC6w0*1z%7f*>vO*I;Th}m#o+lY)K6k6T z4H4!I)fI59uj4h> z`}nTgi`U(i_?~+jzVEKV58Y?sNA6bqgq*$Mz5qXVUx=To{40ww9e2r@xEFhw^G1X@ zTQ!^Hp#%33^78Hg+q1pQdGF#KJV3}tZePTMgf#NJ7hmH4esaEpm1u-n_Xe!S!`R2H zyBkZ{){Q`?93ec)oL@p|=HfA~l~Se(j1sR*-jhpg4&;65usNU<84g_2rP1cV)hwFL z0cC#6=75s_jm-h&|0~wPeF#tsJE-#!6jKj2FFLhh^HM^c*u0cdGd3?})Q`< zoxfHUz}=ax4}??=V&)~ZpB2hQTLQi8>uv2FAik}s1366{$Z6_8PE!Y{DO*~e$VkQ$ z8OeAeBN%J%c*t7OPShSu20)qELV_kJ7h zWmfGw1b(Y%oqq`Ylld^_5V%6i6fKQ*Ns2VDcZk~Pktf7NHO)gdcT>_8(5z2jdrse~< z$~BCEZwl*ubpbt1HS_-ZnuefmmW!pu^P&8h^0Dl9d!osKi{TYBb+i?H@ literal 0 HcmV?d00001 diff --git a/out/production/ActionHealth/com/zeshanaslam/actionhealth/utils/TargetHelper.class b/out/production/ActionHealth/com/zeshanaslam/actionhealth/utils/TargetHelper.class new file mode 100644 index 0000000000000000000000000000000000000000..3774f57855f52712be7fd077ce1e063b583f18c5 GIT binary patch literal 8791 zcmcIp3w%@Ob^jmhac$}Pg)xyZ1PBD%!p7lcu+7658{=RD!GuSWCCIk06${CcWKz59 znyz%L-A0#XYk)RslO`qYvXyqJ!6ju$w=QYZbzQry?V4uE+CAH~DNVPO1ib&bSCS>{ z1juho;M4cr?|kPw=YO8}^0iA}JO^N@hI*wtF=b2lHjFC{?*zT<8_WUrLzca`{idh8!{_`VJ=>hJ^Icu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4lNr%_`ztpJ?n6=zt|&%%eNDdd;X$V8@|v)?E$l^s zB`mBbrT}gC5HDEL*eyU&Mw+6OG@5f<$TKbMj=m%8Y#40>$Dp>qO6ekyi(0Gw9tn)$#wGmw;0es-d@<*XIWOhBlJiQ=={lTM@rf$e zRWpWac3Xo-o%`3<6wf^p8$)0ZH>(<*j(S(QYwn}y^gBtlWRKrDhMIBIYLF~Fj=Jo1 z-He;YunC2efug?CEGyaLS;}xp)HAa2q&g{TUJdFulEjEf>hOfH$5X{gOy_%t)EJ)=?5_U6pCw?6wQK1O>l$2Tm?JJ|g`Ygyj5w-4^cmr%pBqjp|! z0kvtMjaR6jX4tJY=T4w7P$AD??HQ~)br$RQ)tozx4clrOoqp%JdY7Z# zUG6S-J&HMgXSsVty-{0koI&$AHnL+s?53yxFi=seXUWd4=2n@ICF~GuP%KN~mpZh{ zO_s7NsiKC%$MFfO?dSXvJW63G3JZ(v+*?`o^|ec%J%-1rtkzTQxNQ1QkzQSU4jjc3 ztgL*yIYwnq8hC=E@Zjs1N5|%8FrM8_%Ja+^nlswZqGey8sNys>smHb+M?HVqRMk|h zZ?1RM@b#(ObppPV6ED@2yY9ENZO>zzup#}r-+4+VRSjq>DXZ9r)nkUNhELYeR~k?y zjkrmg=qqc{BJ0s6&6$Yyp%$NE)pRl+EWneg*ly3L-=0ywo$5bI74%=d{{(+ZwbMXQ z74ChCdkRFEww_)CpS_4h22M%ouecH9Mjk$A;qZCR6o)&=La{cP`M0n(*QD%bJG)hN zq}391zD-A=>=#dd@JrdmObIn9iat?M>>K~gat9?^f3% entities = TargetHelper.getLivingTargets(player, plugin.settingsManager.lookDistance); + List entities = TargetHelper.getLivingTargets(player, plugin.configStore.lookDistance); if (!entities.isEmpty()) { for (LivingEntity livingEntity : entities) { if (livingEntity.getType().name().equals("ARMOR_STAND")) continue; @@ -50,7 +51,7 @@ public class LookThread extends BukkitRunnable { name = livingEntity.getCustomName(); } - if (TargetHelper.canSee(player, livingEntity.getLocation(), transparentTypeIds) && !plugin.settingsManager.blacklist.contains(name) && !livingEntity.hasMetadata("NPC")) { + if (TargetHelper.canSee(player, livingEntity.getLocation(), transparentTypeIds) && !plugin.configStore.blacklist.contains(name) && !livingEntity.hasMetadata("NPC")) { plugin.healthUtil.sendHealth(player, livingEntity, livingEntity.getHealth()); break; } diff --git a/src/com/zeshanaslam/actionhealth/Main.java b/src/com/zeshanaslam/actionhealth/Main.java index 7de17cd..7c595fe 100644 --- a/src/com/zeshanaslam/actionhealth/Main.java +++ b/src/com/zeshanaslam/actionhealth/Main.java @@ -1,6 +1,11 @@ package com.zeshanaslam.actionhealth; import com.sk89q.worldguard.bukkit.WorldGuardPlugin; +import com.zeshanaslam.actionhealth.commands.HealthCommand; +import com.zeshanaslam.actionhealth.config.ConfigStore; +import com.zeshanaslam.actionhealth.events.HealthListeners; +import com.zeshanaslam.actionhealth.support.WorldGuardAPI; +import com.zeshanaslam.actionhealth.utils.HealthUtil; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; @@ -11,8 +16,9 @@ import java.util.UUID; public class Main extends JavaPlugin { - public SettingsManager settingsManager; + public ConfigStore configStore; public WorldGuardPlugin worldGuardPlugin; + public WorldGuardAPI worldGuardAPI; public HealthUtil healthUtil; public int taskID = -1; @@ -26,7 +32,7 @@ public class Main extends JavaPlugin { this.healthUtil = new HealthUtil(this); // Load config settings - settingsManager = new SettingsManager(this); + configStore = new ConfigStore(this); // Create player folder File file = new File("plugins/ActionHealth/players/"); @@ -35,11 +41,12 @@ public class Main extends JavaPlugin { // Register listeners getServer().getPluginManager().registerEvents(new HealthListeners(this), this); - // Register command + // Register commands getCommand("Actionhealth").setExecutor(new HealthCommand(this)); if (Bukkit.getServer().getPluginManager().isPluginEnabled("WorldGuard")) { this.worldGuardPlugin = ((WorldGuardPlugin) getServer().getPluginManager().getPlugin("WorldGuard")); + this.worldGuardAPI = new WorldGuardAPI(this); } } diff --git a/src/com/zeshanaslam/actionhealth/HealthCommand.java b/src/com/zeshanaslam/actionhealth/commands/HealthCommand.java similarity index 82% rename from src/com/zeshanaslam/actionhealth/HealthCommand.java rename to src/com/zeshanaslam/actionhealth/commands/HealthCommand.java index cc38381..2618f81 100644 --- a/src/com/zeshanaslam/actionhealth/HealthCommand.java +++ b/src/com/zeshanaslam/actionhealth/commands/HealthCommand.java @@ -1,5 +1,8 @@ -package com.zeshanaslam.actionhealth; +package com.zeshanaslam.actionhealth.commands; +import com.zeshanaslam.actionhealth.Main; +import com.zeshanaslam.actionhealth.config.ConfigStore; +import com.zeshanaslam.actionhealth.utils.FileHandler; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -27,7 +30,7 @@ public class HealthCommand implements CommandExecutor { } plugin.reloadConfig(); - plugin.settingsManager = new SettingsManager(plugin); + plugin.configStore = new ConfigStore(plugin); sender.sendMessage(ChatColor.RED + "ActionHealth " + ChatColor.GRAY + "has been reloaded!"); return true; } @@ -39,14 +42,14 @@ public class HealthCommand implements CommandExecutor { if (plugin.toggle.contains(player.getUniqueId())) { plugin.toggle.remove(player.getUniqueId()); - player.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.settingsManager.enableMessage).replace("{name}", player.getName())); + player.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.configStore.enableMessage).replace("{name}", player.getName())); } else { plugin.toggle.add(player.getUniqueId()); - player.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.settingsManager.disableMessage).replace("{name}", player.getName())); + player.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.configStore.disableMessage).replace("{name}", player.getName())); } - if (plugin.settingsManager.rememberToggle) { + if (plugin.configStore.rememberToggle) { FileHandler fileHandler = new FileHandler("plugins/ActionHealth/players/" + player.getUniqueId() + ".yml"); fileHandler.set("toggle", plugin.toggle.contains(player.getUniqueId())); diff --git a/src/com/zeshanaslam/actionhealth/SettingsManager.java b/src/com/zeshanaslam/actionhealth/config/ConfigStore.java similarity index 93% rename from src/com/zeshanaslam/actionhealth/SettingsManager.java rename to src/com/zeshanaslam/actionhealth/config/ConfigStore.java index c93836f..19c6e66 100644 --- a/src/com/zeshanaslam/actionhealth/SettingsManager.java +++ b/src/com/zeshanaslam/actionhealth/config/ConfigStore.java @@ -1,5 +1,7 @@ -package com.zeshanaslam.actionhealth; +package com.zeshanaslam.actionhealth.config; +import com.zeshanaslam.actionhealth.LookThread; +import com.zeshanaslam.actionhealth.Main; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.scheduler.BukkitTask; @@ -9,7 +11,7 @@ import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; -public class SettingsManager { +public class ConfigStore { public String healthMessage; public String healthMessageOther; @@ -17,6 +19,7 @@ public class SettingsManager { public boolean showMobs; public boolean showPlayers; public boolean delay; + public long delayTick; public boolean checkPvP; public boolean stripName; public boolean rememberToggle; @@ -41,7 +44,7 @@ public class SettingsManager { public boolean hasPlaceholderAPI; public int limitHealth; - public SettingsManager(Main plugin) { + public ConfigStore(Main plugin) { // Clear settings for reloads worlds.clear(); regions.clear(); @@ -68,6 +71,12 @@ public class SettingsManager { showMobs = plugin.getConfig().getBoolean("Show Mob"); showPlayers = plugin.getConfig().getBoolean("Show Player"); delay = plugin.getConfig().getBoolean("Delay Message"); + if (plugin.getConfig().contains("Delay Tick")) { + delayTick = plugin.getConfig().getLong("Delay Tick"); + } else { + delayTick = 1L; + } + checkPvP = plugin.getConfig().getBoolean("Region PvP"); stripName = plugin.getConfig().getBoolean("Strip Name"); filledHeartIcon = plugin.getConfig().getString("Full Health Icon"); diff --git a/src/com/zeshanaslam/actionhealth/HealthListeners.java b/src/com/zeshanaslam/actionhealth/events/HealthListeners.java similarity index 69% rename from src/com/zeshanaslam/actionhealth/HealthListeners.java rename to src/com/zeshanaslam/actionhealth/events/HealthListeners.java index af9b3fa..659131e 100644 --- a/src/com/zeshanaslam/actionhealth/HealthListeners.java +++ b/src/com/zeshanaslam/actionhealth/events/HealthListeners.java @@ -1,5 +1,7 @@ -package com.zeshanaslam.actionhealth; +package com.zeshanaslam.actionhealth.events; +import com.zeshanaslam.actionhealth.Main; +import com.zeshanaslam.actionhealth.utils.FileHandler; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; @@ -21,7 +23,7 @@ public class HealthListeners implements Listener { @EventHandler(priority = EventPriority.MONITOR) public void onDamage(EntityDamageByEntityEvent event) { - if (plugin.settingsManager.checkPvP && event.isCancelled()) { + if (plugin.configStore.checkPvP && event.isCancelled()) { return; } @@ -29,14 +31,20 @@ public class HealthListeners implements Listener { return; } - if (plugin.settingsManager.worlds.contains(event.getDamager().getWorld().getName())) { + if (plugin.configStore.worlds.contains(event.getDamager().getWorld().getName())) { return; } - if (plugin.settingsManager.usePerms && !event.getDamager().hasPermission("ActionHealth.Health")) { + if (plugin.configStore.usePerms && !event.getDamager().hasPermission("ActionHealth.Health")) { return; } + // Check if the setting 'Show Player' is enabled + if (event.getEntity() instanceof Player) { + if (!plugin.configStore.showPlayers) { + return; + } + } Entity damaged = event.getEntity(); if (damaged.getType().name().equals("ARMOR_STAND")) return; @@ -47,14 +55,7 @@ public class HealthListeners implements Listener { if (projectile.getShooter() instanceof Player) { Player player = (Player) projectile.getShooter(); - // Check if the setting 'Show Player' is enabled - if (event.getEntity() instanceof Player) { - if (!plugin.settingsManager.showPlayers) { - return; - } - } - - if (!plugin.settingsManager.showMobs) { + if (!plugin.configStore.showMobs) { return; } @@ -63,9 +64,7 @@ public class HealthListeners implements Listener { } if (plugin.toggle.contains(player.getUniqueId())) { - if (plugin.settingsManager.toggleMessage != null && !plugin.settingsManager.toggleMessage.equals("")) { - plugin.healthUtil.sendActionBar(player, plugin.settingsManager.toggleMessage.replace("{name}", player.getName())); - } + sendMessage(player); return; } @@ -86,7 +85,7 @@ public class HealthListeners implements Listener { // Check if the setting 'Show Player' is enabled if (event.getEntity() instanceof Player) { - if (!plugin.settingsManager.showPlayers) { + if (!plugin.configStore.showPlayers) { return; } @@ -95,14 +94,12 @@ public class HealthListeners implements Listener { } } - if (!plugin.settingsManager.showMobs) { + if (!plugin.configStore.showMobs) { return; } if (plugin.toggle.contains(player.getUniqueId())) { - if (plugin.settingsManager.toggleMessage != null && !plugin.settingsManager.toggleMessage.equals("")) { - plugin.healthUtil.sendActionBar(player, plugin.settingsManager.toggleMessage.replace("{name}", player.getName())); - } + sendMessage(player); return; } @@ -114,11 +111,17 @@ public class HealthListeners implements Listener { } } + private void sendMessage(Player player) { + if (plugin.configStore.toggleMessage != null && !plugin.configStore.toggleMessage.equals("")) { + plugin.healthUtil.sendActionBar(player, plugin.configStore.toggleMessage.replace("{name}", player.getName())); + } + } + @EventHandler(priority = EventPriority.MONITOR) public void onJoin(PlayerJoinEvent event) { Player player = event.getPlayer(); - if (plugin.settingsManager.rememberToggle) { + if (plugin.configStore.rememberToggle) { FileHandler fileHandler = new FileHandler("plugins/ActionHealth/players/" + player.getUniqueId() + ".yml"); if (fileHandler.getBoolean("toggle")) { @@ -131,8 +134,6 @@ public class HealthListeners implements Listener { public void onLeave(PlayerQuitEvent event) { Player player = event.getPlayer(); - if (plugin.toggle.contains(player.getUniqueId())) { - plugin.toggle.remove(player.getUniqueId()); - } + plugin.toggle.remove(player.getUniqueId()); } } diff --git a/src/com/zeshanaslam/actionhealth/PreAction.java b/src/com/zeshanaslam/actionhealth/support/PreAction.java similarity index 97% rename from src/com/zeshanaslam/actionhealth/PreAction.java rename to src/com/zeshanaslam/actionhealth/support/PreAction.java index e662af0..214f765 100644 --- a/src/com/zeshanaslam/actionhealth/PreAction.java +++ b/src/com/zeshanaslam/actionhealth/support/PreAction.java @@ -1,4 +1,4 @@ -package com.zeshanaslam.actionhealth; +package com.zeshanaslam.actionhealth.support; import org.bukkit.Bukkit; import org.bukkit.entity.Player; diff --git a/src/com/zeshanaslam/actionhealth/support/WorldGuardAPI.java b/src/com/zeshanaslam/actionhealth/support/WorldGuardAPI.java new file mode 100644 index 0000000..2a41ab4 --- /dev/null +++ b/src/com/zeshanaslam/actionhealth/support/WorldGuardAPI.java @@ -0,0 +1,222 @@ +package com.zeshanaslam.actionhealth.support; + +import com.sk89q.worldguard.bukkit.WorldGuardPlugin; +import com.sk89q.worldguard.domains.Association; +import com.sk89q.worldguard.protection.ApplicableRegionSet; +import com.sk89q.worldguard.protection.association.Associables; +import com.sk89q.worldguard.protection.association.RegionAssociable; +import com.sk89q.worldguard.protection.flags.StateFlag; +import com.sk89q.worldguard.protection.managers.RegionManager; +import com.sk89q.worldguard.protection.regions.ProtectedRegion; +import com.zeshanaslam.actionhealth.Main; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.block.Block; +import org.bukkit.entity.Player; + +import javax.annotation.Nullable; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.util.List; +import java.util.Objects; +import java.util.logging.Level; +import java.util.stream.Collectors; + +public class WorldGuardAPI { + private final Main main; + private Object worldGuard = null; + private WorldGuardPlugin worldGuardPlugin = null; + private Object regionContainer = null; + private Method regionContainerGetMethod = null; + private Method createQueryMethod = null; + private Method regionQueryTestStateMethod = null; + private Method locationAdaptMethod = null; + private Method worldAdaptMethod = null; + private Method regionManagerGetMethod = null; + private Constructor vectorConstructor = null; + private Method vectorConstructorAsAMethodBecauseWhyNot = null; + private StateFlag buildFlag; + private StateFlag pvpFlag; + private StateFlag exitFlag; + private boolean initialized = false; + + public WorldGuardAPI(Main main) { + this.main = main; + worldGuardPlugin = main.worldGuardPlugin; + + try { + Class worldGuardClass = Class.forName("com.sk89q.worldguard.WorldGuard"); + Method getInstanceMethod = worldGuardClass.getMethod("getInstance"); + worldGuard = getInstanceMethod.invoke(null); + } catch (Exception e) { + } + } + + + protected RegionAssociable getAssociable(Player player) { + RegionAssociable associable; + if (player == null) { + associable = Associables.constant(Association.NON_MEMBER); + } else { + associable = worldGuardPlugin.wrapPlayer(player); + } + + return associable; + } + + private void initialize() { + if (!initialized) { + initialized = true; + // Super hacky reflection to deal with differences in WorldGuard 6 and 7+ + if (worldGuard != null) { + try { + Method getPlatFormMethod = worldGuard.getClass().getMethod("getPlatform"); + Object platform = getPlatFormMethod.invoke(worldGuard); + Method getRegionContainerMethod = platform.getClass().getMethod("getRegionContainer"); + regionContainer = getRegionContainerMethod.invoke(platform); + createQueryMethod = regionContainer.getClass().getMethod("createQuery"); + Class worldEditLocationClass = Class.forName("com.sk89q.worldedit.util.Location"); + Class worldEditWorldClass = Class.forName("com.sk89q.worldedit.world.World"); + Class worldEditAdapterClass = Class.forName("com.sk89q.worldedit.bukkit.BukkitAdapter"); + worldAdaptMethod = worldEditAdapterClass.getMethod("adapt", World.class); + locationAdaptMethod = worldEditAdapterClass.getMethod("adapt", Location.class); + regionContainerGetMethod = regionContainer.getClass().getMethod("get", worldEditWorldClass); + Class regionQueryClass = Class.forName("com.sk89q.worldguard.protection.regions.RegionQuery"); + regionQueryTestStateMethod = regionQueryClass.getMethod("testState", worldEditLocationClass, RegionAssociable.class, StateFlag[].class); + + Class flagsClass = Class.forName("com.sk89q.worldguard.protection.flags.Flags"); + buildFlag = (StateFlag) flagsClass.getField("BUILD").get(null); + pvpFlag = (StateFlag) flagsClass.getField("PVP").get(null); + exitFlag = (StateFlag) flagsClass.getField("EXIT").get(null); + } catch (Exception ex) { + regionContainer = null; + main.getLogger().log(Level.SEVERE, "Unable to hook into WG. SE: 1", ex); + main.worldGuardPlugin = null; + return; + } + } else { + regionContainer = worldGuardPlugin.getRegionContainer(); + try { + createQueryMethod = regionContainer.getClass().getMethod("createQuery"); + regionContainerGetMethod = regionContainer.getClass().getMethod("get", World.class); + Class regionQueryClass = Class.forName("com.sk89q.worldguard.bukkit.RegionQuery"); + regionQueryTestStateMethod = regionQueryClass.getMethod("testState", Location.class, RegionAssociable.class, StateFlag[].class); + + Class flagsClass = Class.forName("com.sk89q.worldguard.protection.flags.DefaultFlag"); + buildFlag = (StateFlag) flagsClass.getField("BUILD").get(null); + pvpFlag = (StateFlag) flagsClass.getField("PVP").get(null); + exitFlag = (StateFlag) flagsClass.getField("EXIT").get(null); + } catch (Exception ex) { + main.getLogger().log(Level.SEVERE, "Unable to hook into WG. SE: 2", ex); + main.worldGuardPlugin = null; + regionContainer = null; + return; + } + } + + // Ugh guys, API much? + try { + Class vectorClass = Class.forName("com.sk89q.worldedit.Vector"); + vectorConstructor = vectorClass.getConstructor(Double.TYPE, Double.TYPE, Double.TYPE); + regionManagerGetMethod = RegionManager.class.getMethod("getApplicableRegions", vectorClass); + } catch (Exception ex) { + try { + Class vectorClass = Class.forName("com.sk89q.worldedit.math.BlockVector3"); + vectorConstructorAsAMethodBecauseWhyNot = vectorClass.getMethod("at", Double.TYPE, Double.TYPE, Double.TYPE); + regionManagerGetMethod = RegionManager.class.getMethod("getApplicableRegions", vectorClass); + } catch (Exception sodonewiththis) { + main.getLogger().log(Level.SEVERE, "Unable to hook into WG. SE: 3", ex); + main.worldGuardPlugin = null; + regionContainer = null; + return; + } + } + + if (regionContainer == null) { + main.getLogger().log(Level.SEVERE, "Unable to hook into WG. SE: 2"); + main.worldGuardPlugin = null; + } + } + } + + @Nullable + private RegionManager getRegionManager(World world) { + initialize(); + if (regionContainer == null || regionContainerGetMethod == null) return null; + RegionManager regionManager = null; + try { + if (worldAdaptMethod != null) { + Object worldEditWorld = worldAdaptMethod.invoke(null, world); + regionManager = (RegionManager) regionContainerGetMethod.invoke(regionContainer, worldEditWorld); + } else { + regionManager = (RegionManager) regionContainerGetMethod.invoke(regionContainer, world); + } + } catch (Exception ex) { + main.getLogger().log(Level.SEVERE, "Unable to run WG lookup. SE: 1"); + } + return regionManager; + } + + @Nullable + private ApplicableRegionSet getRegionSet(Location location) { + RegionManager regionManager = getRegionManager(location.getWorld()); + if (regionManager == null) return null; + // The Location version of this method is gone in 7.0 + // Oh and then they also randomly changed the Vector class at some point without even a version bump. + // So awesome! + try { + Object vector = vectorConstructorAsAMethodBecauseWhyNot == null + ? vectorConstructor.newInstance(location.getX(), location.getY(), location.getZ()) + : vectorConstructorAsAMethodBecauseWhyNot.invoke(null, location.getX(), location.getY(), location.getZ()); + return (ApplicableRegionSet) regionManagerGetMethod.invoke(regionManager, vector); + } catch (Exception ex) { + main.getLogger().log(Level.SEVERE, "Unable to run WG lookup. SE: 2"); + } + return null; + } + + public boolean isPVPAllowed(Player player, Location location) { + if (worldGuardPlugin == null || location == null) return true; + + ApplicableRegionSet checkSet = getRegionSet(location); + if (checkSet == null) return true; + + return checkSet.queryState(getAssociable(player), pvpFlag) != StateFlag.State.DENY; + } + + public boolean isExitAllowed(Player player, Location location) { + if (worldGuardPlugin == null || location == null) return true; + + ApplicableRegionSet checkSet = getRegionSet(location); + if (checkSet == null) return true; + + return checkSet.queryState(getAssociable(player), exitFlag) != StateFlag.State.DENY; + } + + public List getRegionNames(Location location) { + ApplicableRegionSet applicableRegionSet = getRegionSet(location); + return Objects.requireNonNull(applicableRegionSet).getRegions().stream() + .map(ProtectedRegion::getId).collect(Collectors.toList()); + } + + public boolean hasBuildPermission(Player player, Block block) { + initialize(); + if (block != null && createQueryMethod != null && regionContainer != null) { + try { + boolean result; + Object query = createQueryMethod.invoke(regionContainer); + if (locationAdaptMethod != null) { + Object location = locationAdaptMethod.invoke(null, block.getLocation()); + result = (boolean) regionQueryTestStateMethod.invoke(query, location, getAssociable(player), new StateFlag[]{buildFlag}); + } else { + result = (boolean) regionQueryTestStateMethod.invoke(query, block.getLocation(), getAssociable(player), new StateFlag[]{buildFlag}); + } + return result; + } catch (Exception ex) { + main.getLogger().log(Level.SEVERE, "Unable to run WG lookup. SE: 3"); + } + } + + return true; + } +} diff --git a/src/com/zeshanaslam/actionhealth/FileHandler.java b/src/com/zeshanaslam/actionhealth/utils/FileHandler.java similarity index 99% rename from src/com/zeshanaslam/actionhealth/FileHandler.java rename to src/com/zeshanaslam/actionhealth/utils/FileHandler.java index e4cf3f1..d027d2f 100644 --- a/src/com/zeshanaslam/actionhealth/FileHandler.java +++ b/src/com/zeshanaslam/actionhealth/utils/FileHandler.java @@ -1,4 +1,4 @@ -package com.zeshanaslam.actionhealth; +package com.zeshanaslam.actionhealth.utils; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.configuration.file.YamlConfigurationOptions; diff --git a/src/com/zeshanaslam/actionhealth/HealthUtil.java b/src/com/zeshanaslam/actionhealth/utils/HealthUtil.java similarity index 68% rename from src/com/zeshanaslam/actionhealth/HealthUtil.java rename to src/com/zeshanaslam/actionhealth/utils/HealthUtil.java index 03817d6..436e58a 100644 --- a/src/com/zeshanaslam/actionhealth/HealthUtil.java +++ b/src/com/zeshanaslam/actionhealth/utils/HealthUtil.java @@ -1,10 +1,7 @@ -package com.zeshanaslam.actionhealth; +package com.zeshanaslam.actionhealth.utils; -import com.sk89q.worldedit.bukkit.BukkitAdapter; -import com.sk89q.worldguard.protection.ApplicableRegionSet; -import com.sk89q.worldguard.protection.regions.ProtectedRegion; -import com.sk89q.worldguard.protection.regions.RegionContainer; -import com.sk89q.worldguard.protection.regions.RegionQuery; +import com.zeshanaslam.actionhealth.Main; +import com.zeshanaslam.actionhealth.support.PreAction; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.entity.LivingEntity; @@ -24,7 +21,7 @@ public class HealthUtil { } public void sendHealth(Player receiver, LivingEntity entity, double health) { - if (plugin.settingsManager.canSee) { + if (plugin.configStore.canSee) { if (entity instanceof Player) { Player player = (Player) entity; @@ -35,7 +32,7 @@ public class HealthUtil { } } - if (plugin.settingsManager.spectatorMode) { + if (plugin.configStore.spectatorMode) { if (entity instanceof Player) { Player player = (Player) entity; @@ -47,13 +44,13 @@ public class HealthUtil { } } - if (plugin.settingsManager.invisiblePotion) { + if (plugin.configStore.invisiblePotion) { if (entity.hasPotionEffect(PotionEffectType.INVISIBILITY)) { return; } } - if (plugin.settingsManager.delay) { + if (plugin.configStore.delay) { new BukkitRunnable() { public void run() { @@ -62,7 +59,7 @@ public class HealthUtil { if (output != null) sendActionBar(receiver, output); } - }.runTaskLater(plugin, 1L); + }.runTaskLater(plugin, plugin.configStore.delayTick); } else { String output = getOutput(health, receiver, entity); @@ -83,13 +80,13 @@ public class HealthUtil { name = entity.getCustomName(); } - if (plugin.settingsManager.blacklist.contains(name)) return null; + if (plugin.configStore.blacklist.contains(name)) return null; - if (plugin.settingsManager.stripName) name = ChatColor.stripColor(name); - if (plugin.settingsManager.translate.containsKey(entity.getName())) - name = plugin.settingsManager.translate.get(entity.getName()); + if (plugin.configStore.stripName) name = ChatColor.stripColor(name); + if (plugin.configStore.translate.containsKey(entity.getName())) + name = plugin.configStore.translate.get(entity.getName()); - String output = plugin.settingsManager.healthMessage; + String output = plugin.configStore.healthMessage; if (entity instanceof Player) { String displayName; @@ -104,17 +101,17 @@ public class HealthUtil { output = output.replace("{displayname}", displayName); // Placeholder apis - if (plugin.settingsManager.hasMVdWPlaceholderAPI) { + if (plugin.configStore.hasMVdWPlaceholderAPI) { output = be.maximvdw.placeholderapi.PlaceholderAPI.replacePlaceholders(player, output); } - if (plugin.settingsManager.hasPlaceholderAPI) { + if (plugin.configStore.hasPlaceholderAPI) { output = me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(player, output); output = me.clip.placeholderapi.PlaceholderAPI.setRelationalPlaceholders(receiver, player, output); } } else { - if (!plugin.settingsManager.healthMessageOther.isEmpty()) { - output = plugin.settingsManager.healthMessageOther; + if (!plugin.configStore.healthMessageOther.isEmpty()) { + output = plugin.configStore.healthMessageOther; } output = output.replace("{displayname}", name); @@ -126,17 +123,17 @@ public class HealthUtil { if (output.contains("{usestyle}")) { StringBuilder style = new StringBuilder(); - int left = plugin.settingsManager.limitHealth; - double heart = maxHealth / plugin.settingsManager.limitHealth; + int left = plugin.configStore.limitHealth; + double heart = maxHealth / plugin.configStore.limitHealth; double halfHeart = heart / 2; double tempHealth = health; if (maxHealth != health && health >= 0 && !entity.isDead()) { - for (int i = 0; i < plugin.settingsManager.limitHealth; i++) { + for (int i = 0; i < plugin.configStore.limitHealth; i++) { if (tempHealth - heart > 0) { tempHealth = tempHealth - heart; - style.append(plugin.settingsManager.filledHeartIcon); + style.append(plugin.configStore.filledHeartIcon); left--; } else { break; @@ -144,21 +141,21 @@ public class HealthUtil { } if (tempHealth > halfHeart) { - style.append(plugin.settingsManager.filledHeartIcon); + style.append(plugin.configStore.filledHeartIcon); left--; } else if (tempHealth > 0 && tempHealth <= halfHeart) { - style.append(plugin.settingsManager.halfHeartIcon); + style.append(plugin.configStore.halfHeartIcon); left--; } } if (maxHealth != health) { for (int i = 0; i < left; i++) { - style.append(plugin.settingsManager.emptyHeartIcon); + style.append(plugin.configStore.emptyHeartIcon); } } else { for (int i = 0; i < left; i++) { - style.append(plugin.settingsManager.filledHeartIcon); + style.append(plugin.configStore.filledHeartIcon); } } @@ -172,17 +169,17 @@ public class HealthUtil { message = ChatColor.translateAlternateColorCodes('&', message); try { - if (plugin.settingsManager.mcVersion.equals("v1_12_R1") || plugin.settingsManager.mcVersion.startsWith("v1_13") || plugin.settingsManager.mcVersion.startsWith("v1_14_")) { + if (plugin.configStore.mcVersion.equals("v1_12_R1") || plugin.configStore.mcVersion.startsWith("v1_13") || plugin.configStore.mcVersion.startsWith("v1_14_")) { new PreAction(player, message); - } else if (!(plugin.settingsManager.mcVersion.equalsIgnoreCase("v1_8_R1") || (plugin.settingsManager.mcVersion.contains("v1_7_")))) { - Class c1 = Class.forName("org.bukkit.craftbukkit." + plugin.settingsManager.mcVersion + ".entity.CraftPlayer"); + } else if (!(plugin.configStore.mcVersion.equalsIgnoreCase("v1_8_R1") || (plugin.configStore.mcVersion.contains("v1_7_")))) { + Class c1 = Class.forName("org.bukkit.craftbukkit." + plugin.configStore.mcVersion + ".entity.CraftPlayer"); Object p = c1.cast(player); Object ppoc; - Class c4 = Class.forName("net.minecraft.server." + plugin.settingsManager.mcVersion + ".PacketPlayOutChat"); - Class c5 = Class.forName("net.minecraft.server." + plugin.settingsManager.mcVersion + ".Packet"); + Class c4 = Class.forName("net.minecraft.server." + plugin.configStore.mcVersion + ".PacketPlayOutChat"); + Class c5 = Class.forName("net.minecraft.server." + plugin.configStore.mcVersion + ".Packet"); - Class c2 = Class.forName("net.minecraft.server." + plugin.settingsManager.mcVersion + ".ChatComponentText"); - Class c3 = Class.forName("net.minecraft.server." + plugin.settingsManager.mcVersion + ".IChatBaseComponent"); + Class c2 = Class.forName("net.minecraft.server." + plugin.configStore.mcVersion + ".ChatComponentText"); + Class c3 = Class.forName("net.minecraft.server." + plugin.configStore.mcVersion + ".IChatBaseComponent"); Object o = c2.getConstructor(new Class[]{String.class}).newInstance(message); ppoc = c4.getConstructor(new Class[]{c3, byte.class}).newInstance(o, (byte) 2); @@ -195,14 +192,14 @@ public class HealthUtil { Method sendPacket = playerConnection.getClass().getDeclaredMethod("sendPacket", c5); sendPacket.invoke(playerConnection, ppoc); } else { - Class c1 = Class.forName("org.bukkit.craftbukkit." + plugin.settingsManager.mcVersion + ".entity.CraftPlayer"); + Class c1 = Class.forName("org.bukkit.craftbukkit." + plugin.configStore.mcVersion + ".entity.CraftPlayer"); Object p = c1.cast(player); Object ppoc; - Class c4 = Class.forName("net.minecraft.server." + plugin.settingsManager.mcVersion + ".PacketPlayOutChat"); - Class c5 = Class.forName("net.minecraft.server." + plugin.settingsManager.mcVersion + ".Packet"); + Class c4 = Class.forName("net.minecraft.server." + plugin.configStore.mcVersion + ".PacketPlayOutChat"); + Class c5 = Class.forName("net.minecraft.server." + plugin.configStore.mcVersion + ".Packet"); - Class c2 = Class.forName("net.minecraft.server." + plugin.settingsManager.mcVersion + ".ChatSerializer"); - Class c3 = Class.forName("net.minecraft.server." + plugin.settingsManager.mcVersion + ".IChatBaseComponent"); + Class c2 = Class.forName("net.minecraft.server." + plugin.configStore.mcVersion + ".ChatSerializer"); + Class c3 = Class.forName("net.minecraft.server." + plugin.configStore.mcVersion + ".IChatBaseComponent"); Method m3 = c2.getDeclaredMethod("a", String.class); Object cbc = c3.cast(m3.invoke(c2, "{\"text\": \"" + message + "\"}")); ppoc = c4.getConstructor(new Class[]{c3, byte.class}).newInstance(cbc, (byte) 2); @@ -226,11 +223,8 @@ public class HealthUtil { return false; } - RegionContainer regionContainer = com.sk89q.worldguard.WorldGuard.getInstance().getPlatform().getRegionContainer(); - RegionQuery regionQuery = regionContainer.createQuery(); - ApplicableRegionSet applicableRegions = regionQuery.getApplicableRegions(BukkitAdapter.adapt(location)); - for (ProtectedRegion region : applicableRegions) { - if (plugin.settingsManager.regions.contains(region.getId())) { + for (String regionName : plugin.worldGuardAPI.getRegionNames(location)) { + if (plugin.configStore.regions.contains(regionName)) { return true; } } diff --git a/src/com/zeshanaslam/actionhealth/TargetHelper.java b/src/com/zeshanaslam/actionhealth/utils/TargetHelper.java similarity index 98% rename from src/com/zeshanaslam/actionhealth/TargetHelper.java rename to src/com/zeshanaslam/actionhealth/utils/TargetHelper.java index 049c875..6fb63c2 100644 --- a/src/com/zeshanaslam/actionhealth/TargetHelper.java +++ b/src/com/zeshanaslam/actionhealth/utils/TargetHelper.java @@ -1,7 +1,6 @@ -package com.zeshanaslam.actionhealth; +package com.zeshanaslam.actionhealth.utils; import org.bukkit.Location; -import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; @@ -47,6 +46,10 @@ public class TargetHelper { * @return all entities in the player's vision line */ public static List getLivingTargets(LivingEntity source, double range, double tolerance) { + if (source == null) { + return new ArrayList<>(); + } + List list = source.getNearbyEntities(range, range, range); List targets = new ArrayList(); @@ -157,6 +160,8 @@ public class TargetHelper { * @return true if the target is in front of the entity */ public static boolean isInFront(Entity entity, Entity target) { + if (entity.getWorld() != target.getWorld()) + return false; // Get the necessary vectors Vector facing = entity.getLocation().getDirection();