From dede4cdaee40c15102a92d27c462f8cdcf118e77 Mon Sep 17 00:00:00 2001 From: NovaFox161 Date: Sun, 6 May 2018 11:56:17 -0500 Subject: [PATCH] Maven + UTF-8 + Arconix2 --- .gitignore | 2 + pom.xml | 185 +++++++++++ src/com/songoda/epicfarming/EpicFarming.java | Bin 23128 -> 0 bytes src/com/songoda/epicfarming/Lang.java | Bin 7236 -> 0 bytes src/com/songoda/epicfarming/References.java | Bin 502 -> 0 bytes src/com/songoda/epicfarming/api/MCUpdate.java | Bin 12248 -> 0 bytes .../epicfarming/events/BlockListeners.java | Bin 9154 -> 0 bytes .../epicfarming/events/EntityListeners.java | Bin 1486 -> 0 bytes .../epicfarming/events/InteractListeners.java | Bin 2328 -> 0 bytes .../events/InventoryListeners.java | Bin 5384 -> 0 bytes src/com/songoda/epicfarming/farming/Crop.java | Bin 1220 -> 0 bytes src/com/songoda/epicfarming/farming/Farm.java | Bin 26076 -> 0 bytes .../epicfarming/farming/FarmManager.java | Bin 2014 -> 0 bytes .../songoda/epicfarming/farming/Level.java | Bin 3478 -> 0 bytes .../epicfarming/farming/LevelManager.java | Bin 1810 -> 0 bytes .../epicfarming/handlers/CommandHandler.java | Bin 7330 -> 0 bytes .../epicfarming/handlers/FarmingHandler.java | Bin 8246 -> 0 bytes .../epicfarming/handlers/GrowthHandler.java | Bin 5534 -> 0 bytes .../epicfarming/handlers/HookHandler.java | Bin 7240 -> 0 bytes .../epicfarming/hooks/ASkyBlockHook.java | Bin 3418 -> 0 bytes .../epicfarming/hooks/FactionsHook.java | Bin 3124 -> 0 bytes .../hooks/GriefPreventionHook.java | Bin 2110 -> 0 bytes src/com/songoda/epicfarming/hooks/Hook.java | Bin 2142 -> 0 bytes .../epicfarming/hooks/KingdomsHook.java | Bin 2952 -> 0 bytes .../epicfarming/hooks/PlotSquaredHook.java | Bin 2020 -> 0 bytes .../epicfarming/hooks/RedProtectHook.java | Bin 1924 -> 0 bytes .../songoda/epicfarming/hooks/TownyHook.java | Bin 3480 -> 0 bytes .../epicfarming/hooks/USkyBlockHook.java | Bin 2622 -> 0 bytes .../epicfarming/hooks/WorldGuardHook.java | Bin 1704 -> 0 bytes .../player/PlayerActionManager.java | Bin 1338 -> 0 bytes .../epicfarming/player/PlayerData.java | Bin 1122 -> 0 bytes .../epicfarming/utils/ConfigWrapper.java | Bin 3634 -> 0 bytes .../songoda/epicfarming/utils/CropType.java | Bin 6352 -> 0 bytes .../songoda/epicfarming/utils/Debugger.java | Bin 1818 -> 0 bytes .../songoda/epicfarming/utils/Methods.java | Bin 5138 -> 0 bytes .../epicfarming/utils/SettingsManager.java | Bin 18766 -> 0 bytes .../com/songoda/epicfarming/EpicFarming.java | 269 ++++++++++++++++ .../java/com/songoda/epicfarming/Lang.java | 111 +++++++ .../com/songoda/epicfarming/References.java | 14 + .../epicfarming/events/BlockListeners.java | 130 ++++++++ .../epicfarming/events/EntityListeners.java | 27 ++ .../epicfarming/events/InteractListeners.java | 39 +++ .../events/InventoryListeners.java | 70 +++++ .../com/songoda/epicfarming/farming/Crop.java | 32 ++ .../com/songoda/epicfarming/farming/Farm.java | 296 ++++++++++++++++++ .../epicfarming/farming/FarmManager.java | 36 +++ .../songoda/epicfarming/farming/Level.java | 68 ++++ .../epicfarming/farming/LevelManager.java | 30 ++ .../epicfarming/handlers/CommandHandler.java | 74 +++++ .../epicfarming/handlers/FarmingHandler.java | 113 +++++++ .../epicfarming/handlers/GrowthHandler.java | 80 +++++ .../epicfarming/handlers/HookHandler.java | 114 +++++++ .../epicfarming/hooks/ASkyBlockHook.java | 64 ++++ .../epicfarming/hooks/FactionsHook.java | 56 ++++ .../hooks/GriefPreventionHook.java | 38 +++ .../com/songoda/epicfarming/hooks/Hook.java | 40 +++ .../epicfarming/hooks/KingdomsHook.java | 43 +++ .../epicfarming/hooks/PlotSquaredHook.java | 38 +++ .../epicfarming/hooks/RedProtectHook.java | 34 ++ .../songoda/epicfarming/hooks/TownyHook.java | 56 ++++ .../epicfarming/hooks/USkyBlockHook.java | 49 +++ .../epicfarming/hooks/WorldGuardHook.java | 31 ++ .../player/PlayerActionManager.java | 18 ++ .../epicfarming/player/PlayerData.java | 29 ++ .../songoda/epicfarming/utils/CropType.java | 107 +++++++ .../songoda/epicfarming/utils/Debugger.java | 31 ++ .../songoda/epicfarming/utils/Methods.java | 74 +++++ .../epicfarming/utils/SettingsManager.java | 246 +++++++++++++++ .../resources}/SettingDefinitions.yml | 0 src/{ => main/resources}/plugin.yml | 0 70 files changed, 2644 insertions(+) create mode 100644 pom.xml delete mode 100644 src/com/songoda/epicfarming/EpicFarming.java delete mode 100644 src/com/songoda/epicfarming/Lang.java delete mode 100644 src/com/songoda/epicfarming/References.java delete mode 100644 src/com/songoda/epicfarming/api/MCUpdate.java delete mode 100644 src/com/songoda/epicfarming/events/BlockListeners.java delete mode 100644 src/com/songoda/epicfarming/events/EntityListeners.java delete mode 100644 src/com/songoda/epicfarming/events/InteractListeners.java delete mode 100644 src/com/songoda/epicfarming/events/InventoryListeners.java delete mode 100644 src/com/songoda/epicfarming/farming/Crop.java delete mode 100644 src/com/songoda/epicfarming/farming/Farm.java delete mode 100644 src/com/songoda/epicfarming/farming/FarmManager.java delete mode 100644 src/com/songoda/epicfarming/farming/Level.java delete mode 100644 src/com/songoda/epicfarming/farming/LevelManager.java delete mode 100644 src/com/songoda/epicfarming/handlers/CommandHandler.java delete mode 100644 src/com/songoda/epicfarming/handlers/FarmingHandler.java delete mode 100644 src/com/songoda/epicfarming/handlers/GrowthHandler.java delete mode 100644 src/com/songoda/epicfarming/handlers/HookHandler.java delete mode 100644 src/com/songoda/epicfarming/hooks/ASkyBlockHook.java delete mode 100644 src/com/songoda/epicfarming/hooks/FactionsHook.java delete mode 100644 src/com/songoda/epicfarming/hooks/GriefPreventionHook.java delete mode 100644 src/com/songoda/epicfarming/hooks/Hook.java delete mode 100644 src/com/songoda/epicfarming/hooks/KingdomsHook.java delete mode 100644 src/com/songoda/epicfarming/hooks/PlotSquaredHook.java delete mode 100644 src/com/songoda/epicfarming/hooks/RedProtectHook.java delete mode 100644 src/com/songoda/epicfarming/hooks/TownyHook.java delete mode 100644 src/com/songoda/epicfarming/hooks/USkyBlockHook.java delete mode 100644 src/com/songoda/epicfarming/hooks/WorldGuardHook.java delete mode 100644 src/com/songoda/epicfarming/player/PlayerActionManager.java delete mode 100644 src/com/songoda/epicfarming/player/PlayerData.java delete mode 100644 src/com/songoda/epicfarming/utils/ConfigWrapper.java delete mode 100644 src/com/songoda/epicfarming/utils/CropType.java delete mode 100644 src/com/songoda/epicfarming/utils/Debugger.java delete mode 100644 src/com/songoda/epicfarming/utils/Methods.java delete mode 100644 src/com/songoda/epicfarming/utils/SettingsManager.java create mode 100644 src/main/java/com/songoda/epicfarming/EpicFarming.java create mode 100644 src/main/java/com/songoda/epicfarming/Lang.java create mode 100644 src/main/java/com/songoda/epicfarming/References.java create mode 100644 src/main/java/com/songoda/epicfarming/events/BlockListeners.java create mode 100644 src/main/java/com/songoda/epicfarming/events/EntityListeners.java create mode 100644 src/main/java/com/songoda/epicfarming/events/InteractListeners.java create mode 100644 src/main/java/com/songoda/epicfarming/events/InventoryListeners.java create mode 100644 src/main/java/com/songoda/epicfarming/farming/Crop.java create mode 100644 src/main/java/com/songoda/epicfarming/farming/Farm.java create mode 100644 src/main/java/com/songoda/epicfarming/farming/FarmManager.java create mode 100644 src/main/java/com/songoda/epicfarming/farming/Level.java create mode 100644 src/main/java/com/songoda/epicfarming/farming/LevelManager.java create mode 100644 src/main/java/com/songoda/epicfarming/handlers/CommandHandler.java create mode 100644 src/main/java/com/songoda/epicfarming/handlers/FarmingHandler.java create mode 100644 src/main/java/com/songoda/epicfarming/handlers/GrowthHandler.java create mode 100644 src/main/java/com/songoda/epicfarming/handlers/HookHandler.java create mode 100644 src/main/java/com/songoda/epicfarming/hooks/ASkyBlockHook.java create mode 100644 src/main/java/com/songoda/epicfarming/hooks/FactionsHook.java create mode 100644 src/main/java/com/songoda/epicfarming/hooks/GriefPreventionHook.java create mode 100644 src/main/java/com/songoda/epicfarming/hooks/Hook.java create mode 100644 src/main/java/com/songoda/epicfarming/hooks/KingdomsHook.java create mode 100644 src/main/java/com/songoda/epicfarming/hooks/PlotSquaredHook.java create mode 100644 src/main/java/com/songoda/epicfarming/hooks/RedProtectHook.java create mode 100644 src/main/java/com/songoda/epicfarming/hooks/TownyHook.java create mode 100644 src/main/java/com/songoda/epicfarming/hooks/USkyBlockHook.java create mode 100644 src/main/java/com/songoda/epicfarming/hooks/WorldGuardHook.java create mode 100644 src/main/java/com/songoda/epicfarming/player/PlayerActionManager.java create mode 100644 src/main/java/com/songoda/epicfarming/player/PlayerData.java create mode 100644 src/main/java/com/songoda/epicfarming/utils/CropType.java create mode 100644 src/main/java/com/songoda/epicfarming/utils/Debugger.java create mode 100644 src/main/java/com/songoda/epicfarming/utils/Methods.java create mode 100644 src/main/java/com/songoda/epicfarming/utils/SettingsManager.java rename src/{ => main/resources}/SettingDefinitions.yml (100%) rename src/{ => main/resources}/plugin.yml (100%) diff --git a/.gitignore b/.gitignore index 5ec6929..ac5d64e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ out/ \.idea/ EpicFarming\.iml +/src/main/resources/META-INF/MANIFEST.MF +/target/ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..fae2abf --- /dev/null +++ b/pom.xml @@ -0,0 +1,185 @@ + + 4.0.0 + com.songoda + EpicFarming + 1.1 + + jar + + EpicFarming + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-shade-plugin + 1.4 + + + package + + shade + + + + + + + + + jcenter + http://jcenter.bintray.com + + + + bukkit-repo + https://hub.spigotmc.org/nexus/content/groups/public/ + + + + songoda-public + http://jenkins.songoda.com:8081/repository/songoda-public/ + + + songoda-private + http://jenkins.songoda.com:8081/repository/songoda-private/ + + + + sk89q-repo + http://maven.sk89q.com/repo/ + + + + vault-repo + http://nexus.hc.to/content/repositories/pub_releases + + + + uSkyBlock-mvn-repo + https://raw.github.com/rlf/uSkyBlock/mvn-repo/ + + true + always + + + + + bintray-tastybento-maven-repo + bintray + http://dl.bintray.com/tastybento/maven-repo + + + jitpack.io + https://jitpack.io + + + + + + + org.bukkit + bukkit + 1.12.2-R0.1-SNAPSHOT + jar + provided + + + + com.songoda.arconix + api + 2.0.0 + provided + + + com.songoda.arconix + plugin + 2.0.0 + provided + + + + com.sk89q + worldguard + 6.1.1-SNAPSHOT + provided + + + + net.milkbowl.vault + VaultAPI + 1.6 + provided + + + + com.palmergames + Towny + 0.92.0.0 + provided + + + + com.github.rlf + uSkyBlock-API + 2.6.4 + provided + + + + br.net.fabiozumbi12 + RedProtect + 7.3.0 + provided + + + + com.intellectualcrafters + PlotSquared + 18.05.01 + provided + + + + org.kingdoms + Kingdoms + 13.3.40 + provided + + + + com.github.TechFortress + GriefPrevention + 16.7.1 + provided + + + + me.markeh + factionsframework + 1.2.0 + provided + + + + com.wasteofplastic + askyblock + 3.0.8.2 + provided + + + + commons-lang + commons-lang + 2.6 + compile + + + \ No newline at end of file diff --git a/src/com/songoda/epicfarming/EpicFarming.java b/src/com/songoda/epicfarming/EpicFarming.java deleted file mode 100644 index 8c5d80d9b40e5f3d0123b0603e9e689d97046867..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23128 zcmdU1ZF3v95yt2IinBg=WVbrUvRyfC(iz)wYA3eqiQM)>r_+)3W+oKHAt^g)CV#!{ z^I*9G76%+p5=EYeBT>9NEFSDTc0v93e{Ssd-GTcFzfatetMK=kJ9V|2;(df`XYLU9 zYTO&U0q!2-(*#cp{M|pfFYp@R^B7M~+^mHH$C3I7&;JaHr=U4=AN&k8=yLoisL${c z>a}}^XMV=#XSgeKjBsUyE1Y>5^G-o;0!sUCh~NLgr`qi`u63U+&!-yn$-mmY##;V{ zzsc1Z=D9xQBli(>$df7PKgBxEyhLANzNw#sJe%O}WzY58&pN;yzqp&9?WLcME1|~D zRy3pXmfCqUtF#tXV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+u0h`L$sI{_&wsXe&^RKLbJ!)5D_yxYE`S!SKMOQk$t zG1l6;c2`4feTZ5rtH^pqJA9OWT>UNWK0@!4eV-Ai4N;xZ`B>%V6;^7b6RLME-{tIz zR8MqUNo__*bdCHUGd#t|>Naai0joZd(kS%?^ZL~t@iH~8IqOa6;I8Lg_=Z<35Nr$G=D-{&cc;>F`0LICa{zWXT;thrrQ5>rM}5(l3<5d?K?vch{AazZIf9 RFF(;0arql6DN5+?{{fwhNv;3@ diff --git a/src/com/songoda/epicfarming/Lang.java b/src/com/songoda/epicfarming/Lang.java deleted file mode 100644 index 8d4e9a1aca1a90b692f58d7cfbff2f0a524c98af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7236 zcmcgwQBNB=5cYF_#a?x4gLKIQm7v$tJp>3GDo~V!HdR$cfh06)2vHJxoDhHguHWa` ziS1o)NH~I4;H*8KnQvx1Gv0syGh@>+7v?+uUz(mt@cY_anTnZW9AWO-bg@>!+Sm-R z+Q-`j6a%~Zhk1c#fcG&dCuRl?951os+}wcgcdX9vwrjp&=M3Yu8Cn|dU1ldW8bR&= zTyMaeTn2WoVrPfYtzz~u$6w?hrxsnu;BgL0Vo5+h!uu6|9f2?LCg#p!O7M%%si~V9 zxF4F9DVdkRIl(S!bBnj%K=IPNGH=Zn{NDnlSZN>JoRzr#6?7Y*f06P{%n7JlrfIpJ zfafi6IgY<$UFX7mJEjVh@9n-F$f5WAeQr+nIf*TxX#zzeH67oMISZ%~^EYfTgI5!vIL)Es+>!ZUtw+1XB}pXoJpH$=2dCit4xC>>r#sAi zFb!yZkC`KA_yd1KM5tQSA*@;25M#~8^#4aGyj7;ghs^p&i{veX_16Hc%5wPVw~zQc zvfgvHaDLiCtV-pIc9nXgsz(Dtb=iu_4AjW%mx`8Y=>m)f2_cjxR zXVf990#g(5+ctjzW8Hd>u^ghT0^baos|+f7j}gu@;3HO=BtzqLQdyy-MRw2~ZF^36 zVyp0Xv37OnHOARvt}N0nq{(Z?eCi}Q?Oa^!rdqTy?&Dz=5l`)=lFJzTcvx$EUtO5b zn7cuqxUiHXys;+v)Cp$3A#$de4>Ml{_Ri+aGw6Dd##IeoJcjlSJXOp}4h{2S8P$Zo zn?fcls_#M7Z3?*;c!aKxw;`T?a{6>J<8;-^%eiZ;u->rZNj7BN@=rI<`!5kZ$I!er zkNjh3c?%xC4Y%NbwU3i2_PUzWv(7VSV>bH?kDXat`LYCk85YdT+@AX_FClINb^&68 zJ6lOVp*q~!EEm)01gPn`b{b8zf<}4AdaRsA6XpAn-Se_u*2a|IpXb|r?3~zh&rDN? zbj@r$<;*hd5B!|wVz+DktFg3Y})ayR!Zw}ZVxe<3|H7`aNX^>ByA3c~zzV7WRyv^Ogi=*+4Rq7ljLM>nv> zj!rS@sOPEzs|xbO{0S<3^X-t|BiLn!ljZNZ54y;(>kRGk1AZLf1Sarl4;rhTO0X`y z)4?fE=Cj59t@Q5N`xfC=3ybc4Z@sMcp{1GQX2{Nrg^tZ+Gt{;s>Fk|npqiwSD|w~@ z^x0TiWWSgOr>PfLmmTx?s?vS0e6$|B0itDf5gQiq;0=ZKfl(g&y%C(jr_wyMF?*8B zCB3>Bjc|HiEIdWh1w0jsL(8#eEBpl6mKE8zSP3y8vex4rW_!8EGLx&Uc%}=_++y$S zd3>KA)j6c|>p%~PSlONq*G|CsvB&`-Ke$$@#*vgy2 zlNeI7)(;UUj1kth{5Kd{g7^LrY7e`5b_P}a;>a8=Gt5kKd*v_Y>M3&DYji)at&Un# zDk*wjixPNgme)+n)9+>__iq3bD^R{ttJMdnFbU*})e>~K#H1OqsN(2u9kVuZ?-d}{ z+YNhj-q8GS57NnNO#0PQd1pt*TkP-No_NYZ`I=^bv#x)ANFXf#bLukLY6hc$Fai>X8)Q8C)FroEU@n`w7)<6n_8! diff --git a/src/com/songoda/epicfarming/References.java b/src/com/songoda/epicfarming/References.java deleted file mode 100644 index 3ebef3e1172dbb00398b21e93a8be7f0edb8d222..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 502 zcmZ{gOA5k35JYS3DF#=HkPC<_Q4m~+g1Ge)H5g+^q6p&E)z=e(QIw`LpPKG^oySwD zmRjq;cc)N}{Ygg!%2^ZcPTHUaXsII9EvJkZkypEF5UI{uDfYT`h@!VCiqHPV8U{i8yC|8Ig0RVNxUd&u!EN T-WjZp-5#PG%KALt6p*|CPkT>E diff --git a/src/com/songoda/epicfarming/api/MCUpdate.java b/src/com/songoda/epicfarming/api/MCUpdate.java deleted file mode 100644 index 7597cb04ab76f1b24e643f7cd5bd222570aba151..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12248 zcmc(l+j1Mn5r*g5PqD&948;~CE0v2Vb{t7|C2~n3i==gvq*N3SA}tc20Z_K$;;Se5 zziG7QfZfHCW|BgY3+&GH@$a6Vp8eOq!$sH+2jQLmzYRyB(f3(650kLab*g)_aHwY! zJ-Y~}dU~v1bB#ESPbd1t{Xd3J^f}f23(c5^r6_TItC?@YrRcxY)1`hr$$l|w$edkq zpNIGH|Ij&4!--^DhNqI_EXp!;=8-g8Mrl7t-fhj^4EUNQgy-YlQ7go{LPMQoHYDCA^v>9!ejYm-02Uji&z^N?{>nok+$*(J}j! zNZFI^7QztpYRvqgXYchl5&xO~gRo+ zb|2)CKFQJy$L+Au7O|jUm}JB!nQ9WPejM?`%t?3=ZF3?`4_C;+wr@0oOh&F_?n0kN zW1q@~7aB>{AQM_IB=^3#Lb>nV0 zu{_#@S3=#6umk>HYV23~8-*{V#RFZj+$Xxz&ZDH8b1Zp0k?(fJ=k*FL&gDchEhYJ* za9sfpv-4A55WS5DoNnWpIx*vY4Pm;0GuSVQb=58Wo;tKl^nb>%$NQL70$}*sG zQqj4e{jTj>>R#%b%MBLrw6Ak!U(;fkUEfGf))FFnD%qjFr#s(7$w3S>iTz8B>Gv3` ziswi$b5@OSx8^hP1y!tthNzjW2T!ny1WU;SJxA488WTrY^-$mMW|qW5eU^m=>-e@X z`7-=PsNu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ld3`sXt&%gke3sMW^vis6^f7DY&)s%zcfUGMRLfk{7Ww4}uTjW*pHhKUQqIVk7e~Pdj5vimxTp5)1=m1Xf-m; z9xH5`F(>RJ{jgv1f5-_Y(Dd zOxcCJxxV?^do|+oXTvmGe{0*SN8aOE#N0!b{#f6*a;}XZtlMnwU9jt7UM#`p*8p63)7x*ZN%j2Z945)&Kwi diff --git a/src/com/songoda/epicfarming/events/BlockListeners.java b/src/com/songoda/epicfarming/events/BlockListeners.java deleted file mode 100644 index ef9cb3f66bdc24ef9745beddec6556b4c6b750c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9154 zcmeHMYfl?T6rIofip@6@n$4?KrKFKcQb%RBb?NC=& zL+EdhyH4_Z_@|5aeOa&x&yZ1_JMd2I`}dG3ei>6!&y#P5SR<~_FZ~_?ELjKW`V$Qsc45tM5(GhWIVr+BlZq0YMj$-|={E zC+h<|OHc4~;D(L;5hL5g+%xYTMtm-E^1g{>_U5HC9`_(Wc=qmO zzXkGBcX=LzNDO?Nw zKY}D??RB3U<;fOCOJ7|F5snsgYP4Ekc#p5?dZnMz&!B@{lz7kq2g&djM*CnYEhINI zr+Q6SKzDEOywyG0MjO}Atucr6AlGUky>~SeYqd`*J*uwz=w&gd3?SVkX(St~H0+Vhm|9ctBE ze6C@ow%u3YXB$!8^|8O7iA9qb;xTZgSvCt5JmzW`4Os6gqlLU>T87|aKVhS)^#<%# zu8!HdjqKSQF}QFKd?l!M#q3hIu#@@&EBq6#!7qxPy6YGB1zu100U@XEk9HmFz|7sH zu*UgVV^#djy{|mlCqB2aYZxGp_F-pQW2@K{=fQWO9<72OJL5`N?u$YOj7VNt?<=@J@szcqo#;w|ldCf7dQ+oo8> zkJddgh!s3n%fy&!M!egB0n z!m>a26s))07o6h79*P|myPzX{&-Hdy&QHdU`nbvX%dd2Zg_Hpn8S}FyAAun&(b^8I zrFEvmeud~4Gs7H3wz#aTo$|H7Bt;kf5x&2GhB^zvoYd}o)Siv%5ZA2ZJ6s!)w}q&B zrFNcTa<8}tEa!e##_Sew%HEIBGj$eAzU1zr8#XTnuS(vp9`mf6KyhFCH{K}Eq3oaUo&Ih>fVZ5@s;#*gZiG+%v~7$@d&$dlgSa& z_jEimj~1<5PMiFevy=Dg?7W7R&FvHdT|<0v-Jgvto@Br;h}J&%%1j-0kzw{K7~X;e zGI0fOt_|y@vC2kUfA)Oi%m1=KV|)c2xE2w{Scd_Y!Fy5jJIA zWf1$%f@dg}nSMmR8hZZ)d#YKUezzUEW^*q0+0&w1Nb9b$V0I=_FRdCr-BNO4mM!v5 z$igwVs+o{k_AV`t`|ASiwKI!Fe3?JVsPlMyuCT~6x%s)V)IP2n|36CEk|M7^*SP&& zbveqx&Gw$*Og-LvhS9b0`7n10IxDWL#a!Q}r)oi(7#i|i%+NIBG}~zsU%WEp+hms} zUMO#b{%p~XjHh2b|2_4dl3aG(^4xS=^Vw)RddqF$q*xlHo%avNdw6D`bf?dg^Hc2Q znKj8@?l4$W_}#c%*Z<3Z%5IuX@3EpYZ*uoB-)h9ZYI^!vzqUFD2>)iVPvu_V1PF<; zddhGDyN_{S{*#2@9eFsPQPa^`z6+d>J3>PidxHPrR!^Cy^CIpp%#R_GSXJl)o{Vvo z`7g@`PH7CS*0p+#B^sU_U*(-@FS9q|nf$rsG4SMt2s)$6Y&#VGKRQi=?Uq}3>Kkx1 zd@g(DYJF${nspJ)PWcr*LLKXyjH5+rv*L2P fPtD(ptXebq&DJbfKb?!YT6}}m`M3V70lfbJ=|O6C diff --git a/src/com/songoda/epicfarming/events/EntityListeners.java b/src/com/songoda/epicfarming/events/EntityListeners.java deleted file mode 100644 index d8b2eb5f77a8e4005a9984fab90dc5e92a0d87bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1486 zcmd6m%}&BV6ov1)Pch4~nHMl7F06q>H@*QD#fG*tEhQMktE=CgVYDq01U6>UPCNJS zoOADdd`cx#NoB!%F3)24UP>WW8upU2rOdEdY?WkKU-+x>$edNr*F2@Hh`5r7m0_)j zt2sM8U$U!n*Q=wMFU#A4CX*bLR&GK3BrWWebM0{Vvn%>Jp6az=Wkh$mT1mcnk3m|Z zQhs)>d-69_P#w?3<9nbu-$0tUj`%-iJLUYfgLz-i3&#&dAWy$h(_DLxis1=gEL0cN3tjj9ee| zw9Ye@(Qdj!-kT1y{scs>uKM-4u2CjqP7He~W8Rg-Cn;#)JtAHi1{`5uxsD9k2kRF9 z)J;Lk92n{*vf)H;wcZOwq}ewI^M_2syJM-_68-3M`CA|FGU=3sxUg?KXZro)ajBv+ Uka$gxP5)nY44A|IpH)Q5FN>b{f&c&j diff --git a/src/com/songoda/epicfarming/events/InteractListeners.java b/src/com/songoda/epicfarming/events/InteractListeners.java deleted file mode 100644 index bb3b89babe5e090a6b872b89b931274ffae74bb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2328 zcmbuBO>Yx15QgX6UtumN?ZM$o;((B#CD5paqN;b)B&Dp9ZdaR4X@&UflxOUkwY`C4 zg{+OewrA#@nRjOM>s~53m#NJ8y_5?vtgq!ttSp&J_O4~dndPjKg43_O)!ZoDsqWwK zl+qyaN_H3prxkKFd;Rr|9_+kN?5O7d)4KvqAq!Aic?aT&tnf~Kt{v`FyQ073rrw$} z3Z$(ZpBL<5-&7wef*Dg zOt7!fm=l+`%za}L>#ERoE_V)#mCw=J*fC2nDodLv3Z832*<z?p<(GJ)7}9 zL8r->Y+UAyJeQ$7l^6UzlP9cR;)mBWWUk1&dZ>(74lBMT!$^)OkEP!6T+;kp@%Y*> zuqTbWksnx6n|`ckzG^F7wlwQg^m)&NREl&nx&bltm7G>s*Um1u6k)Iw=0?6bPizO7 zk=NW_hd0RnOgw%Qm>~w^sJe)H;WJsoSjE5LM7~4FpNBAD28pM!<{owRmj8|^A4l^;uC%Di=4^{ zv-+sD(O|hIaw&&`H(~C26<2s{H{Q3{8p{Vclr!ue!1pn~N38c*pSX2D9C^Pr5BY98 zuxDJq_~lyFpY7t2GdpA?RFY<))tlc~x~y61Sozy<*XukYH+P(QKDYkuy3GBH zfo;yxE|FW_jBTBD%U7oW+xLXyafenfef$EFeAb%p?rB$5Kc{pPt)P+Iy6#r7=fAF6 i7q=Vz&%fmsey@n_DbnFzh}NfS(kyq8w0nxwb*SHW+j&X= diff --git a/src/com/songoda/epicfarming/events/InventoryListeners.java b/src/com/songoda/epicfarming/events/InventoryListeners.java deleted file mode 100644 index ca4624381351e16330bb60b70878176c38703d1f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5384 zcmd^D*-jKu5UppvqUFI1#59ZBgPMqdfkc!DMqgQmp#^3pJE-sV_0*{ve*BcaY{`xs;BQCT65+llM-s~b*Dl`mWEX2O*7}lQbq`M|zDV3E z-w$ziCBu#vGJzw(Y9ISjy!(B5%a?lI26`y@W^(&-2#Ke#HHA0p-qRA^XE<-J;}~)h zNFG4L5;SegF(Sygrhh7Z{j_=hnh+(siU(?6c(z``iN#q}R_Fu>Q@wN5f zS^G}3ZNle1bdBpzwGYg~k!&Cv$|aOmtkphMPM+ZJyv*Y6IjmDTGr0C)>Goyr z$z$Y?0gk8wBW97IkzXla5#dKTl_8^%r}kweXV68hdQ|ftrFEg35$?hk%~-xGw6%=k zvVAS!OBvmGgc>@|?oiVd-qA+0(5{*6yBds3wng%)LJqTKdoKc?Uwc>&nIYd1dN@P| z6PI7+wd`+Rv#rL}oRK2L)VQGDV{$}wG|aOE9Ws(uDJHS&16j~{7LZBS0)1F>nbj_w zV*eDd$j(u}qlK^hJ~rifV0%9!M?KVpF&JxtvUBN{eZFPhn7J;He~2TGzIj)7J(qLr z%Ohy|L(SzpRcWOitleERZ1RXuiTQMrzpbhwv)7mNH*w@wb#{1ehB9FD828OqhCEk{kDtR30~)96*SFS8QJ+1J z8#`r#IdsNI9^wdXjKMAJi0g=g{vu#^R5okLWKDmG9S+yl%~ zyY4|2BgEOq_nlEv?;jOn+l(rcYgfOXVmGPi1X<=Udec-@CXu+c`{MNiD{aJqwZXYW z`<-7k+PA_wG%P*Ep4-FHGHUh1e~c#c|KGxsKmQuqh_W5jO@_bwxaYijf_wfS!e%Do z@Z`#BEdCOY9dmc(qm#woee4w~sj4>oS_t|4rgJN&BdyfBDYf`Z(4VpDScskJ?x$2n zv*Q?)tV<5w4W`q`t9rgC7B3~Q*$@`2y i#YCdr!=~!$`PTd^Uhl7`IveGl=KfVz(S5CF)buY>Lr~NJ diff --git a/src/com/songoda/epicfarming/farming/Crop.java b/src/com/songoda/epicfarming/farming/Crop.java deleted file mode 100644 index 22466fc803d6e83f7497a191d65332e06a3aa011..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1220 zcmb7@!A`?442FH)Q{*@#REaaVq!{S*t9af}$+7o!|cb zJ3IeKCtE3{=65fZD85_yl0pW~245@h#0p}aXrdojJvX$A7LolZE0!kSf$YVQ(VlxU z>|~@)P1ImL<88V1inV1|VzD{M4Y<-_G+&Lwt;jS|;XsDcb#dUvz*3h=O1>RCh0m@I z23n4P)s@6~71>gimhe^)+plpPYHDv>{t5+^Jh2}f*CqT5Osul%qN!JNx#f;$!~O+2Hs^ zd!~D4_M%H1YD=2kndz^;`>lKC-~TBNi`T_=v5)_6i`}Bc_xHuSqF)^2cz|>7iyd6+ zj-!3xvTxk?_Y{<+-DDW9AfNIanb;jkT~A~p#6q9=Az$(H6EOI!1kp0 zhr`_{`G7fgFvAAU+4t_ybCfR(IkFgWWOBI6fJe?x4(YHM0M;qEaRl0*2EXQU{se#L zImaAidjbhkzAKI<)3Ku|%=*DW9zaX`#XRWSf>hr+4W2gil|Yw{6PO>k>wRYt1K80P z==}sv_lu99`2)V4;QQ`S&uLqy_`MMQu1kTI^A`7!u6=y=9FzyaudZVr0Sns0inE5@ z1O@52mT~_!#!7-+=cA-gFy9eyehuooj@!b$oN*siKREk7*=SnkHgM?*Wfz)CdQY5; zLVM{7fnM<=W+WW)m9k!{otrMS$CzmV??#?a2AOhu2Omk#KuJsj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D+HS+v&tnY6CkSK*Gc zR^qZedtn`f_ClH3>t{N?FH83QoM*^6Y0vFaUUAmFlbO7i2|M+6Gk+Y2^^ln?(AT6`_OgIOoy!-RahhcFRBUgTu@D8>L@>|F1l`1KZBYMyM3&i zbi0z?jyBX#tT$=jiJz)#qqU{BwSx_#eJk`d+SC6^b0^VGsC&gm=Q5Rw&Gi+F-|v8V znB%8^zQ>6L%T qPt3)YJ~eakg>|YuLhqTeJ992By$$TM@laI$P2+exzIGQ0HU0-aEHYOB diff --git a/src/com/songoda/epicfarming/farming/LevelManager.java b/src/com/songoda/epicfarming/farming/LevelManager.java deleted file mode 100644 index 68afa68812f9aad9a434f5b1397fdbae3303d8a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1810 zcmcJQ!H&~F42FH?DRL|bL?SEgiiw5dd%;^H|IGT%EfV^LE$s0=!xZN<(;aLDFf$@64zL#z9G+)w&emymM$Md!p@T*izR$XT+D$3L%saZD^y;yG`Ww?dTt=_wdERw<4tf8- zm>X_W>D`?&(oH(u7x#%)lOgW!j`}TfAB3LoIeSkZR%BoPzPEPU;0!(v&_u KiT~_4ZptrlYBRwA diff --git a/src/com/songoda/epicfarming/handlers/CommandHandler.java b/src/com/songoda/epicfarming/handlers/CommandHandler.java deleted file mode 100644 index 23a746f85061783fb682137958d2b571ee91d808..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7330 zcmeI1Yi}Dx6o%(>e#JH)BDcV%<)T&~1SL%&5`n6z`X!2x@*;sUUwHc%K=c z?CizPZsUqXLaWVscV^C<^PcbGre~&aV|S*pRAUo2 z(C8bzO*LcSM^pE^-ZRY^YQ|KnzHwW+2AVO^+Nqnbp$R4S%QXK&dps??L#Y{^RlMyl zd468t`Q~(g_A;M)S#QSSLih}X-AvLy6N0C1ApSMRP7~q0gYDBIoGpTwK7x zTU`UqPTddDTNStZHNk>LOS?$jp7tE+3U;y?D*LjRzHA5l;9@gWk3E?k%uTxPPR%RZ%6U`wqj7G(vR6_d*thJGhFi+}4+$MgjX-O|O_4Q}4eW?T`v*kU_U|p;G?xN_<`Tk+MCf z9?v%#2iHutg9NFtCQrOrj*^$5nz&DNZ@V2uq3z{cm10;+9-E0C_BRo&fjG>TyoDLB zHG^6qA2Ir?BIJ(yN_!7=kCl_4j0a`<3(mI-Y4F)`Puyqz*;S-^uF594vR6hQE87!& zh{NOyBCtiIL|=m)rFTd=?0D|Ajh7=2Qtm4rksE__)R(I=#8GMeU6LIS8p<-eKBpu1 z%jk<`*G#@T5H<_hFWwrgpV&vukvOX=iF^1-;^&j6@yoko=jW1)e3*9%R68Tdb9`m* z_&>P@tbSb12MJ^*|1cZ73G1lw!l?O6h?bkiV&4*p{Ut)wT(${&wBYR9>779I>4wk!}Rvl15bPv zYRG>`Y)fRZdHkd=Y7_0K#SOdiv#3+^9IJ2Jc7Xf-^p22c$`z9dpdoxIk|Bt z8((d=wx?N)S!{h5^+*w>S?(y)jblx<;~o3#7N2O`Z@{zdVb6|YaFIr_kELS?UBQ9k zH`s6@K~M93*)s&B5A>C4prfcCpJb)_*424cUsZOf9P*hU(=7VdM~e9L%eahX;gp2a zQ#vox(XmcyPP|4!kDJK~hq~J8DAvvDzOX*`w9Bneg>_Ge+bJwHR<)C?e#v`F`of;P zgR@|2{e`bhrlQ!DcJPif(Wj10^lj|t(3euB%>5|@`p$jH)?<_L8hFIRGSRx%q9QJ8 zw@q%pi3OO&{I_*F84em0qkR@KJWj6xh?ISUErvFo!)lPqua?OBbTWji}m{33>tpE#Wx`)r=6>nPe| zab8EWnq?j1q)Gj;ZVqErKSvWiACY^C%$&xOuQ=z+Pvz)lFRsl^<^N1^cDN8SFFh?{ THyJQcs?$Ur@7Gsrth)RcQK3@N diff --git a/src/com/songoda/epicfarming/handlers/FarmingHandler.java b/src/com/songoda/epicfarming/handlers/FarmingHandler.java deleted file mode 100644 index 89851164ac6f1dc3b924a6070abe5c56eccf4130..0000000000000000000000000000000000000000 GIT binary patch liter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vigw0r_QkuW0-Pz+_EMJN z>V`3$@E2?lGI}1L@qV*Fo^pDy37VBk9GkQugM}AWkGIf_XF7Vmnz2u`9}rh|%cF)@ zsCOP`O#6t6wXffX7JG72J)sr$+R#&W_r>A`_ok@B?TYUyG zyw;y_BGRM~PilQ+AN|}`)!4=7ovRAFjDB5ei9G3p19N8!Qn;JosTifLR2A`szpMKx zo*mjVA=JQ}WtOitkG_JuoOYTmY`yPdNC0fY{GZ+!N>% zuP{BI!nvJ(+i>?S2=-s@^lPYWsS7ICC!+aj4FSoiIo7e(7Ohj-ED-rd1!`|suK aUFJLsy6!RaH6f>2-3Oe{n$tPg;rkyl?z@fv diff --git a/src/com/songoda/epicfarming/handlers/GrowthHandler.java b/src/com/songoda/epicfarming/handlers/GrowthHandler.java deleted file mode 100644 index 90088ccfd961fcb08322ddde17ac53934183c49a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5534 zcmd5=TTc^F5T0j##ma*zQ5NvQ2SgLOcuA<5QcZj^6iU0cY@4=##`xFO@0-)%oV~Pc zC2q`SIlE`)KHtol^6R&ZPH}fDYdeN*XUdb{DXq-cK`zKSP>bz(b^VufdnfSz6f$EmU&^!m z6;#)_V?=2N9&)_F`xF>yVl9hv8P6)TEyyMMh*^icF|;!R#46D|R12nfey!QQfo*-Y z%cC}uABx%tRJ_KZOwboHu&@#>KpU8KOKnt{E+{C%-4{eS9 zKo;E4|)&z6(FCuqvE4ymker77q)&8F3dmpi2 z-G^9UeP6>1+hctb=|sd0)@7s^dp>>pEPcc0S zB0((=aGQLqoqU!k(Z20NzdMD(U4IINyN8Gy~Vxjz@AR?=?2<;1OQ`rXHmh!laS=4Oe38QliK4P7mKEA#eHPw1XVhoxDl&-Q}=k%yB9oEmL zs4`bY=PH>Iw0PxLLxK6o8hoPJDm#yg+%7^^IW9)_=H^XS?l(lr`mxhQA0FY}xg)=( z(Ia#Ud9&Nzo%PjIapqk_<#m^LdedpE#mM}MP&4dF7PC$DBa(->s%IrHg{X0nU#$YN zeb#KY)mN*pP;XSf*o zQx8aplIT{IOEH!*Q<=f?M?|QLf9ma)+(YztkxhrQL*yoSM=L4n$ieR!&T;)YZ{Nuy z$UczAI6sv8{$DcJa}U=sFrL5~>y(vDyEzUgZz0djzr~YKtxkSHihdMFEUz+7Sckof zDC8H~oIHi(5LVA{+{OO`kKrQ_jXWMo1wGZ#&*Tt3&5)ZjjOQ%0#~!UbHsDcQdOe1f z32gP{4SeQ2?l)L`gZCNmoFaqF&=35Iys{Q-PnmC`Ka_8CE6l4s{vE84Y5I^FAY0Z* z8`mdDowymjC<<%`$wkqoC9PhpRhYt8wN)N@$kXYEw>;BAf=u^M~O z+mRh#KijfBzXsb0a1CI68)KS~Xx!o&r{<#0wF-VWMB@h#WynOpz9_GHrl<s95NIAodZYIAm(7MqurN!l#6OtOia zmdQ3V&N69>f0oHDvW`kD<~CH2*0NSynL{X_U>=0p%sn%3?(peMSi$VTxZ+Gv%N?92 zxJ!+is$AC7nXygQ7W>&Wl5dK597*=1 z(@H${!0J}St%&@u$QJ&GxE8)^Y}-avJH&EMnqq2Iu`-So&9?QcddvOOI+eSq@8;L6 z`n*oHs*dZ7wCUx^sZ*LDA!Dz+1KWo zt6DqR@+zt5bS5=@B~<5<^7_n91iyb2heWIZ diff --git a/src/com/songoda/epicfarming/hooks/ASkyBlockHook.java b/src/com/songoda/epicfarming/hooks/ASkyBlockHook.java deleted file mode 100644 index 24da432e987468afef7ee9ee10756fd1ab3dcbed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3418 zcmdT`T~E|N6ur;tw0-3@Y@9oIgpU!Q#>C7bp{-<_A-6Sn@K-Ly~20wB9{V{WACXCK@+E{_X64A|MAgfE(g1T21K5e~?1!^P19_nWw z=!cpI=99kqyxDH@<>T#Q_MAGc(;6C@U~LWi6XZ8n>r|^*YLBc}V>IqlsVWV5C-XJB z8ly>Bzl}WdKKOqt2T%z4qgGCF7v`GkJXZaUu!6BrtsHlNmOYBR#T86#JjJSZZ^*Eg zeJ6B_KCWvZVqK-OZmd}rFJP|%mN~rgt^%4;vv?ynu)%jBBbC+}t7jXm4U&kqRLv7a zH^N1Xtoa(xGmW0;uJDFz2gVGSjn+lj4X&||JbT^5hz^!>DJ-dcntkhko9I@)U%i2S z_7iHZ>*=dzZ!DiMj-hzsAy)yNuTZn!9(@Ph>|{0ex{>g^tJ*114S{>h(Z3nA3;Lfh;ZR3!TfsiS?ZO z`Z2%#inJAdW84qgYnuI`JsVi-tL&J$jXOK3**EUux`@@%SE z_BX849y*aPYRP|n57bT?MYqp3qmFyB>8h#bho5%rs65MeQOiTbJO&Ggh@PkB1iA^m i<8h~6Goo0xu`0V~r~{U10}-{`&c1b~W|#LI;r}mlp#G2m diff --git a/src/com/songoda/epicfarming/hooks/FactionsHook.java b/src/com/songoda/epicfarming/hooks/FactionsHook.java deleted file mode 100644 index d2d3ec0a5fb1b0064a7a74afd6731fd31a370fb1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3124 zcmchZTW`}q5QXQtzhc!Vw?ZzL2Oba-P+F*jN=1J`E~d3|sfm+91^w&5ch*_iYdaK? z7Omp7y}NVf%$XVI=PxU4U?ZDwy|Bz2_g6Nv)Jo<#@2+gjTFP2sIjf&}TCgMctEpYG zv7LcBup6HLCsL)x!?9|{qN~n*#;=Lg z$4Z%YLF}dIgps2_Y9G*KMBJr>^y>Q9e=cLM&MZ+Z?P#}S2e!}HA+z`S9fF;Cl#D8I z_;ABDt{ms_ojv316MN3}sXg|0>DtZ#bAk6mGDQ`p8dT1d3}>o@X5PKWp6bnk{0%?l z@!0RISH5FWK31c^%iONlemd)~F^3ORUlposXD|8n?@ay9#P-$|U*j}6Z1P*@oXNv* zF3ct9g|Cyuc00Ux*LY!fm~$%8Spvfnf9J4N9Hobl_Ihx_$tK@sA4~0>k64D~Gq3Qq zk8;SRI?jsGlI|dEWmvF$%YFUy%03c()xUHYb62m$x(~g!@_yhoPzKNK4RKNL5~F4} zkz$X)Z0EXTZ=C&`BEG~UWo(}sflHX0~eI>uJdjMVu zYV5UC_`ztiNqzpDqS>7DRn|7MDfn{B$*QM~$T{Ww5glN}nF1fHKBum*N$p^#{ryW} zw*vcnsltx4hren||5qIIc+0wom2K4nS)4Z^-%fl7=w_Mts?+_sj$@4!uT@K-kRR$^;Xcgq>HAeURZ#!0``F?umpvi0k%4l!!WoUDJlgBg1-PL~0dSqt-iX0CI z_*5b@*0l2unK8StFTQfaJa-G?EZQlS299_g`F(Zow!Lmok+=ktJicON;EeWx2#vrf zR)qPk_dfa^v6eBL-1%POr-IW6YvN}CYc=~lJGLW6kBm9uIdxWrZcO$CurGLbGcq{t zV9&Vw#GdnhYL9&umwJwo1zr!arp#4t%WlaCdt&$=?aJx^f?tj!2Z`=AJHOE{#Pukg zlNF6*kX)Ane0HYBXl5=?lLmLyBC6ds4Z9qi%c zV2LH&O){eng7x9J#OoXe#JD0SyN4UBrkiap+MQ%yg(bgg{wlA`y8k52x1HF$w9lp* zoq3GTnKevwGi2y-7kX8`GDh+>EUA0Qqjv5pnvXcOT1|no-TKmTN>=BrsOlRg(%B@NE|w}sU9#qUciu(V%E4MWdm}7G zxKm{e>>F?OB(16cR;_ONim(0}cVbw79d+-q^PPi!!l-K_;a!zopX=JMJ$T@Cm$U?X z$Y}c*-I`+fvlII|+N(V<;?s9B>=W6qIG=R1Z|3;c?TL{Q*{kX~qtA$`g0;FQtM_cn oo8;^2zf6CvIoyABP4!>6?|OtI-AYnblIBTvS!;N2-`72!e<9OT`Tzg` diff --git a/src/com/songoda/epicfarming/hooks/Hook.java b/src/com/songoda/epicfarming/hooks/Hook.java deleted file mode 100644 index 6a3ec212b4bc6de28f1bcc72c4f22692e20fe9ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2142 zcmchY(Q4a35Jl(NU$OWh$h7DON?)2LG|-knzrb=_N5rv(w0!>q&MGT8{mxU3MHxQ?MnUP1sTvPoBfGlZUzXb_13=u;ji1PiXDwZU4U}x?(2Z z%P<*Yesl6$lFyxe#76sYz}j;%Z*4=)le0G?mA~b^rr`j>B6KNL@$=b^6=7PGpK5U< zObvIc#>*464xU+OV^X!6RYP(!Y-)he|Axd=ixxx zm-u{H7tcNX*Dl_}bVDvjHYMsp)=?F0(AfTUyIO_07RD|0MXi?3M19L%#c*Uw^WLyM zHCPqQB}8pfv`D(6?TXVs=d5T|HGgK_pH|KO>`S?KVT!e}(g;mvQettYP3vpC!=|hH zv3qB2>8f`>sy0A+av5Uj%hXrTl3b=np0cS@nJrPHqNk1NYek#8?zbU!=bZ0N;Hqn* XuZq4I)23_}RBt<=UHan8jNJYJ95!FE diff --git a/src/com/songoda/epicfarming/hooks/KingdomsHook.java b/src/com/songoda/epicfarming/hooks/KingdomsHook.java deleted file mode 100644 index e45d4e281702f05ba43e24e1777ee68388d2656a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2952 zcmb`JTW`}q5QXQtzryNMS|OLq0}rSYq7;z06wwC|Z@IO#+N8#IS}N#Y2fnkL!FJ+A zX+c)9YwzsLnKNhB{`K2(>)X)I`9HO>CCo2vVyTskQ=VPgh_#fp+%i^AxGS*8!fI+~ zSX{Edv}d-(m9dudq_FB9-VWzcUbUjg^S}9>fhMyHP^R{hTn08HH)UJ|+->hde~P87 z&bcynr}mDlhTxJXakGr7d*2va?WybrFCRhCXSP1FVv79{ktPAP>M~_kv0MI>i9AiQ z5w>x3uDeQa-A9Nd?;Nnj?byMU=v z?k9Lp?e%>2zG0yiu^Y9#XS-Zm=y;dk0jd~dTk${Qen1ry>d@?yB-|zT#P;lwJ>~zg zJq)vS?q`oNhs{CAbBKpw;Go1)vXFCWZ}6w?N{IPAL{`0JS+D%SqcFxR2W4hgbDW8F zcT^H8s~!;7iS6_2woHR%&vxdV)Nz_Qv};x4*1p7q(D(UR!a+_}h4pNEDevuhJh%2S zLmvq{GB`K{c|Y)|dMMIPM;zZNrFp*1Q!8DHT{A0IDzvX?QiS`uWnSMsN4HlY6EQzx zRn-Wd`S^?;3sz$n`qK~SNav|CmyQ=z>vr|qrODoxd+z%h_Qli6Yq&W2+fta~dvkOB z`QCNfD?-oq;lr(aYih9`>oMxkxiUrndb?aR)2SH|JAUW#=<^2zRJBqgQ zn>x^UJ0XN>FU#4*5g;1)UJ2KA#chdadMc8Uut@Lt~w)K k8;f6sDIDvY=Tq<$zh`^FPdAF?ld#Qi^VIa1@jb%-A6WF`LjV8( diff --git a/src/com/songoda/epicfarming/hooks/PlotSquaredHook.java b/src/com/songoda/epicfarming/hooks/PlotSquaredHook.java deleted file mode 100644 index 130424ac7db8703aaab615f69d6379ac479cfb27..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2020 zcmbuATW=FF5QXQtzrysPN-MPC^1uT^;ub_DBvAPUxop!_L$Yi(Kt%i3f$!LH_foF} zLRQw!+B4_OnHle|-&Wex=620uVb8OxpY!<6p4!+R+cTa|?2%t( z2R~!x681CDR2ixr;cgl3E^D9dtIxF%7xo^nsust;AFvhgg+Jfy{KT)AhEc+`ux|&p z&eGX)zHX$qD$Usoe(95;!bW!Ll^H_m)?Dzes%&bo&9JROv`oh>TxW_fBFA})N+o(! zHnQUZ^^SY2qisP4IqV9QoDl!i=R|r7ZwN73mt-v}*Y4-0^U|>dm1}MQ;i}G}$Nn78 zG~FF^3?9}*{T_3EGzc(Fcy4^aYbPXeQSSs%^F7=0Q#mY0f0(}dkJ=me6MyyU-5k&Ctz3OY# zjzj9Gp49n$2K}@5^VYo$Vm!C_3b*l`DwmoQZml`UCD`GH)=f5)_vokpHOR>F4n;1! dr|_*Dc|WNxYFB*p*sT`T*ADx(b?6PAe*j_?G<5&~ diff --git a/src/com/songoda/epicfarming/hooks/RedProtectHook.java b/src/com/songoda/epicfarming/hooks/RedProtectHook.java deleted file mode 100644 index 3ca95677afa757efabbd317a947ac51eb92b2cf6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal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RS0r(9JbfsytJ6Fc?I zOgx8^f8gx&qv)!j$!(vS|5g`KcRHYEcHwkL%xAE0=<3J6&qO>M|A$V}jCg%b3iI_k zMwjuB%l7?u_4}(1v0AT3TN_4cf4ZuaUw zRd-Xlp6g242kw+?uF?6gez&T|uW|}DwR`>k94rjTe?S*HU8NHL@1P!yx?g{Xxfy+K OMsJ^T)nkwn`1}NZCnFUA diff --git a/src/com/songoda/epicfarming/hooks/USkyBlockHook.java b/src/com/songoda/epicfarming/hooks/USkyBlockHook.java deleted file mode 100644 index 5aa64c45c65c21e14b31d230addaee1644d922e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2622 zcmbuB-EPxB5QXQuPhs`SRLJG$0tti!Ek#snDWc*5k~D3tCa#GcM1}h5z<1Uj;!SK+ zrLy96yt6as%$%9z_a7^5WD~pLeq~cjc)qo{Wmd5kyt}mv_A>TL%h|o;+X9O`>}Gb2 z#VzM6dt*CXIeR5<7FKWJ?Wm3NF^VG3kMp|(O>Q$#X7&LtV_U*aj28iS>|N-uu$0ve zSI+6o4m#g95%r%rArlk0D7y0b&~sC4b*8pEB7Xt-h^KzE%fPC}LRMq2Pr;mlb{2fh zL;NXLH~1LyR+wZl3fY$BdDuJnxA&fy$8AOTZI5e*YVPql4F1JviZT-X-EoiAk_4`a zy|jIMZm+n%uxH^ZYyIrAmc$hrsY<#N`id*DZyR_%;ZZ6}i25_cE{HDM)y^+`3T1PZ z;LPnu%RL$7sGSNNs?5;YepMzgm~r}wI0a|l^69tCf@Nw?+KjH^bTcr_S|<||KR@Yf zMf@`8BDLL~yzRCz-QL%nK29tJc?ITzEU6NzsA3I8^V414-3gHOAXwE$`Kg%~irLM! zd-c_Aq)Sz%$!yBEew7Msw>PuU*LCO`ug)n9#j@#maqP27ql$jUeojuBsyRAe?>p7d z^Qt!Q>qIY=Ep(R%Dd312egWdW|eBu?R@F&DOT$i&Ga1ml9(o1A96ea)w-w%6sD z=$Z)X^JDHhpY||y`!j4bOA3&j@|mL?)u4Kiq8+8Pm%{a%_Z?K4tMcOP|Cc@YTBI5*4z4S9CO>Os!LDEz$hqq(em%>+k0x){Kie_ZdLe*89m`_iAtK^J<{9 diff --git a/src/com/songoda/epicfarming/hooks/WorldGuardHook.java b/src/com/songoda/epicfarming/hooks/WorldGuardHook.java deleted file mode 100644 index 0918b78ea49bbf98024687678c6f3118ed1b35b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1704 zcmbuAOK;Oa6ov0Pzhab?+aj08f+B>3fC38yhz;vJjBBM$OzZ#=^shs|GxpSWJ&`J* zQSFK6KF+!K-09zcR@%%Kw&IyvW{&;Ft}L~R_nL1TTXL3iR$9U7H-2rgDEw(^7g%iY zuk5)^SOsS#U$#~cqOI)Ap4oRI{q(1o#LaEzqb>P5XTM?<_@(ys*5=)<&1bu0pZm

}%17)!zpJ>~h>9{OF{#yRC(!f{SE z=|c)q-iqa-eSA+$DaMig7g&XQ>8-ny-$WJ8W|bf<>_>~$S-f`+9Gya(y}&zenR?5_ zj#|xjdHOtJ8Vm^K>r5zvZ+KVKqVzRSY#QZ1ZSw|?@Gh7wX9-LzaIayjnyNR-b`;4K zJo~)+6B(bQz@e#7%>*l>G#27rv+sVrv`^GtDpD7g?7FjI=jXn&!aM`Nl%V%3Dx!%H zkG>|=uLoG&RlCD>sQ*K?u0bTt#`+MrNaHmKwjNQ*TwH*v0*M&u9+Og=IZFl#O8wN< zeu^u&h<)kjOEamS1dESEydqwsiW3k`{Y>w%Zze%KclL)Bp9$3^+-)g&)?ljJ9OEiB zbsJZy-^0NFnvBg|vVghtbM%EIE<;;<7Bt{pZD>a`Kl49P3{QcmT7m7*>1 zE5#A-5$&^&Q1P8&9myryjFk{iWtvHS|L19Y`d(3ml?S=zEPDF<#dan$naZRS1w~^? z=L@O8dPS$sW19Q^9r#6Z^9{)Y>jhH9U71m&Ez7iQ#{r63Z_ZXOOYGh}BZfC!1+vt$ z;m{knR2JvNH8mzq9Rg8#YQgJ zzjq(Oh~6UQPZ64e^cW^B@5*>PPgM6cLzl`EKI##BjFg3fee7{>@a#gTf6Srp zxwJFAdkrGnFB228(sge~Ez}#XbV_svo!s*Lc~*25`mocL-Ewa#`dEW^40<}zbAM-& X&cDo{7km1@$~+I&v#^`h5TWfSHMr?{ diff --git a/src/com/songoda/epicfarming/player/PlayerData.java b/src/com/songoda/epicfarming/player/PlayerData.java deleted file mode 100644 index 69ca742b425de31191e9d08bda3f908b85843625..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1122 zcmbW0K~BRk5Jmr*Q+U~Kask8!RY>gEZ~zKT2@PqKxRolz)qyu|O&myQgsjA#8PClB z-}c9+YCY&t8~$spS1TVi~bo1<@Rang9YiiC4ENfAt7LW0xYgpM zKuu(c-}Ev?O`(?IdbJmLJ)hHC(9N;3QNybU9eg;E9IIkqNi6oUU7haHYkbG5L>=At z2|8V|y8>&;u-r5|WsoWoQP0j`nN!<%MLco#dWKJnWH&ui5 Q4P}FMhE8byOEb>t3)Pvlt^fc4 diff --git a/src/com/songoda/epicfarming/utils/ConfigWrapper.java b/src/com/songoda/epicfarming/utils/ConfigWrapper.java deleted file mode 100644 index 75b1145d2d222ebfbaa66e7fa77b7bfddf178006..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3634 zcmb_f+iuf95S{0K#llls(Dnlm5>iVgPz8ueARd$8rlz@Axlt7Q>%cj?nR+%^JFbc> z$F6sGE@#f1-TwJ2mGosOxA+}NAr9{|nTVGKo>P3A$#;x-j8#%%^csK7F{2ElURJWi z`xx_I$q}v+V-;4-@!f^z2&)H}cZ;jUS08*#VX1`u6=wE>4f^xp>log=Tm-v?oP|ho zv+42w`TK@ACdlOJ{wi2mAva>=*o>E3^B*3S+h&nSmPdVD|;#@xQ=b2j7hCBH_0YD`=5vK=GF$efLzm2u2{E3_2V^|K+sp8sy;wYaqjj65 z#k?8kUg*MhBpJy9G4=5z+tjK<>?iZqjBWVbQ7Xyul215_5^tF5h**Oqs4lE zeGb!TCpU7)RvNw9Nxxbf_bruLquM2^O$N<@HT9A;F68HfN~SeS(I-3DTT$cND|Hj> zM`kr)&KRf`>~hPZo*W0QP;B){&s35wbMto7sEAw5YV}frwN84W7wT-CJPTZyLT|>n znsQPrmPH=DRsieEtunIPn4=HOA}e;i<@0B4)qY!@RTC^u>Hg@p5!o4xDBl~3$PkgL zQjv-5jjnh+w$?UR&6zfqVW*$MvyJBQ9gycovr?wa$>U@r^1!OzITzb{TPr;%4tr30 z#O9zGAGXLD6?VsS*y5Rr>|CNpd-$E>ui^>4)W)$|OWG=%$0^4r* zGs>3h$#Y=F-RA;0>P{Ft;RV*_6kB!A?vIE2HCNH7=7-OV@l3U=l4(cxl73Jm(zv?S zvq@#U*K)UpPJZJ`J60pyo!g{Ail5bhT*u^egPp+h)t(rnXOIgHK18Yk?ET+h*F%-~Q}SfTrWS35UP diff --git a/src/com/songoda/epicfarming/utils/CropType.java b/src/com/songoda/epicfarming/utils/CropType.java deleted file mode 100644 index a7180cfc3fc59b4f96bff49617a09123d0e5ae10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6352 zcmdT|+in|24CQmaVv#3VD3tdW0a~j<8nkr;OM%fRLzd-Kux^mn34$WO-u4`hnAx2j zS}Uk%Y%HX`49PjX49S_l|B;PMWGeUg{~$9d@Vu6#^kj$o3g6api?JTYHZsTP9p1K} znCoay9;C$c0`xz~3tV%IZNRm~_d@Ri3f$`m5&K=%KyTE-4&NXH!F!mYu8K^k=5kF#?V7`TFLzD&P<9()l6KFtWrThsx zK232a)eR_Y_ND4Q2kjhRZ*}xD{`>oxcXEmEH>%%i&-DuT4fN#Pv{V6#72cN>zVRM! zA%B6IvxVzQevtum9!p1F$`!E96x~bt4iu@qdcbih?_?+=XFSTw^N%pwKz;`Q86;GZ z^nv11r3Wm1;Ml6xC6MK%Re26mT+3VNIe=Ej(55(t(0{BJd#5%V!WX65Z0+K#@*FdF zp0+A2>XhOew#j$Rkgwt`P@bJY1=b z2f%*~j}3JG3p|hZJ`C|{>v;*i7SL(s>Xeg_M;R#(jX#EeDDQ!L2#dXy6!%b9=SK6A zkJyutM^&e8L-QE=3s`)txq#whcA%D(=mF7*?Ns^ zeV-lOfs^?^|sBur8Tic4w_*CGLIoMj@|3 zmGe!L$G32h;*ZnHCeQ8>i>F19>Ww}w(~p%P)gQ0Q{Zgx_v9B>5y3pzk;>!AvumZRu z*fHE9BH3%0b=gI+`=REcLkrzc)i$ATs>=TnD~vNd;Lh&GxQ~;{p2nosdz<sg+Ol&L3|5Y3m&y+o|61{oc+u%tw}K z3+Tye&i&3Eau&Oi|8I3g6uwTUdU6Eqa@{~%KN`j~!jAP~Un>E7mO?)1bI9(r_yoV5 z?un=H2lua2eDQ5UuZ7(+tAy=X*;9s|o_pWsemm^!S);grsoS;w#yrV02Fhb(EcbG4 z?;m1>ar79*67vuTD_>mfEp)GBTs4Q6u(WJkj9!1*xe`=%_!bUBZcg zRlu(JxtZq_w3ykOJ3F31gtGqv%*ZOo^W)IhJmC4ZmQCB& j1*-uzTd~iy>G$Uo{r_E!2(_o0_wzNvyi=tN72?akE|S>T diff --git a/src/com/songoda/epicfarming/utils/Debugger.java b/src/com/songoda/epicfarming/utils/Debugger.java deleted file mode 100644 index d57ed77d150f1894f76293e1a085858c8d6ea333..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1818 zcmd6o+fKqj5QgWPr`T{+Nh}^NyfECT_yEESP${*swoO}4F}}L`%`OeJ9K?hKvtf6; zJ3EJeW`4fDC6|fZ%Oi6np&0g=Jc%zQYsy(BQ|^53a*4T}@l_xZ+go3rrDC5Te<>YC z%w5i_g7d#?8_uoVHmo?!ed#eeXzlU4#zKfx#XRLZkay;$*T%+RD=F6GK1*8l8HaptWQexj}cpZDg@2IQc+chnbJ&+Y)coBd6&F>#_B%Ku0Qf7DI=O zCqsF|mZGZiinZbEXl|p{U#~H^8}X1Vm%Q?j-}It>IRY2;E3{e7Y`%P~7U)VjPnbRF z%HV*bOB9;p+UNGVYYby~AWj2T8F3}duQtkvGeypj9fxy4{F({HJS7i`i=q+Qs?vH= zbPQQ?Ro|>fAH4SC@v$6k{1!t#$cqokh<9q3jeY8KG)P^X{%-0>SXQO zWP zYd7ST`LD^kyv80DXAS28^wWSQ7$x+4>U@MFg07rb^8N>AbDcfHbtA)+F+~)Wz-cCe zwTbqAieHuG3{w&HJU05Z`{}dUbH2w$kfsZHTHuia{T+V!Gh;K89H`w{biJpJ$G{sJ zv@qHoLOhl21dGCBbi&IJZs+OSU9w73cM~3 ze>GP*&v=-(Zy61Cz>NQ3tJxxr{5_G8z&mJD$Jpsgqi6OU>U^(92_^JXhj9oQpNM^2HM4uQ@tg?MBh z#&a#mo*EN+R<@37+3t3%cz4?=(gL;yj=-rRZ!*s;uO`YUWS`$v#@L|`ecIaiSlqcY zYqPDcWc~%Up@w4i!j( zu{Jc_Q44oWn-5;6T2zDB41>k!6K0wvPrWjvfb%E?%2`sy=D^~_l|r+ z4*7uI<^cD{cy43C?-V~_4ZB=MqGNA8p}6*hEGRwoVp-7J%KS*9_bzRy-|5-yvTAzq z;+pT<$acc^J)4$ce|Mb4;ibt)3G774eVKe+M6wFWG$WKr7W$O()^nI6d}*SYcYptF zU|tsgiN42IVF8;@^JDla#p&bs&;0t)fra&pgjT7liE36}-}Cb`zOJE{*!T0uWKvdM z>-YSEa)s;pnbo;31uhI18LO}ng9R* diff --git a/src/com/songoda/epicfarming/utils/SettingsManager.java b/src/com/songoda/epicfarming/utils/SettingsManager.java deleted file mode 100644 index d1078c60700c361c18ef8cf40c4e13b031604230..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18766 zcmeHPZF3v95yof#3R=_Y&`HWjcKnvQXmGO|A470_>bc~6dTtxf{EFYJxNE$QaAkxm?Z+)iV|^;69}+2Dp6({- zk^4F&&XBWu2~E7gr;mB`++U(!ZTqZ3Zj=<|GVqdX+w(`??*N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?cz9nb-09u#LmxGq_>32ZRUF;>u zyU7LftZ*jLo_H{qC)cT1q^QR*TRqwPQF}m?0mf#1u_`lS^^)5`ZNze#T~tIK<0SqD zG8|RDx;5)RC`{}JUBa6A+`6=>}zp8JDc-Q$#IN-{2sVXYq5+gR*6jgg1(pY z*JIcyBYoLRcHke3Q>^e?R>c2F;tYLgH=$nmRm78YeT{AKTHqGlOQ6Uz@FO z`IR8^klo1cY3un}d{Y^5%SULQBcNQ@A@e=#77;^UwVcD<3Prsy%-s|FUj(=V${JCi zc^{SK5{LIH^q%-E;{8-}Wtx1uxwYOvE_6AwJy4M>d{ z(TU&pyFoVF$(k5 zZ9i6-KKEE@x5HQ>8Q4bORweTE*S(m@qCR+d?iOCjX3;u{vWmo>qY items = (List)dataFile.getConfig().getList("Farms." + locationStr + ".Contents"); + + Farm farm = new Farm(location, levelManager.getLevel(level)); + farm.loadInventory(items); + + farmManager.addFarm(location, farm); + } + } + playerActionManager = new PlayerActionManager(); + + hooks = new HookHandler(); + hooks.hook(); + + farmingHandler = new FarmingHandler(this); + growthHandler = new GrowthHandler(this); + references = new References(); + + this.getCommand("EpicFarming").setExecutor(new CommandHandler(this)); + + getServer().getPluginManager().registerEvents(new BlockListeners(this), this); + getServer().getPluginManager().registerEvents(new InteractListeners(this), this); + getServer().getPluginManager().registerEvents(new InventoryListeners(this), this); + getServer().getPluginManager().registerEvents(new EntityListeners(), this); + + this.getServer().getPluginManager().registerEvents(this, this); + + new MCUpdate(this, true); + + console.sendMessage(Arconix.pl().getApi().format().formatText("&a=============================")); + } + + public void onDisable() { + saveToFile(); + for (PlayerData playerData : playerActionManager.getRegisteredPlayers()) { + if (playerData.getPlayer() != null) + playerData.getPlayer().closeInventory(); + } + CommandSender console = Bukkit.getConsoleSender(); + dataFile.saveConfig(); + console.sendMessage(Arconix.pl().getApi().format().formatText("&a=============================")); + console.sendMessage(Arconix.pl().getApi().format().formatText("&7EpicFarming " + this.getDescription().getVersion() + " by &5Brianna <3!")); + console.sendMessage(Arconix.pl().getApi().format().formatText("&7Action: &cDisabling&7...")); + console.sendMessage(Arconix.pl().getApi().format().formatText("&a=============================")); + } + + /* + * Saves registered farms to file. + */ + private void saveToFile() { + + // Wipe old kit information + dataFile.getConfig().set("Farms", null); + + /* + * Dump FarmManager to file. + */ + for (Farm farm : farmManager.getFarms().values()) { + String locationStr = Arconix.pl().getApi().serialize().serializeLocation(farm.getLocation()); + dataFile.getConfig().set("Farms." + locationStr + ".level", farm.getLevel().getLevel()); + dataFile.getConfig().set("Farms." + locationStr + ".Contents", farm.dumpInventory()); + } + + //Save to file + dataFile.saveConfig(); + + } + + public void reload() { + langFile.createNewFile("Loading Language File", "EpicFarming Language File"); + hooks.hooksFile.createNewFile("Loading hooks File", "EpicFarming hooks File"); + hooks = new HookHandler(); + hooks.hook(); + loadLanguageFile(); + references = new References(); + reloadConfig(); + saveConfig(); + } + + private void setupConfig() { + settingsManager.updateSettings(); + + if (!getConfig().contains("settings.levels.Level-1")) { + getConfig().addDefault("settings.levels.Level-1.Radius", 1); + getConfig().addDefault("settings.levels.Level-1.Speed-Multiplier", 1); + getConfig().addDefault("settings.levels.Level-1.Cost-xp", 20); + getConfig().addDefault("settings.levels.Level-1.Cost-eco", 5000); + + getConfig().addDefault("settings.levels.Level-2.Radius", 2); + getConfig().addDefault("settings.levels.Level-2.Speed-Multiplier", 1.5); + getConfig().addDefault("settings.levels.Level-2.Auto-Harvest", true); + getConfig().addDefault("settings.levels.Level-2.Cost-xp", 20); + getConfig().addDefault("settings.levels.Level-2.Cost-eco", 5000); + + getConfig().addDefault("settings.levels.Level-3.Radius", 3); + getConfig().addDefault("settings.levels.Level-3.Speed-Multiplier", 1.5); + getConfig().addDefault("settings.levels.Level-3.Auto-Harvest", true); + getConfig().addDefault("settings.levels.Level-3.Auto-Replant", true); + getConfig().addDefault("settings.levels.Level-3.Cost-xp", 25); + getConfig().addDefault("settings.levels.Level-3.Cost-eco", 7500); + + getConfig().addDefault("settings.levels.Level-4.Radius", 3); + getConfig().addDefault("settings.levels.Level-4.Speed-Multiplier", 2); + getConfig().addDefault("settings.levels.Level-4.Auto-Harvest", true); + getConfig().addDefault("settings.levels.Level-4.Auto-Replant", true); + getConfig().addDefault("settings.levels.Level-4.Cost-xp", 30); + getConfig().addDefault("settings.levels.Level-4.Cost-eco", 10000); + + getConfig().addDefault("settings.levels.Level-5.Radius", 3); + getConfig().addDefault("settings.levels.Level-5.Speed-Multiplier", 2.5); + getConfig().addDefault("settings.levels.Level-5.Auto-Harvest", true); + getConfig().addDefault("settings.levels.Level-5.Auto-Replant", true); + getConfig().addDefault("settings.levels.Level-5.Cost-xp", 35); + getConfig().addDefault("settings.levels.Level-5.Cost-eco", 12000); + + getConfig().addDefault("settings.levels.Level-6.Radius", 4); + getConfig().addDefault("settings.levels.Level-6.Speed-Multiplier", 3); + getConfig().addDefault("settings.levels.Level-6.Auto-Harvest", true); + getConfig().addDefault("settings.levels.Level-6.Auto-Replant", true); + getConfig().addDefault("settings.levels.Level-6.Cost-xp", 40); + getConfig().addDefault("settings.levels.Level-6.Cost-eco", 25000); + } + + getConfig().options().copyDefaults(true); + saveConfig(); + } + + private void loadLanguageFile() { + Lang.setFile(langFile.getConfig()); + + for (final Lang value : Lang.values()) { + langFile.getConfig().addDefault(value.getPath(), value.getDefault()); + } + + langFile.getConfig().options().copyDefaults(true); + langFile.saveConfig(); + } + + private void loadDataFile() { + dataFile.getConfig().options().copyDefaults(true); + dataFile.saveConfig(); + } + + public static EpicFarming pl() { + return INSTANCE; + } + + public static EpicFarming getInstance() { + return INSTANCE; + } + + public FarmManager getFarmManager() { + return farmManager; + } + + public LevelManager getLevelManager() { + return levelManager; + } + + public FarmingHandler getFarmingHandler() { + return farmingHandler; + } + + public PlayerActionManager getPlayerActionManager() { + return playerActionManager; + } + + public GrowthHandler getGrowthHandler() { + return growthHandler; + } +} diff --git a/src/main/java/com/songoda/epicfarming/Lang.java b/src/main/java/com/songoda/epicfarming/Lang.java new file mode 100644 index 0000000..838769f --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/Lang.java @@ -0,0 +1,111 @@ +package com.songoda.epicfarming; + +import org.bukkit.ChatColor; +import org.bukkit.configuration.file.FileConfiguration; + +public enum Lang { + + PREFIX("prefix", "&8[&6EpicFarming&8]"), + NEXT("Next", "&9Next"), + BACK("Back", "&9Back"), + + XPTITLE("Xp-upgrade-title", "&aUpgrade with XP"), + XPLORE("Xp-upgrade-lore", "&7Cost: &a{COST} Levels"), + + ECOTITLE("Eco-upgrade-title", "&aUpgrade with ECO"), + ECOLORE("Eco-upgrade-lore", "&7Cost: &a${COST}"), + + LEVEL("Level", "&6Farm Level &7{LEVEL}"), + NEXT_LEVEL("Next-Level", "&6Next Level &7{LEVEL}"), + + NEXT_RADIUS("Next-Radius", "&7Radius: &6{RADIUS}"), + NEXT_SPEED("Next-Speed", "&7Speed: &6{SPEED}x"), + NEXT_AUTO_HARVEST("Next-Auto-Harvest", "&7Auto Harvest: &6{AUTOHARVEST}"), + NEXT_AUTO_REPLANT("Next-Auto-Replant", "&7Auto Replant: &6{AUTOREPLANT}"), + + CANT_AFFORD("Cant-afford", "&cYou cannot afford this upgrade."), + + UPGRADE_MESSAGE("Upgrade-message", "&7You successfully upgraded this farm to &6level {LEVEL}&7!"), + + MAXED("Maxed", "&6This farm is maxed out."), + + YOU_MAXED("You-Maxed", "&7You maxed out this farm at &6{NEW}x&7."), + + NAME_FORMAT("Name-format", "&eLevel {LEVEL} &fFarm"), + + NO_PERMS("No-perms", "&cYou do not have permission to do that."); + + private String path; + private String def; + private static FileConfiguration LANG; + + Lang(String path, String start) { + this.path = path; + this.def = start; + } + + public static void setFile(final FileConfiguration config) { + LANG = config; + } + + public String getDefault() { + return this.def; + } + + public String getPath() { + return this.path; + } + + public String getConfigValue() { + return getConfigValue(null, null, null); + } + + public String getConfigValue(String arg) { + return getConfigValue(arg, null, null); + } + + public String getConfigValue(int arg) { + return getConfigValue(Integer.toString(arg)); + } + + public String getConfigValue(double arg) { + return getConfigValue(Double.toString(arg)); + } + + public String getConfigValue(boolean arg) { + return getConfigValue(Boolean.toString(arg)); + } + + public String getConfigValue(String arg, String arg2, String arg3) { + String value = ChatColor.translateAlternateColorCodes('&', LANG.getString(this.path, this.def)); + + if (arg != null) { + value = value.replace("{COST}", arg); + value = value.replace("{GOAL}", arg); + value = value.replace("{NEW}", arg); + value = value.replace("{MAX}", arg); + value = value.replace("{AMT}", arg); + value = value.replace("{LEVEL}", arg); + value = value.replace("{NEWM}", arg); + + value = value.replace("{RADIUS}", arg); + value = value.replace("{SPEED}", arg); + value = value.replace("{AUTOHARVEST}", arg); + value = value.replace("{AUTOREPLANT}", arg); + + if (arg2 != null) { + value = value.replace("{TYPE}", arg2); + } + value = value.replace("{TYPE}", arg); + if (arg3 != null) + value = value.replace("{TIME}", arg3); + } + + if (arg2 != null) { + value = value.replace("{COST}", arg2).replace("{GOAL}", arg2).replace("{NEW}", arg2).replace("{MAX}", arg2).replace("{AMT}", arg2) + .replace("{LEVEL}", arg2).replace("{TYPE}", arg2).replace("{NEWM}", arg2); + } + + return value; + } +} diff --git a/src/main/java/com/songoda/epicfarming/References.java b/src/main/java/com/songoda/epicfarming/References.java new file mode 100644 index 0000000..73c6415 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/References.java @@ -0,0 +1,14 @@ +package com.songoda.epicfarming; + +public class References { + + private String prefix; + + public References() { + prefix = Lang.PREFIX.getConfigValue() + " "; + } + + public String getPrefix() { + return this.prefix; + } +} diff --git a/src/main/java/com/songoda/epicfarming/events/BlockListeners.java b/src/main/java/com/songoda/epicfarming/events/BlockListeners.java new file mode 100644 index 0000000..41a3950 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/events/BlockListeners.java @@ -0,0 +1,130 @@ +package com.songoda.epicfarming.events; + +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.farming.Farm; +import com.songoda.epicfarming.farming.FarmManager; +import com.songoda.epicfarming.farming.Level; +import com.songoda.epicfarming.utils.Debugger; +import com.songoda.epicfarming.utils.Methods; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.event.block.BlockFadeEvent; +import org.bukkit.event.block.BlockGrowEvent; +import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.inventory.ItemStack; + +/** + * Created by songoda on 3/14/2017. + */ +public class BlockListeners implements Listener { + + private EpicFarming instance; + + public BlockListeners(EpicFarming instance) { + this.instance = instance; + } + + @EventHandler + public void onBlockFade(BlockFadeEvent e) { + try { + if (checkForFarm(e.getBlock().getLocation())) { + e.setCancelled(true); + } + + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + @EventHandler + public void onGrow(BlockGrowEvent e) { + try { + if (checkForFarm(e.getNewState().getLocation())) { + e.setCancelled(true); + } + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) + public void onBlockPlace(BlockPlaceEvent e) { + try { + if (e.getPlayer().getItemInHand().getType() != Material.END_ROD + || Methods.getLevelFromItem(e.getItemInHand()) == 0) return; + + if (e.getBlockAgainst().getType() == Material.END_ROD) e.setCancelled(true); + + Location location = e.getBlock().getLocation(); + + Farm farm = new Farm(location, instance.getLevelManager().getLevel(Methods.getLevelFromItem(e.getItemInHand()))); + instance.getFarmManager().addFarm(location, farm); + + farm.tillLand(e.getBlock().getLocation()); + + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + private boolean checkForFarm(Location location) { + + FarmManager farmManager = instance.getFarmManager(); + + Block block = location.getBlock(); + for(Level level : instance.getLevelManager().getLevels().values()) { + int radius = level.getRadius(); + int bx = block.getX(); + int by = block.getY(); + int bz = block.getZ(); + for (int fx = -radius; fx <= radius; fx++) { + for (int fy = -2; fy <= 1; fy++) { + for (int fz = -radius; fz <= radius; fz++) { + Block b2 = block.getWorld().getBlockAt(bx + fx, by + fy, bz + fz); + if (b2.getType() == Material.END_ROD) { + if (!farmManager.getFarms().containsKey(b2.getLocation())) continue; + if (level.getRadius() != farmManager.getFarm(b2.getLocation()).getLevel().getRadius()) continue; + return true; + } + + } + } + } + } + return false; + } + + @EventHandler(priority = EventPriority.HIGHEST) + public void onBlockBreak(BlockBreakEvent event) { + try { + if (event.getBlock().getType() != Material.END_ROD) return; + + Farm farm = instance.getFarmManager().removeFarm(event.getBlock().getLocation()); + + instance.getFarmingHandler().getCrops(farm, false); + + if (farm == null) return; + + event.setCancelled(true); + + ItemStack item = Methods.makeFarmItem(farm.getLevel().getLevel()); + + Block block = event.getBlock(); + + block.setType(Material.AIR); + block.getLocation().getWorld().dropItemNaturally(block.getLocation().add(.5,.5,.5), item); + + for (ItemStack itemStack : farm.dumpInventory()) { + if (itemStack == null) continue; + farm.getLocation().getWorld().dropItemNaturally(farm.getLocation().add(.5,.5,.5), itemStack); + } + } catch (Exception ex) { + Debugger.runReport(ex); + } + } +} diff --git a/src/main/java/com/songoda/epicfarming/events/EntityListeners.java b/src/main/java/com/songoda/epicfarming/events/EntityListeners.java new file mode 100644 index 0000000..2d8fdbe --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/events/EntityListeners.java @@ -0,0 +1,27 @@ +package com.songoda.epicfarming.events; + +import com.songoda.epicfarming.utils.Debugger; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityDeathEvent; +import org.bukkit.event.inventory.InventoryMoveItemEvent; + +public class EntityListeners implements Listener { + + @EventHandler + public void onHop(InventoryMoveItemEvent e) { + try { + + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + @EventHandler + public void ondrop(EntityDeathEvent e) { + try { + } catch (Exception ex) { + Debugger.runReport(ex); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicfarming/events/InteractListeners.java b/src/main/java/com/songoda/epicfarming/events/InteractListeners.java new file mode 100644 index 0000000..de9c991 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/events/InteractListeners.java @@ -0,0 +1,39 @@ +package com.songoda.epicfarming.events; + +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.utils.Debugger; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.player.PlayerInteractEvent; + +/** + * Created by songoda on 3/14/2017. + */ +public class InteractListeners implements Listener { + + private EpicFarming instance; + + public InteractListeners(EpicFarming instance) { + this.instance = instance; + } + + @EventHandler + public void onBlockInteract(PlayerInteractEvent e) { + try { + if (e.getClickedBlock() != null && e.getClickedBlock().getType() != Material.END_ROD) return; + + if (e.getAction() != Action.RIGHT_CLICK_BLOCK) return; + + Location location = e.getClickedBlock().getLocation(); + + if (instance.getFarmManager().getFarms().containsKey(location)) { + instance.getFarmManager().getFarm(location).view(e.getPlayer()); + } + } catch (Exception ex) { + Debugger.runReport(ex); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicfarming/events/InventoryListeners.java b/src/main/java/com/songoda/epicfarming/events/InventoryListeners.java new file mode 100644 index 0000000..3b8418e --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/events/InventoryListeners.java @@ -0,0 +1,70 @@ +package com.songoda.epicfarming.events; + +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.farming.Farm; +import com.songoda.epicfarming.player.PlayerData; +import com.songoda.epicfarming.utils.Debugger; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryCloseEvent; +import org.bukkit.event.inventory.InventoryType; + +/** + * Created by songoda on 3/14/2017. + */ +public class InventoryListeners implements Listener { + + private EpicFarming instance; + + public InventoryListeners(EpicFarming instance) { + this.instance = instance; + } + + @EventHandler + public void onInventoryClick(InventoryClickEvent event) { + try { + if (instance.getPlayerActionManager().getPlayerAction((Player)event.getWhoClicked()).getFarm() == null + || event.getInventory() == null) return; + + + if (event.getInventory().getType() != InventoryType.CHEST) return; + + PlayerData playerData = instance.getPlayerActionManager().getPlayerAction((Player)event.getWhoClicked()); + Farm farm = playerData.getFarm(); + if (event.getSlot() <= 26) { + event.setCancelled(true); + } + + Player player = (Player)event.getWhoClicked(); + + if (event.getSlot() == 11 && player.hasPermission("EpicFarming.Upgrade.XP")) { + if (!event.getCurrentItem().getItemMeta().getDisplayName().equals("§l")) { + farm.upgrade("XP", player); + player.closeInventory(); + } + } else if (event.getSlot() == 15 && player.hasPermission("EpicFarming.Upgrade.ECO")) { + if (!event.getCurrentItem().getItemMeta().getDisplayName().equals("§l")) { + farm.upgrade("ECO", player); + player.closeInventory(); + } + } + + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + @EventHandler + public void onClose(InventoryCloseEvent event) { + try { + if (instance.getPlayerActionManager().getRegisteredPlayers().size() == 0 + || instance.getPlayerActionManager().getPlayerAction((Player)event.getPlayer()).getFarm() != null) return; + + instance.getPlayerActionManager().getPlayerAction((Player)event.getPlayer()).setFarm(null); + } catch (Exception ex) { + Debugger.runReport(ex); + } + } +} diff --git a/src/main/java/com/songoda/epicfarming/farming/Crop.java b/src/main/java/com/songoda/epicfarming/farming/Crop.java new file mode 100644 index 0000000..73218f2 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/farming/Crop.java @@ -0,0 +1,32 @@ +package com.songoda.epicfarming.farming; + +import org.bukkit.Location; + +public class Crop { + + private Location location; + + private int ticksLived = 1; + private Farm farm; + + public Crop(Location location, Farm farm) { + this.location = location; + this.farm = farm; + } + + public int getTicksLived() { + return ticksLived; + } + + public void setTicksLived(int ticksLived) { + this.ticksLived = ticksLived; + } + + public Farm getFarm() { + return farm; + } + + public Location getLocation() { + return location; + } +} diff --git a/src/main/java/com/songoda/epicfarming/farming/Farm.java b/src/main/java/com/songoda/epicfarming/farming/Farm.java new file mode 100644 index 0000000..aa1e425 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/farming/Farm.java @@ -0,0 +1,296 @@ +package com.songoda.epicfarming.farming; + + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.Lang; +import com.songoda.epicfarming.player.PlayerData; +import com.songoda.epicfarming.utils.Debugger; +import com.songoda.epicfarming.utils.Methods; +import net.milkbowl.vault.economy.Economy; +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryHolder; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.plugin.RegisteredServiceProvider; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +public class Farm implements InventoryHolder { + + private Location location; + private Level level; + private Inventory inventory; + + public Farm(Location location, Level level) { + this.location = location; + this.level = level; + this.inventory = Bukkit.createInventory(null, 54, Methods.formatName(level.getLevel(),false)); + } + + public void view(Player player) { + try { + if (!player.hasPermission("epicfarming.view")) + return; + + setupOverview(player); + + player.openInventory(inventory); + PlayerData playerData = EpicFarming.getInstance().getPlayerActionManager().getPlayerAction(player); + + playerData.setFarm(this); + + getInventory(); + + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + public void setupOverview(Player player) { + Inventory inventory = Bukkit.createInventory(null, 54, Methods.formatName(level.getLevel(),false)); + inventory.setContents(this.inventory.getContents()); + this.inventory = inventory; + + EpicFarming instance = EpicFarming.getInstance(); + + Level nextLevel = instance.getLevelManager().getHighestLevel().getLevel() > level.getLevel() ? instance.getLevelManager().getLevel(level.getLevel()+1) : null; + + int level = this.level.getLevel(); + + ItemStack item = new ItemStack(Material.END_ROD, 1); + ItemMeta itemmeta = item.getItemMeta(); + itemmeta.setDisplayName(Arconix.pl().getApi().format().formatText(Lang.LEVEL.getConfigValue(level))); + ArrayList lore = this.level.getDescription(); + lore.add(""); + if (nextLevel == null) lore.add(Lang.MAXED.getConfigValue()); + else { + lore.add(Lang.NEXT_LEVEL.getConfigValue(nextLevel.getLevel())); + lore.addAll(nextLevel.getDescription()); + } + + itemmeta.setLore(lore); + item.setItemMeta(itemmeta); + + ItemStack itemXP = new ItemStack(Material.valueOf(instance.getConfig().getString("Interfaces.XP Icon")), 1); + ItemMeta itemmetaXP = itemXP.getItemMeta(); + itemmetaXP.setDisplayName(Lang.XPTITLE.getConfigValue()); + ArrayList loreXP = new ArrayList<>(); + if (nextLevel != null) + loreXP.add(Lang.XPLORE.getConfigValue(Integer.toString(nextLevel.getCostExperiance()))); + else + loreXP.add(Lang.MAXED.getConfigValue()); + itemmetaXP.setLore(loreXP); + itemXP.setItemMeta(itemmetaXP); + + ItemStack itemECO = new ItemStack(Material.valueOf(instance.getConfig().getString("Interfaces.Economy Icon")), 1); + ItemMeta itemmetaECO = itemECO.getItemMeta(); + itemmetaECO.setDisplayName(Lang.ECOTITLE.getConfigValue()); + ArrayList loreECO = new ArrayList<>(); + if (nextLevel != null) + loreECO.add(Lang.ECOLORE.getConfigValue(Arconix.pl().getApi().format().formatEconomy(nextLevel.getCostExperiance()))); + else + loreECO.add(Lang.MAXED.getConfigValue()); + itemmetaECO.setLore(loreECO); + itemECO.setItemMeta(itemmetaECO); + + int nu = 0; + while (nu != 27) { + inventory.setItem(nu, Methods.getGlass()); + nu++; + } + if (instance.getConfig().getBoolean("Main.Upgrade With XP") && player != null && player.hasPermission("EpicDispensers.Upgrade.XP")) { + inventory.setItem(11, itemXP); + } + + inventory.setItem(13, item); + + if (instance.getConfig().getBoolean("Main.Upgrade With Economy") && player != null && player.hasPermission("EpicDispensers.Upgrade.ECO")) { + inventory.setItem(15, itemECO); + } + + inventory.setItem(0, Methods.getBackgroundGlass(true)); + inventory.setItem(1, Methods.getBackgroundGlass(true)); + inventory.setItem(2, Methods.getBackgroundGlass(false)); + inventory.setItem(6, Methods.getBackgroundGlass(false)); + inventory.setItem(7, Methods.getBackgroundGlass(true)); + inventory.setItem(8, Methods.getBackgroundGlass(true)); + inventory.setItem(9, Methods.getBackgroundGlass(true)); + inventory.setItem(10, Methods.getBackgroundGlass(false)); + inventory.setItem(16, Methods.getBackgroundGlass(false)); + inventory.setItem(17, Methods.getBackgroundGlass(true)); + inventory.setItem(18, Methods.getBackgroundGlass(true)); + inventory.setItem(19, Methods.getBackgroundGlass(true)); + inventory.setItem(20, Methods.getBackgroundGlass(false)); + inventory.setItem(24, Methods.getBackgroundGlass(false)); + inventory.setItem(25, Methods.getBackgroundGlass(true)); + inventory.setItem(26, Methods.getBackgroundGlass(true)); + } + + @Override + public Inventory getInventory() { + return inventory; + } + + public void loadInventory(List items) { + setupOverview(null); + int i = 27; + for (ItemStack item : items) { + inventory.setItem(i++, item); + } + } + + public List dumpInventory() { + List items = new ArrayList<>(); + + for(int i=27; i < inventory.getSize(); i++) { + items.add(inventory.getItem(i)); + } + + return items; + } + + public void upgrade(String type, Player player) { + try { + EpicFarming instance = EpicFarming.getInstance(); + if (instance.getLevelManager().getLevels().containsKey(this.level.getLevel()+1)) { + + Level level = instance.getLevelManager().getLevel(this.level.getLevel()+1); + int cost; + if (type == "XP") { + cost = level.getCostExperiance(); + } else { + cost = level.getCostEconomy(); + } + + if (type == "ECO") { + if (instance.getServer().getPluginManager().getPlugin("Vault") != null) { + RegisteredServiceProvider rsp = instance.getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class); + net.milkbowl.vault.economy.Economy econ = rsp.getProvider(); + if (econ.has(player, cost)) { + econ.withdrawPlayer(player, cost); + upgradeFinal(level, player); + } else { + player.sendMessage(instance.references.getPrefix() + Lang.CANT_AFFORD.getConfigValue(null)); + } + } else { + player.sendMessage("Vault is not installed."); + } + } else if (type == "XP") { + if (player.getLevel() >= cost || player.getGameMode() == GameMode.CREATIVE) { + if (player.getGameMode() != GameMode.CREATIVE) { + player.setLevel(player.getLevel() - cost); + } + upgradeFinal(level, player); + } else { + player.sendMessage(instance.references.getPrefix() + Lang.CANT_AFFORD.getConfigValue(null)); + } + } + } + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + + public void upgradeFinal(Level level, Player player) { + try { + EpicFarming instance = EpicFarming.getInstance(); + this.level = level; + if (instance.getLevelManager().getHighestLevel() != level) { + player.sendMessage(Lang.UPGRADE_MESSAGE.getConfigValue(level.getLevel())); + } else { + player.sendMessage(Lang.YOU_MAXED.getConfigValue(Integer.toString(level.getLevel()))); + } + if (instance.getConfig().getBoolean("settings.On-upgrade-particles")) { + Location loc = location.clone().add(.5,.5,.5); + if (!instance.v1_8 && !instance.v1_7) { + player.getWorld().spawnParticle(org.bukkit.Particle.valueOf(instance.getConfig().getString("Main.Upgrade Particle Type")), loc, 200, .5, .5, .5); + } else { + player.getWorld().playEffect(loc, org.bukkit.Effect.valueOf(instance.getConfig().getString("Main.Upgrade Particle Type")), 1, 0); + //Can't get that to resolve. + //player.getWorld().spigot().playEffect(loc, org.bukkit.Effect.valueOf(instance.getConfig().getString("Main.Upgrade Particle Type")), 1, 0, (float) 1, (float) 1, (float) 1, 1, 200, 10); + } + } + if (instance.getConfig().getBoolean("Main.Sounds Enabled")) { + if (instance.getLevelManager().getHighestLevel() == level) { + if (!instance.v1_8 && !instance.v1_7) { + player.playSound(player.getLocation(), org.bukkit.Sound.ENTITY_PLAYER_LEVELUP, 0.6F, 15.0F); + } else { + player.playSound(player.getLocation(), org.bukkit.Sound.valueOf("LEVEL_UP"), 2F, 15.0F); + } + } else { + if (!instance.v1_10 && !instance.v1_9 && !instance.v1_8 && !instance.v1_7) { + player.playSound(player.getLocation(), org.bukkit.Sound.ENTITY_PLAYER_LEVELUP, 2F, 25.0F); + player.playSound(player.getLocation(), org.bukkit.Sound.BLOCK_NOTE_CHIME, 2F, 25.0F); + Bukkit.getScheduler().scheduleSyncDelayedTask(instance, () -> player.playSound(player.getLocation(), org.bukkit.Sound.BLOCK_NOTE_CHIME, 1.2F, 35.0F), 5L); + Bukkit.getScheduler().scheduleSyncDelayedTask(instance, () -> player.playSound(player.getLocation(), org.bukkit.Sound.BLOCK_NOTE_CHIME, 1.8F, 35.0F), 10L); + } else { + player.playSound(player.getLocation(), org.bukkit.Sound.valueOf("LEVEL_UP"), 2F, 25.0F); + } + } + } + tillLand(location); + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + private static final Random random = new Random(); + + public boolean tillLand(Location location) { + EpicFarming instance = EpicFarming.getInstance(); + Block block = location.getBlock(); + int radius = level.getRadius(); + int bx = block.getX(); + int by = block.getY(); + int bz = block.getZ(); + for (int fx = -radius; fx <= radius; fx++) { + for (int fy = -2; fy <= 1; fy++) { + for (int fz = -radius; fz <= radius; fz++) { + Block b2 = block.getWorld().getBlockAt(bx + fx, by + fy, bz + fz); + + // ToDo: enum for all flowers. + if (b2.getType() == Material.LONG_GRASS || b2.getType() == Material.RED_ROSE || b2.getType() == Material.YELLOW_FLOWER) { + Bukkit.getScheduler().runTaskLater(EpicFarming.getInstance(), () -> { + b2.getRelative(BlockFace.DOWN).setType(Material.SOIL); + b2.breakNaturally(); + if (instance.getConfig().getBoolean("Main.Sounds Enabled")) + b2.getWorld().playSound(b2.getLocation(), org.bukkit.Sound.BLOCK_GRASS_BREAK, 10, 15); + }, random.nextInt(30) + 1); + } + if ((b2.getType() == Material.GRASS || b2.getType() == Material.DIRT) && b2.getRelative(BlockFace.UP).getType() == Material.AIR) { + Bukkit.getScheduler().runTaskLater(EpicFarming.getInstance(), () -> { + b2.setType(Material.SOIL); + if (instance.getConfig().getBoolean("Main.Sounds Enabled")) + b2.getWorld().playSound(b2.getLocation(), org.bukkit.Sound.BLOCK_GRASS_BREAK, 10, 15); + }, random.nextInt(30) + 1); + } + + } + } + } + return false; + } + + public Location getLocation() { + return location.clone(); + } + + public void setLocation(Location location) { + this.location = location; + } + + public Level getLevel() { + return level; + } +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicfarming/farming/FarmManager.java b/src/main/java/com/songoda/epicfarming/farming/FarmManager.java new file mode 100644 index 0000000..b60817f --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/farming/FarmManager.java @@ -0,0 +1,36 @@ +package com.songoda.epicfarming.farming; + +import org.bukkit.Location; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +public class FarmManager { + + private final Map registeredFarms = new HashMap<>(); + + public void addFarm(Location location, Farm farm) { + registeredFarms.put(roundLocation(location), farm); + } + + public Farm removeFarm(Location location) { + return registeredFarms.remove(roundLocation(location)); + } + + public Farm getFarm(Location location) { + return registeredFarms.get(roundLocation(location)); + } + + public Map getFarms() { + return Collections.unmodifiableMap(registeredFarms); + } + + private Location roundLocation(Location location) { + location = location.clone(); + location.setX(location.getBlockX()); + location.setY(location.getBlockY()); + location.setZ(location.getBlockZ()); + return location; + } +} diff --git a/src/main/java/com/songoda/epicfarming/farming/Level.java b/src/main/java/com/songoda/epicfarming/farming/Level.java new file mode 100644 index 0000000..9ca6a3a --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/farming/Level.java @@ -0,0 +1,68 @@ +package com.songoda.epicfarming.farming; + +import com.songoda.epicfarming.Lang; + +import java.util.ArrayList; + +public class Level { + + private int level, costExperiance, costEconomy, radius; + + private double speedMultiplier; + + private boolean autoHarvest, autoReplant; + + private ArrayList description = new ArrayList<>(); + + public Level(int level, int costExperiance, int costEconomy, double speedMultiplier, int radius, boolean autoHarvest, boolean autoReplant) { + this.level = level; + this.costExperiance = costExperiance; + this.costEconomy = costEconomy; + this.speedMultiplier = speedMultiplier; + this.radius = radius; + this.autoHarvest = autoHarvest; + this.autoReplant = autoReplant; + + description.add(Lang.NEXT_RADIUS.getConfigValue(radius)); + description.add(Lang.NEXT_SPEED.getConfigValue(speedMultiplier)); + + if (autoHarvest) + description.add(Lang.NEXT_AUTO_HARVEST.getConfigValue(autoHarvest)); + + if (autoReplant) + description.add(Lang.NEXT_AUTO_REPLANT.getConfigValue(autoReplant)); + + } + + public ArrayList getDescription() { + return (ArrayList)description.clone(); + } + + public int getLevel() { + return level; + } + + public int getRadius() { + return radius; + } + + public boolean isAutoHarvest() { + return autoHarvest; + } + + public boolean isAutoReplant() { + return autoReplant; + } + + public double getSpeedMultiplier() { + return speedMultiplier; + } + + public int getCostExperiance() { + return costExperiance; + } + + public int getCostEconomy() { + return costEconomy; + } +} diff --git a/src/main/java/com/songoda/epicfarming/farming/LevelManager.java b/src/main/java/com/songoda/epicfarming/farming/LevelManager.java new file mode 100644 index 0000000..ad54b79 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/farming/LevelManager.java @@ -0,0 +1,30 @@ +package com.songoda.epicfarming.farming; + +import java.util.Collections; +import java.util.Map; +import java.util.NavigableMap; +import java.util.TreeMap; + +public class LevelManager { + + private final NavigableMap registeredLevels = new TreeMap<>(); + + public void addLevel(int level, int costExperiance, int costEconomy, double speedMultiplier, int radius, boolean autoHarvest, boolean autoReplant) { + registeredLevels.put(level, new Level(level, costExperiance, costEconomy, speedMultiplier, radius, autoHarvest, autoReplant)); + } + + public Level getLevel(int level) { + return registeredLevels.get(level); + } + + public Level getLowestLevel() { + return registeredLevels.firstEntry().getValue(); + } + + public Level getHighestLevel() { + return registeredLevels.lastEntry().getValue(); + } + public Map getLevels() { + return Collections.unmodifiableMap(registeredLevels); + } +} diff --git a/src/main/java/com/songoda/epicfarming/handlers/CommandHandler.java b/src/main/java/com/songoda/epicfarming/handlers/CommandHandler.java new file mode 100644 index 0000000..2f2cc12 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/handlers/CommandHandler.java @@ -0,0 +1,74 @@ +package com.songoda.epicfarming.handlers; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.Lang; +import com.songoda.epicfarming.utils.Debugger; +import com.songoda.epicfarming.utils.Methods; +import org.bukkit.Bukkit; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +/** + * Created by songoda on 3/14/2017. + */ + +public class CommandHandler implements CommandExecutor { + + private EpicFarming instance; + + public CommandHandler(EpicFarming instance) { + this.instance = instance; + } + + @Override + public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { + try { + if (args.length == 0 || args[0].equalsIgnoreCase("help") || args[0].equalsIgnoreCase("?")) { + sender.sendMessage(""); + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&7" + instance.getDescription().getVersion() + " Created by &5&l&oBrianna")); + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aEFA help &7Displays this page.")); + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aEFA settings &7Edit the EpicFarming Settings.")); + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aEFA reload &7Reloads Configuration and Language files.")); + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aEFA givefarmitem [player] &7Give a farm item to a player.")); + sender.sendMessage(""); + } else if (args[0].equalsIgnoreCase("reload")) { + if (!sender.hasPermission("epicfarming.admin")) { + sender.sendMessage(instance.references.getPrefix() + Lang.NO_PERMS.getConfigValue()); + } else { + instance.reload(); + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&8Configuration and Language files reloaded.")); + } + } else if (args[0].equalsIgnoreCase("givefarmitem")) { + if (!sender.hasPermission("epicfarming.admin")) { + sender.sendMessage(instance.references.getPrefix() + Lang.NO_PERMS.getConfigValue()); + return true; + } + //ToDo: add the ability to specify level. + if (args.length == 1) { + if (sender instanceof Player) + ((Player) sender).getInventory().addItem(Methods.makeFarmItem(1)); + } else if (Bukkit.getPlayerExact(args[1]) == null) { + sender.sendMessage(instance.references.getPrefix() + Arconix.pl().getApi().format().formatText("&cThat username does not exist, or the user is not online!")); + } else { + Bukkit.getPlayerExact(args[1]).getInventory().addItem(Methods.makeFarmItem(1)); + } + } else if (sender instanceof Player) { + if (args[0].equalsIgnoreCase("settings")) { + if (!sender.hasPermission("epicfarming.admin")) { + sender.sendMessage(instance.references.getPrefix() + Lang.NO_PERMS.getConfigValue()); + } else { + Player p = (Player) sender; + instance.settingsManager.openSettingsManager(p); + } + } + } + + } catch (Exception ex) { + Debugger.runReport(ex); + } + return true; + } +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicfarming/handlers/FarmingHandler.java b/src/main/java/com/songoda/epicfarming/handlers/FarmingHandler.java new file mode 100644 index 0000000..6f53b5a --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/handlers/FarmingHandler.java @@ -0,0 +1,113 @@ +package com.songoda.epicfarming.handlers; + +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.farming.Crop; +import com.songoda.epicfarming.farming.Farm; +import com.songoda.epicfarming.utils.CropType; +import com.songoda.epicfarming.utils.Debugger; +import org.bukkit.Bukkit; +import org.bukkit.CropState; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.block.BlockState; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.material.Crops; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +public class FarmingHandler { + + private EpicFarming instance; + + public FarmingHandler(EpicFarming instance) { + this.instance = instance; + Bukkit.getScheduler().scheduleSyncRepeatingTask(EpicFarming.getInstance(), this::farmRunner, 0, instance.getConfig().getInt("Main.Farm Tick Speed")); + } + + + private void farmRunner() { + try { + for (Farm farm : instance.getFarmManager().getFarms().values()) { + for (Block block : getCrops(farm, true)) { + Crops crop = (Crops) block.getState().getData(); + + // Add to GrowthHandler + if (!instance.getGrowthHandler().liveCrops.containsKey(block.getLocation())) + instance.getGrowthHandler().liveCrops.put(block.getLocation(), new Crop(block.getLocation(), farm)); + + if (!farm.getLevel().isAutoHarvest() + || !crop.getState().equals(CropState.RIPE) + || !doDrop(farm, block.getType())) continue; + + if (farm.getLevel().isAutoReplant()) { + BlockState cropState = block.getState(); + Crops cropData = (Crops) cropState.getData(); + cropData.setState(CropState.VERY_SMALL); + cropState.setData(cropData); + cropState.update(); + continue; + } + block.setType(Material.AIR); + } + } + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + private boolean doDrop(Farm farm, Material material) { + Random random = new Random(); + + ItemStack stack = new ItemStack(CropType.getCropType(material).getYieldMaterial()); + ItemStack seedStack = new ItemStack(CropType.getCropType(material).getSeedMaterial(), random.nextInt(3)); + + if (!canMove(farm.getInventory(), stack)) return false; + farm.getInventory().addItem(stack); + farm.getInventory().addItem(seedStack); + return true; + } + + public List getCrops(Farm farm, boolean add) { + List crops = new ArrayList<>(); + + Block block = farm.getLocation().getBlock(); + int radius = farm.getLevel().getRadius(); + int bx = block.getX(); + int by = block.getY(); + int bz = block.getZ(); + for (int fx = -radius; fx <= radius; fx++) { + for (int fy = -2; fy <= 1; fy++) { + for (int fz = -radius; fz <= radius; fz++) { + Block b2 = block.getWorld().getBlockAt(bx + fx, by + fy, bz + fz); + + if (!(b2.getState().getData() instanceof Crops)) continue; + if (add) + crops.add(b2); + else { + instance.getGrowthHandler().liveCrops.remove(b2.getLocation()); + } + + } + } + } + return crops; + } + + private boolean canMove(Inventory inventory, ItemStack item) { + try { + if (inventory.firstEmpty() != -1) return true; + + for (ItemStack stack : inventory.getContents()) { + if (stack.isSimilar(item) && stack.getAmount() <= stack.getMaxStackSize()) { + return true; + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + return false; + } +} diff --git a/src/main/java/com/songoda/epicfarming/handlers/GrowthHandler.java b/src/main/java/com/songoda/epicfarming/handlers/GrowthHandler.java new file mode 100644 index 0000000..0c45671 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/handlers/GrowthHandler.java @@ -0,0 +1,80 @@ +package com.songoda.epicfarming.handlers; + +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.farming.Crop; +import org.bukkit.Bukkit; +import org.bukkit.CropState; +import org.bukkit.Location; +import org.bukkit.block.BlockState; +import org.bukkit.material.Crops; + +import java.util.HashMap; +import java.util.Map; +import java.util.Random; + +public class GrowthHandler { + + public GrowthHandler(EpicFarming instance) { + Bukkit.getScheduler().scheduleSyncRepeatingTask(EpicFarming.getInstance(), this::growthRunner, 0, instance.getConfig().getInt("Main.Growth Tick Speed")); + Bukkit.getScheduler().scheduleSyncRepeatingTask(EpicFarming.getInstance(), this::clear, 0, instance.getConfig().getInt("Main.Clear Tick Speed")); + } + + Map liveCrops = new HashMap<>(); + + private static final Random random = new Random(); + + private void growthRunner() { + + for (Crop crop : liveCrops.values()) { + + if (!(crop.getLocation().getBlock().getState().getData() instanceof Crops)) continue; + + //ToDO: This should be in config. + int cap = (int)Math.ceil(60 / crop.getFarm().getLevel().getSpeedMultiplier()) - crop.getTicksLived(); + if (cap > 2) { + int rand = random.nextInt(cap) + 1; + + crop.setTicksLived(crop.getTicksLived() + 1); + if (rand != cap - 1 && crop.getTicksLived() != cap / 2) continue; + + } + + BlockState cropState = crop.getLocation().getBlock().getState(); + Crops cropData = (Crops) cropState.getData(); + + switch(cropData.getState()) { + case SEEDED: + cropData.setState(CropState.GERMINATED); + break; + case GERMINATED: + cropData.setState(CropState.VERY_SMALL); + break; + case VERY_SMALL: + cropData.setState(CropState.SMALL); + break; + case SMALL: + cropData.setState(CropState.MEDIUM); + break; + case MEDIUM: + cropData.setState(CropState.TALL); + break; + case TALL: + cropData.setState(CropState.VERY_TALL); + break; + case VERY_TALL: + cropData.setState(CropState.RIPE); + break; + case RIPE: + break; + } + cropState.setData(cropData); + cropState.update(); + crop.setTicksLived(1); + + } + } + + private void clear() { + liveCrops.clear(); + } +} diff --git a/src/main/java/com/songoda/epicfarming/handlers/HookHandler.java b/src/main/java/com/songoda/epicfarming/handlers/HookHandler.java new file mode 100644 index 0000000..e229fd7 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/handlers/HookHandler.java @@ -0,0 +1,114 @@ +package com.songoda.epicfarming.handlers; + +import com.songoda.arconix.api.utils.ConfigWrapper; +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.hooks.*; +import com.songoda.epicfarming.utils.Debugger; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.entity.Player; + +/** + * Created by songoda on 3/17/2017. + */ +public class HookHandler { + + public Hook FactionsHook = null, RedProtectHook = null, ASkyBlockHook = null, USkyBlockHook = null, + WorldGuardHook = null, GriefPreventionHook = null, PlotSquaredHook = null, KingdomsHook = null, + TownyHook = null; + + public ConfigWrapper hooksFile = new ConfigWrapper(EpicFarming.getInstance(), "", "hooks.yml"); + + public HookHandler() { + } + + public void hook() { + try { + hooksFile.createNewFile("Loading hooks File", EpicFarming.getInstance().getDescription().getName() + " hooks File"); + + new FactionsHook(); + new RedProtectHook(); + new GriefPreventionHook(); + new ASkyBlockHook(); + new USkyBlockHook(); + new WorldGuardHook(); + new PlotSquaredHook(); + new KingdomsHook(); + new TownyHook(); + + hooksFile.getConfig().options().copyDefaults(true); + hooksFile.saveConfig(); + } catch (Exception e) { + Debugger.runReport(e); + } + + } + + public boolean isInFaction(String name, Location l) { + if (FactionsHook != null) { + return FactionsHook.isInClaim(name, l); + } + return false; + } + + public String getFactionId(String name) { + if (FactionsHook != null) { + return FactionsHook.getClaimId(name); + } + return null; + } + + public boolean isInTown(String name, Location l) { + if (TownyHook != null) { + return TownyHook.isInClaim(name, l); + } + return false; + } + + public String getTownId(String name) { + if (TownyHook != null) { + return TownyHook.getClaimId(name); + } + return null; + } + + public boolean isInIsland(String name, Location l) { + if (USkyBlockHook != null) + return USkyBlockHook.isInClaim(name, l); + else if (ASkyBlockHook != null) + return ASkyBlockHook.isInClaim(name, l); + else + return false; + } + + public String getIslandId(String name) { + try { + return Bukkit.getOfflinePlayer(name).getUniqueId().toString(); + } catch (Exception ignore) { + } + return null; + } + + public boolean canBuild(Player p, Location l) { + boolean result = true; + if (WorldGuardHook != null) + result = WorldGuardHook.canBuild(p, l); + if (RedProtectHook != null && result) + result = RedProtectHook.canBuild(p, l); + if (FactionsHook != null && result) + result = FactionsHook.canBuild(p, l); + if (ASkyBlockHook != null && result) + result = ASkyBlockHook.canBuild(p, l); + if (USkyBlockHook != null && result) + result = USkyBlockHook.canBuild(p, l); + if (GriefPreventionHook != null && result) + result = GriefPreventionHook.canBuild(p, l); + if (PlotSquaredHook != null && result) + result = PlotSquaredHook.canBuild(p, l); + if (KingdomsHook != null && result) + result = KingdomsHook.canBuild(p, l); + if (TownyHook != null && result) + result = TownyHook.canBuild(p, l); + return result; + } +} diff --git a/src/main/java/com/songoda/epicfarming/hooks/ASkyBlockHook.java b/src/main/java/com/songoda/epicfarming/hooks/ASkyBlockHook.java new file mode 100644 index 0000000..d7738b9 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/hooks/ASkyBlockHook.java @@ -0,0 +1,64 @@ +package com.songoda.epicfarming.hooks; + +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.utils.Debugger; +import com.wasteofplastic.askyblock.ASkyBlockAPI; +import org.bukkit.Location; +import org.bukkit.entity.Player; + +import java.util.List; +import java.util.Set; +import java.util.UUID; + +/** + * Created by songoda on 3/17/2017. + */ +public class ASkyBlockHook extends Hook { + + private ASkyBlockAPI as; + + public ASkyBlockHook() { + super("ASkyblock"); + if (isEnabled()) { + as = ASkyBlockAPI.getInstance(); + EpicFarming plugin = EpicFarming.pl(); + plugin.hooks.ASkyBlockHook = this; + } + } + + @Override + public boolean canBuild(Player p, Location location) { + try { + if (hasBypass(p) || as.getIslandAt(location) == null) return true; + + UUID owner = as.getOwner(location); + List list = as.getTeamMembers(owner); + Set list2 = as.getCoopIslands(p); + + if (owner == null) return true; + + for (UUID uuid : list) { + if (uuid.equals(p.getUniqueId())) { + return true; + } + } + + for (Location loc: list2) { + if (as.getIslandAt(location).getOwner().equals(as.getIslandAt(loc).getOwner())) { + return true; + } + } + + return owner.equals(p.getUniqueId()); + } catch (Exception e) { + Debugger.runReport(e); + } + return true; + } + + @Override + public boolean isInClaim(String uuid, Location location) { + return as.getOwner(location).toString().equals(uuid); + } + +} diff --git a/src/main/java/com/songoda/epicfarming/hooks/FactionsHook.java b/src/main/java/com/songoda/epicfarming/hooks/FactionsHook.java new file mode 100644 index 0000000..70cb89c --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/hooks/FactionsHook.java @@ -0,0 +1,56 @@ +package com.songoda.epicfarming.hooks; + +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.utils.Debugger; +import me.markeh.factionsframework.entities.FPlayer; +import me.markeh.factionsframework.entities.FPlayers; +import me.markeh.factionsframework.entities.Faction; +import me.markeh.factionsframework.entities.Factions; +import org.bukkit.Location; +import org.bukkit.entity.Player; + +/** + * Created by songoda on 3/17/2017. + */ +public class FactionsHook extends Hook { + + public FactionsHook() { + super("Factions"); + EpicFarming plugin = EpicFarming.pl(); + if (isEnabled()) + plugin.hooks.GriefPreventionHook = this; + } + + @Override + public boolean canBuild(Player p, Location location) { + try { + FPlayer fp = FPlayers.getBySender(p); + + Faction faction = Factions.getFactionAt(location); + + return (fp.getFaction().equals(faction) || faction.isNone()); + } catch (Exception e) { + Debugger.runReport(e); + } + return false; + } + + @Override + public boolean isInClaim(String id, Location location) { + Faction faction = Factions.getFactionAt(location); + + return faction.getId().equals(id); + } + + @Override + public String getClaimId(String name) { + try { + Faction faction = Factions.getByName(name, ""); + + return faction.getId(); + } catch (Exception e) { + } + return null; + } + +} diff --git a/src/main/java/com/songoda/epicfarming/hooks/GriefPreventionHook.java b/src/main/java/com/songoda/epicfarming/hooks/GriefPreventionHook.java new file mode 100644 index 0000000..c863696 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/hooks/GriefPreventionHook.java @@ -0,0 +1,38 @@ +package com.songoda.epicfarming.hooks; + +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.utils.Debugger; +import me.ryanhamshire.GriefPrevention.Claim; +import me.ryanhamshire.GriefPrevention.GriefPrevention; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.entity.Player; + +/** + * Created by songoda on 3/17/2017. + */ +public class GriefPreventionHook extends Hook { + + private EpicFarming plugin = EpicFarming.pl(); + + public GriefPreventionHook() { + super("GriefPrevention"); + if (isEnabled()) + plugin.hooks.GriefPreventionHook = this; + } + + @Override + public boolean canBuild(Player p, Location location) { + try { + if (hasBypass(p)) + return true; + + Claim claim = GriefPrevention.instance.dataStore.getClaimAt(location, false, null); + return claim != null && claim.allowBuild(p, Material.STONE) == null; + + } catch (Exception e) { + Debugger.runReport(e); + } + return false; + } +} diff --git a/src/main/java/com/songoda/epicfarming/hooks/Hook.java b/src/main/java/com/songoda/epicfarming/hooks/Hook.java new file mode 100644 index 0000000..db95f14 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/hooks/Hook.java @@ -0,0 +1,40 @@ +package com.songoda.epicfarming.hooks; + +import com.songoda.epicfarming.EpicFarming; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.entity.Player; + +public abstract class Hook { + + protected final String pluginName; + + protected Hook(String pluginName) { + this.pluginName = pluginName; + if (isEnabled()) + EpicFarming.getInstance().hooks.hooksFile.getConfig().addDefault("hooks." + pluginName, true); + } + + protected boolean isEnabled() { + return (Bukkit.getPluginManager().isPluginEnabled(pluginName) + && EpicFarming.getInstance().hooks.hooksFile.getConfig().getBoolean("hooks." + pluginName,true)); + } + + protected boolean hasBypass(Player p) { + return p.hasPermission(EpicFarming.getInstance().getDescription().getName() + ".bypass"); + } + + public abstract boolean canBuild(Player p, Location location); + + public boolean isInClaim(String id, Location location) { + return false; + } + + public String getClaimId(String name) { + return null; + } + + + + +} diff --git a/src/main/java/com/songoda/epicfarming/hooks/KingdomsHook.java b/src/main/java/com/songoda/epicfarming/hooks/KingdomsHook.java new file mode 100644 index 0000000..f531293 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/hooks/KingdomsHook.java @@ -0,0 +1,43 @@ +package com.songoda.epicfarming.hooks; + +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.utils.Debugger; +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.kingdoms.constants.land.Land; +import org.kingdoms.constants.land.SimpleChunkLocation; +import org.kingdoms.constants.player.OfflineKingdomPlayer; +import org.kingdoms.manager.game.GameManagement; + +/** + * Created by songoda on 3/17/2017. + */ +public class KingdomsHook extends Hook { + + public KingdomsHook() { + super("Kingdoms"); + EpicFarming plugin = EpicFarming.pl(); + if (isEnabled()) + plugin.hooks.KingdomsHook = this; + } + + @Override + public boolean canBuild(Player p, Location location) { + try { + if (hasBypass(p)) return true; + + OfflineKingdomPlayer pl = GameManagement.getPlayerManager().getOfflineKingdomPlayer(p); + if (pl.getKingdomPlayer().getKingdom() == null) return true; + + SimpleChunkLocation chunkLocation = new SimpleChunkLocation(location.getWorld().getName(), location.getChunk().getX(), location.getChunk().getZ()); + Land land = GameManagement.getLandManager().getOrLoadLand(chunkLocation); + String owner = land.getOwner(); + + return pl.getKingdomPlayer().getKingdom().getKingdomName().equals(owner) || owner == null; + } catch (Exception e) { + Debugger.runReport(e); + } + return true; + } + +} diff --git a/src/main/java/com/songoda/epicfarming/hooks/PlotSquaredHook.java b/src/main/java/com/songoda/epicfarming/hooks/PlotSquaredHook.java new file mode 100644 index 0000000..9b1a8dc --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/hooks/PlotSquaredHook.java @@ -0,0 +1,38 @@ +package com.songoda.epicfarming.hooks; + +import com.intellectualcrafters.plot.api.PlotAPI; +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.utils.Debugger; +import org.bukkit.Location; +import org.bukkit.entity.Player; + +/** + * Created by songoda on 3/17/2017. + */ +public class PlotSquaredHook extends Hook { + + private PlotAPI plotAPI; + + public PlotSquaredHook() { + super("PlotSquared"); + if (isEnabled()) { + EpicFarming plugin = EpicFarming.pl(); + plugin.hooks.PlotSquaredHook = this; + this.plotAPI = new PlotAPI(); + } + } + + @Override + public boolean canBuild(Player p, Location location) { + try { + return hasBypass(p) + || (plotAPI.getPlot(location) != null + && plotAPI.isInPlot(p) + && plotAPI.getPlot(p) == plotAPI.getPlot(location)); + } catch (Exception e) { + Debugger.runReport(e); + } + return true; + } + +} diff --git a/src/main/java/com/songoda/epicfarming/hooks/RedProtectHook.java b/src/main/java/com/songoda/epicfarming/hooks/RedProtectHook.java new file mode 100644 index 0000000..3eccffb --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/hooks/RedProtectHook.java @@ -0,0 +1,34 @@ +package com.songoda.epicfarming.hooks; + +import br.net.fabiozumbi12.RedProtect.Bukkit.API.RedProtectAPI; +import br.net.fabiozumbi12.RedProtect.Bukkit.RedProtect; +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.utils.Debugger; +import org.bukkit.Location; +import org.bukkit.entity.Player; + +/** + * Created by songoda on 3/17/2017. + */ +public class RedProtectHook extends Hook { + + private EpicFarming plugin = EpicFarming.pl(); + + public RedProtectHook() { + super("RedProtect"); + if (isEnabled()) + plugin.hooks.RedProtectHook = this; + } + + @Override + public boolean canBuild(Player p, Location location) { + try { + RedProtectAPI rpAPI = RedProtect.get().getAPI(); + return hasBypass(p) || (rpAPI.getRegion(location) != null && rpAPI.getRegion(location).canBuild(p)); + } catch (Exception e) { + Debugger.runReport(e); + } + return true; + } + +} diff --git a/src/main/java/com/songoda/epicfarming/hooks/TownyHook.java b/src/main/java/com/songoda/epicfarming/hooks/TownyHook.java new file mode 100644 index 0000000..bd0b584 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/hooks/TownyHook.java @@ -0,0 +1,56 @@ +package com.songoda.epicfarming.hooks; + +import com.palmergames.bukkit.towny.object.Resident; +import com.palmergames.bukkit.towny.object.TownyUniverse; +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.utils.Debugger; +import org.bukkit.Location; +import org.bukkit.entity.Player; + +/** + * Created by songoda on 3/17/2017. + */ +public class TownyHook extends Hook { + + public TownyHook() { + super("Towny"); + EpicFarming plugin = EpicFarming.pl(); + if (isEnabled()) + plugin.hooks.TownyHook = this; + } + + @Override + public boolean canBuild(Player p, Location location) { + try { + if (hasBypass(p) || TownyUniverse.isWilderness(location.getBlock())) return true; + if (!TownyUniverse.getTownBlock(location).hasTown()) return true; + + Resident r = TownyUniverse.getDataSource().getResident(p.getName()); + return r.hasTown() && TownyUniverse.getTownName(location).equals(r.getTown().getName()); + } catch (Exception e) { + Debugger.runReport(e); + } + return true; + } + + @Override + public boolean isInClaim(String id, Location location) { + try { + return !TownyUniverse.isWilderness(location.getBlock()) + && TownyUniverse.getTownBlock(location).getTown().getUID() == Integer.parseInt(id); + } catch (Exception e) { + Debugger.runReport(e); + } + return false; + } + + @Override + public String getClaimId(String name) { + try { + return TownyUniverse.getDataSource().getTown(name).getUID().toString(); + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } +} diff --git a/src/main/java/com/songoda/epicfarming/hooks/USkyBlockHook.java b/src/main/java/com/songoda/epicfarming/hooks/USkyBlockHook.java new file mode 100644 index 0000000..09c34ef --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/hooks/USkyBlockHook.java @@ -0,0 +1,49 @@ +package com.songoda.epicfarming.hooks; + +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.utils.Debugger; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.entity.Player; +import us.talabrek.ultimateskyblock.api.uSkyBlockAPI; + +/** + * Created by songoda on 3/17/2017. + */ +public class USkyBlockHook extends Hook { + + private uSkyBlockAPI usb; + private EpicFarming plugin = EpicFarming.pl(); + + public USkyBlockHook() { + super("USkyBlock"); + if (isEnabled()) { + plugin.hooks.USkyBlockHook = this; + this.usb = (uSkyBlockAPI) Bukkit.getPluginManager().getPlugin(pluginName); + } + } + + @Override + public boolean canBuild(Player p, Location location) { + try { + if (hasBypass(p)) return true; + + for (Player pl : usb.getIslandInfo(location).getOnlineMembers()) { + if (pl.equals(p)) { + return true; + } + } + + return usb.getIslandInfo(location).isLeader(p); + } catch (Exception e) { + Debugger.runReport(e); + } + return false; + } + + @Override + public boolean isInClaim(String uuid, Location location) { + return usb.getIslandInfo(location).getLeader().equals(uuid); + } + +} diff --git a/src/main/java/com/songoda/epicfarming/hooks/WorldGuardHook.java b/src/main/java/com/songoda/epicfarming/hooks/WorldGuardHook.java new file mode 100644 index 0000000..814cf64 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/hooks/WorldGuardHook.java @@ -0,0 +1,31 @@ +package com.songoda.epicfarming.hooks; + +import com.sk89q.worldguard.bukkit.WorldGuardPlugin; +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.utils.Debugger; +import org.bukkit.Location; +import org.bukkit.entity.Player; + +/** + * Created by songoda on 3/17/2017. + */ +public class WorldGuardHook extends Hook { + + private EpicFarming plugin = EpicFarming.pl(); + + public WorldGuardHook() { + super("WorldGuard"); + if (isEnabled()) + plugin.hooks.WorldGuardHook = this; + } + + @Override + public boolean canBuild(Player p, Location location) { + try { + return p.hasPermission(plugin.getDescription().getName() + ".bypass") || WorldGuardPlugin.inst().canBuild(p, location); + } catch (Exception e) { + Debugger.runReport(e); + } + return false; + } +} diff --git a/src/main/java/com/songoda/epicfarming/player/PlayerActionManager.java b/src/main/java/com/songoda/epicfarming/player/PlayerActionManager.java new file mode 100644 index 0000000..fb6138e --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/player/PlayerActionManager.java @@ -0,0 +1,18 @@ +package com.songoda.epicfarming.player; + +import org.bukkit.entity.Player; + +import java.util.*; + +public class PlayerActionManager { + + private final Map registeredPlayers = new HashMap<>(); + + public PlayerData getPlayerAction(Player player) { + return (player != null) ? registeredPlayers.computeIfAbsent(player.getUniqueId(), p -> new PlayerData(player.getUniqueId())) : null; + } + + public Collection getRegisteredPlayers() { + return Collections.unmodifiableCollection(registeredPlayers.values()); + } +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicfarming/player/PlayerData.java b/src/main/java/com/songoda/epicfarming/player/PlayerData.java new file mode 100644 index 0000000..cfd827c --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/player/PlayerData.java @@ -0,0 +1,29 @@ +package com.songoda.epicfarming.player; + +import com.songoda.epicfarming.farming.Farm; +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; + +import java.util.UUID; + +public class PlayerData { + + private final UUID playerUUID; + private Farm farm = null; + + public PlayerData(UUID playerUUID) { + this.playerUUID = playerUUID; + } + + public Farm getFarm() { + return farm; + } + + public void setFarm(Farm farm) { + this.farm = farm; + } + + public Player getPlayer() { + return Bukkit.getPlayer(playerUUID); + } +} diff --git a/src/main/java/com/songoda/epicfarming/utils/CropType.java b/src/main/java/com/songoda/epicfarming/utils/CropType.java new file mode 100644 index 0000000..0ad890c --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/utils/CropType.java @@ -0,0 +1,107 @@ +package com.songoda.epicfarming.utils; + +import org.bukkit.Material; + +/** + * A list of all crop types available in Minecraft that can be + * modified by CropsReborn + */ +public enum CropType { + + WHEAT("Wheat", Material.CROPS, Material.WHEAT, Material.SEEDS), + + CARROT("Carrot", Material.CARROT, Material.CARROT_ITEM, Material.CARROT_ITEM), + + POTATO("Potato", Material.POTATO, Material.CARROT_ITEM, Material.POTATO_ITEM), + + BEETROOT("Beetroot", Material.BEETROOT_BLOCK, Material.BEETROOT, Material.BEETROOT_SEEDS), + + WATER_MELON_STEM("Watermelon", Material.MELON_STEM, Material.MELON, Material.MELON_SEEDS), + + PUMPKIN_STEM("Pumpkin", Material.PUMPKIN_STEM, Material.PUMPKIN, Material.PUMPKIN_SEEDS), + + NETHER_WARTS("Nether Wart", Material.NETHER_WART_BLOCK, Material.NETHER_WARTS, Material.NETHER_WARTS); + + private final String name; + private final Material yieldMaterial, blockMaterial, seedMaterial; + + CropType(String name, Material blockMaterial, Material yieldMaterial, Material seedMaterial) { + this.name = name; + this.blockMaterial = blockMaterial; + this.seedMaterial = seedMaterial; + this.yieldMaterial = yieldMaterial; + } + + /** + * Get the friendly name of the crop + * + * @return the name of the crop + */ + public String getName() { + return name; + } + + /** + * Get the blockMaterial that represents this crop type + * + * @return the represented blockMaterial + */ + public Material getBlockMaterial() { + return blockMaterial; + } + + /** + * Get the yield Material that represents this crop type + * + * @return the represented yieldMaterial + */ + public Material getYieldMaterial() { + return yieldMaterial; + } + + /** + * Get the blockMaterial that represents the seed item for this crop type + * + * @return the represented seed blockMaterial + */ + public Material getSeedMaterial() { + return seedMaterial; + } + + /** + * Check whether a specific blockMaterial is an enumerated crop type or not + * + * @param material the blockMaterial to check + * @return true if it is a crop, false otherwise + */ + public static boolean isCrop(Material material) { + for (CropType type : values()) + if (type.getBlockMaterial() == material) return true; + return false; + } + + /** + * Check whether a specific blockMaterial is an enumerated crop type seed or not + * + * @param material the blockMaterial to check + * @return true if it is a seed, false otherwise + */ + public static boolean isCropSeed(Material material) { + for (CropType type : values()) + if (type.getSeedMaterial() == material) return true; + return false; + } + + /** + * Get the crop type based on the specified blockMaterial + * + * @param material the crop blockMaterial + * @return the respective CropType. null if none found + */ + public static CropType getCropType(Material material) { + for (CropType type : values()) + if (type.getBlockMaterial() == material) return type; + return null; + } + +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicfarming/utils/Debugger.java b/src/main/java/com/songoda/epicfarming/utils/Debugger.java new file mode 100644 index 0000000..f7bc70c --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/utils/Debugger.java @@ -0,0 +1,31 @@ +package com.songoda.epicfarming.utils; + +import com.songoda.epicfarming.EpicFarming; + +/** + * Created by songoda on 3/21/2017. + */ +public class Debugger { + + + public static void runReport(Exception e) { + if (isDebug()) { + System.out.println("=============================================================="); + System.out.println("The following is an error encountered in EpicFarming."); + System.out.println("--------------------------------------------------------------"); + e.printStackTrace(); + System.out.println("=============================================================="); + } + sendReport(e); + } + + public static void sendReport(Exception e) { + + } + + public static boolean isDebug() { + EpicFarming plugin = EpicFarming.pl(); + return plugin.getConfig().getBoolean("System.Debugger Enabled"); + } + +} diff --git a/src/main/java/com/songoda/epicfarming/utils/Methods.java b/src/main/java/com/songoda/epicfarming/utils/Methods.java new file mode 100644 index 0000000..4027b8e --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/utils/Methods.java @@ -0,0 +1,74 @@ +package com.songoda.epicfarming.utils; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicfarming.EpicFarming; +import com.songoda.epicfarming.Lang; +import org.apache.commons.lang.math.NumberUtils; +import org.bukkit.Material; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + +/** + * Created by songoda on 2/24/2017. + */ +public class Methods { + + public static ItemStack getGlass() { + try { + EpicFarming plugin = EpicFarming.pl(); + return Arconix.pl().getApi().getGUI().getGlass(plugin.getConfig().getBoolean("settings.Rainbow-Glass"), plugin.getConfig().getInt("Interfaces.Glass Type 1")); + } catch (Exception ex) { + Debugger.runReport(ex); + } + return null; + } + + public static ItemStack getBackgroundGlass(boolean type) { + try { + EpicFarming plugin = EpicFarming.pl(); + if (type) + return Arconix.pl().getApi().getGUI().getGlass(false, plugin.getConfig().getInt("Interfaces.Glass Type 2")); + else + return Arconix.pl().getApi().getGUI().getGlass(false, plugin.getConfig().getInt("Interfaces.Glass Type 3")); + } catch (Exception ex) { + Debugger.runReport(ex); + } + return null; + } + + public static int getLevelFromItem(ItemStack item) { + try { + if (!item.hasItemMeta() || !item.getItemMeta().hasDisplayName()) return 0; + if (item.getItemMeta().getDisplayName().contains(":")) { + return NumberUtils.toInt(item.getItemMeta().getDisplayName().replace("\u00A7", "").split(":")[0], 0); + } + } catch (Exception ex) { + Debugger.runReport(ex); + } + return 0; + } + + public static String formatName(int level, boolean full) { + try { + String name = Lang.NAME_FORMAT.getConfigValue(level); + + String info = ""; + if (full) { + info += Arconix.pl().getApi().format().convertToInvisibleString(level + ":"); + } + + return info + Arconix.pl().getApi().format().formatText(name); + } catch (Exception ex) { + Debugger.runReport(ex); + } + return null; + } + + public static ItemStack makeFarmItem(int level) { + ItemStack item = new ItemStack(Material.END_ROD, 1); + ItemMeta meta = item.getItemMeta(); + meta.setDisplayName(Arconix.pl().getApi().format().formatText(Methods.formatName(level, true))); + item.setItemMeta(meta); + return item; + } +} diff --git a/src/main/java/com/songoda/epicfarming/utils/SettingsManager.java b/src/main/java/com/songoda/epicfarming/utils/SettingsManager.java new file mode 100644 index 0000000..f296bc6 --- /dev/null +++ b/src/main/java/com/songoda/epicfarming/utils/SettingsManager.java @@ -0,0 +1,246 @@ +package com.songoda.epicfarming.utils; + +import com.songoda.arconix.api.utils.ConfigWrapper; +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicfarming.EpicFarming; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.player.AsyncPlayerChatEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Created by songo on 6/4/2017. + */ +public class SettingsManager implements Listener { + + private String pluginName = "EpicFarming"; + private final EpicFarming instance; + + private static ConfigWrapper defs; + + private Map cat = new HashMap<>(); + + public SettingsManager(EpicFarming instance) { + this.instance = instance; + instance.saveResource("SettingDefinitions.yml", true); + defs = new ConfigWrapper(instance, "", "SettingDefinitions.yml"); + defs.createNewFile("Loading data file", "EpicFarming SettingDefinitions file"); + instance.getServer().getPluginManager().registerEvents(this, instance); + } + + public Map current = new HashMap<>(); + + @EventHandler + public void onInventoryClick(InventoryClickEvent e) { + if (e.getInventory() == null + || e.getCurrentItem() == null + || !e.getCurrentItem().hasItemMeta() + || !e.getCurrentItem().getItemMeta().hasDisplayName() + || e.getWhoClicked().getOpenInventory().getTopInventory() != e.getInventory()) { + return; + } + if (e.getInventory().getTitle().equals(pluginName + " Settings Manager")) { + + if (e.getCurrentItem().getType().equals(Material.STAINED_GLASS_PANE)) { + e.setCancelled(true); + return; + } + + String type = ChatColor.stripColor(e.getCurrentItem().getItemMeta().getDisplayName()); + cat.put((Player) e.getWhoClicked(), type); + openEditor((Player) e.getWhoClicked()); + e.setCancelled(true); + } else if (e.getInventory().getTitle().equals(pluginName + " Settings Editor")) { + + if (e.getCurrentItem().getType().equals(Material.STAINED_GLASS_PANE)) { + e.setCancelled(true); + return; + } + + Player p = (Player) e.getWhoClicked(); + e.setCancelled(true); + + String key = cat.get(p) + "." + ChatColor.stripColor(e.getCurrentItem().getItemMeta().getDisplayName()); + + if (instance.getConfig().get(key).getClass().getName().equals("java.lang.Boolean")) { + boolean bool = (Boolean) instance.getConfig().get(key); + if (!bool) + instance.getConfig().set(key, true); + else + instance.getConfig().set(key, false); + finishEditing(p); + } else { + editObject(p, key); + } + } + } + + @EventHandler + public void onChat(AsyncPlayerChatEvent e) { + final Player p = e.getPlayer(); + if (!current.containsKey(p)) { + return; + } + switch (instance.getConfig().get(current.get(p)).getClass().getName()) { + case "java.lang.Integer": + instance.getConfig().set(current.get(p), Integer.parseInt(e.getMessage())); + break; + case "java.lang.Double": + instance.getConfig().set(current.get(p), Double.parseDouble(e.getMessage())); + break; + case "java.lang.String": + instance.getConfig().set(current.get(p), e.getMessage()); + break; + } + finishEditing(p); + e.setCancelled(true); + + } + + public void finishEditing(Player p) { + current.remove(p); + instance.saveConfig(); + openEditor(p); + } + + + public void editObject(Player p, String current) { + this.current.put(p, ChatColor.stripColor(current)); + p.closeInventory(); + p.sendMessage(""); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Please enter a value for &6" + current + "&7.")); + if (instance.getConfig().get(current).getClass().getName().equals("java.lang.Integer")) { + p.sendMessage(Arconix.pl().getApi().format().formatText("&cUse only numbers.")); + } + p.sendMessage(""); + } + + public void openSettingsManager(Player p) { + Inventory i = Bukkit.createInventory(null, 27, pluginName + " Settings Manager"); + int nu = 0; + while (nu != 27) { + i.setItem(nu, Methods.getGlass()); + nu++; + } + + int spot = 10; + for (String key : instance.getConfig().getConfigurationSection("").getKeys(false)) { + ItemStack item = new ItemStack(Material.WOOL, 1, (byte) (spot - 9)); + ItemMeta meta = item.getItemMeta(); + meta.setLore(Collections.singletonList(Arconix.pl().getApi().format().formatText("&6Click To Edit This Category."))); + meta.setDisplayName(Arconix.pl().getApi().format().formatText("&f&l" + key)); + item.setItemMeta(meta); + i.setItem(spot, item); + spot++; + } + p.openInventory(i); + } + + public void openEditor(Player p) { + Inventory i = Bukkit.createInventory(null, 54, pluginName + " Settings Editor"); + + int num = 0; + for (String key : instance.getConfig().getConfigurationSection(cat.get(p)).getKeys(true)) { + String fKey = cat.get(p) + "." + key; + ItemStack item = new ItemStack(Material.DIAMOND_HELMET); + ItemMeta meta = item.getItemMeta(); + meta.setDisplayName(Arconix.pl().getApi().format().formatText("&6" + key)); + ArrayList lore = new ArrayList<>(); + switch (instance.getConfig().get(fKey).getClass().getName()) { + case "java.lang.Boolean": + + item.setType(Material.LEVER); + boolean bool = (Boolean) instance.getConfig().get(fKey); + + if (!bool) + lore.add(Arconix.pl().getApi().format().formatText("&c" + false)); + else + lore.add(Arconix.pl().getApi().format().formatText("&a" + true)); + + break; + case "java.lang.String": + item.setType(Material.PAPER); + String str = (String) instance.getConfig().get(fKey); + lore.add(Arconix.pl().getApi().format().formatText("&9" + str)); + break; + case "java.lang.Integer": + item.setType(Material.WATCH); + + int in = (Integer) instance.getConfig().get(fKey); + lore.add(Arconix.pl().getApi().format().formatText("&5" + in)); + break; + default: + continue; + } + if (defs.getConfig().contains(fKey)) { + String text = defs.getConfig().getString(key); + + Pattern regex = Pattern.compile("(.{1,28}(?:\\s|$))|(.{0,28})", Pattern.DOTALL); + Matcher m = regex.matcher(text); + while (m.find()) { + if (m.end() != text.length() || m.group().length() != 0) + lore.add(Arconix.pl().getApi().format().formatText("&7" + m.group())); + } + } + meta.setLore(lore); + item.setItemMeta(meta); + + i.setItem(num, item); + num++; + } + p.openInventory(i); + } + + public void updateSettings() { + for (settings s : settings.values()) { + if (s.setting.equals("Main.Upgrade Particle Type")) { + if (instance.v1_7 || instance.v1_8) + instance.getConfig().addDefault(s.setting, "WITCH_MAGIC"); + else + instance.getConfig().addDefault(s.setting, s.option); + } else + instance.getConfig().addDefault(s.setting, s.option); + } + } + + public enum settings { + o1("Main.Upgrade With Economy", true), + o2("Main.Upgrade With XP", true), + o3("Main.Upgrade Particle Type", "SPELL_WITCH"), + o4("Main.Sounds Enabled", true), + o5("Main.Farm Tick Speed", 70), + o6("Main.Growth Tick Speed", 20), + o7("Main.Clear Tick Speed", 1800), + + o8("Interfaces.Economy Icon", "DOUBLE_PLANT"), + o9("Interfaces.XP Icon", "EXP_BOTTLE"), + o10("Interfaces.Glass Type 1", 7), + o11("Interfaces.Glass Type 2", 11), + o12("Interfaces.Glass Type 3", 3), + + o13("System.Debugger Enabled", false); + + private String setting; + private Object option; + + settings(String setting, Object option) { + this.setting = setting; + this.option = option; + } + + } +} \ No newline at end of file diff --git a/src/SettingDefinitions.yml b/src/main/resources/SettingDefinitions.yml similarity index 100% rename from src/SettingDefinitions.yml rename to src/main/resources/SettingDefinitions.yml diff --git a/src/plugin.yml b/src/main/resources/plugin.yml similarity index 100% rename from src/plugin.yml rename to src/main/resources/plugin.yml