From 865bab0ecf36773a7920e9f56ec71f41748e13b3 Mon Sep 17 00:00:00 2001 From: NovaFox161 Date: Mon, 7 May 2018 10:27:48 -0500 Subject: [PATCH] Maven + UTF-8 + New Arconix --- .gitignore | 2 + pom.xml | 224 +++ src/com/massivestats/MassiveStats.java | Bin 37184 -> 0 bytes .../epicspawners/API/EpicSpawnersAPI.java | Bin 31964 -> 0 bytes .../songoda/epicspawners/Entity/EPlayer.java | Bin 10902 -> 0 bytes .../songoda/epicspawners/EpicSpawners.java | Bin 29418 -> 0 bytes .../epicspawners/Events/BlockListeners.java | Bin 30396 -> 0 bytes .../epicspawners/Events/ChatListeners.java | Bin 15116 -> 0 bytes .../epicspawners/Events/EntityListeners.java | Bin 12594 -> 0 bytes .../Events/InteractListeners.java | Bin 15236 -> 0 bytes .../Events/InventoryListeners.java | Bin 51424 -> 0 bytes .../epicspawners/Events/SpawnerListeners.java | Bin 34090 -> 0 bytes .../epicspawners/Events/TestListeners.java | Bin 6064 -> 0 bytes .../Handlers/BlacklistHandler.java | Bin 4256 -> 0 bytes .../epicspawners/Handlers/BoostHandler.java | Bin 7822 -> 0 bytes .../epicspawners/Handlers/CommandHandler.java | Bin 73634 -> 0 bytes .../Handlers/HologramHandler.java | Bin 21020 -> 0 bytes .../epicspawners/Handlers/HookHandler.java | Bin 7256 -> 0 bytes .../epicspawners/Handlers/ItemHandler.java | Bin 32530 -> 0 bytes .../epicspawners/Handlers/OmniHandler.java | Bin 8658 -> 0 bytes .../epicspawners/Hooks/ASkyBlockHook.java | Bin 3430 -> 0 bytes .../epicspawners/Hooks/FactionsHook.java | Bin 3296 -> 0 bytes .../Hooks/GriefPreventionHook.java | Bin 2122 -> 0 bytes src/com/songoda/epicspawners/Hooks/Hook.java | Bin 2154 -> 0 bytes .../epicspawners/Hooks/KingdomsHook.java | Bin 2964 -> 0 bytes .../epicspawners/Hooks/PlotSquaredHook.java | Bin 2032 -> 0 bytes .../epicspawners/Hooks/RedProtectHook.java | Bin 1936 -> 0 bytes .../songoda/epicspawners/Hooks/TownyHook.java | Bin 3492 -> 0 bytes .../epicspawners/Hooks/USkyBlockHook.java | Bin 2634 -> 0 bytes .../epicspawners/Hooks/WorldGuardHook.java | Bin 1838 -> 0 bytes src/com/songoda/epicspawners/Locale.java | Bin 23802 -> 0 bytes src/com/songoda/epicspawners/References.java | Bin 584 -> 0 bytes .../songoda/epicspawners/Spawners/Shop.java | Bin 31468 -> 0 bytes .../epicspawners/Spawners/Spawner.java | Bin 142406 -> 0 bytes .../Spawners/SpawnerBreakEvent.java | Bin 3120 -> 0 bytes .../Spawners/SpawnerChangeEvent.java | Bin 3470 -> 0 bytes .../Spawners/SpawnerDropEvent.java | Bin 3106 -> 0 bytes .../epicspawners/Spawners/SpawnerEditor.java | Bin 107424 -> 0 bytes .../epicspawners/Spawners/SpawnerItem.java | Bin 1260 -> 0 bytes .../Spawners/SpawnerPlaceEvent.java | Bin 2940 -> 0 bytes .../epicspawners/Utils/ConfigWrapper.java | Bin 3636 -> 0 bytes .../songoda/epicspawners/Utils/Debugger.java | Bin 1830 -> 0 bytes .../songoda/epicspawners/Utils/HeadType.java | Bin 12904 -> 0 bytes src/com/songoda/epicspawners/Utils/Heads.java | Bin 3078 -> 0 bytes .../songoda/epicspawners/Utils/Methods.java | Bin 20488 -> 0 bytes .../epicspawners/Utils/Reflection.java | Bin 3608 -> 0 bytes .../epicspawners/Utils/SettingsManager.java | Bin 28510 -> 0 bytes .../java/com/massivestats/MassiveStats.java | 490 ++++++ .../songoda/epicspawners/EpicSpawners.java | 340 ++++ .../java/com/songoda/epicspawners/Locale.java | 365 +++++ .../com/songoda/epicspawners/References.java | 14 + .../epicspawners/api/EpicSpawnersAPI.java | 428 +++++ .../songoda/epicspawners/entity/EPlayer.java | 105 ++ .../handlers/BlacklistHandler.java | 68 + .../epicspawners/handlers/BoostHandler.java | 65 + .../epicspawners/handlers/CommandHandler.java | 541 +++++++ .../handlers/HologramHandler.java | 217 +++ .../epicspawners/handlers/HookHandler.java | 114 ++ .../epicspawners/handlers/ItemHandler.java | 242 +++ .../epicspawners/handlers/OmniHandler.java | 79 + .../epicspawners/hooks/ASkyBlockHook.java | 64 + .../epicspawners/hooks/FactionsHook.java | 57 + .../hooks/GriefPreventionHook.java | 37 + .../com/songoda/epicspawners/hooks/Hook.java | 40 + .../epicspawners/hooks/KingdomsHook.java | 43 + .../epicspawners/hooks/PlotSquaredHook.java | 38 + .../epicspawners/hooks/RedProtectHook.java | 33 + .../songoda/epicspawners/hooks/TownyHook.java | 56 + .../epicspawners/hooks/USkyBlockHook.java | 49 + .../epicspawners/hooks/WorldGuardHook.java | 31 + .../listeners/BlockListeners.java | 317 ++++ .../epicspawners/listeners/ChatListeners.java | 98 ++ .../listeners/EntityListeners.java | 115 ++ .../listeners/InteractListeners.java | 177 +++ .../listeners/InventoryListeners.java | 389 +++++ .../listeners/SpawnerListeners.java | 339 ++++ .../epicspawners/listeners/TestListeners.java | 59 + .../songoda/epicspawners/spawners/Shop.java | 343 ++++ .../epicspawners/spawners/Spawner.java | 1373 +++++++++++++++++ .../spawners/SpawnerBreakEvent.java | 66 + .../spawners/SpawnerChangeEvent.java | 82 + .../spawners/SpawnerDropEvent.java | 68 + .../epicspawners/spawners/SpawnerEditor.java | 1095 +++++++++++++ .../epicspawners/spawners/SpawnerItem.java | 31 + .../spawners/SpawnerPlaceEvent.java | 63 + .../songoda/epicspawners/utils/Debugger.java | 31 + .../songoda/epicspawners/utils/HeadType.java | 68 + .../com/songoda/epicspawners/utils/Heads.java | 47 + .../songoda/epicspawners/utils/Methods.java | 283 ++++ .../epicspawners/utils/Reflection.java | 54 + .../epicspawners/utils/SettingsManager.java | 310 ++++ .../resources}/SettingDefinitions.yml | 0 src/{ => main/resources}/blacklist.yml | 0 src/{ => main/resources}/config.yml | 0 src/{ => main/resources}/en_US.lang | 0 src/main/resources/plugin.yml | 21 + src/plugin.yml | Bin 1238 -> 0 bytes 97 files changed, 9171 insertions(+) create mode 100644 pom.xml delete mode 100644 src/com/massivestats/MassiveStats.java delete mode 100644 src/com/songoda/epicspawners/API/EpicSpawnersAPI.java delete mode 100644 src/com/songoda/epicspawners/Entity/EPlayer.java delete mode 100644 src/com/songoda/epicspawners/EpicSpawners.java delete mode 100644 src/com/songoda/epicspawners/Events/BlockListeners.java delete mode 100644 src/com/songoda/epicspawners/Events/ChatListeners.java delete mode 100644 src/com/songoda/epicspawners/Events/EntityListeners.java delete mode 100644 src/com/songoda/epicspawners/Events/InteractListeners.java delete mode 100644 src/com/songoda/epicspawners/Events/InventoryListeners.java delete mode 100644 src/com/songoda/epicspawners/Events/SpawnerListeners.java delete mode 100644 src/com/songoda/epicspawners/Events/TestListeners.java delete mode 100644 src/com/songoda/epicspawners/Handlers/BlacklistHandler.java delete mode 100644 src/com/songoda/epicspawners/Handlers/BoostHandler.java delete mode 100644 src/com/songoda/epicspawners/Handlers/CommandHandler.java delete mode 100644 src/com/songoda/epicspawners/Handlers/HologramHandler.java delete mode 100644 src/com/songoda/epicspawners/Handlers/HookHandler.java delete mode 100644 src/com/songoda/epicspawners/Handlers/ItemHandler.java delete mode 100644 src/com/songoda/epicspawners/Handlers/OmniHandler.java delete mode 100644 src/com/songoda/epicspawners/Hooks/ASkyBlockHook.java delete mode 100644 src/com/songoda/epicspawners/Hooks/FactionsHook.java delete mode 100644 src/com/songoda/epicspawners/Hooks/GriefPreventionHook.java delete mode 100644 src/com/songoda/epicspawners/Hooks/Hook.java delete mode 100644 src/com/songoda/epicspawners/Hooks/KingdomsHook.java delete mode 100644 src/com/songoda/epicspawners/Hooks/PlotSquaredHook.java delete mode 100644 src/com/songoda/epicspawners/Hooks/RedProtectHook.java delete mode 100644 src/com/songoda/epicspawners/Hooks/TownyHook.java delete mode 100644 src/com/songoda/epicspawners/Hooks/USkyBlockHook.java delete mode 100644 src/com/songoda/epicspawners/Hooks/WorldGuardHook.java delete mode 100644 src/com/songoda/epicspawners/Locale.java delete mode 100644 src/com/songoda/epicspawners/References.java delete mode 100644 src/com/songoda/epicspawners/Spawners/Shop.java delete mode 100644 src/com/songoda/epicspawners/Spawners/Spawner.java delete mode 100644 src/com/songoda/epicspawners/Spawners/SpawnerBreakEvent.java delete mode 100644 src/com/songoda/epicspawners/Spawners/SpawnerChangeEvent.java delete mode 100644 src/com/songoda/epicspawners/Spawners/SpawnerDropEvent.java delete mode 100644 src/com/songoda/epicspawners/Spawners/SpawnerEditor.java delete mode 100644 src/com/songoda/epicspawners/Spawners/SpawnerItem.java delete mode 100644 src/com/songoda/epicspawners/Spawners/SpawnerPlaceEvent.java delete mode 100644 src/com/songoda/epicspawners/Utils/ConfigWrapper.java delete mode 100644 src/com/songoda/epicspawners/Utils/Debugger.java delete mode 100644 src/com/songoda/epicspawners/Utils/HeadType.java delete mode 100644 src/com/songoda/epicspawners/Utils/Heads.java delete mode 100644 src/com/songoda/epicspawners/Utils/Methods.java delete mode 100644 src/com/songoda/epicspawners/Utils/Reflection.java delete mode 100644 src/com/songoda/epicspawners/Utils/SettingsManager.java create mode 100644 src/main/java/com/massivestats/MassiveStats.java create mode 100644 src/main/java/com/songoda/epicspawners/EpicSpawners.java create mode 100644 src/main/java/com/songoda/epicspawners/Locale.java create mode 100644 src/main/java/com/songoda/epicspawners/References.java create mode 100644 src/main/java/com/songoda/epicspawners/api/EpicSpawnersAPI.java create mode 100644 src/main/java/com/songoda/epicspawners/entity/EPlayer.java create mode 100644 src/main/java/com/songoda/epicspawners/handlers/BlacklistHandler.java create mode 100644 src/main/java/com/songoda/epicspawners/handlers/BoostHandler.java create mode 100644 src/main/java/com/songoda/epicspawners/handlers/CommandHandler.java create mode 100644 src/main/java/com/songoda/epicspawners/handlers/HologramHandler.java create mode 100644 src/main/java/com/songoda/epicspawners/handlers/HookHandler.java create mode 100644 src/main/java/com/songoda/epicspawners/handlers/ItemHandler.java create mode 100644 src/main/java/com/songoda/epicspawners/handlers/OmniHandler.java create mode 100644 src/main/java/com/songoda/epicspawners/hooks/ASkyBlockHook.java create mode 100644 src/main/java/com/songoda/epicspawners/hooks/FactionsHook.java create mode 100644 src/main/java/com/songoda/epicspawners/hooks/GriefPreventionHook.java create mode 100644 src/main/java/com/songoda/epicspawners/hooks/Hook.java create mode 100644 src/main/java/com/songoda/epicspawners/hooks/KingdomsHook.java create mode 100644 src/main/java/com/songoda/epicspawners/hooks/PlotSquaredHook.java create mode 100644 src/main/java/com/songoda/epicspawners/hooks/RedProtectHook.java create mode 100644 src/main/java/com/songoda/epicspawners/hooks/TownyHook.java create mode 100644 src/main/java/com/songoda/epicspawners/hooks/USkyBlockHook.java create mode 100644 src/main/java/com/songoda/epicspawners/hooks/WorldGuardHook.java create mode 100644 src/main/java/com/songoda/epicspawners/listeners/BlockListeners.java create mode 100644 src/main/java/com/songoda/epicspawners/listeners/ChatListeners.java create mode 100644 src/main/java/com/songoda/epicspawners/listeners/EntityListeners.java create mode 100644 src/main/java/com/songoda/epicspawners/listeners/InteractListeners.java create mode 100644 src/main/java/com/songoda/epicspawners/listeners/InventoryListeners.java create mode 100644 src/main/java/com/songoda/epicspawners/listeners/SpawnerListeners.java create mode 100644 src/main/java/com/songoda/epicspawners/listeners/TestListeners.java create mode 100644 src/main/java/com/songoda/epicspawners/spawners/Shop.java create mode 100644 src/main/java/com/songoda/epicspawners/spawners/Spawner.java create mode 100644 src/main/java/com/songoda/epicspawners/spawners/SpawnerBreakEvent.java create mode 100644 src/main/java/com/songoda/epicspawners/spawners/SpawnerChangeEvent.java create mode 100644 src/main/java/com/songoda/epicspawners/spawners/SpawnerDropEvent.java create mode 100644 src/main/java/com/songoda/epicspawners/spawners/SpawnerEditor.java create mode 100644 src/main/java/com/songoda/epicspawners/spawners/SpawnerItem.java create mode 100644 src/main/java/com/songoda/epicspawners/spawners/SpawnerPlaceEvent.java create mode 100644 src/main/java/com/songoda/epicspawners/utils/Debugger.java create mode 100644 src/main/java/com/songoda/epicspawners/utils/HeadType.java create mode 100644 src/main/java/com/songoda/epicspawners/utils/Heads.java create mode 100644 src/main/java/com/songoda/epicspawners/utils/Methods.java create mode 100644 src/main/java/com/songoda/epicspawners/utils/Reflection.java create mode 100644 src/main/java/com/songoda/epicspawners/utils/SettingsManager.java rename src/{ => main/resources}/SettingDefinitions.yml (100%) rename src/{ => main/resources}/blacklist.yml (100%) rename src/{ => main/resources}/config.yml (100%) rename src/{ => main/resources}/en_US.lang (100%) create mode 100644 src/main/resources/plugin.yml delete mode 100644 src/plugin.yml diff --git a/.gitignore b/.gitignore index 33e493a..d8023dc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ out/ \.idea/ +/EpicSpawners.iml +/src/main/resources/META-INF/MANIFEST.MF diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..2e50596 --- /dev/null +++ b/pom.xml @@ -0,0 +1,224 @@ + + 4.0.0 + com.songoda + EpicSpawners + 4.2.5 + + jar + + EpicSpawners + + + 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 + + + + placeholderapi + http://repo.extendedclip.com/content/repositories/placeholderapi/ + + + jitpack.io + https://jitpack.io + + + + + + + org.bukkit + bukkit + 1.12.2-R0.1-SNAPSHOT + jar + provided + + + + org.spigotmc + spigot-api + 1.12.2-R0.1-SNAPSHOT + 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 + + + + uk.antiperson + StackMob + 2.2.9-SNAPSHOT + provided + + + + me.clip + placeholderapi + 2.8.4 + provided + + + + org.bukkit + craftbukkit + 1.7.10 + provided + + + + commons-lang + commons-lang + 2.6 + compile + + + + commons-io + commons-io + 2.6 + + + \ No newline at end of file diff --git a/src/com/massivestats/MassiveStats.java b/src/com/massivestats/MassiveStats.java deleted file mode 100644 index f8c0525a827ee6239d90b200af0ee234879ad951..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37184 zcmeI5ZF3wqa>wWOeTubG71K&?W#1(!=MtwROR~(1o{FNK%Bw3%q-5D5rSQSFqSIHu zq<{0@78)2}W_CsDq3()B&hE?rX!LV88sK04ue;J+?tarP?C&D{T<@NDFS?iAard-) z(*4k#+OywvpLbt$U)raw?os!dUGH>z-HH7??SAeK?E3?IZ_j?8+CBb0vg@L|Z9muT z`dj&U*6cU)+hFR-1oEp2A*9TnZ6d?W4k`<$2hbRUfP}K-I3kl)5HG$ zS>MCHeSd0C7B)6-{Men@-$y+(d|!0G*z;5CchUa^>Q9S#_$*HB$>I%M%;un5u3)=j z*WVb1_U!IY_V-B-17jZAJHVLm0xrPHN%wDktEcw-g}r%f_n61AwO-mR&a9`Odgzwj z*Wnwj=CrwPvtk@*_pI-CZp(un??={l+1-5e`CIGlsN3)He%!-82a4F&ZG)THA6P$7 zcN2JC*!WPK_RH>m`1VJeBeYHs&+VT+&kXCdUK)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*inUe0Iad?oX*YsDRV{lc^#d~w>>zHv?#rx{ZzgI$Is*c)S9%S2JP`xPUIi$8d^i;u@D=)U{}PpLvG3Ll=d6U~Ybj;V>+42E zU$Ix@tL#@2c4RqNvaNOcI5u)j3~Q0fzDqBrCVBM{hjO%jRmmomF6Uo|@^(^@vjID+B(Bwsh{JzZPLXV=c?3#_o!Sv7%FFMlv6yI#y5SwPTmly>fCqBaID%ar>bW;OKyrBQ&M|r@NU21JyC2vub^3Va$1}poaQn$O;>mnZrKd_ zWMRrRZB8C|XwrgwmR3TZ;BDhUEai#)&Gl%@`;D`lwxXL+kvw0rqF$+op23fRmR@(t zY8C$%^~h%Emfd+FokoifnpahOpZ>1&YsncU7sd70`Bcs2e$L#=zS|O+TYk|LsoG!B THTOs6(KN!Fw~sbPlzsjGKn97l diff --git a/src/com/songoda/epicspawners/API/EpicSpawnersAPI.java b/src/com/songoda/epicspawners/API/EpicSpawnersAPI.java deleted file mode 100644 index f185f8ed19ca7293f9f2783b737d97d2748e7315..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 31964 zcmeHQYjd2n71n2d#o`al2AYM0-i8upLI~7Ta+xHQwhY5Kj-f8T)$4?$f#1WwZ2LSq z`&gG((&}BW6DKg9Sl)f5qoZ>_N79@B{?8q`Ew}By$M5glj+@}`L$~i{ZjSZ<-yOO~ zcs9ecBe#pEb3ft-Jlk={_%w6Z-Ceio{^Z`k&o0IuVa%~RX~5dTbIx;s{!cxG_%k8( z!KvePbAj#s4BK_U&SB16`pt`&V-xh<0j<|D*B5}b>-Ib^KLON-?lJgIX*gax{9Ax} z;{NHSYF>a&$@vZvK^(rv&n|k;+{e+U;fl*+ZeW%zjJ|=n_Pj*)j{F?GxBb{%{B_Wc z`*iUad0C#lms&d*Pia4K&j9y2R<{qB$I##ttn&c2 zZZ$|ZBe-XW@Br8yVdbkqx(ljp0YX`S%RJu&{!cK1)L{=&M>fW2Ge#y$(DnhHG>&E5 zAk&hWUD)bgae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LU>QeP*os#-}z`2w$Up_6R7O|%v`rEHoG~C1t{`r1|TUCF*e0(F~Sy4qV_B}3g zr|~@N7ER2qqBV8CAPc73%V7;~nMLNALJzZSsGks%!7u8a{ zN$K2Sxp%UC=BBG>YmvRG?Nt}o<3@ea>0lk4rJhml@NRhsl2|^IHgbiUlZujkIy3E8RTdR z&olB>UE{n)oz7+T={7EXYtZlKb9ZA@;-F&_J38|2Jf48eGxF(~2M>q%yYM}>D()f; z?R9Vt($7HOBK~7peL2?YQ%eu%*lzaM8YJXFL)UTKoHDbi9=m9LOqrUoQ`n%wgYGNN zXZNtI-wunvmv+eeuI2vN?{rGGr6rZ3{3&wC3g>UhNq918t!^mZU#l0M(-F>*^o)dc zM%Z)U;7r$(31)G|;dScH=19Npt{v-c+Pl%Ow@$lM=lXQ(?De;VRiExUMrWzRzNT~Z ztaRDe9WFs7oo-V2^!n^@_38DHdrISflfDrxf=Rz@FP1765BA%&e!Fx{u>&V5QeB&6 znbHUoJA*Gc2%abQFpR426qjIaInBYdRUhiEP2Dw8HzrSm@Nw;!)w1<|I=WO3r)R&N z;{Q?s?POZ{>0jODWccbO8Bf<7?w`u?7x&0>e&_!Mr}P|Q_a@Q5kK`x!MGv~{$J))` z?)2x;p2h#MHBxU5o!$JuEsIJ@&!>p@4?D*fSBjQ_sAqiaUpxkit9v9AN0<*nzGwMC z=djCJx{lBLv_U1)oAh+Ta)FXVS9S=9!MHIs~%0QP5K>FD{EW6ZknABUArq!_Wv+Jvl diff --git a/src/com/songoda/epicspawners/Events/BlockListeners.java b/src/com/songoda/epicspawners/Events/BlockListeners.java deleted file mode 100644 index 1db6ab7e8ee56cdeefc07eaa62efed9b876f74dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30396 zcmd^IZBrb_5#G=K6$e#GVL3WWN~Ka2J5JDxEy|LmGO`^fl}dp?a3wehAj^`Yzn1?XxvSf!nonC}+GCc$ zzW1Thmh1oqXZ8{=YTdNE8+>cM=P|H2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Ea|P-4aV)IQ4e*>1u6TVjdDV|%RWfbZ@BpJoEMD|5 zh7=#ML*@_VlK)gk{3c5b zXr8U(WpR*;-2u(Haum><)h43(pNPf-mfut<4e@xfcHB0W7wwQp&Uy9jYA_lvhL~I> zQSbb2hsv^23^BQ85cM+I?KKNV-*bGpqBFWx4DM$9%;6Gb{!&NFGMnv;w@LPv(YwnW zwVADPb@T)W&$4Eg%@JIgx?sGiS!h#Z~R*xpOl)D9+2;lvFnJwpWz_Ka|?0o0t3y{c*i6{Uu1XDo+o7IWzFR2d z!0qS2WfmCfn4ylD-{X+4pa=Bs0IPL{AA_(KRkqVJlNB@Cu%CeSl>DC8-D7UX z3t6V$^IGG_#ql<)Z7MG!&rKPBr%(l9CfuZ66e_W*!FuOUyAoS}=SQgP2_+u_xZLp?#|JN85uN}5 diff --git a/src/com/songoda/epicspawners/Events/EntityListeners.java b/src/com/songoda/epicspawners/Events/EntityListeners.java deleted file mode 100644 index 98add1ef7815eb98da9441ac47c743f2d7490270..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12594 zcmd^FYi|=r6rIoficO?ePFj|Sidwa4)g%~*fPf$oZNF3`Ho?VlOq^$1{(9SU?)A;g zj(6AVUAqdPmA%iobD!tldHnOQ8@ktS-@U{Cf$O>i*GKNqrEY}t0MCwG2k%n68@e9e zj-zzp_M&%3X9VZj>VEq^&irI z3aTgWt@xArNtQajm~=lrrB>r*o9mP_foMven@<+e;h#8Wu6u=$~%`?3`~8Z6NAU z{IY|-7A1%G&ukAda{mEo&+tnT&D233S6gDkW6=XGHYtBzE3-bozTs}URU9{vV^;C= zcI?7m6ClYY{35kyGbU9`RH?#cgccgKATj+D+VoQL3(amjqg{Kc#>!jV9e-ipQx z?X0;lK?`O+#>ydnniCTjf0?+y&OyYhNJ}kcCm`dFv==LH0 z+sGI@ZYAg^E7uvQ_C!-e$qjIQ){n_eylrekS{;v_voO`Bi&82VO9CSf#auN{T1+%xyfo0M%JEX0oZ>sV_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mgr^>pmSC}W&lXy?>$#Vkr zmY+WhmV)=pqc<>DPyEp<5mFhJ7Q1Yo^7)-~X#0$V+Hd}#CLcsl28YEkXN$u^mK9S+buwABKJ2~E3m?qIL>^1VVud=dmoj5 z8#b)os%&q7^6n$@vzyNdeT+^OPw>cYdhnyx4`?+KMq_sA%W9hG_c!9!)Oe()yQcNT zVHJCl&t_uwecTDZ`n;x1dFP`rYs4@4yqlcQR2r-Ekm8PcjQ+)1pjuhbofxaQP8Owo zu4c-Mr$}^enNPUxX@PialRn+f%+bZxgzUrTYrMKHOml6fHmQ=8ej>TO2|vkQUjCnk zbfg&}_4I{i$XZKDUbpQlIURfMZIU~4{Qrp1^`1S_Dz-Mx+wPF?q8J^e_p^v-)yrVG zI@vLjy@t9hMc3A=a*Ub8tQ}tNM;xIiMvQ4w<(*#1oZDPyx_+-xtk=8-7P|wMDy_16 zJ}1y<6_*+4ih3oFq*GE>jfAs2)5x)|2GVuwzG2<3`y1sv2?)%Q~09_}Z24Utc-RY+OkV4dJ(Id6fSyT9WZPPyLb-oz? gXa~%$NBGMVK2`m%^Tygfw*N&)WtMI+=RJP^23`qpSpWb4 diff --git a/src/com/songoda/epicspawners/Events/InventoryListeners.java b/src/com/songoda/epicspawners/Events/InventoryListeners.java deleted file mode 100644 index 02598b013c5beabafc4d0f2a45d351e6e382b74d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 51424 zcmeHQU2_~Y7VT$##l#PkVK);TLRfYQg%bj}2qc9A?Aw;@OoBIwZETYe0>6iUxx44+ z`dHm+b&sU(89VHh%a&(GBVFC^dv&G$&ws0`>Mi{2V}v7o^BC`SkGO-+IokpH z|AKKg8?QN1+BkiX8O+-O%wvoljybKG?<`}EE#P+sT#qr=cNlBGdgdtl8Ajc$eg^f) z6UU>E|20NEt$uX8WjxcQG&$!9ID#-d#m_!^PpjLtSM3$Yzwi3MF zIqxgS;pA?6^$_nIVZ^eL9sq_Nj1b3ad=0a6`Krs>ml)>&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DePs~EOr5kyn#%#W~npBDE$xaW2i)wDdbdKG`|Sqc{u zYv(`tB*dLwUjz<$_u0i_a7cZEFsF9;82kdfN4~uX-h02`Mtfl@Y?p(%2QDl26jIDA z8PDrenup`AJV(wPq{W+eK*s}@vnzcXYlzdF>gHyiFQ+0vvno#US=B$!4tuvH`xq63 zd^&~h%=N2p#)Z5eM^CBxt@;hGx_atah9AxyQ$79J6w#uzT_iV#Fva*~RlN{mDSSPK zo_tfP7_@fnM8>ML7InjESn)FaJn))3fxC%XqeqbJcHI`Ei*h?6T&W#{Pxf4PgXf%Q z0lXFuPSjk3I@`BCFEAol}!%gc(g6m?*rA1N<(h-(HPAtg%ls8jp>-YQEMaP4U;k8AU>xT|^3m%lTqt@X#rSbPMn{H*#0 zJn<5I()2MD4W;=N^0*dBrS}qPG$t&HzVajIaWHWN+VDPWdooU{p1CYsN@d= z?j%_rw@P=(`_xUz<+pV%g6bZ+lBYxV#VnGP6~71*{q16@%d=hS65j1i&!Z-Nfzn8H zxI}XVJL$kXTkMI_CynUVG=@EW#Ga49xH!)qjT`5N9?oTpF#lY7rB4FcwTDe%&1dJs+bl>@f_bR zm3mDt;}d96RU_H0sXpt_?D?_lSSu2j8&jf}^w5uH*cM zf1h*tnI(nw9`qn$6cBexlFKZq-L%i_5aH%-A#41ZP1NBB(EfjhEhg&sot zoZuVx&{|%*EK=Z3zalW6C+XAN!k1cc_!a0SK|TBqON~_bv!=j9y)tbJ+ETWNw$ML$ zWD3jXZDEdVXjS7?U=g<)E>`HXPIW&)FsNNLhRJW_EvuMl+ciE7$SVG*1D>4ihRm0& hGKo^XtIcJ#Df9Jis>e6aj-~p0abKfOMgEW9{{c1S)NB9% diff --git a/src/com/songoda/epicspawners/Events/SpawnerListeners.java b/src/com/songoda/epicspawners/Events/SpawnerListeners.java deleted file mode 100644 index a8a490317bd9c8655b5f889a497bf3ccb92ce4e6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34090 zcmeHQYjYI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PoU zIq}f?E!Xr3w0e4PopjaRGQ1Qs14gJTumeW^aiqWGoXvx_TS_@KY{~2{mQ0y-43nOu znd@Ax!NRJ2Hlwz5Y>V#tPREjKa@tI@^0Q8HAB}DOy(?HKA8|a+)L-=@qFg&|_bU2y z``v5DLS4Qf#we0xev~CDDpP8oLa+1QCXs)a{mj0{@-OZu$6w33gxGKo8Jb6mF3NK% zQ?yy4!|1hZ5@l*qFVj4vtr z0>^E)ZrNUB-)^h=^4cB15fZ uJkG}#`={7q^Xu}@ZE>#VnpoCW=^$59%Vp+O@{46{G?n_zH@_nXsQo|T_dCY` diff --git a/src/com/songoda/epicspawners/Events/TestListeners.java b/src/com/songoda/epicspawners/Events/TestListeners.java deleted file mode 100644 index b4e70ae7a9f56960b6590459601f6feed5699aa4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6064 zcmd6rTW{M&5QXR2zk>BcDyJ#cG-(60DA3liYo!Si#5Vd^$hwuVBQX*kyD0M4(|%`H z8!l-|VPqE&2#J?n&d!`Ub6I})*K+IIz|Q%f*vJyDXZFTYTX3H8Y-U5oQpR%27+ttG zt{5BHoV(Nx>>bxrE4cg7b~rL5#1^*nei1pd}3F4uz`j!eWArnsv^R@pfvjvAzIZNfHh>^=f|4qb(VKJN$*c zzdPYcjt-ki>LF)@?+($n&v{chufU~`CZB`F=p&0_Mjat%3Ii|hK-Md)63+S;a_un+ z{7&sT?=Bolp8uQ3$Rl)8i?QmtC=zOl$%2R|h_2GRWu)Ehy3ar*W1Xt}9qZbCjvZq7 zKEHkR8ljmuGUWaY3=`0Z^F-qA5_`nE58eN__6=80;Hj6><(v}*XP}^bqWmDXEI1N7 zLALO%GMr;V`gIiu!7d|$Ip>fRW^0dqsoZHe&VeXg*szWJF=er#{YpG zqw8L@PSvJ&4pE^bbYdUJ{;d1EQ<+&GUCo9BJoZ>imIu4TxxhyGsc9_C$!yGw4pLH= z!3r`{#?@bVVt?tUb4G{E(K_OayrkG1@Oyv-|OV)wnX&7Fa(+pIvA17mgWIczeOo z)~;Y*ykdfkOI8;*#I{o3b(ja6PSG&4w@4VlMDLFjduBDO_FQ%g>woIJ&G@HyAhECb z1>A)G?fen&=-~fm*0%GC*tc+;s#o&PjoO|PNzd&i|G(QGta?li`O_ZTcd$v>Jm}Q+ zyjiRSR!eX3`w9d$lccWj|BJdNuX~=K5|iq1<{+u6F>*QS0r)*M{gyGSzk$PT0Q$s?Luc!t!&|GS!r)u!D3%0pjpqY@wm9qgh`0JkPUO9TixDEYL{dyHLO62knz&nJk?0^LwVaLdUa&#UZoQ5Bmu5 z*3@gj?YyI0IAdR?{cL@;qve=5rHZ|27a%?5PUvrX7|oqOo0Tt4N{E6E`OK^lAE|Y& zX}@skr1_pYpmD}?eIxO4ygfYeSe)Q9-%rbfS6r)0)|IS0Up|v9!8+~0wS)Aw`iv7$ zyK<<0>1OnqHAYq+S?cW-Guw%QBFAUl3_U&jOD5=Rf!{SNBa7YYy{6bS!?xj;+H}vp z$7cnH>dO!8>APsHLzzrfP~Qg&_TvMd$k!8Q_(+zg^?gr1>(b>u=4-$sV!i7kep{K` zgKeePo8K-CI2BIV(UGt~jqAB5~g=%8V~56Ml-C?c{Ue{5M5& zv7p*>d>!>1%HPUW!cEqc8Qg!{_51I;_ILYw8F#v&c7}7)Slb?b^%s{Qy={*!Nlh6& J)=t;_{sT(2v@`$! diff --git a/src/com/songoda/epicspawners/Handlers/BlacklistHandler.java b/src/com/songoda/epicspawners/Handlers/BlacklistHandler.java deleted file mode 100644 index aa44ddf4c45a32d240a3602bd8eec2da93f6f712..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4256 zcmd5QK*k$m^6^;#-OFZ}G93I>7oSW6S*19XbgD*z* z1!G%WWdFmrAH`cB?#LK1km-@k`X^g`#LHh@;mW`PnI9M~O1a0=Cveinoq7o4|Bl&P zd{X$Z45so1e#zRsoWf^;_p@uq?EGJE$*%0++CnyW@HvLZ9(vMo>Hvw_QwZgq_; z1%Efd(ZFw+9X~3cpGBN-Ez66tqGJhmm?Ltg@50gHQdUw#;4*z?*wMKr(4K6 z_Xy`(*VIbV{Dh63_k(bO=^KyGbd}mx{*VN9msQ>BNV)i_CAcsbCess!&j;?aK-?G0qyxM9R zovm*Fd`|D0zl*D}N%naUZXMoYuja{C7NNoCtsZhcif2GtOI zik>KnNsr_5qPoxY}AL=OWjFjGc^Dm`~#}( BdSd_p diff --git a/src/com/songoda/epicspawners/Handlers/BoostHandler.java b/src/com/songoda/epicspawners/Handlers/BoostHandler.java deleted file mode 100644 index 2fe44c890c0873237574943f6b0c695e55d0c4aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7822 zcmd5>U2oeq6ur;=650ShrF@n|QnVv{yOcBZCFmQ=0KKW7 z@i+Q{Ir~_n3$LJT#CF+v2YwD^AK+hp34op&HtKKkyRdA$C2<)P`<*Qz~bsd ziR|PcCU2bLrR%XW!8(j!iJZVU_|`!zHv|vm2=9#U%nHiKF4oxrKMubR_|iFybZ2-! zg$5k_*|LZ8Pfni6uKa+zEsy1i{D}3G!Y z9x3RRrBF1hCEFO!nKsYbskdBypN$D4LE>Z76fvJzq5UU9>WlAPXp}C8O+vt4+_)}?bHPg^6?N7s4Kyq5UBk#ZwF=%)RGlF7P;{nH#_Y^B`-OOe_G#^ayeS58~O^R@xY*xx< z9wLmszFK3f38sjw%UG`>sZuG+*=jxHA=PBJwh!G+ybYNPnAhps4%J1^$I0h-ru1f; zU;KAkpbu-XE}~DY^DbM>T8rKb4;_M!up&`yk9>5}I>Y9!YZVQ|6TQkoir$U&7Ce{H zjjeS5P@VwiPQDN9#OEzoDb`~Ze=vEijcKV(vOAzfq~MN>c|-MRq$l`4UtLTn?Yln&@p_*_A;M+Ge-q;^`ZhefoCwI^P7|Jd~}QJ z`$P`pH`F*EQAZqN@B2Z1Mb0>??C&PAwV~vj`J_>@wm6eD6PJl!RscnLC&mk_7K>i_ zHG^?p)P^-h(HQ&ADyTP)#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pDu!P()o6(Wqcgz9OXlUhMGm-YQ9Cimha+7_Uw<F@1Hq;7Z5uU$k8w}^QL2m!PG8@Gzbybn|!J0n#Ei_CsvV;%ph$!8fx^d)YiD1id4&L{Lk$_u;O^oUHQuSdwuKF)t-70hkaoq!~5~P zdC1Wr8}0`Ut$hQ-P?HLH-`U5j))?cHIs@ofbzJu0SB*tuXyQgsXtaGjq`c+5xo4qv z`+9<&Jvyto+;NTH>6HF+FAYZott<#U6z@Og=QQ=fq`bH$wY$f;izP|#Ppv9hk?x{c z5FFq)%EKLM!It5rIlBIJJk2(I+}&$IX(81uP?EE)IJE^iiQ^7dX$Q>pmyy&9eLcW? zS{+9FNu#V&KX_J4ozpsABP;UDJe%4_>NKLaIeXJR-WN7>bvc=sjqu!wYsohGi}O>l zW#6x*4V!+D$k?R%!f3}l4wn7vH@azJRnbM8mh(Lf@z4 z-hB1Zp1r4a4C85l@8sUL#vxx(iU0LCRXB@BYhA%X8;_Jd40}hcQqeX9y zUl*QZK^`#vjZ^E{{J&w=TjOr)r!5W{zY-{|hz*%~s$e;-^_p?QRlAbEZ(14ovHkV3 z-dyehhj|0R0GI17Fut2WDD5gq5MKLUMF-J&-*}HqgXF@clRJ`&v2@RSVwX~)P9h<+ zfFSA{Tje7Ut@h1iG+T0*7u9E!;7j!fm09&2pVIkT=hHq}CE;maxg}a7sIiJlaK& NVa1oPp64z5{eSk?#<>6h diff --git a/src/com/songoda/epicspawners/Handlers/HologramHandler.java b/src/com/songoda/epicspawners/Handlers/HologramHandler.java deleted file mode 100644 index 20f82120d49dcb8ebe36872b3305d537ff614ad2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21020 zcmd^HX>S`h5as9mimg8sYT9m-7D0<%K$Ey=P$wDbt<%|^ugo1BBeZgf+G8_qX>}jZ+2c9h{}XL}7hSWZymp$Y z+n&+Ao6x`zAA7)W1Z;`)V<3EBt{@f4YHXI>{!_F%HLtA9CpE28nlC{I zX*j_#!rP^J7+h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Nb`TxEh-Q7lWis!nc?B^EOhq1%es&ebAdHLZ6|elNO^%+$D->NaU+vOx zyNk{&ie46}wxrj>(pw|$0(Tli`x$eaXMO7Yr$(8|Rqr$Ld{+0#q&9{;3R{jB?!P;m zt&p}!w2sfs$^iK<2`|Alb8OsUG{GwIE9lX=-F>vo-I%hmi|s1R|Bl$8s~4zm1OY;USuEWQKcCOB7g)P?%Cu`HaI zgO+k=UDs_^sVm(O^Bi0sYCadXxwwTqTpw~itF^hvg*;pza>}A?E^eNK>qAZXz0F0< zbC8Fc&zs0oq$PjFi&5k$qJa9i!_A^%PoC4ee0E%O(XYjC;;Yg=b8ANDoQV|1{bp02 gHcG^^E@M<8BhvhvPlF(5ty}X9{os12g$>X8-^I diff --git a/src/com/songoda/epicspawners/Handlers/HookHandler.java b/src/com/songoda/epicspawners/Handlers/HookHandler.java deleted file mode 100644 index 5dc222a122b91b1b1105651ecd0bbbb4ee9c1255..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7256 zcmd5=$#T;`5bblmV#tAVfD+q*1I2-z6cnTqQaL-e5>$y7EVH;MejRvkq>ePQS~7BM zD3z^kdU@SFZ(8%~w@jrk1G&Kexy0gdJ&}<_lHxqZvxyAxF2cL1BzT*8iEnrp%M5ps zyutf1MqTDl9?K4n1X`w$p2@tE)|a`xql!IhUsv}V_%#7$dVfo$da)T2JK*>@at;8YGPWIeg-%3mggjjO1DAZrP`LnRh@n02bmT zzE$O7jHS$67O;GP81-?b-tNdhSLnyBXfmN{otf@Oy#(uoj)S@8lt5@5>|n zKahL=D$4cT#d!*hr?AGFWmVH|io>B^v+Rd;>*NQd=tp*h@+#xx74!_QqL5x`bMgd| zV_3b!aR=9j9>W0;O*|e-6?&?ppUM&Pvp{YxF`hHh9(%m<*aDB@((?(d%wTIMuidaBgJ^asb7aKKI zXE%jB`Mk_v>bcgUo`0fBvo2r&Ms%?EQoiE}yF;Bn&Ref%0@YLPTq5uF*sqz|HTFyt zA!mhmA)}unP7}}8hhNj=+!bFqi@iE&f58RxT}t9Z5VanM%fP(_s>7mP`$y}XLu z2)YDIkLn{s&XLWT_ubMOU7>mo-}<;4!G|&idR)gajGWrib7+&b#jZ9E{|7%u# zUZ+}B$0p#3SwXfsrt~l)Z#(v+3-)O{F-pO(3{{D8Ysjg}4JJP(5&AzO)lP#~3nm?UM zO5yN$ZDt#?OcuYKDTekZ52)OnYdlBW8u)IFA6T$BfA*o1Y diff --git a/src/com/songoda/epicspawners/Handlers/ItemHandler.java b/src/com/songoda/epicspawners/Handlers/ItemHandler.java deleted file mode 100644 index 06481cac828e21521fd7c2b743a759d84558a6f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32530 zcmeHQTXPf18SUr%3c*84VS}(?Nh%w5D=e1^wT5hAZ?f=ai~$AtvbGGE4Szk!IsNIl zr`t2qXr^Z@!p$RGccXni zsory{p?ffcdozJM&$HhF=Y3#EI>aMv0P_(wdoIUVKjB$p zNDeW%4?4YYCy+Tx;!*bJKgLt1?v0n|ELD{)Y&|_z57){+a7O&z^7t z+e1L|0<@=np#>rrj`24*qhxGj2JTnf#ry3qzF*Xj?-{y3;A-BdyR@Bpu9ctDHAO8j z^7?5CeNQ{ZcM&q?+B2ymU?Uc;YqKE<>7oN_1vWS{16->AVEu>+{y0rRn! z%W^7|bG?p4RB>his!V{_Yp<0C?pr`nb?wMsOI{JOA=_|_fy9%fmaa`~hM~dxJY=bCg z$IudssFnv?drDo{7SWW~?HhcI2IA5W{v3Jn z3e=~k#2HeT@)}wCTpkHEbdj5O-sm3t;6X+y0n}#Zn~dE@?3vtf7N0+tjyXKTvwVgN z)^tlMF@~6cdOOfO24xxiqS^PeYu~z`J%j`3L2AOUOEpV6p7!H$KQ1-y^H$^9Y`;>< zBjNZjFG~~5PvZfjjeF3~2rb+>PWusjWxH9 zR&8GZ#{)o2+ejNj%_{%wAdrB!254@~@6!6zQLJCRpO8DccYsFi+B z@HiPc6N)&-5U-w;-ZREg&g*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+ALwfS5p;S^SuRn^Ft?( zI>qH?uedz#6c_O&pMH>($&N@vS51~bZ?9k5L>O^K_ePYO-VSIUf zg6vr*< zA^7sU1FYV&u1K1k<61}>h9er<;~3_usziy=Vfy8 z*eAt;w1d?721P#-W7h2vyr3>RKj+a-o+)#Yv9xT#zv-g?v)x?G)$ce!EKX~|I3=GY zk7Xz9eJ=f-v|#&wZ4vdnk%p_&&l%uT*1%@5pk)jsuH@1hZPw5!uOyn6PD=OLu^DJb zPp+E|&EUz0DrsK7M%qOj@24kIqyE-|xu^#-pRSb;sclu|YX|-hv&i3gO~rSFsR4@J zmS1}HE4KT2yhL$j(RQOEFJyX~o=aF8%&tu{7+qvjQmCmLciv_99bctZ{Kazt~+l)*l8XdVszhd8 zx~OecjcgT=1IUc@g_c!?T>;u&bam}A|n&~+o zv-G7dOJC73omq@kxjyUk-0BF7?CqSbGau?~)$jaseVtXy@XyQEhrZ!BX5T!Ellj)> z9zN3<_t|CEpO=+#`SYf&RS@#7#FJ96YM-km*gKH+J0MlpbmUMX_S3}H@^F~ z6Vg1*HSghtXv{#ZZhB?wa#Qb(b4@each*&3`*qT}zO~-g40%|t;Kt~XwPwQ*IwQ>$yVeKMm;yhgdLO%(dz(*82#Ow)D6*<)tMY=v>Fe((BD zuOrZunP2`A*slNm3D(6;eiYNNPmO(8e9rRs+L~p}?q#1Y|N6*0r+k-oVtteJh7jvh04S&xALvnB!Qy{`%tIfLRunrq_%5tFVH5Qyg?(9bEcY0bcMl-3GhY zXEeDiw5mcfrz+2aKAf%6Zojd_=#RbwwUW(b>D_Jk^tP7B#b})>Z2RyEtH##xi-h4K z#_n^>KE|p$Gw4;7*=uH4V()GU`^O9cvnck4Y>c^^CX>Nb~$ro{hqSU;wYEX=#6>|9&g6raiO`1~Jy7NS@H diff --git a/src/com/songoda/epicspawners/Handlers/OmniHandler.java b/src/com/songoda/epicspawners/Handlers/OmniHandler.java deleted file mode 100644 index 5d9799e746c7f814786205d658730bca4eea40f4..0000000000000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K0}0yf9KhA={S zuF;C5c`a=^*1d;0V3kE(c-XYOhW8Tqk2M&*s{3oMTUh5KZAAcf79AuKj)%( z)@MVv*lk`vofDBU#qNtalldX@zIEj})4bcRCShLswBoy;>Adc}nb+#q z0gBkBdww?m(!tY;ol)Dx+K{^$h%8n?-67LPw&;$@H^X1sVDQaAVjIlegt1NLt~003 S*i~be^)b5sfB$`hrvCz?rhEhd diff --git a/src/com/songoda/epicspawners/Hooks/ASkyBlockHook.java b/src/com/songoda/epicspawners/Hooks/ASkyBlockHook.java deleted file mode 100644 index 52466febd222b9814156fedda190bf5ec170873d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3430 zcmdT`U2oGs5Zvef3ad|Pg|1K@kf25MO9Ba0M92?FTeme$922{gi1x1oGke+iY@cb> zJ|QbP+jqA+J3G7Q-+!c#v7E{k{x2kz1otzUijxv!j(0OT!<@rhAsJ>%-Eo7tROWbc z@*Znuuu#eyS;LiKe}Ol1sUBtTXz6L#@`W2WIZ#cO&*a1D{go_WYl3-l>10oa7#Fg?dbcN^I67K4JP`O$V=>fA+PYiEzkANE$wV!ED#Gb!Q4>I zK365~yE!rCCh+=GedqAbwe`#|*d$7S6~LJ(XG9va>GPZ*7GDp2JNs0gsJ^Jm47p5X z7r(x>PS*}(W65dlE99U*ZthHk5!y~0OR!iV!nq7&eZ^d@@b#rnTW@2A`be;c8ae|0 zvF3s~rLR73wws*!h`X3QuTE>Vf{t>mtzbV#j#ITx#hRt|$eJ}yom@gmzGKBIwaz`c zudtfY#H`;19(iB;e<#OK3HhU5&Tv=HH5GcISSDD(Sg2Tz`#{S+Mc%?HraGQsRl7eV zSj*m1cZ@!+D>GldvP$N#u1CB065p#jwQkY4)uL?x17&p7j<; z*;A;wuBWe>y{UY{IECW<$v6nm`3g1r?a_D9olaImuiFv72dbR{)lhS9Ir=w)mf%*cq(2OOR2jnSK2=e#T>;Lfh;ZRbJena-u)#Cpy{ z{g~f=McRtKG3*EJHO>Ceo~>EytL%`u?Rz_^**EUOx(LtycY6@IU0GsfD^)+DsIyDB~K8b(=fXg74U;IAd5bNB9ciX;y%(40XiwAiX!& z?eAEpJv5guYRP|x57bT^MYqp3qYitr>8h#b$DelWs65LLP|IV)JOv9wM9)(*hi>ZL i@w8K~8BwU)P?g;?)B($^fr#2|XWu$gv&(yq@c$P>QUSRD diff --git a/src/com/songoda/epicspawners/Hooks/FactionsHook.java b/src/com/songoda/epicspawners/Hooks/FactionsHook.java deleted file mode 100644 index 025e8283c6654db7ad458ab87958573fd016f640..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3296 zcmcgu+iuf95S{0I#VQY#TcItN2Oba-P#UNNr6S@3axulq&BRVi1pW2GIkR5u^@Rcn z$V%3iotblH&WwHgT~ZmzL}vKElvoVTSF#W*8P+B4tz?R47SB>i@HA74Ydni(jVmj! zv1bJjnLLpmjs*58?yM#MD}Sd&q+u-*z3=M#1282rSKKebU@RMOB=fbR5B)E2--68u zPiHv)gsYF5FM45qGF-25hdZy8^GtKK)HvJ~Ypj7>AnHiAxc;A!TuuHRD{9B*qFJAP z=C2y5jTQBFiQKcIGaLzUS$R>pYT|3Rd4oDmP^)fU?RGKrK${#@wvBrC_sxc#vVEaHGwu zR+UE=cG@|V-p;QX;-}hQk@Oqf`$asz+ph^a*hmDH84xeQl(}S0T%-dz!1Jn(tj>#E zE6nLZ#&2OqTQ^B)Y1JdU-tVbcdJsJZisIvu-h;{3N#WN-GzG-GwUc zN~`TPUDlhG%3(?V>=5tyCeXn%c?T76c2N&goRvF6{f!j^Gsuikk6f8Q&Ru4;Iti(p zd)QU)IfK1n7j{)W2O@S3b?dR$*Kqn8`bz`K)SB?GKaH%rcw9C==A-Xmq{`Go$RK4bZe-6O=w5G_Q@Y=6U1 zXW>+Ru5&4d71dc)jnByqEZq#9KwIpuQ%sx*5T?NB-kqF6T~+md>hEX^b{p_}ub$jD zMx=h)Q8cp^W{IrHKMq*zOZ)7pGoU>|j1gEbkcT1ovxoR?Ww1_n)PGpndcC~L_pdrX zH$&Zcy`5>Na|(tkBVTIf*ZmsSi22&oD&+OSO8IlYhSvM7a9BMzE6VCR*5Mw$75E+0 z#rgNfZkeV5S297i>}>tFo; E02f*fT>t<8 diff --git a/src/com/songoda/epicspawners/Hooks/GriefPreventionHook.java b/src/com/songoda/epicspawners/Hooks/GriefPreventionHook.java deleted file mode 100644 index 9c5199d8c15f3508fcb6495f9994ff4aa17a87f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2122 zcmbuA+invv5QgVEPhon2(h9j8F1SFIfKtH)CsBBSBu(2@lg%o-X^Bu@9s2#Vu{N7i zD=I6tV|!-)`RA~I|5;%@8`u@|g$*sRpV-)~u6FcKBa#vW!ZRrv>+zoBYzi6L$ zGeJXXZ>+<}kS{oyTJ>N0P8OCK%$Lii~d)=PmaRDZIe8tGX8SOK1 z8h}x(2=hbbzPOB7%h-(`ESLDH;55RT_?g36&3?xY?SRoCZw~k!JF7xBBnt!B=gjTQ z430b4D`a2TYvz~s+;?%I=a99)>ps?$!OC&jEg8Xf^O$lwfZ(^|$U!2x=H?Ijg}5Gt zb8?M-p$@h!n**3eo_!g-2RqvFHu~GH?Jp{u% zU@5|#s-tJ8%<4-zQxC3|I_5k6b=SBP!{e}|XuK(JDCti6; zOR%SmWgnwkQw(ofv9F`O+6N;({UpP_lKqPFQA_(~j&I$b7#Wbgs-6>ijhHGptNXJ0 r&$hftzOH`H^yQkt{SVhve~-JaM>vvHT2&=!pVl^O4e!hHlH+#=GPPF} diff --git a/src/com/songoda/epicspawners/Hooks/Hook.java b/src/com/songoda/epicspawners/Hooks/Hook.java deleted file mode 100644 index 6ad44768e039ffd02b1956c84f766176c908cef5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2154 zcmchZ(Q4a35Jl%XU$OWh$h7DON?($uG|-knzQA%6#YC}%BvVZ3ueUvS*IRp4+fh;| z0!!MRxifQT_R2qhSz|Ms+ate~mF9R}*^}kgabL2wvOD&2_8MET+j);~?3LE?mfI(6 zRv>it&d#_N_&2Py*1rnxY8&Zx5J~7MwqjIdP}rLIkL>omUF^M$_4!P`bL#BDP~Btw zN^IrR+lI(DR)ewe%mgkPaw%99bB?_NmU^-l=Ybu0bX@KakIue(9vy4C8thkCm)@tO zAI|PUT;f^teCrYQUU}=9n3doEip3LtA(vBlv4`0Rv?)=PVZ@8~-X4gmiD<}cn1i$T zC$fte@xGu!XPL*l@|B83)t=du>+k5%^Vsy{a8kn5HE8O=jQgAw;pJo=XL$elBk>hA z`d<3k5ck#AZ$?IU_5quF5Z74u>`W5836;D#Qu|xhH4keLroKXCNgJ|6S)>TZ&S2Wt#!t4;Zs>Q57N}<(ztXtul^h4IH1i!N zs0FQImLjH3Q?Q8YqZ1ZRz=XYGudc~6Gk;n;hx0G}UiwMasg+V_I-?$oHJ!Gh(mQNY z?GOFiDNL&2!>D3ZnsVu5>H9R)&;_}SjXdVGN@;4M23?P*W~dkY+@)WL(4Aer*Pg4? YM&A~FImXS|(kowmK)>{V;LOPFHvwK^>i_@% diff --git a/src/com/songoda/epicspawners/Hooks/KingdomsHook.java b/src/com/songoda/epicspawners/Hooks/KingdomsHook.java deleted file mode 100644 index 9178ab906e9ca87d9a194fa310eacd6e3a4ac7c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2964 zcmb_e+iuf95S{0K#i~z9g&ZyqJfKR55`n~}hzNmr%f+--6UW$YO9lOP;G9`cy>=4I z4akbu&d$!9Idf*$zyC-kQ<=*J?q?EU2%=MSaQ5Y z@)|a4cqrtV9NFIl^@SH6P)30#(GYEpcDqeTFJJ)FJE_r*BT4$VeW^ zQ`{fRLw$-WKO>A8*qmveb9k652L(L2R?fv;k2%Erp^;f{T3Yux`3aB2=&uYY6S=Bz zI@#4#PHW39pwgTiAD-!T92KK3P$(k_IFyO*g*hsZm#t}4a`&YCPyJnZXl(1zqs=|ETHducS?Otgn zWPgFD+Ok>gnMP$-v13_%jxT_V`xA2rmChhqVlN#noK!$s{Ilub45+Bm&n2QN!y>j_w8q|MX$lGu4MPds7A<8*uB)zPqHrUvB&D&(znhz1#E6^ZXhZ z`uQ7d=+5}~3_a$U^<8NHzK4#ur!sTuxUE{Vt52Aay)S#N`>N~wZe=xWk9J}blRrEA z>(AD9X)o8Foq`Xu9(2^A8|wt>;J%VV|2$#rE6gJ{{KnliwMUvZ j+Fyo|?sBPoR8RiPcA$Q?quAVGoBW2mrp5H<2=0FYY=q`r diff --git a/src/com/songoda/epicspawners/Hooks/PlotSquaredHook.java b/src/com/songoda/epicspawners/Hooks/PlotSquaredHook.java deleted file mode 100644 index 2b74552da5efb7309b60ddff478e5cdf93644cdd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2032 zcmbuA+iuf95QgWvPqFl(N-N}WxZnaIaf(DGBoI{}AP19L4T*6aN<{nW!1wQF6MJhT z5L(&0-rbq`=bwXr{<6}>HnnTsbIZ-KUfCDRY|Xr6Z)G#iGR{gXI9+>*8_sg8_{!`Z zcUEXv+jBc&6v&tCR8}|i6-d;`EEqX@YTKZ9!Kz~Z?9YO}lHC>G8T+!C*~i_^D^};; zO1F)_$2{73bCGx>5B^v8CD;oPi<`IjI>FPqXSeFWE}rJx)U9hq;XQv315^B$CdJ`C zu5P*9vn(Ck9dBb+id2Zr(9Re~#N~|V4g0ybk`rYIhAr c;jcOHdb+BpnekC$J6n`r8|0hPp*DE`25eS0j{pDw diff --git a/src/com/songoda/epicspawners/Hooks/RedProtectHook.java b/src/com/songoda/epicspawners/Hooks/RedProtectHook.java deleted file mode 100644 index 5f40fc681ab3c52d0a11284fad1d5621ba715b53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1936 zcmcJQ-EPxB5QXPDPqFj@xfOD0x!?jJ@mC2XBq}N%AWlMRH6&K-00H{yz<0)3*-keS zNT5}`Yw!G=IdgXN^OsdNwu#;FoZHL->y>@7+-l|}-&QtdFK4f^lHJ-pzOXm5HE+4S z#%4u?+Md{mQQ}|mWo-@d3g+Cc8|IJ1DzI4DH``#R^_iWs^PYH9yTp2h-;7MMe}UBv zqx84u?7ul++wKX$|I44kcsJwUGkCG%_G*vYe-Zlw%$2tAPQ8NH0!HWF>$Uf5$dn8BX%J7k-?ZDz+iZn|9kT2cy(DCHYWNTY9@YcN#KduB&T z4vuztqeq-ePHeD@YHN@$saU+KKgxET$Q3>NmFIR%-`YDOebQqMEk_OZ$|#k@c(<&( zw`cYa{-q>!V#=!98+O0&%)&hO9!SSazgKiBR7YQz>evHv?khfEJ3Ir2xNbls-KP2w zYe{vny}tt9mBqF6lCsVH{5IZ$xNd!-eqyHmStqPP4QuD(8ZK(M*pjn7AsH)G_Jg6m zcW7cB;hDp^?tv`H%01Wlk}L~Gu=|XDU4I%W_d93UE1_#o$bMzF8%eeYJ=Jbwc}6F2_= diff --git a/src/com/songoda/epicspawners/Hooks/TownyHook.java b/src/com/songoda/epicspawners/Hooks/TownyHook.java deleted file mode 100644 index fa4fcc138e4cdfa22103c52f02d310660d789eca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3492 zcmdUy-A@xi6vgi|f5pm!S%_Kuc<{lP7=c6*qedh?m$H-}M;A zJdjDd)6UGj=bn4+o%ZsVRV?*%50AYq@2t7VgA1)>51E zDX~}VnPH)@XST-3IG^*)+{%VM`8i`nrzXrb)9FL|!r4vlYSxWaINr_8?MQIV!Ad|sce-HONk4v*q)IG*dHs7btOG-u~ zkS=&{M;bZ*kv*|3dt^^}e{2ukEUD~l@yvozk^U%kKCSm zR|g#RqKP27fys{f#)22 zbBk@g5$}5CBkT*$%#N`U6Inq-Q=$`d%7A=q40s49n^7iqLS}r$Ck?MPmtvu0m;5OE z!O8{m`qK-0Th*4hR$bR??W`U;e?mHPEK8qLdr9X8uT4hXr zR7oXV=)8EJGxxnJVC_Bw_Ir)&_0j1*D6e)jJ@8uh-KmY;~@?=(?R=R(xdz z>kC_kb_WzCuYEEtM#jV-EP=nSZRIMgz2Tg0C6B$S+b+U3<8v(ZqmS%9V|D)94A=gL z_)YCI5$O(~w#LmtzioOck+zzSve{~Ucr#)(B8%{^Wd=3lyu71?ZC$OTfbo-s89r5a#6y}?C zj6UNbm)+;z>i16_V!2)q$it4SJJq>v59LKSug*y8>aG4am|xKyc67(JeOy&@yI23K zy4%Y2T-VCpbGKxBkM4i|0bS^HwMzW|gl07Ae#0H+ZuGe+ Nz5R^Qj6q7^^&94QCNBU0 diff --git a/src/com/songoda/epicspawners/Hooks/USkyBlockHook.java b/src/com/songoda/epicspawners/Hooks/USkyBlockHook.java deleted file mode 100644 index 854cb4a3f8c471e620338f6f890fd43186d95f94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2634 zcmbuB+iuf95QgWvPhs`SRLJFUfdoQ=mP%A=DQeUQ$gz!@q$YNO2=�@89(hJF!uf z%Cgt-&f%Y#e`fRhkLA|4q22Plwy`C=-`U(UD_9qNyR#8{8GE@+*)4*`5BA2k9fcp~>4D6m575OrtZ`xN3*F-3( zTdpbEnH|-BZDVTJIU^rK@+j}h>tprC$V#WQ6`sF>yw6)Z+WQbyiG-vEU>}1y1MMu> zm;Hxl6q8~CY$zIqy`nUHHpQlw_5AA?!kD4BE9|!x2XbeLV?5%hLFH&i^%f~*C>x<<-SiL`vy zGwxP>bs2F})rq-H`PI%;p{@647J9o3o#XX6CqhLTyIwK2Nu`aNenEatPGZ#@ov#nI zYUq7kn-6vY_tdXq;fS~OUX%BOkU8aD=+p;V6^rJTYEkcgG4451n{y>WwmE6K>Q{nD z9oxnvkIR{H1C|0TE4;?uRCXdaG-XOqE(2;=z2}Q+x{lQC`8omP65rb~&G`D3J67B4 za*B6N1@-zVPwA&Ek-Gc^GMXnkqt3bKFejc?k72Z<^ytNKoqyjzrP*5G+oS(q_S}xI z-I;QUuC>muO_?U&Hg}socg?E0^o$Jj1A~`U{B3>vK<(l=H>A5&;S=Wc5ZxS>#I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ted file mode 100644 index e76fe28baa54d83d85f88386a4a538e97d9af8f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 584 zcmZ{h(MrQW5Jm5^U$Nw=BIF0eM;{6b(tbgVu?Vw_8@;PkBz|zW(F<4!)~f}L-th_6Xv^2Ft~kARdRFHZ#?jFeIYA5R zUcI)VrzW%8Z|@3Zc6yjv?dci7gO)_QvH2&|I9h#;)6RYQ)W0UpbPa<|OFb#t%)}aW z2Yx?pxSVWQx-*03=!qz+#yyNXVGsCJgLH7__m94B1TlAKDm!kl@;$ZH?rGGYg&{MYW|E`!P1OIZ1u0XcN^*B*ARe_RU6INeT diff --git a/src/com/songoda/epicspawners/Spawners/Shop.java b/src/com/songoda/epicspawners/Spawners/Shop.java deleted file mode 100644 index 5a0999f71c7e4b54695323ef1343e83bbd4af4f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 31468 zcmeHQ+j0~~676TcV&K6swwD22FyLh!Asg&fm|Gycufzxmn6)Id8i8QF{`K8Gr?QW# zySlpiGOZb56BANjraLQdm6?^5RrBBfWyjexdzt-;|F5(CY=rZ-*zT3}Ea5c$xf;)fBuHZ8Rlw-VolAR`?PVqfkJi_xI0BfssO-TLV z90I%3?2W^IlD%?x9DS6!l zs5o%kzYm;uvv-gb<##d&?nU^I09BlvN1#)}uOT_&@GCwuJUz+2FI-i*8Gq-IlMiW_ z;q0JwTc$s+@YZXzdg7qWoK8)gY>y!S>UTS!>!sr(wXZFXrXQs7BdB}|ET=e&^F2-_ zweLONpq}vw!r89eYl}}D+9}{4qF&L ziCXnBdzizo@-y~c@#!nsjqEFYuD}+4g})yFaUU?r(LG%60{RHJ7j5pyU5&C0yt|g& z#Q$~tU(0R-CxdeX$75i+3p`09tv5Atj?W0x)BYXf>^D5eH|$eqnMQzdAiAGf+94}@pz2ZCg&~ljG8yjG4mLeWf8V2UAyOc zJuN7G_jkb6TdWz*sTbrZJ>40ORo%Xaw}?}^J;Eo)j)3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ftY^!8rRwJbkv54Su#?ip^|EORTZ~y=R diff --git a/src/com/songoda/epicspawners/Spawners/Spawner.java b/src/com/songoda/epicspawners/Spawners/Spawner.java deleted file mode 100644 index b64de4cdb2dbd95f5cb33352c3ff8650caff02ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 142406 zcmeI5`Ewk{vFGRK{VO2Et`?FXMFKT`EAPz8`oI5gaj>|zc(C}<{(rpKTWs0q7mNMHa&c(a z=XUSK;-USvwBHUEPwm&k>W$a-+uq`(eOoT>WOx33@!#z4skL%oZ@*j|b+mfVey7Lh z_WaM**2UyIEsbku-$r+|cv6jixp-8KW8da+WPeYqc`X-r?U|qL`(^vp$I6_Z+nw@$ z+o5uG1+OOPl+CHV?eD8uJgcC8#m0Pp@yb?;^?NzX*yHxETdRWPVMFVz@MBv!#_*&4 zJ+-Hoi;s(+yuWy6@CO5zi%ai5*H@sqpZM*|Hj=$+jbBxtQplIK=-Bwk=JD8O^s;L2 zsg3ZtjSozDZrD`+?T+>Qpjs84DDBI!4T!xN1T!%BC+iVh1une3Tf0{}issgito?nX z?IVK#t23oFr$)HQuC+(Ij#c+&YW0qd@0H=sv%&2i*gMb;Fjy{b+t~PgSd9{FdT0=U zs(!M&5A4$|`~0H%_OQASRB|5me+*(j*+2N%p}qCe-aW7u;gsRqRqN6F-D`lt@HVbn zkI(I28y8TEOPen|@R^OLiAtNE0}`~$jOgdc=JDj+{8Mh$_x`QweX!uAjo0D#iH+oA zgX5O{zhzV=ItKn*##!Fj|EWCMswi=5abfX^{rkN7|I@|!#qVr{-p(g>J+QgLAy_*k z+cWF?(EheEnYFceYftl@|6Q}zA5`OX%HOg#^E=%Fe2H65e-EJ=laW6d_TDm0>930$i>t=7N_$oB=_)y9`wFMp*V5Mhna%Sf>-n&v zS0BgI#Xs#^+x?t&fYV16ovZ)8E1VS>i#8TkZP&iXdYn_{&WbY2dH`SAdQWjlPyJ%g zJ12nSvFcZi3nB^N=;980y=#zbX-iwxS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sOFB1Gt@VJW#gpMwZr}U>P*Tj)<4=E>w;~lyTF6}yDzK;P-vqRO5^AQ%)npK zziS-Nr+caNPQ33puBs5`tlG!VRyG{4WFL(0mCWz@tjpGLlV=+|T~t5!xgyn$R@Bsw zLz_H1C|k3Fl3Z>F$^?h&_sUjvv-p2lNBG6T%2VrW+PA~EOU^ROF*N{@t9U|=?EfeB z`Lx7OoO8t0WH>>gsgfspHgcm)!j(i!@TiBAIh^lu?&{@ADgiwt$6i)vjULlCg~e%g zN8N>2xy*wu)8Nu5uD`zS=D`=J*}wk}YKyRf diff --git a/src/com/songoda/epicspawners/Spawners/SpawnerBreakEvent.java b/src/com/songoda/epicspawners/Spawners/SpawnerBreakEvent.java deleted file mode 100644 index 31ef28757086f222441b6b0980418287b7910271..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3120 zcmb_e+iuf95S{0I#XhDLaseUnfGR;tBp$el@&iqi7AuZp*-HvS{5o*XZl>N{U*tx} zviCYOXJ*gL`p;jfROvM=(V~@~ zkY5C&ub8Re*KwLY1IaZsFfP+I?6IGCGP#6wiFmA`hnnc+W3aTE7NY%QaJ+LkR?d2j zGsFkZrYlQ4&8Ut;zJWS`^V_o+OSm+;u@IYV24 z7xb45BM0e!gU2N7x;R+e;M~+l1M5E=h7u?!6RvqaF_K%nj5K%j$J)p*hsj`v0j3&w z_6Psymvw!Q@fK?(#szlvM~w4tWeRo)|gD%gnhSl$y)QA=Vy67e|^k1{k_| zG$b9el)7Wi4oT5h=J6KiRG^nTj6=Jxu!FH<{V?daS;Z6gPa54NeAq!Z`9!|3E@(D* zb}@FhF5(S#k=dcPkUw!n>f_A3Q+v8md;)vJ(K^9u$QJc0woTTs!fL&Y84&NCch1o> zK{ab@pjS?e&e#j)Uu|URjJyhMTr^-W*wREV8h{r0!3QUeYUTYeGaJ-W6eoOu{%s{p OC45CpXH$QWGyed|)9|wZ diff --git a/src/com/songoda/epicspawners/Spawners/SpawnerChangeEvent.java b/src/com/songoda/epicspawners/Spawners/SpawnerChangeEvent.java deleted file mode 100644 index ab0aaa02f4587fe72f0c4baea81cbb656631724b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3470 zcmd5;+iDa+5UuBYML%wWOjHCPL{Qg&4{F5t1KHh49QMl0xN#AGT|K8OZC~a>Cj^mY zXL_o-?x(Bk*KgU$rOaiC=e3k#u-?jA3Tg1(fVPzdcm;SnslaWl#0_|*)c7joBB8vH zBm638*+IIN7Fzkf#@?BHgRLdFExz7^K8N-e-?T=_9J!gStmG0p-uzwXN|&%ii>(|W z{|WM!STUM>4SVdTmO@Uf)RCNGbprnlo<^q7R@%r)gjBfBGA{5W8)s?Mq zbL&N@EktbG9r{r^>2!i_Nhno`*_ zoUD6$9U+EPKBSDx`Z!e5e~-(hk*ah`4R!oP3_gmuZ?G2KskS{J#eH$B&FfFQ^O#re ztn#*Maa+;~?Xi#gj+pCP|H;U=f1Y&WT)X!_Q(-UH9JspX+U~>ASj6!eQkxq0T`kAh z%*A2cyVZV3%Z+=ef5x%Dl5;x)5mgm#*>bSI4b3O&Va#nL*UNOeNwefmeB5grpkJrq zInHEk+fPn?o;mJA`R8wg{7j}(18>oImgMY^>tQ-`q#3-AhkM-UL<8ql?K^(1(aC0l XS$ll;8S0k)&QCqp?wwN8c!1wO+i@bc diff --git a/src/com/songoda/epicspawners/Spawners/SpawnerDropEvent.java b/src/com/songoda/epicspawners/Spawners/SpawnerDropEvent.java deleted file mode 100644 index 22d1c3e4f6c19225cf853608538b40fa68b5dc1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3106 zcmb_e+iuh_5S{1!3O{ZulmbHH0aXIEEAhZhzz?uZTB2sNQDU}KsJ{-JW3TZoS*0r! zB~EP5%$b=pzqFt(W6N{O`sYn{|s9gM^s)+*`oRmhiQ z=9MgP)zH#Gx)%+t9B;69Ek9uE7ONUx?=XJ_?Hb>-M#(vH74}j_%RRKLg0HWb>45Aw zO`oIz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zs_7*3Pr{f zFJy+Nf|mx?t!Q{oooiiUC+?`_ zC+rtN?<+hs59B4^!yfC2r;u}4*WjasA9`Yx_rc;lEyR5vgX5jSu`;{2 z$WetXYZK8-&g2x&3>iJedyYs;tk(Elp}$1*Dp3w|Ut{zcY@g!c?_+r)&k?cpbB4Bo zE*LKrMh!Cl4v$LIWjQ8CK1PM!4}+lw3fhEoR!?Mdi>#WJCBCPjxlpH!+*LokJHmrR(GHvU1VlCrX3v<_K`EaKur+SCNwH}RA zk@e?#A&TDHRe7i zW}nks*3%PWcXqdIZmj>$^(*;gZoJl1ofR_WbsgUi)TB@MVQw4lpm+&7)yMg z#CyA2R~=5u@a#k3^K9ianbvF8o%mK|)y_qjR{NB}V-W6fpH$|53GWL%h%SvH#W7Y5 Rd|gT{Y<)^c(|B-B{{dtv*g^mR diff --git a/src/com/songoda/epicspawners/Utils/ConfigWrapper.java b/src/com/songoda/epicspawners/Utils/ConfigWrapper.java deleted file mode 100644 index 7ccab6afa4945067538c140232c666d032b9e968..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3636 zcmb_f+iuf95S{0K#lllskoy4$38|$Lr~*U5<8kfdm>jD}uv6^gAsX_-vYXKh?>=oN9Rs#>kgP_;$|wil{sjXblpumIm=xSC>8 zEq)ax=(QABUzg0tZexsztt?hW-C8_;=2rE$?a|k5yx)j>7Kr3t0BOIlcqp_0i0fVdcbe@;yp`Rkd@j%Y6G<24Ecap!SF# zgGSt~kt=fSj+f9ifi_lWfgT;;cZIL?3BA--V-=UQWj2mete&)HkF6^oAzue8le}g; zW{dUYB{1Xea|IlACv=_g08QuoL1evM_+v3d7-(VeO4EE#t6Am|50BJ`_Y zKATv!e=h4eH1Zo)*shQ9C^&M~y2(Fb4E zwYRaduEywb?j;k;^zK9%KU*7A(?cTztL9h*AMPsTwkfPuC+|dVaGw8)`!jA<@N>J1 kk}Y^1SU`gRvozW;R|a!SD`SLR5$ieXbP;rAg&Era1A%-uz5oCK diff --git a/src/com/songoda/epicspawners/Utils/Debugger.java b/src/com/songoda/epicspawners/Utils/Debugger.java deleted file mode 100644 index ac57c365cfb07ff7a10222048a10899279dcdcc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1830 zcmd6n-A=+l5QWb*PqE<&O)UOgcwxLzc>&P}5Gl2>Leo~!7++oeW=jJtKN4et*|1x7 zch1b5Ju{zQN_D4uJu*iM<@lcHNr7_KF?$mYISV*T6?2+^=6*>4NoO{SNn_>$ou>*@e&eW!93*uKyS?T*qzVB=|o)}>&VZCtf$0Y z;&fS4J!75t94+bu)STgT1@?f`$TO6&^Ui%6ZZ_(+Inh`|#+K6y-eVtI2F6&|pjGU2 z)YB`sY{%{!uv8L?-~IbNsaIU|45sc}B$9gG)a!<1d> z$=GqcQmOr>A_Exvo0t!@yYW*FVNEH0_$fQa4J_GLh;sghh5x9&j}?l{yT7EuG=e+zoP^~n)2M;@ixzo_M8-K^d*miu@QoIBt3t=gM)P_oJV4L?Zjgi76Ams6+D-fQi(_c_)5@Ba+%hoj+S_-o$(Je&<{+5dKUJKP+;&*!_G`*t|Z zwVS#2et4a$-;a0vE!WP5?{ai=cs^X@%A4%}X80`It>MdTpQW!a^ZF{S&eFq0-cNIU zJp3c?S9@O@ziVyS%)J}K`sMp#*iG;4=T<)74?pDYH{&SQ(%ZWnzfE6XkNuwx&(ibz z?5_>~9Pe7o-iPh>aF7-^hR=t;WGokH`Rjbot#Mp`&-)MKIN9?y-@v+)oH-iKbM5AM zeDSl^w}$o>4R>d^l?{9G%XvnA7E4aXy_4)M zGRlpNe=%Bmp1re-@+4=^vn^u9M&9?c&!$CQ-P_FZQSRAK`{V2{a?ehVcP_oUkz?o2 z)5Da#Uj_gBVc9pa_|fb(^Z911Hm3cIbvy4YJIi*SQDWbol#%O`N_H(=u3tc(N=T`c{e7#}QX?ohe#?r&!dUtq| z*Wv6IZ)9}a8H4!Rj3tnUvQhK@B3EH~oR@fpB&3hiR_xY>`UZAbj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src/com/songoda/epicspawners/Utils/Heads.java b/src/com/songoda/epicspawners/Utils/Heads.java deleted file mode 100644 index b02b2435e202faa51dee540d545260722d7b9c7b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3078 zcmd6pTTc^F6ovOQzhc7EXv`pLBr1|9AQDB0(D+DNTAa#^$dE?onl=w^_n;y zI9sJ{o0TKhT4*U7!9YN7;h!^}E?!D(2bl>nBgRd9Rx9D5N@P*qi zYkV}1*nfnwflhuU_g|^BMvRbhn-<_H`R+VYOmOq0& z2|OzQ8ravHo~*13_{H|NV(pgQM|f?*_mqB&@2=>p+A6~o$q}RbY}#Ot>eq?WX+&&~ z7!8OmA^H0(b~sfUW;IiPWxG@hq#HZsDgp$)cVYl^aQ z875Z1ouBbD6dx7&3RsS`xO9{2Zr|mf;E)Qt$A69N*(BnXqs#Z$6;78weI-_&g$SL` zi1JZ?jH*pHnOq5&#WsIN{{L%MWrL5l+v}iT zyPYuB+r8N1h2D+AuD%V!Kf}J>Z0P>);eB@ic7avM(GqH756ugv)Ap9G~sQc|MQ-hv9iRA0CE_`nw(e7_ok-K6}D` zL)Ry<_jniLA7r;BJRjE ztdZ(!j#_?6L^f73f}GZr3|#!b+wa4B5Yvvc8e15EGd z*SsIS&PNIGxAiOB*%#iskpt#+@Gu*Co@n5+9jcYn<#b@~X*9kuzh~-sx^c`mYVjyi z|55l^_t5sGp5Qy+h)DsxyD5aEVm+VegQXb8QMcp^fCLZs1-l)KX}*+H*ou7IDCY2{ zw@f`32IDB}NZM23;rcuXxuvUwYc4&|b-#7)^GME)C<0~n!}STbZVIP$JsCv!C!;jg z-wma!x5bf#up*4_>TVVvT$Wt^q2gYo9om5GB}{Hea!RWVE{>;Dh*sYV=PhBIzh4k- zwgnkIvpIY%=teQ@n`6>;b)70P{8s(Yscvbj!*pDe)yD#0hw3vn?@*spAAEgG;1UDE z%aR86#<*O*VLpjE&6?=&>sR>0HmM09;5D+09n=sODs*Ur9pv`Ys%U8lf@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$9r_`SlZU#s)z@ z)2X&rSQM<6?G)kHK-MC){PdMa60_%3pRer(MHZa5w$B=yfd3#W#Yf_o&Hvk4oc#ij zRrd`mc(|r^@Sp6PzaOFLsW|8ISm z&YDN@dm_#cZ@y;9IqApjp_kj#ZtLd!B)j(&^5&et{ Y5mK_H4%e?AOO?W+n}qcV?a@8)e<8k`T>t<8 diff --git a/src/com/songoda/epicspawners/Utils/Reflection.java b/src/com/songoda/epicspawners/Utils/Reflection.java deleted file mode 100644 index 83bb9bf32aa288de225da63e1203a61c4ecdf675..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3608 zcmeH~NmCO+7>2(yzhcZOpiW%M^5BAk95@&$iRHoa5Rx%KLP#YOmZJFU>hpHfH9gRf zNO|yJP0iBFw=ez9&tEpNuJvrlb6|yKd>`A9CzX71SftmUjt?10soqc~-)uqmV5 zzF5i1i0@an!gT=s1iC5nnR^e|wP$mr3|TE1ZA2qcEkkpF%oC)J;UMnk@Y&|OK;ABI zZ->{RWouk3$Y0~$WOu>3_VyX?L7QE(P@0aJeP%807w-AQp4v;Kcs?!O6ZGE0R(V3c z8o_nOmDy)_|6p7&D}Q)y7tn~>Uv=u4(^-4P>l1truc$K@i_+Tm5zB7c*i6i2@bSJ_ zg`4CCsp0(&UUMv%IB!VnuV_ETYI%0RxM>Z>T|0%-Ir|Fc8n&9?wHaC7gI*qZ!>t@D zoxi(yqfF@8gr8y*vpsjwSSpbIKP%YRto1 z;H}B8EQuw`JBqfC$|hP&;NP%E$haA!Jj#x=#X*O9l$(WXT-uzNkL#s`9E5mOV++bu2XG`{96YE6gOM7BGp<=@@^7oZfZ&{BBiZ zn6I>oXLnq04Y)C0X|tj;%g-qbC+xuQXNH@o~QoKItXn zzig*EBe&A^5jycM_)Y%QA4HD-gi2y8F+zJ~;F%p}9x$(S wS6uYZ6#h1p+jGunQLdxYqF5JTtXKCeLty=s#$fes0WS@mOep(}^_{!i7f^mm}~ry6&r^WE^C>pF8C>;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#bF1gBs4B+_wG=8Ahy3={u)6b)U{URIlS61pFK- zRCtY=Lmkr3T2O@G3Wj?Y8{xcHs5ASlSBZb|+Tp8l0_tQJcj2qmQ>1neBe( z?-0fd@<{Y6|FI{EEZ4PPE~^qxZyNi2#%}ExL&Z{U?exPA<$38Ay%BHe%b#bxwsF48 zHO)EgaPd6k2Mz0puNpZQQtpzo6NB-SH%)`( z;0BwRFqVQ+kHc&e4@8faeil(V_6q1mkp-X0uNpl>VZWbVV1B>7D}d)m+0jnE=DDwD zXns7YEsSm{{mUk#^2~O3d)^IYTRay?Zn)kv=SrilA2(~WQg4oe)*lspcs`MLGxMHi zyke1jC27Jd({6o_=Di!C&+$yN^8~?mz@dBIr8*mnZ``1hX&t<&uDSM?F^HpL z-;Z}f*eKo%QtqZOt7YX8LOL%M5_?&#v)$IWI4YgjM*+QWX3u!ANZw$V&b%_$%s#4n zP1)&Xjpsl%^g>p}T0*3xpJLW*q7RuQ<5CVRiDz-$G@mOSV{0 zhOE{dQ)YP~AF?l8sdLFq%h<&`sS0^w5xkmR<&;b8^lo#h`9H5vDaHRwhFUScU#PTK zynlRYZ~Yi3o8p4M#gzZiC+^`LM@5eJxoZ5Jt`c78Kz>&ah3nmT4L!+V{bt*d+)S%_(#=%KB?KtJU_qqL;?+fOaKK}!C$Fsx$ diff --git a/src/main/java/com/massivestats/MassiveStats.java b/src/main/java/com/massivestats/MassiveStats.java new file mode 100644 index 0000000..8eb26dc --- /dev/null +++ b/src/main/java/com/massivestats/MassiveStats.java @@ -0,0 +1,490 @@ +/* + * Copyright 2018 (c) Massive Statistics LLC - All Rights Reserved + * This file may only be used in conjunction with the 'MassiveStats' service. + */ + +package com.massivestats; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.plugin.java.JavaPlugin; +import org.bukkit.scheduler.BukkitRunnable; + +import javax.net.ssl.HttpsURLConnection; +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.MalformedURLException; +import java.net.URL; + +/** + * MassiveStats collects plugin and server information for plugin authors. + * You can learn more at our website: https://www.massivestats.com/ + * + * @version 3.0 + * @author Sam Jakob Harker, Brianna Hazel O'Keefe + */ +@SuppressWarnings("all") +public class MassiveStats implements Listener { + + /* START: MASSIVESTATS SETTINGS */ + public static final int CLIENT_VERSION = 0; // v3.0 + public static final String API_URL = "https://report.massivestats.com/v2/"; + + public static final String MASSIVE_UPDATE_PERMISSION = "massivestats.update"; + /* END: MASSIVESTATS SETTINGS */ + + private MassiveStatsUpdateTask task = null; + private int pingInterval; + + private MassiveStatsDataResponse lastResponse; + private boolean listenerDisabled; + + private final JavaPlugin plugin; + + private Class jsonElement; + private Class jsonParser; + private Class jsonObject; + private Class jsonPrimitive; + + /** + * @param plugin The plugin you wish to collect data for. + * @author Sam Jakob Harker + */ + public MassiveStats(JavaPlugin plugin){ + this(plugin, 900); // default value: 900 seconds (= 15 minutes) + } + + /** + * @param plugin The plugin you wish to collect data for. + * @param pingInterval Duration between requests. + * @author Sam Jakob Harker + */ + public MassiveStats(JavaPlugin plugin, int pingInterval){ + try { + jsonElement = Class.forName("com.google.gson.JsonElement"); + jsonParser = Class.forName("com.google.gson.JsonParser"); + jsonObject = Class.forName("com.google.gson.JsonObject"); + jsonPrimitive = Class.forName("com.google.gson.JsonPrimitive"); + }catch(ClassNotFoundException ex){ + // Gson not included in classpath (so use NMS version) + try { + jsonElement = Class.forName("net.minecraft.util.com.google.gson.JsonElement"); + jsonParser = Class.forName("net.minecraft.util.com.google.gson.JsonParser"); + jsonObject = Class.forName("net.minecraft.util.com.google.gson.JsonObject"); + jsonPrimitive = Class.forName("net.minecraft.util.com.google.gson.JsonPrimitive"); + }catch(ClassNotFoundException ignored){ + Bukkit.getLogger().severe("MassiveStats could not find an instance/version of Gson to use."); + this.plugin = null; + return; + } + } + + // Ensure the pingInterval that is set is reasonable. + if(pingInterval < 10 || pingInterval > 86400){ + pingInterval = 900; + } + + // Ensure that a plugin instance has been provided. + if(plugin == null){ + throw new IllegalArgumentException("You must provide a plugin for MassiveStats to collect data for!"); + } + + // Set the ping interval. + this.pingInterval = pingInterval; + // Set the plugin reference. + this.plugin = plugin; + // and start sending data to the MassiveStats server immediately. + start(); + + // Register join/leave events for the plugin + Bukkit.getServer().getPluginManager().registerEvents(this, plugin); + } + + /** + * Gets whether or not the built-in MassiveStats {@link org.bukkit.event.player.PlayerJoinEvent} listener is enabled. + * @return Whether or not the MassiveStats listener is enabled. + */ + public boolean isListenerDisabled(){ + return listenerDisabled; + } + + /** + * Sets whether or not the built-in MassiveStats {@link org.bukkit.event.player.PlayerJoinEvent} listener is enabled. + * @param listenerDisabled Whether or not the MassiveStats listener is enabled. + */ + public void setListenerDisabled(boolean listenerDisabled){ + this.listenerDisabled = listenerDisabled; + } + + /** + * Start the MassiveStats reporting timer. + * If the timer is already running, this method will do nothing. + * @author Sam Jakob Harker + */ + public void start(){ + if(this.plugin == null){ + Bukkit.getLogger().severe("MassiveStats could not find an instance/version of Gson to use and thus cannot start."); + return; + } + + if(task == null){ + // If the API endpoint URL is invalid, don't start a new task to prevent the user from being spammed. + try { + new URL(MassiveStats.API_URL); + }catch(MalformedURLException ex){ + getPlugin() + .getLogger().warning("You have specified an invalid API endpoint for MassiveStats."); + return; + } + + task = new MassiveStatsUpdateTask(this); + task.runTaskTimerAsynchronously(plugin, 0L, pingInterval * 20L); + } + } + + /** + * Stop the MassiveStats reporting timer. + * Requests will no longer be sent to the server - or until {@link #start()} is invoked. + * @author Sam Jakob Harker + */ + public void stop(){ + if(task == null){ + return; + } + + task.cancel(); + task = null; + } + + /** + * Sets the duration, in seconds, that MassiveStats should wait before sending another request to the server. + * @param pingInterval Duration between requests. + * @author Sam Jakob Harker + */ + public void setPingInterval(int pingInterval){ + this.pingInterval = pingInterval; + + stop(); + start(); + } + + /** + * Returns the duration, in seconds, that MassiveStats will wait before sending another request to the server. + * @return Duration between requests. + * @author Sam Jakob Harker + */ + public int getPingInterval(){ + return pingInterval; + } + + /** + * Returns the plugin that this MassiveStats instance is collecting data for. + * @return MassiveStats instance plugin. + * @author Sam Jakob Harker + */ + public JavaPlugin getPlugin(){ + return plugin; + } + + void setLastResponse(MassiveStatsDataResponse lastResponse){ + this.lastResponse = lastResponse; + } + + /** + * Returns the contents of the last response from the MassiveStats server. + * @return MassiveStats server response. + * @author Sam Jakob Harker + */ + public MassiveStatsDataResponse getLastResponse() { + return lastResponse; + } + + @EventHandler + public void onPlayerJoin(PlayerJoinEvent event){ + // Ensure the listener should be active + if(lastResponse == null || listenerDisabled){ + return; + } + + // Of course, only notify the user if the plugin is not up to date. + if(lastResponse.isUpToDate()){ + return; + } + + // and only notify operators - or players with the correct permission. + if(!event.getPlayer().isOp() && !event.getPlayer().hasPermission(MassiveStats.MASSIVE_UPDATE_PERMISSION)){ + return; + } + + event.getPlayer().sendMessage(lastResponse.getUpdateMessage()); + } + + Class getJsonElement(){ + return jsonElement; + } + + Class getJsonParser(){ + return jsonParser; + } + + Class getJsonObject(){ + return jsonObject; + } + + Class getJsonPrimitive(){ + return jsonPrimitive; + } + +} + +class MassiveStatsUpdateTask extends BukkitRunnable { + + private final MassiveStats instance; + + MassiveStatsUpdateTask(MassiveStats requester){ + instance = requester; + } + + @Override + @SuppressWarnings("all") + public void run(){ + try { + // Generate the request payload and serialize it as JSON. + String payload = new MassiveStatsDataRequest(instance).serialize(); + + // Then create a new HttpsUrlConnection to the API server and open it. + HttpsURLConnection connection = (HttpsURLConnection) new URL(MassiveStats.API_URL).openConnection(); + + // Ensure that we don't hang the server with our 'dang shenanigans'. + connection.setConnectTimeout(2500); + connection.setReadTimeout(3500); + + // Set the all-important request headers before we begin POSTing... + connection.setRequestMethod("POST"); + connection.setRequestProperty("Accept", "application/json"); + connection.setRequestProperty("Content-Type", "application/json; charset=utf-8"); + connection.setRequestProperty("User-Agent", "Massive/" + MassiveStats.CLIENT_VERSION); + + // Open the output stream, write the payload, and then close the stream. + connection.setDoOutput(true); + DataOutputStream output = new DataOutputStream(connection.getOutputStream()); + output.writeBytes(payload); + output.flush(); + output.close(); + + // Ensure that the server was happy with our data. + int responseCode = connection.getResponseCode(); + if(responseCode != 200){ + throw new IOException(); + } + + // Now, read the server's response to our payload... + BufferedReader input = new BufferedReader(new InputStreamReader(connection.getInputStream())); + StringBuilder response = new StringBuilder(); + + // ...line by line. + String line; + while((line = input.readLine()) != null){ + response.append(line); + } + input.close(); + + // Now, we parse the JSON object. + try { + if(response.toString().contains("ERR_DATA_MISSING")){ + Bukkit.getLogger().severe("MassiveStats has encountered an error for the following plugin: " + + instance.getPlugin().getName()); + instance.stop(); + return; + } + + Object parser = instance.getJsonParser().newInstance(); + + // JsonElement + Object serverResponseRaw = + parser.getClass().getMethod("parse", String.class).invoke(parser, response.toString()); + + // JsonObject + Object serverResponse = serverResponseRaw.getClass().getMethod("getAsJsonObject", null) + .invoke(serverResponseRaw, null); + + Method serverResponseGet = instance.getJsonObject().getMethod("get", String.class); + + Method getAsBoolean = + instance.getJsonPrimitive().getMethod("getAsBoolean", null); + Method getAsString = + instance.getJsonPrimitive().getMethod("getAsString", null); + + if(serverResponseGet.invoke(serverResponse, "upToDate") == null){ + Bukkit.getLogger().severe("MassiveStats has encountered an error for the following plugin: " + + instance.getPlugin().getName()); + instance.stop(); + return; + } + + if(serverResponseGet.invoke(serverResponse, "notice") != null) { + Bukkit.getLogger().severe( + (String) getAsString.invoke(serverResponseGet.invoke(serverResponse, "notice")) + ); + instance.stop(); + return; + } + + boolean upToDate = (boolean) getAsBoolean.invoke(serverResponseGet.invoke(serverResponse, "upToDate"), null); + String latestVersion = (String) getAsString.invoke(serverResponseGet.invoke(serverResponse, "latestVersion"), null); + String updateMessage = ChatColor.translateAlternateColorCodes( + '&', (String) getAsString.invoke(serverResponseGet.invoke(serverResponse, "updateMessage"), null) + ); + + instance.setLastResponse(new MassiveStatsDataResponse( + upToDate, latestVersion, updateMessage + )); + + }catch (IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException e) { + instance.getPlugin() + .getLogger().warning("MassiveStats returned an invalid response for this plugin."); + } + + // Finally, call an event to mark the update. + } catch(MalformedURLException ex){ + instance.getPlugin() + .getLogger().warning("You have specified an invalid API endpoint for MassiveStats."); + }catch(IOException ex){ + instance.getPlugin() + .getLogger().warning("MassiveStats was unable to communicate with its API endpoint."); + } + } + +} + +class MassiveStatsDataRequest { + + private Object jsonObject; + + MassiveStatsDataRequest(MassiveStats requester){ + try { + jsonObject = requester.getJsonObject().newInstance(); + + Method add = + requester.getJsonObject().newInstance().getClass().getMethod("add", String.class, requester.getJsonElement()); + Method addPropertyString = + requester.getJsonObject().newInstance().getClass().getMethod("addProperty", String.class, String.class); + Method addPropertyNumber = + requester.getJsonObject().newInstance().getClass().getMethod("addProperty", String.class, Number.class); + Method addPropertyBoolean = + requester.getJsonObject().newInstance().getClass().getMethod("addProperty", String.class, Boolean.class); + + addPropertyNumber.invoke(jsonObject, "now", System.currentTimeMillis()); + + /* PLUGIN DATA */ + Object pluginObject = jsonObject.getClass().newInstance(); + addPropertyString.invoke(pluginObject, "name", requester.getPlugin().getDescription().getName()); + addPropertyString.invoke(pluginObject, "version", requester.getPlugin().getDescription().getVersion()); + add.invoke(jsonObject, "plugin", pluginObject); + + /* SERVER DATA */ + Object minecraftServerObject = jsonObject.getClass().newInstance(); + addPropertyNumber.invoke(minecraftServerObject, "players", Bukkit.getServer().getOnlinePlayers().size()); + addPropertyBoolean.invoke(minecraftServerObject, "onlineMode", Bukkit.getServer().getOnlineMode()); + addPropertyString.invoke(minecraftServerObject, "version", Bukkit.getServer().getVersion()); + + Object javaServerObject = jsonObject.getClass().newInstance(); + addPropertyString.invoke(javaServerObject, "version", System.getProperty("java.version")); + + Object osServerObject = jsonObject.getClass().newInstance(); + addPropertyString.invoke(osServerObject, "name", System.getProperty("os.name")); + addPropertyString.invoke(osServerObject, "arch", System.getProperty("os.arch")); + addPropertyString.invoke(osServerObject, "version", System.getProperty("os.version")); + + Object hardwareServerObject = jsonObject.getClass().newInstance(); + addPropertyNumber.invoke(hardwareServerObject, "cores", Runtime.getRuntime().availableProcessors()); + + Object serverObject = jsonObject.getClass().newInstance(); + add.invoke(serverObject, "minecraft", minecraftServerObject); + add.invoke(serverObject, "java", javaServerObject); + add.invoke(serverObject, "os", osServerObject); + add.invoke(serverObject,"hardware", hardwareServerObject); + + add.invoke(jsonObject, "server", serverObject); + + /* MASSIVE DATA */ + Object massiveObject = jsonObject.getClass().newInstance(); + addPropertyNumber.invoke(massiveObject, "version", MassiveStats.CLIENT_VERSION); + addPropertyNumber.invoke(massiveObject, "pingInterval", requester.getPingInterval()); + + //object.add("Massive", massiveObject); + add.invoke(jsonObject,"Massive", massiveObject); + } catch (IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException e) { + e.printStackTrace(); + } + } + + @SuppressWarnings("all") + public String serialize(){ + //return object.toString(); + try { + Method toString = jsonObject.getClass().getMethod("toString", null); + return (String) toString.invoke(jsonObject); + } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { + e.printStackTrace(); + } + + return null; + } + +} + +@SuppressWarnings("unused") +final class MassiveStatsDataResponse { + + private final boolean isUpToDate; + private final String newVersion; + private final String updateMessage; + + MassiveStatsDataResponse(boolean isUpToDate, String newVersion, String updateMessage){ + this.isUpToDate = isUpToDate; + + if(!isUpToDate) { + this.newVersion = newVersion; + this.updateMessage = updateMessage; + return; + } + + this.newVersion = null; + this.updateMessage = null; + } + + /** + * Indicates whether or not this version of the plugin is the latest. + * True = This is the latest version of the plugin. + * False = There is an update available. + * @return Whether or not there is an update available. + */ + public boolean isUpToDate() { + return isUpToDate; + } + + /** + * Gets the name of the latest version. If this is the latest version, it returns null. + * @return The name of the latest version. + */ + public String getLatestVersion(){ + return newVersion; + } + + /** + * Gets the message to display, convincing the user to update to the new version of the plugin. + * @return The update message to display. + */ + public String getUpdateMessage(){ + return updateMessage; + } + +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicspawners/EpicSpawners.java b/src/main/java/com/songoda/epicspawners/EpicSpawners.java new file mode 100644 index 0000000..fbe5372 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/EpicSpawners.java @@ -0,0 +1,340 @@ +package com.songoda.epicspawners; + +import com.songoda.arconix.api.utils.ConfigWrapper; +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.api.EpicSpawnersAPI; +import com.songoda.epicspawners.handlers.*; +import com.songoda.epicspawners.listeners.*; +import com.songoda.epicspawners.spawners.Shop; +import com.songoda.epicspawners.spawners.SpawnerEditor; +import com.songoda.epicspawners.utils.Heads; +import com.songoda.epicspawners.utils.Methods; +import com.songoda.epicspawners.utils.SettingsManager; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.block.Block; +import org.bukkit.command.CommandSender; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.event.Listener; +import org.bukkit.inventory.ItemStack; +import org.bukkit.plugin.java.JavaPlugin; + +import java.util.*; + +/** + * Created by songoda on 2/25/2017. + */ +public class EpicSpawners extends JavaPlugin implements Listener { + public static CommandSender console = Bukkit.getConsoleSender(); + + private static EpicSpawners INSTANCE; + + public Map cache = new HashMap<>(); + + public BlacklistHandler blacklist; + + public HookHandler hooks; + + public Shop shop; + public SpawnerEditor editor; + public HologramHandler holo; + public Heads heads; + public SettingsManager sm; + + public EpicSpawnersAPI api; + + public List change = new ArrayList<>(); + + public List boosting = new ArrayList<>(); + public Map boostAmt = new HashMap<>(); + + public Map infPage = new HashMap<>(); + + public HashMap tickTracker = new HashMap<>(); + public HashMap tickTracker2 = new HashMap<>(); + + public boolean v1_12 = Bukkit.getServer().getClass().getPackage().getName().contains("1_12"); + public boolean v1_11 = Bukkit.getServer().getClass().getPackage().getName().contains("1_11"); + public boolean v1_7 = Bukkit.getServer().getClass().getPackage().getName().contains("1_7"); + public boolean v1_8 = Bukkit.getServer().getClass().getPackage().getName().contains("1_8"); + public boolean v1_9 = Bukkit.getServer().getClass().getPackage().getName().contains("1_9"); + public boolean v1_10 = Bukkit.getServer().getClass().getPackage().getName().contains("1_10"); + public boolean v1_8_R1 = Bukkit.getServer().getClass().getPackage().getName().contains("1_8_R1"); + + public List itemEditorInstance = new ArrayList<>(); + public List entityEditorInstance = new ArrayList<>(); + public List commandEditorInstance = new ArrayList<>(); + public List blockEditorInstance = new ArrayList<>(); + + public String newSpawnerName = ""; + + public boolean isItemInstanceSaved = false; + public boolean isEntityInstanceSaved = false; + public boolean isCommandInstanceSaved = false; + public boolean isBlockInstanceSaved = false; + + public Map editing = new HashMap<>(); + public Map subediting = new HashMap<>(); + + public Map chatEditing = new HashMap<>(); + + public Map inShow = new HashMap<>(); + public Map page = new HashMap<>(); + + public Map pickup = new HashMap<>(); + public Map freePickup = new HashMap<>(); + + public Map lastSpawn = new HashMap<>(); + + private Locale locale; + public ConfigWrapper dataFile = new ConfigWrapper(this, "", "data.yml"); + public ConfigWrapper spawnerFile = new ConfigWrapper(this, "", "spawners.yml"); + + public References references = null; + + public Map spawnerLoc = new HashMap<>(); + public Map lastSpawner = new HashMap<>(); + + public void onDisable() { + thinData(); + dataFile.saveConfig(); + spawnerFile.saveConfig(); + console.sendMessage(Arconix.pl().getApi().format().formatText("&a=============================")); + console.sendMessage(Arconix.pl().getApi().format().formatText("&7EpicSpawners " + this.getDescription() + " by &5Brianna <3!")); + console.sendMessage(Arconix.pl().getApi().format().formatText("&7Action: &cDisabling&7...")); + console.sendMessage(Arconix.pl().getApi().format().formatText("&a=============================")); + } + + public void onEnable() { + INSTANCE = this; + + Arconix.pl().hook(this); + + console.sendMessage(Arconix.pl().getApi().format().formatText("&a=============================")); + console.sendMessage(Arconix.pl().getApi().format().formatText("&7EpicSpawners " + this.getDescription().getVersion() + " by &5Brianna <3&7!")); + console.sendMessage(Arconix.pl().getApi().format().formatText("&7Action: &aEnabling&7...")); + Bukkit.getServer().getPluginManager().registerEvents(this, this); + + hooks = new HookHandler(); + hooks.hook(); + + heads = new Heads(); + + api = new EpicSpawnersAPI(); + + sm = new SettingsManager(); + + setupConfig(); + setupSpawners(); + + dataFile.createNewFile("Loading Data File", "EpicSpawners Data File"); + loadDataFile(); + + // Locales + Locale.init(this); + Locale.saveDefaultLocale("en_US"); + this.locale = Locale.getLocale(this.getConfig().getString("Locale", "en_US")); + + thinData(); + + blacklist = new BlacklistHandler(); + references = new References(); + + shop = new Shop(this); + editor = new SpawnerEditor(this); + holo = new HologramHandler(); + new OmniHandler(); + new BoostHandler(); + new ItemHandler(); + + new com.massivestats.MassiveStats(this, 900); + + + Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, () -> { + thinData(); + dataFile.saveConfig(); + }, 50000L, 50000L); + + this.getCommand("EpicSpawners").setExecutor(new CommandHandler(this)); + this.getCommand("SpawnerStats").setExecutor(new CommandHandler(this)); + this.getCommand("SpawnerShop").setExecutor(new CommandHandler(this)); + + getServer().getPluginManager().registerEvents(new BlockListeners(this), this); + getServer().getPluginManager().registerEvents(new ChatListeners(), this); + getServer().getPluginManager().registerEvents(new EntityListeners(), this); + getServer().getPluginManager().registerEvents(new InteractListeners(this), this); + getServer().getPluginManager().registerEvents(new InventoryListeners(this), this); + getServer().getPluginManager().registerEvents(new SpawnerListeners(), this); + + if (!v1_7) { + getServer().getPluginManager().registerEvents(new com.songoda.epicspawners.listeners.TestListeners(), this); + } + console.sendMessage(Arconix.pl().getApi().format().formatText("&a=============================")); + } + + private void setupConfig() { + sm.updateSettings(); + getConfig().options().copyDefaults(true); + saveConfig(); + } + + private void setupSpawners() { + for (final EntityType value : EntityType.values()) { + if (value.isSpawnable() && value.isAlive() && + !value.toString().toLowerCase().contains("armor") && + !value.toString().toLowerCase().contains("giant")) + processDefault(value.name()); + } + processDefault("Omni"); + spawnerFile.getConfig().options().copyDefaults(true); + spawnerFile.saveConfig(); + } + + public void processDefault(String value) { + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".Display-Name")) + spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(value) + ".Display-Name", Methods.getTypeFromString(value)); + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".Pickup-cost")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".Pickup-cost", 0); + + String spawnBlock = "AIR"; + + if (value.equalsIgnoreCase("pig") || value.equalsIgnoreCase("sheep") || value.equalsIgnoreCase("chicken") || + value.equalsIgnoreCase("cow") || value.equalsIgnoreCase("rabbit") || value.equalsIgnoreCase("llamma") || + value.equalsIgnoreCase("horse") || value.equalsIgnoreCase("OCELOT")) { + spawnBlock = "GRASS"; + } + + if (value.equalsIgnoreCase("MUSHROOM_COW")) { + spawnBlock = "MYCEL"; + } + + if (value.equalsIgnoreCase("SQUID") || value.equalsIgnoreCase("ELDER_GUARDIAN")) { + spawnBlock = "WATER"; + } + + if (value.equalsIgnoreCase("OCELOT")) { + spawnBlock = ", LEAVES"; + } + + for (final EntityType val : EntityType.values()) { + if (val.isSpawnable() && val.isAlive()) { + if (val.name().equals(value)) { + List list = new ArrayList<>(); + list.add(value); + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".entities")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".entities", list); + } + } + } + + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".Spawn-Block")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".Spawn-Block", spawnBlock); + + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".Allowed")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".Allowed", true); + + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".Spawn-On-Fire")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".Spawn-On-Fire", false); + + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".Has-AI") && !EpicSpawners.getInstance().v1_7) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".Has-AI", true); + + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".Upgradable")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".Upgradable", true); + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".Convertible")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".Convertible", true); + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".Convert-Price")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".Convert-Price", "45%"); + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".Limited")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".Limited", 0); + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".In-Shop")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".In-Shop", true); + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".Shop-Price")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".Shop-Price", 1000.00); + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".CustomGoal")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".CustomGoal", 0); + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".Custom-ECO-Cost")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".Custom-ECO-Cost", 0); + if (!spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(value) + ".Custom-XP-Cost")) + spawnerFile.getConfig().addDefault("Entities." + Methods.getTypeFromString(value) + ".Custom-XP-Cost", 0); + } + + private void loadDataFile() { + dataFile.getConfig().options().copyDefaults(true); + dataFile.saveConfig(); + } + + public void reload() { + locale.reloadMessages(); + spawnerFile.createNewFile("Loading Spawners File", "EpicSpawners Spawners File"); + hooks.hooksFile.createNewFile("Loading Hooks File", "EpicSpawners Spawners File"); + hooks = new HookHandler(); + hooks.hook(); + references = new References(); + blacklist.reload(); + reloadConfig(); + saveConfig(); + } + + public void thinData() { + if (dataFile.getConfig().contains("data.entityshop")) { + ConfigurationSection cs = dataFile.getConfig().getConfigurationSection("data.entityshop"); + for (String key : cs.getKeys(true)) { + if (isDead(UUID.fromString(key))) { + dataFile.getConfig().set("data.entityshop." + key, null); + } + } + } + + if (getConfig().getBoolean("System.Remove Dead Entities from Data File")) { + if (dataFile.getConfig().contains("data.Entities")) { + ConfigurationSection cs = dataFile.getConfig().getConfigurationSection("data.Entities"); + for (String key : cs.getKeys(true)) { + if (isDead(UUID.fromString(key))) { + dataFile.getConfig().set("data.Entities." + key, null); + } + } + } + } else { + dataFile.getConfig().set("data.Entities", null); + } + + if (!getConfig().getBoolean("Spawner Drops.Allow Killing Mobs To Drop Spawners")) { + if (dataFile.getConfig().contains("data.kills")) { + dataFile.getConfig().set("data.kills", null); + } + } + } + + public boolean isDead(UUID uniqueId) { + for (World world : Bukkit.getWorlds()) { + for (Entity entity : world.getEntities()) { + if (entity.getUniqueId().equals(uniqueId)) { + return false; + } + } + } + + return true; + } + + public Locale getLocale() { + return locale; + } + + public EpicSpawnersAPI getApi() { + return api; + } + + public static EpicSpawners pl() { + return INSTANCE; + } + + public static EpicSpawners getInstance() { + return INSTANCE; + } +} diff --git a/src/main/java/com/songoda/epicspawners/Locale.java b/src/main/java/com/songoda/epicspawners/Locale.java new file mode 100644 index 0000000..1866e2a --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/Locale.java @@ -0,0 +1,365 @@ +package com.songoda.epicspawners; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Lists; +import org.apache.commons.io.IOUtils; +import org.bukkit.ChatColor; +import org.bukkit.plugin.java.JavaPlugin; + +import java.io.*; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +/** + * Assists in the creation of multiple localizations and languages, + * as well as the generation of default .lang files + * + * @author Parker Hawke - 2008Choco + */ +public class Locale { + + private static JavaPlugin plugin; + private static final List LOCALES = Lists.newArrayList(); + + private static final Pattern NODE_PATTERN = Pattern.compile("(\\w+(?:\\.{1}\\w+)*)\\s*=\\s*\"(.*)\""); + private static final String FILE_EXTENSION = ".lang"; + private static File localeFolder; + + private static String defaultLocale; + + private final Map nodes = new HashMap<>(); + + private final File file; + private final String name, region; + + private Locale(String name, String region) { + if (plugin == null) + throw new IllegalStateException("Cannot generate locales without first initializing the class (Locale#init(JavaPlugin))"); + + this.name = name.toLowerCase(); + this.region = region.toUpperCase(); + + String fileName = name + "_" + region + FILE_EXTENSION; + this.file = new File(localeFolder, fileName); + + if (this.reloadMessages()) return; + + plugin.getLogger().info("Loaded locale " + fileName); + } + + /** + * Get the name of the language that this locale is based on. + * (i.e. "en" for English, or "fr" for French) + * + * @return the name of the language + */ + public String getName() { + return name; + } + + /** + * Get the name of the region that this locale is from. + * (i.e. "US" for United States or "CA" for Canada) + * + * @return the name of the region + */ + public String getRegion() { + return region; + } + + /** + * Return the entire locale tag (i.e. "en_US") + * + * @return the language tag + */ + public String getLanguageTag() { + return name + "_" + region; + } + + /** + * Get the file that represents this locale + * + * @return the locale file (.lang) + */ + public File getFile() { + return file; + } + + /** + * Get a message set for a specific node + * + * @param node the node to get + * @return the message for the specified node + */ + public String getMessage(String node) { + return ChatColor.translateAlternateColorCodes('&', this.getMessageOrDefault(node, node)); + } + + /** + * Get a message set for a specific node and replace its params with a supplied arguments. + * + * @param node the node to get + * @param args the replacement arguments + * @return the message for the specified node + */ + public String getMessage(String node, Object... args) { + String message = getMessage(node); + for (Object arg : args) { + message = message.replaceFirst("\\%.*?\\%", arg.toString()); + } + return message; + } + + /** + * Get a message set for a specific node + * + * @param node the node to get + * @param defaultValue the default value given that a value for the node was not found + * + * @return the message for the specified node. Default if none found + */ + public String getMessageOrDefault(String node, String defaultValue) { + return this.nodes.getOrDefault(node, defaultValue); + } + + /** + * Get the key-value map of nodes to messages + * + * @return node-message map + */ + public Map getMessageNodeMap() { + return ImmutableMap.copyOf(nodes); + } + + /** + * Clear the previous message cache and load new messages directly from file + * + * @return reload messages from file + */ + public boolean reloadMessages() { + if (!this.file.exists()) { + plugin.getLogger().warning("Could not find file for locale " + this.name); + return false; + } + + this.nodes.clear(); // Clear previous data (if any) + + try(BufferedReader reader = new BufferedReader(new FileReader(file))) { + String line; + for (int lineNumber = 0; (line = reader.readLine()) != null; lineNumber++) { + if (line.isEmpty() || line.startsWith("#") /* Comment */) continue; + + Matcher matcher = NODE_PATTERN.matcher(line); + if (!matcher.find()) { + System.err.println("Invalid locale syntax at (line=" + lineNumber + ")"); + continue; + } + + nodes.put(matcher.group(1), matcher.group(2)); + } + } catch (IOException e) { + e.printStackTrace(); + return false; + } + return true; + } + + /** + * Initialize the locale class to generate information and search for localizations. + * This must be called before any other methods in the Locale class can be invoked. + * Note that this will also call {@link #searchForLocales()}, so there is no need to + * invoke it for yourself after the initialization + * + * @param plugin the plugin instance + */ + public static void init(JavaPlugin plugin) { + Locale.plugin = plugin; + + if (localeFolder == null) { + localeFolder = new File(plugin.getDataFolder(), "locales/"); + } + + localeFolder.mkdirs(); + Locale.searchForLocales(); + } + + /** + * Find all .lang file locales under the "locales" folder + */ + public static void searchForLocales() { + if (!localeFolder.exists()) localeFolder.mkdirs(); + + for (File file : localeFolder.listFiles()) { + String name = file.getName(); + if (!name.endsWith(".lang")) continue; + + String fileName = name.substring(0, name.lastIndexOf('.')); + String[] localeValues = fileName.split("_"); + + if (localeValues.length != 2) continue; + if (localeExists(localeValues[0] + "_" + localeValues[1])) continue; + + LOCALES.add(new Locale(localeValues[0], localeValues[1])); + plugin.getLogger().info("Found and loaded locale \"" + fileName + "\""); + } + } + + /** + * Get a locale by its entire proper name (i.e. "en_US") + * + * @param name the full name of the locale + * @return locale of the specified name + */ + public static Locale getLocale(String name) { + for (Locale locale : LOCALES) + if (locale.getLanguageTag().equalsIgnoreCase(name)) return locale; + return null; + } + + /** + * Get a locale from the cache by its name (i.e. "en" from "en_US") + * + * @param name the name of the language + * @return locale of the specified language. Null if not cached + */ + public static Locale getLocaleByName(String name) { + for (Locale locale : LOCALES) + if (locale.getName().equalsIgnoreCase(name)) return locale; + return null; + } + + /** + * Get a locale from the cache by its region (i.e. "US" from "en_US") + * + * @param region the name of the region + * @return locale of the specified region. Null if not cached + */ + public static Locale getLocaleByRegion(String region) { + for (Locale locale : LOCALES) + if (locale.getRegion().equalsIgnoreCase(region)) return locale; + return null; + } + + /** + * Check whether a locale exists and is registered or not + * + * @param name the whole language tag (i.e. "en_US") + * @return true if it exists + */ + public static boolean localeExists(String name) { + for (Locale locale : LOCALES) + if (locale.getLanguageTag().equals(name)) return true; + return false; + } + + /** + * Get an immutable list of all currently loaded locales + * + * @return list of all locales + */ + public static List getLocales() { + return ImmutableList.copyOf(LOCALES); + } + + /** + * Save a default locale file from the project source directory, to the locale folder + * + * @param path the path to the file to save + * @param fileName the name of the file to save + * + * @return true if the operation was successful, false otherwise + */ + public static boolean saveDefaultLocale(String path, String fileName) { + if (!localeFolder.exists()) localeFolder.mkdirs(); + + if (!fileName.endsWith(FILE_EXTENSION)) + fileName = (fileName.lastIndexOf(".") == -1 ? fileName : fileName.substring(0, fileName.lastIndexOf('.'))) + FILE_EXTENSION; + + File destinationFile = new File(localeFolder, fileName); + if (destinationFile.exists()) { + return compareFiles(plugin.getResource(fileName), destinationFile); + } + + try (OutputStream outputStream = new FileOutputStream(destinationFile)) { + IOUtils.copy(plugin.getResource(fileName), outputStream); + + fileName = fileName.substring(0, fileName.lastIndexOf('.')); + String[] localeValues = fileName.split("_"); + + if (localeValues.length != 2) return false; + + LOCALES.add(new Locale(localeValues[0], localeValues[1])); + if (defaultLocale == null) defaultLocale = fileName; + + return true; + } catch (IOException e) { + return false; + } + } + + /** + * Save a default locale file from the project source directory, to the locale folder + * + * @param fileName the name of the file to save + * @return true if the operation was successful, false otherwise + */ + public static boolean saveDefaultLocale(String fileName) { + return saveDefaultLocale("", fileName); + } + + /** + * Clear all current locale data + */ + public static void clearLocaleData() { + for (Locale locale : LOCALES) + locale.nodes.clear(); + LOCALES.clear(); + } + + // Write new changes to existing files, if any at all + private static boolean compareFiles(InputStream defaultFile, File existingFile) { + // Look for default + if (defaultFile == null) { + defaultFile = plugin.getResource(defaultLocale != null ? defaultLocale : "en_US"); + if (defaultFile == null) return false; // No default at all + } + + boolean changed = false; + + List defaultLines, existingLines; + try (BufferedReader defaultReader = new BufferedReader(new InputStreamReader(defaultFile)); + BufferedReader existingReader = new BufferedReader(new FileReader(existingFile)); + BufferedWriter writer = new BufferedWriter(new FileWriter(existingFile, true))) { + defaultLines = defaultReader.lines().collect(Collectors.toList()); + existingLines = existingReader.lines().map(s -> s.split("\\s*=")[0]).collect(Collectors.toList()); + + for (String defaultValue : defaultLines) { + if (defaultValue.isEmpty() || defaultValue.startsWith("#")) continue; + + String key = defaultValue.split("\\s*=")[0]; + + if (!existingLines.contains(key)) { + if (!changed) { + writer.newLine(); writer.newLine(); + writer.write("# New messages for " + plugin.getName() + " v" + plugin.getDescription().getVersion()); + } + + writer.newLine(); + writer.write(defaultValue); + + changed = true; + } + } + } catch (IOException e) { + return false; + } + + return changed; + } + +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicspawners/References.java b/src/main/java/com/songoda/epicspawners/References.java new file mode 100644 index 0000000..81963b3 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/References.java @@ -0,0 +1,14 @@ +package com.songoda.epicspawners; + +public class References { + + private String prefix; + + public References() { + prefix = EpicSpawners.getInstance().getLocale().getMessage("general.nametag.prefix") + " "; + } + + public String getPrefix() { + return this.prefix; + } +} diff --git a/src/main/java/com/songoda/epicspawners/api/EpicSpawnersAPI.java b/src/main/java/com/songoda/epicspawners/api/EpicSpawnersAPI.java new file mode 100644 index 0000000..2a69e0b --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/api/EpicSpawnersAPI.java @@ -0,0 +1,428 @@ +package com.songoda.epicspawners.api; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.spawners.Spawner; +import com.songoda.epicspawners.spawners.SpawnerItem; +import com.songoda.epicspawners.utils.Debugger; +import com.songoda.epicspawners.utils.Methods; +import org.bukkit.ChatColor; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.block.CreatureSpawner; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.ArmorStand; +import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.BlockStateMeta; +import org.bukkit.inventory.meta.ItemMeta; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by songoda on 3/17/2017. + */ +public class EpicSpawnersAPI { + + + public int getSpawnerMultiplier(Location location) { + int amt = 0; + try { + if (location.getBlock().getType() != Material.MOB_SPAWNER) + return 0; + else { + Spawner spawner = new Spawner(location); + amt = 1; + if (location.getBlock() != null) + amt = spawner.getMulti(); + return amt; + } + } catch (Exception e) { + Debugger.runReport(e); + } + return amt; + } + + public boolean setMultiplier(Location location, int multi) { + try { + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawner." + Arconix.pl().getApi().serialize().serializeLocation(location), multi); + } catch (Exception e) { + Debugger.runReport(e); + return false; + } + return true; + } + + public String getSpawnerType(Block b) { + return getSpawnerType(b.getLocation()); + } + + public String getSpawnerType(Location location) { + Spawner eSpawner = new Spawner(location); + return eSpawner.spawnedTypeU; + } + + public ItemStack addOmniSpawner(SpawnerItem spawner, ItemStack item) { + try { + List ents = getOmniList(item); + + boolean hit = false; + boolean maxed = false; + for (SpawnerItem ent : ents) { + if (spawner.getType().equals(ent.getType())) { + if (ent.getMulti() == EpicSpawners.getInstance().getConfig().getInt("settings.Spawner-max")) { + maxed = true; + } else { + ent.setMulti(ent.getMulti() + spawner.getMulti()); + } + hit = true; + } + } + if (hit || ents.size() < EpicSpawners.getInstance().getConfig().getInt("Main.Max Spawners Inside A OmniSpawner")) { + if (!hit) { + ents.add(spawner); + } + if (!maxed) { + return newOmniSpawner(ents); + } else { + return null; + } + } else { + return null; + } + } catch (Exception e) { + //Debugger.runReport(e); + } + return null; + } + + public ItemStack newOmniSpawner(SpawnerItem spawner, SpawnerItem spawner2) { + try { + List ents = new ArrayList<>(); + ents.add(spawner2); + ents.add(spawner); + return newOmniSpawner(ents); + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public ItemStack newOmniSpawner(List ents) { + try { + ItemStack item = new ItemStack(Material.MOB_SPAWNER, 1); + ItemMeta meta = item.getItemMeta(); + ArrayList lore = new ArrayList<>(); + StringBuilder str = new StringBuilder(); + String str2 = getOmniString(ents); + for (SpawnerItem spawner : ents) { + str.append(spawner.getType()).append("-").append(spawner.getMulti()).append(":"); + } + meta.setDisplayName(Methods.compileName("OMNI", 1, true)); + lore.add(Arconix.pl().getApi().format().formatText(Arconix.pl().getApi().format().convertToInvisibleString(str.toString()) + str2)); + meta.setLore(lore); + item.setItemMeta(meta); + return item; + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public String getOmniString(List ents) { + try { + StringBuilder str2 = new StringBuilder("&7"); + for (SpawnerItem spawner : ents) { + str2.append(Methods.properType(spawner.getType())).append(" ").append(spawner.getMulti()).append("x, "); + } + return str2.substring(0, str2.length() - 2); + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public void updateDisplayItem(String type, Location location) { + try { + Spawner eSpawner = new Spawner(location); + eSpawner.getSpawner().setSpawnedType(EntityType.DROPPED_ITEM); + eSpawner.update(); + + Location nloc = location.clone(); + nloc.add(.5, -.4, .5); + List near = (List) nloc.getWorld().getNearbyEntities(nloc, 8, 8, 8); + for (Entity e : near) { + if (e.getLocation().getX() == nloc.getX() && e.getLocation().getY() == nloc.getY() && e.getLocation().getZ() == nloc.getZ()) { + e.remove(); + } + } + + try { + EntityType next = EntityType.valueOf(Methods.restoreType(type)); + eSpawner.getSpawner().setSpawnedType(next); + eSpawner.update(); + } catch (Exception ex) { + + location.setPitch(-360); + + ArmorStand as = (ArmorStand) location.getWorld().spawnEntity(nloc, EntityType.ARMOR_STAND); + as.setSmall(true); + as.setVisible(false); + as.setCustomNameVisible(false); + as.setGravity(false); + as.setCanPickupItems(false); + as.setBasePlate(true); + try { + if (EpicSpawners.getInstance().spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(type) + ".Display-Item")) { + as.setHelmet(new ItemStack(Material.valueOf(EpicSpawners.getInstance().spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(type) + ".Display-Item")))); + } else { + as.setHelmet(new ItemStack(Material.DIRT)); + } + } catch (Exception ee) { + as.setHelmet(new ItemStack(Material.DIRT)); + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public ItemStack newSpawnerItem(SpawnerItem item, int amount) { + return newSpawnerItem(item.getType(), item.getMulti(), amount); + } + + public ItemStack newSpawnerItem(String type, int amount) { + try { + return newSpawnerItem(type, 0, amount); + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public ItemStack newSpawnerItem(EntityType type, int amount) { + try { + try { + return newSpawnerItem(type.name(), 0, amount); + } catch (Exception e) { + return newSpawnerItem("PIG", 0, amount); + } + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public ItemStack newSpawnerItem(String type, int multi, int amount) { + try { + if (multi == 0) + multi = 1; + ItemStack item = new ItemStack(Material.MOB_SPAWNER, amount); + ItemMeta itemmeta = item.getItemMeta(); + String name = Methods.compileName(type, multi, true); + itemmeta.setDisplayName(name); + + /* BlockStateMeta bsm = (BlockStateMeta) item.getItemMeta(); + CreatureSpawner cs = (CreatureSpawner) bsm.getBlockState(); + + cs.setSpawnedType(type); + bsm.setBlockState(cs); + item.setItemMeta(bsm); */ + + item.setItemMeta(itemmeta); + return item; + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public boolean isOmniBlock(Location location) { + if (location != null) { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".type")) { + return EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".type").equals("OMNI"); + } + } + return false; + } + + public void clearOmni(Location location) { + try { + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".entities", null); + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".type", null); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void saveCustomSpawner(ItemStack item, Block b) { + try { + if (getIType(item).equals("OMNI")) { + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(b) + ".type", getIType(item)); + + List entities = getOmniList(item); + + List ents = new ArrayList<>(); + for (SpawnerItem spawner : entities) + ents.add(spawner.getType() + "-" + spawner.getMulti()); + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(b) + ".entities", ents); + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public List getOmniList(ItemStack item) { + List entities = new ArrayList<>(); + try { + String[] arr = (item.getItemMeta().getLore().get(0).replace("§", "")).split(":"); + int num = 1; + for (String str : arr) { + if (arr.length != num) { + String[] arr2 = str.split("-"); + entities.add(new SpawnerItem(arr2[0], Integer.parseInt(arr2[1]))); + } + num++; + } + } catch (Exception e) { + Debugger.runReport(e); + } + return entities; + } + + public int getIMulti(ItemStack item) { + try { + if (item.getItemMeta().getDisplayName().contains("§fSpaw§fner")) { + if (item.getItemMeta().getDisplayName().contains("§fSpaw§fner §c")) { + String arr[] = item.getItemMeta().getDisplayName().split("§fSpaw§fner §c"); + return Integer.parseInt(arr[1]); + } + return 1; + } else { + String arr[] = (item.getItemMeta().getDisplayName().replace("§", "")).split(":"); + return Integer.parseInt(arr[1]); + } + } catch (Exception e) { + return 1; + } + } + + public String getType(ItemStack item) { + if (getIType(item) != null && !getIType(item).equals("")) + return Methods.restoreType(getIType(item)); + else + return null; + } + + public String getIType(ItemStack item) { + try { + if (item != null) { + try { + if (item.getItemMeta().getDisplayName().contains("§fSpaw§fner")) { + String[] arr = ChatColor.stripColor(item.getItemMeta().getDisplayName()).split(" Spawner"); + String otype = arr[0]; + return otype.replaceAll(" ", "_").toUpperCase(); + } else if (item.getItemMeta().getDisplayName().contains(":")) { + String arr[] = (item.getItemMeta().getDisplayName().replace("§", "")).split(":"); + return arr[0]; + } else { + for (final EntityType value : EntityType.values()) { + if (value.isSpawnable() && value.isAlive()) { + String str = item.getItemMeta().getDisplayName().toLowerCase(); + str = str.replace(" ", "_"); + if (str.contains(value.name().toLowerCase())) { + return value.toString(); + } + } + } + } + return ""; + } catch (Exception e) { + BlockStateMeta bsm = (BlockStateMeta) item.getItemMeta(); + CreatureSpawner bs = (CreatureSpawner) bsm.getBlockState(); + return bs.getSpawnedType().toString(); + } + } else { + return ""; + } + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public List convertFromList(List list) { + try { + List entities = new ArrayList<>(); + + for (String ent : list) { + String[] arr2 = ent.split("-"); + entities.add(new SpawnerItem(arr2[0], Integer.parseInt(arr2[1]))); + } + return entities; + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public List removeOmni(ItemStack item) { + try { + List items = new ArrayList<>(); + List entities = getOmniList(item); + + items.add(newSpawnerItem(entities.get(entities.size() - 1), 1)); + + entities.remove(entities.size() - 1); + if (entities.size() == 1) { + items.add(newSpawnerItem(entities.get(entities.size() - 1), 1)); + } else { + items.add(newOmniSpawner(entities)); + } + return items; + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public List removeSpawner(ItemStack item) { + try { + List items = new ArrayList<>(); + + int multi = getIMulti(item); + + if (multi > 1) { + + items.add(newSpawnerItem(getIType(item), multi - 1, 1)); + items.add(newSpawnerItem(getIType(item), 1, 1)); + } + return items; + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + + public int removeBoosts(String type, String value) { + int removes = 0; + try { + ConfigurationSection cs = EpicSpawners.getInstance().dataFile.getConfig().getConfigurationSection("data.boosts"); + for (String key : cs.getKeys(false)) { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.boosts." + key + "." + type)) { + if (EpicSpawners.getInstance().dataFile.getConfig().getString("data.boosts." + key + "." + type).equals(value)) { + EpicSpawners.getInstance().dataFile.getConfig().set("data.boosts." + key, null); + removes++; + } + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + return removes; + } +} diff --git a/src/main/java/com/songoda/epicspawners/entity/EPlayer.java b/src/main/java/com/songoda/epicspawners/entity/EPlayer.java new file mode 100644 index 0000000..3574fa2 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/entity/EPlayer.java @@ -0,0 +1,105 @@ +package com.songoda.epicspawners.entity; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.spawners.SpawnerDropEvent; +import com.songoda.epicspawners.spawners.SpawnerItem; +import com.songoda.epicspawners.utils.Debugger; +import com.songoda.epicspawners.utils.Methods; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; + +import java.util.List; + +/** + * Created by songoda on 2/25/2017. + */ +public class EPlayer { + private Player p; + + public EPlayer(Player p) { + this.p = p; + } + + public void plus(Entity entity, int amt) { + try { + EpicSpawners instance = EpicSpawners.getInstance(); + + if (instance.getConfig().getInt("Spawner Drops.Kills Needed for Drop") != 0 && instance.getConfig().getBoolean("Spawner Drops.Allow Killing Mobs To Drop Spawners") && p.hasPermission("epicspawners.Killcounter")) { + String type = Methods.getType(entity.getType()); + if (instance.spawnerFile.getConfig().getBoolean("Entities." + type + ".Allowed")) { + String uuid = p.getUniqueId().toString(); + int total = 0; + if (instance.dataFile.getConfig().getInt("data.kills." + uuid + "." + type) != 0) + total = instance.dataFile.getConfig().getInt("data.kills." + uuid + "." + type); + int goal = instance.getConfig().getInt("Spawner Drops.Kills Needed for Drop"); + if (instance.spawnerFile.getConfig().getInt("Entities." + type + ".CustomGoal") != 0) { + goal = instance.spawnerFile.getConfig().getInt("Entities." + type + ".CustomGoal"); + } + if (total > goal) + total = 1; + total = amt + total; + + if (instance.getConfig().getInt("Spawner Drops.Alert Every X Before Drop") != 0) { + if (total % instance.getConfig().getInt("Spawner Drops.Alert Every X Before Drop") == 0 && total != goal) { + Arconix.pl().getApi().packetLibrary.getActionBarManager().sendActionBar(p, instance.getLocale().getMessage("event.goal.alert", goal - total, type)); + } + + } + if (total % goal == 0) { + dropSpawner(entity.getLocation(), 0, entity.getType().name()); + instance.dataFile.getConfig().set("data.kills." + uuid + "." + type, 0); + Arconix.pl().getApi().packetLibrary.getActionBarManager().sendActionBar(p, instance.getLocale().getMessage("event.goal.reached", type)); + } else + instance.dataFile.getConfig().set("data.kills." + uuid + "." + type, total); + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void dropSpawner(Location location, int multi, String type) { + try { + SpawnerDropEvent event = new SpawnerDropEvent(location, p); + Bukkit.getPluginManager().callEvent(event); + ItemStack item; + + if (!event.isCancelled()) { + if (!type.toUpperCase().equals("OMNI")) { + item = EpicSpawners.getInstance().getApi().newSpawnerItem(Methods.restoreType(type), multi, 1); + } else { + if (!p.isSneaking() || p.isSneaking() && !EpicSpawners.getInstance().getConfig().getBoolean("Main.Sneak To Recive A Stacked Spawner")) { + List spawners = EpicSpawners.getInstance().getApi().convertFromList(EpicSpawners.getInstance().dataFile.getConfig().getStringList("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".entities")); + List items = EpicSpawners.getInstance().getApi().removeOmni(EpicSpawners.getInstance().getApi().newOmniSpawner(spawners)); + item = items.get(0); + if (EpicSpawners.getInstance().getApi().getType(items.get(1)).equals("OMNI")) + EpicSpawners.getInstance().getApi().saveCustomSpawner(items.get(1), location.getBlock()); + } else { + List spawners = EpicSpawners.getInstance().getApi().convertFromList(EpicSpawners.getInstance().dataFile.getConfig().getStringList("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".entities")); + item = EpicSpawners.getInstance().getApi().newOmniSpawner(spawners); + } + } + + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Add Spawner To Inventory On Drop") && p != null) { + if (p.getInventory().firstEmpty() == -1) + location.getWorld().dropItemNaturally(location, item); + else + p.getInventory().addItem(item); + } else + location.getWorld().dropItemNaturally(location, item); + } + + + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public Player getP() { + return p; + } +} diff --git a/src/main/java/com/songoda/epicspawners/handlers/BlacklistHandler.java b/src/main/java/com/songoda/epicspawners/handlers/BlacklistHandler.java new file mode 100644 index 0000000..d6e0332 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/handlers/BlacklistHandler.java @@ -0,0 +1,68 @@ +package com.songoda.epicspawners.handlers; + +import com.songoda.arconix.api.utils.ConfigWrapper; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.utils.Debugger; +import org.bukkit.entity.Player; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by songoda on 2/25/2017. + */ +public class BlacklistHandler { + + private ConfigWrapper blackFile = new ConfigWrapper(EpicSpawners.getInstance(), "", "main/resources/blacklist.yml"); + + public BlacklistHandler() { + try { + blackFile.createNewFile("Loading language file", "EpicSpawners blacklist file"); + loadBlacklistFile(); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public boolean isBlacklisted(Player p, boolean yell) { + try { + List list = blackFile.getConfig().getStringList("settings.blacklist"); + String cworld = p.getWorld().getName(); + for (String world : list) { + if (cworld.equalsIgnoreCase(world)) { + if (yell) + p.sendMessage(EpicSpawners.getInstance().getLocale().getMessage("event.block.blacklisted")); + return true; + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + return false; + } + + private void loadBlacklistFile() { + try { + List list = new ArrayList<>(); + list.add("world2"); + list.add("world3"); + list.add("world4"); + list.add("world5"); + blackFile.getConfig().addDefault("settings.blacklist", list); + + blackFile.getConfig().options().copyDefaults(true); + blackFile.saveConfig(); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void reload() { + try { + blackFile.createNewFile("Loading blacklist file", "EpicSpawnesrs.java blacklist file"); + loadBlacklistFile(); + } catch (Exception e) { + Debugger.runReport(e); + } + } +} diff --git a/src/main/java/com/songoda/epicspawners/handlers/BoostHandler.java b/src/main/java/com/songoda/epicspawners/handlers/BoostHandler.java new file mode 100644 index 0000000..6fad651 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/handlers/BoostHandler.java @@ -0,0 +1,65 @@ +package com.songoda.epicspawners.handlers; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.utils.Debugger; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; + +/** + * Created by songo on 9/3/2017. + */ +public class BoostHandler { + + public BoostHandler() { + try { + Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(EpicSpawners.getInstance(), BoostHandler::animate, 2L, 9L); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public static void animate() { + try { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.boosts")) { + ConfigurationSection cs = EpicSpawners.getInstance().dataFile.getConfig().getConfigurationSection("data.boosts"); + for (String key : cs.getKeys(false)) { + Location location = null; + boolean yes = false; + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.boosts." + key + ".location")) { + location = Arconix.pl().getApi().serialize().unserializeLocation(EpicSpawners.getInstance().dataFile.getConfig().getString("data.boosts." + key + ".location")); + yes = true; + if (location.getBlock().getType() != Material.MOB_SPAWNER) { + yes = false; + EpicSpawners.getInstance().dataFile.getConfig().set("data.boosts." + key, null); + } + } else if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.boosts." + key + ".player")) { + String uuid = EpicSpawners.getInstance().dataFile.getConfig().getString("data.boosts." + key + ".player"); + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats")) { + ConfigurationSection cs2 = EpicSpawners.getInstance().dataFile.getConfig().getConfigurationSection("data.spawnerstats"); + for (String key2 : cs2.getKeys(false)) { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + key2 + ".player")) { + if (EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + key2 + ".player").equals(uuid)) { + location = Arconix.pl().getApi().serialize().unserializeLocation(key2); + yes = true; + } + } + } + } + } + if (yes) { + location.add(.5, .5, .5); + float x = (float) (0 + (Math.random() * .75)); + float y = (float) (0 + (Math.random() * 1)); + float z = (float) (0 + (Math.random() * .75)); + Arconix.pl().getApi().packetLibrary.getParticleManager().broadcastParticle(location, x, y, z, 0, "SPELL", 2); + } + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + } +} diff --git a/src/main/java/com/songoda/epicspawners/handlers/CommandHandler.java b/src/main/java/com/songoda/epicspawners/handlers/CommandHandler.java new file mode 100644 index 0000000..a3cc737 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/handlers/CommandHandler.java @@ -0,0 +1,541 @@ +package com.songoda.epicspawners.handlers; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.spawners.Spawner; +import com.songoda.epicspawners.utils.Debugger; +import com.songoda.epicspawners.utils.Methods; +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.ItemFrame; +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + +import java.util.*; + +/** + * Created by songoda on 2/24/2017. + */ +public class CommandHandler implements CommandExecutor { + + private EpicSpawners instance; + + public CommandHandler(EpicSpawners instance) { + this.instance = instance; + } + + public void help(CommandSender sender, int page) { + try { + sender.sendMessage(""); + int of = 3; + if (!sender.hasPermission("epicspawners.admin")) { + of = 1; + } + + sender.sendMessage(Arconix.pl().getApi().format().formatText("&7Page: &a" + page + " of " + of + " ======================")); + if (page == 1) { + 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- &aes help &7Displays this page.")); + if (page == 2 && sender.hasPermission("epicspawners.admin")) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aes editor &7Opens the spawner editor.")); + } + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aspawnershop &7Opens the spawner shop.")); + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aspawnerstats &7Allows a player to overView their current EpicSpawners stats and see how many kills they have left to get a specific spawner drop.")); + } else if (page == 2 && sender.hasPermission("epicspawners.admin")) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aes change &7Changes the entity for the spawner you are looking at.")); + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aes give [player/all] [spawnertype/random] [multiplier] [amount] &7Gives an operator the ability to spawn a spawner of his or her choice.")); + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aes setshop &7Assigns a spawner shop to the block you are looking at.")); + } else if (page == 3 && sender.hasPermission("epicspawners.admin")) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aes settings &7Edit the EpicSpawners Settings.")); + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aes boost [m:minute, h:hour, d:day, y:year] &7This allows you to boost the amount of spawns that are got from placed spawners.")); + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aes removeboosts &7This allows you to remove boosts.")); + sender.sendMessage(Arconix.pl().getApi().format().formatText(" &8- &aes removeshop &7Unassigns a spawner shop to the block you are looking at.")); + } else { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "That page does not exist!")); + } + sender.sendMessage(""); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + @Override + public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { + try { + if (cmd.getName().equalsIgnoreCase("EpicSpawners")) { + if (args.length == 0 || args[0].equalsIgnoreCase("help") || args[0].equalsIgnoreCase("?")) { + if (args.length == 2) { + help(sender, Integer.parseInt(args[1])); + } else { + help(sender, 1); + } + } else if (args[0].equalsIgnoreCase("reload")) { + if (!sender.hasPermission("epicspawners.admin")) { + sender.sendMessage(instance.references.getPrefix() + instance.getLocale().getMessage("event.general.nopermission")); + } else { + instance.reload(); + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&8Configuration and Language files reloaded.")); + } + } else if (args[0].equalsIgnoreCase("change")) { + if (!sender.hasPermission("epicspawners.admin") && !sender.hasPermission("epicspawners.change.*") && !sender.hasPermission("epicspawners.change." + args[1].toUpperCase())) { + sender.sendMessage(instance.references.getPrefix() + instance.getLocale().getMessage("event.general.nopermission")); + } else { + Player p = (Player) sender; + Block b = p.getTargetBlock(null, 200); + + if (b.getType().equals(Material.MOB_SPAWNER)) { + Spawner eSpawner = new Spawner(b); + + try { + eSpawner.getSpawner().setSpawnedType(EntityType.valueOf(args[1].toUpperCase())); + eSpawner.update(); + instance.holo.processChange(b); + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&7Successfully changed this spawner to &6" + args[1] + "&7.")); + } catch (Exception ee) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&7That Entity does not exist.")); + } + } else { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&cThis is not a spawner.")); + } + } + } else if (args[0].equalsIgnoreCase("editor")) { + if (!sender.hasPermission("epicspawners.admin")) { + sender.sendMessage(instance.references.getPrefix() + instance.getLocale().getMessage("event.general.nopermission")); + } else { + instance.editor.open((Player) sender, 1); + } + } else if (args[0].equalsIgnoreCase("removeboosts")) { + if (!sender.hasPermission("epicspawners.admin")) { + sender.sendMessage(instance.references.getPrefix() + instance.getLocale().getMessage("event.general.nopermission")); + } else { + if (args.length == 2) { + if (instance.dataFile.getConfig().contains("data.boosts")) { + if (args[1].contains("p:") || args[1].contains("player:") || + args[1].contains("f:") || args[1].contains("faction:") || + args[1].contains("t:") || args[1].contains("town:") || + args[1].contains("i:") || args[1].contains("island:")) { + String[] arr = (args[1]).split(":"); + + String type = ""; + String att = ""; + + if (arr[0].equalsIgnoreCase("p") || arr[0].equalsIgnoreCase("player")) { + if (Bukkit.getOfflinePlayer(arr[1]) == null) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&cThat player does not exist...")); + } else { + type = "player"; + att = Bukkit.getOfflinePlayer(arr[1]).getUniqueId().toString(); + } + } else if (arr[0].equalsIgnoreCase("f") || arr[0].equalsIgnoreCase("faction")) { + if (instance.hooks.getFactionId(arr[1]) == null) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&cThat faction does not exist...")); + return true; + } else { + type = "faction"; + att = instance.hooks.getFactionId(arr[1]); + } + } else if (arr[0].equalsIgnoreCase("t") || arr[0].equalsIgnoreCase("town")) { + if (instance.hooks.getFactionId(arr[1]) == null) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&cThat town does not exist...")); + return true; + } else { + type = "town"; + att = instance.hooks.getTownId(arr[1]); + } + } else if (arr[0].equalsIgnoreCase("i") || arr[0].equalsIgnoreCase("island")) { + if (instance.hooks.getFactionId(arr[1]) == null) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&cThat island does not exist...")); + return true; + } else { + type = "island"; + att = instance.hooks.getIslandId(arr[1]); + } + } + + int removes = instance.getApi().removeBoosts(type, att); + + if (removes == 0) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&cNo boosts were found matching your search.")); + } else { + if (removes == 1) + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&6" + removes + " &7boost was removed.")); + else + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&6" + removes + " &7boosts were removed.")); + } + } else { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&6" + args[1] + " &7this is incorrect")); + } + } else { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&cThe boost database is currently empty.")); + } + } else { + sender.sendMessage(instance.references.getPrefix() + Arconix.pl().getApi().format().formatText("&7Syntax error...")); + } + } + } else if (args[0].equalsIgnoreCase("boost")) { + if (!sender.hasPermission("epicspawners.admin")) { + sender.sendMessage(instance.references.getPrefix() + instance.getLocale().getMessage("event.general.nopermission")); + } else { + if (args.length >= 3) { + if (args[1].contains("p:") || args[1].contains("player:") || + args[1].contains("f:") || args[1].contains("faction:") || + args[1].contains("t:") || args[1].contains("town:") || + args[1].contains("i:") || args[1].contains("island:")) { + String[] arr = (args[1]).split(":"); + if (!Arconix.pl().getApi().doMath().isNumeric(args[2])) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&6" + args[2] + " &7is not a number...")); + } else { + + Calendar c = Calendar.getInstance(); + Date currentDate = new Date(); + c.setTime(currentDate); + + String response = " &6" + arr[1] + "&7 has been given a spawner boost of &6" + args[2]; + + if (args.length > 3) { + if (args[3].contains("m:")) { + String[] arr2 = (args[3]).split(":"); + c.add(Calendar.MINUTE, Integer.parseInt(arr2[1])); + response += " &7for &6" + arr2[1] + " minutes&7."; + } else if (args[3].contains("h:")) { + String[] arr2 = (args[3]).split(":"); + c.add(Calendar.HOUR, Integer.parseInt(arr2[1])); + response += " &7for &6" + arr2[1] + " hours&7."; + } else if (args[3].contains("d:")) { + String[] arr2 = (args[3]).split(":"); + c.add(Calendar.HOUR, Integer.parseInt(arr2[1]) * 24); + response += " &7for &6" + arr2[1] + " days&7."; + } else if (args[3].contains("y:")) { + String[] arr2 = (args[3]).split(":"); + c.add(Calendar.YEAR, Integer.parseInt(arr2[1])); + response += " &7for &6" + arr2[1] + " years&7."; + } else { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&7" + args[3] + " &7is invalid.")); + return true; + } + } else { + c.add(Calendar.YEAR, 10); + response += "&6."; + } + String uuid = UUID.randomUUID().toString(); + + String start = "&7"; + + if (arr[0].equalsIgnoreCase("p") || arr[0].equalsIgnoreCase("player")) { + if (Bukkit.getOfflinePlayer(arr[1]) == null) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&cThat player does not exist...")); + } else { + start += "The player"; + instance.dataFile.getConfig().set("data.boosts." + uuid + ".player", Bukkit.getOfflinePlayer(arr[1]).getUniqueId().toString()); + } + } else if (arr[0].equalsIgnoreCase("f") || arr[0].equalsIgnoreCase("faction")) { + if (instance.hooks.getFactionId(arr[1]) == null) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&cThat faction does not exist...")); + return true; + } else { + start += "The faction"; + instance.dataFile.getConfig().set("data.boosts." + uuid + ".faction", instance.hooks.getFactionId(arr[1])); + } + } else if (arr[0].equalsIgnoreCase("t") || arr[0].equalsIgnoreCase("town")) { + if (instance.hooks.getTownId(arr[1]) == null) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&cThat town does not exist...")); + return true; + } else { + start += "The town"; + instance.dataFile.getConfig().set("data.boosts." + uuid + ".town", instance.hooks.getTownId(arr[1])); + } + } else if (arr[0].equalsIgnoreCase("i") || arr[0].equalsIgnoreCase("island")) { + if (instance.hooks.getIslandId(arr[1]) == null) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&cThat island does not exist...")); + return true; + } else { + start += "The island"; + instance.dataFile.getConfig().set("data.boosts." + uuid + ".island", instance.hooks.getIslandId(arr[1])); + } + } + + instance.dataFile.getConfig().set("data.boosts." + uuid + ".boosted", Integer.parseInt(args[2])); + + instance.dataFile.getConfig().set("data.boosts." + uuid + ".end", c.getTime().getTime()); + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + start + response)); + } + } else { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&6" + args[1] + " &7this is incorrect")); + } + } else { + sender.sendMessage(instance.references.getPrefix() + Arconix.pl().getApi().format().formatText("&7Syntax error...")); + } + } + } else if (args[0].equalsIgnoreCase("settings")) { + if (!sender.hasPermission("epicspawners.admin")) { + sender.sendMessage(instance.references.getPrefix() + instance.getLocale().getMessage("event.general.nopermission")); + } else { + Player p = (Player) sender; + instance.sm.openSettingsManager(p); + } + } else if (args[0].equalsIgnoreCase("setshop")) { + if (args.length >= 2) { + Player p = (Player) sender; + if (!sender.hasPermission("epicspawners.admin")) { + sender.sendMessage(instance.references.getPrefix() + instance.getLocale().getMessage("event.general.nopermission")); + } else { + + String type = null; + ConfigurationSection css = instance.spawnerFile.getConfig().getConfigurationSection("Entities"); + for (String key : css.getKeys(false)) { + String input = args[1].toUpperCase().replace("_", "").replace(" ", ""); + String compare = key.toUpperCase().replace("_", "").replace(" ", ""); + if (input.equals(compare)) + type = key; + } + + if (type == null) { + sender.sendMessage(instance.references.getPrefix() + Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&7The entity type &6" + args[1] + " &7does not exist. Try one of these:")); + StringBuilder list = new StringBuilder(); + for (final EntityType value : EntityType.values()) { + if (value.isSpawnable() && value.isAlive()) { + list.append(value.toString()).append("&7, &6"); + } + } + sender.sendMessage(Arconix.pl().getApi().format().formatText("&6" + list)); + } else { + Entity ent = null; + if (Arconix.pl().getApi().getPlayer(p).getTarget() != null) { + if (ent instanceof ItemFrame) { + ent = Arconix.pl().getApi().getPlayer(p).getTarget(); + } + } + if (ent != null) { + instance.dataFile.getConfig().set("data.entityshop." + ent.getUniqueId().toString(), type); + sender.sendMessage(instance.references.getPrefix() + Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&aShop setup successfully.")); + } else { + if (p.getTargetBlock(null, 200) != null) { + Block b = p.getTargetBlock(null, 200); + String loc = Arconix.pl().getApi().serialize().serializeLocation(b); + instance.dataFile.getConfig().set("data.blockshop." + loc, args[1]); + sender.sendMessage(instance.references.getPrefix() + Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&aShop setup successfully.")); + } + } + } + } + } + } else if (args[0].equalsIgnoreCase("removeshop")) { + if (!sender.hasPermission("epicspawners.admin")) { + sender.sendMessage(instance.references.getPrefix() + instance.getLocale().getMessage("event.general.nopermission")); + } else { + Player p = (Player) sender; + Entity ent = null; + if (Arconix.pl().getApi().getPlayer(p).getTarget() != null && + ent.getType() == EntityType.ITEM_FRAME) { + ent = Arconix.pl().getApi().getPlayer(p).getTarget(); + } + if (ent != null) { + instance.dataFile.getConfig().set("data.entityshop." + ent.getUniqueId().toString(), null); + return true; + } + Block b = p.getTargetBlock(null, 200); + String loc = Arconix.pl().getApi().serialize().serializeLocation(b); + instance.dataFile.getConfig().set("data.blockshop." + loc, null); + sender.sendMessage(instance.references.getPrefix() + Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&aShop removed successfully.")); + } + } else if (args[0].equalsIgnoreCase("shop")) { + if (!sender.hasPermission("epicspawners.openshop")) { + sender.sendMessage(instance.references.getPrefix() + instance.getLocale().getMessage("event.general.nopermission")); + return true; + } + Player p = (Player) sender; + instance.shop.open(p, 1); + } else if (args[0].equalsIgnoreCase("give")) { + if (args.length <= 3) { + sender.sendMessage(instance.references.getPrefix() + Arconix.pl().getApi().format().formatText("&7Syntax error...")); + return true; + } + if (!sender.hasPermission("epicspawners.admin")) { + sender.sendMessage(instance.references.getPrefix() + instance.getLocale().getMessage("event.general.nopermission")); + return true; + } + if (Bukkit.getPlayerExact(args[1]) == null && !args[1].toLowerCase().equals("all")) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&cThat username does not exist, or the user is not online!")); + return true; + } + int multi = 0; + + String type = null; + ConfigurationSection css = instance.spawnerFile.getConfig().getConfigurationSection("Entities"); + for (String key : css.getKeys(false)) { + String input = args[2].toUpperCase().replace("_", "").replace(" ", ""); + String compare = key.toUpperCase().replace("_", "").replace(" ", ""); + if (input.equals(compare)) + type = key; + } + + if (type == null && !args[2].equalsIgnoreCase("random")) { + sender.sendMessage(instance.references.getPrefix() + Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&7The entity type &6" + args[2] + " &7does not exist. Try one of these:")); + StringBuilder list = new StringBuilder(); + + ConfigurationSection cs = instance.spawnerFile.getConfig().getConfigurationSection("Entities"); + for (String key : cs.getKeys(false)) { + key = key.toUpperCase().replace(" ", "_"); + list.append(key).append("&7, &6"); + } + sender.sendMessage(Arconix.pl().getApi().format().formatText("&6" + list)); + } else { + if (args[2].equalsIgnoreCase("random")) { + ConfigurationSection cs = instance.spawnerFile.getConfig().getConfigurationSection("Entities"); + List list = new ArrayList<>(); + for (String key : cs.getKeys(false)) { + if (instance.spawnerFile.getConfig().getBoolean("Entities." + key + ".Allowed")) { + key = key.toUpperCase().replace(" ", "_"); + list.add(key); + } + } + Random rand = new Random(); + int n = rand.nextInt(list.size() - 1); + type = list.get(n); + } + if (args.length == 4) { + if (!Arconix.pl().getApi().doMath().isNumeric(args[3])) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&6" + args[3] + "&7 is not a number.")); + return true; + } + int amt = Integer.parseInt(args[3]); + ItemStack spawnerItem = instance.api.newSpawnerItem(type, 0, Integer.parseInt(args[3])); + if (args[1].toLowerCase().equals("all")) { + for (Player pl : Bukkit.getOnlinePlayers()) { + pl.getInventory().addItem(spawnerItem); + pl.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + instance.getLocale().getMessage("command.give.success", amt, Methods.compileName(type, multi, false)))); + } + } else { + Player pl = Bukkit.getPlayerExact(args[1]); + pl.getInventory().addItem(spawnerItem); + pl.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + instance.getLocale().getMessage("command.give.success", amt, Methods.compileName(type, multi, false)))); + + } + } else { + if (!Arconix.pl().getApi().doMath().isNumeric(args[3])) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&6" + args[3] + "&7 is not a number.")); + return true; + } + if (!Arconix.pl().getApi().doMath().isNumeric(args[3])) { + sender.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + "&6" + args[4] + "&7 is not a number.")); + return true; + } + int amt = Integer.parseInt(args[3]); + multi = Integer.parseInt(args[4]); + ItemStack spawnerItem = instance.api.newSpawnerItem(type, multi, amt); + if (args[1].toLowerCase().equals("all")) { + for (Player pl : Bukkit.getOnlinePlayers()) { + pl.getInventory().addItem(spawnerItem); + pl.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + instance.getLocale().getMessage("command.give.success", amt, Methods.compileName(type, multi, false)))); + } + } else { + Player pl = Bukkit.getPlayerExact(args[1]); + pl.getInventory().addItem(spawnerItem); + pl.sendMessage(Arconix.pl().getApi().format().formatText(instance.references.getPrefix() + instance.getLocale().getMessage("command.give.success", amt, Methods.compileName(type, multi, false)))); + + } + } + } + } + } else if (cmd.getName().equalsIgnoreCase("SpawnerShop")) { + if (!sender.hasPermission("epicspawners.openshop")) { + sender.sendMessage(instance.references.getPrefix() + instance.getLocale().getMessage("event.general.nopermission")); + } else { + Player p = (Player) sender; + instance.shop.open(p, 1); + } + } else if (cmd.getName().equalsIgnoreCase("SpawnerStats")) { + if (!sender.hasPermission("epicspawners.stats")) { + sender.sendMessage(instance.references.getPrefix() + instance.getLocale().getMessage("event.general.nopermission")); + } else { + Player p = (Player) sender; + String uuid = p.getUniqueId().toString(); + + int size = 0; + + if (instance.dataFile.getConfig().contains("data.kills")) { + for (String u : instance.dataFile.getConfig().getConfigurationSection("data.kills." + uuid).getKeys(false)) { + if (instance.spawnerFile.getConfig().getInt("Entities." + u + ".CustomGoal") != 0) { + size++; + } + } + } + + String title = instance.getLocale().getMessage("interface.spawnerstats.title"); + + Inventory i = Bukkit.createInventory(null, 54, title); + int max2 = 54; + if (size <= 9) { + i = Bukkit.createInventory(null, 18, title); + max2 = 18; + } else if (size <= 18) { + i = Bukkit.createInventory(null, 36, title); + max2 = 36; + } else if (size <= 27) { + i = Bukkit.createInventory(null, 45, title); + max2 = 45; + } + + int num = 0; + while (num != 9) { + i.setItem(num, Methods.getGlass()); + num++; + } + ItemStack exit = new ItemStack(Material.valueOf(instance.getConfig().getString("Interfaces.Exit Icon")), 1); + ItemMeta exitmeta = exit.getItemMeta(); + exitmeta.setDisplayName(instance.getLocale().getMessage("general.nametag.exit")); + exit.setItemMeta(exitmeta); + i.setItem(8, exit); + + short place = 9; + p.sendMessage(""); + if (instance.dataFile.getConfig().getString("data.kills." + uuid) == null) { + p.sendMessage(instance.references.getPrefix() + instance.getLocale().getMessage("interface.spawnerstats.nokills")); + } else { + p.sendMessage(instance.references.getPrefix()); + p.sendMessage(instance.getLocale().getMessage("interface.spawnerstats.prefix")); + for (String u : instance.dataFile.getConfig().getConfigurationSection("data.kills." + uuid).getKeys(false)) { + + int goal = instance.getConfig().getInt("Spawner Drops.Kills Needed for Drop"); + if (instance.spawnerFile.getConfig().getInt("Entities." + u + ".CustomGoal") != 0) { + goal = instance.spawnerFile.getConfig().getInt("Entities." + u + ".CustomGoal"); + } + + + ItemStack it = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + + ItemStack item = instance.heads.addTexture(it, Methods.restoreType(u)); + + ItemMeta itemmeta = item.getItemMeta(); + ArrayList lore = new ArrayList<>(); + itemmeta.setLore(lore); + itemmeta.setDisplayName(Arconix.pl().getApi().format().formatText("&6" + u + "&7: &e" + instance.dataFile.getConfig().getInt("data.kills." + uuid + "." + u) + "&7/&e" + goal)); + item.setItemMeta(itemmeta); + i.setItem(place, item); + + place++; + p.sendMessage(Arconix.pl().getApi().format().formatText(" &7- &6" + u + "&7: &e" + instance.dataFile.getConfig().getInt("data.kills." + uuid + "." + u) + "&7/&e" + goal)); + } + p.sendMessage(instance.getLocale().getMessage("interface.spawnerstats.ongoal")); + } + p.sendMessage(""); + + if (instance.dataFile.getConfig().getString("data.kills." + uuid) != null) + p.openInventory(i); + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + return true; + } +} diff --git a/src/main/java/com/songoda/epicspawners/handlers/HologramHandler.java b/src/main/java/com/songoda/epicspawners/handlers/HologramHandler.java new file mode 100644 index 0000000..2541d0b --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/handlers/HologramHandler.java @@ -0,0 +1,217 @@ +package com.songoda.epicspawners.handlers; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.spawners.Spawner; +import com.songoda.epicspawners.utils.Debugger; +import com.songoda.epicspawners.utils.Methods; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; + +import java.util.Collection; + +/** + * Created by songoda on 3/12/2017. + */ +public class HologramHandler { + + public HologramHandler() { + Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(EpicSpawners.getInstance(), this::updateHolograms, 5000L, 5000L); + loadHolograms(); + } + + public void loadHolograms() { + if ((boolean) EpicSpawners.getInstance().getConfig().get("Main.Spawners Have Holograms")) { + if (!EpicSpawners.getInstance().v1_7) { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawner")) { + ConfigurationSection cs = EpicSpawners.getInstance().dataFile.getConfig().getConfigurationSection("data.spawner"); + for (String key : cs.getKeys(true)) { + if (Arconix.pl().getApi().serialize().unserializeLocation(key).getWorld() != null) { + updateHologram(Arconix.pl().getApi().serialize().unserializeLocation(key).getBlock()); + } + } + } + } + } + } + + public void updateHolograms() { + try { + /* + if (!EpicSpawners.getInstance().v1_7) { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.holograms")) { + ConfigurationSection cs = EpicSpawners.getInstance().dataFile.getConfig().getConfigurationSection("data.holograms"); + for (String key : cs.getKeys(true)) { + if (Methods.getEntityByUniqueId(UUID.fromString(key)) != null) { + EpicSpawners.getInstance().dataFile.getConfig().set("data.holograms." + key, null); + Methods.getEntityByUniqueId(UUID.fromString(key)).remove(); + } + } + } + + if ((boolean) EpicSpawners.getInstance().getConfig().get("Main.Spawners Have Holograms")) { + EpicSpawners.getInstance().dataFile.getConfig().set("data.holograms", null); + Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(plugin, () -> { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawner")) { + ConfigurationSection cs = EpicSpawners.getInstance().dataFile.getConfig().getConfigurationSection("data.spawner"); + for (String key : cs.getKeys(true)) { + if (Arconix.pl().serialize().unserializeLocation(key).getWorld() != null) { + updateHologram(Arconix.pl().serialize().unserializeLocation(key).getBlock()); + } + } + } + }, 1L); + } + } + */ + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void updateHologram(Block b) { + try { + Location olocation = b.getLocation(); + Location location = null; + String face = null; + if (!EpicSpawners.getInstance().v1_7 && !EpicSpawners.getInstance().v1_8_R1) { + Collection nearbyEntites = olocation.getWorld().getNearbyEntities(olocation, 5, 5, 5); + for (Entity entity : nearbyEntites) { + if (entity instanceof Player) { + face = Arconix.pl().getApi().getPlayer((Player) entity).getPlayerDirection(); + } + } + + Arconix.pl().getApi().packetLibrary.getHologramManager().despawnHologram(adjust("UP", b)); + Arconix.pl().getApi().packetLibrary.getHologramManager().despawnHologram(adjust("NORTH", b)); + Arconix.pl().getApi().packetLibrary.getHologramManager().despawnHologram(adjust("SOUTH", b)); + Arconix.pl().getApi().packetLibrary.getHologramManager().despawnHologram(adjust("EAST", b)); + Arconix.pl().getApi().packetLibrary.getHologramManager().despawnHologram(adjust("WEST", b)); + Arconix.pl().getApi().packetLibrary.getHologramManager().despawnHologram(adjust("DOWN", b)); + + } + if (b.getType() == Material.MOB_SPAWNER) { + boolean go = true; + if (face != null && b.getRelative(BlockFace.UP).getType() != Material.AIR) { + if (b.getRelative(BlockFace.valueOf(face.toUpperCase())).getType() == Material.AIR) { + location = adjust(face.toUpperCase(), b); + go = false; + } + } + + if (go) { + if (b.getRelative(BlockFace.UP).getType() == Material.AIR) { + location = adjust("UP", b); + } else if (b.getRelative(BlockFace.NORTH).getType() == Material.AIR) { + location = adjust("NORTH", b); + } else if (b.getRelative(BlockFace.SOUTH).getType() == Material.AIR) { + location = adjust("SOUTH", b); + } else if (b.getRelative(BlockFace.EAST).getType() == Material.AIR) { + location = adjust("EAST", b); + } else if (b.getRelative(BlockFace.WEST).getType() == Material.AIR) { + location = adjust("WEST", b); + } else if (b.getRelative(BlockFace.DOWN).getType() == Material.AIR) { + location = adjust("DOWN", b); + } + } + + if (location != null) { + if ((boolean) EpicSpawners.getInstance().getConfig().get("Main.Spawners Have Holograms")) { + addHologram(location, olocation); + } + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public Location adjust(String direction, Block b) { + Location location = null; + try { + switch (direction) { + case "UP": + location = b.getLocation().add(0.5, 1, 0.5); + break; + case "DOWN": + location = b.getLocation().subtract(0, 0.75, 0); + location = location.add(0.5, 0, 0.5); + break; + case "NORTH": + location = b.getLocation().subtract(0, 0, 0.5); + location = location.add(0.5, 0.15, 0); + break; + case "SOUTH": + location = b.getLocation().add(0, 0, 1.5); + location = location.add(0.5, 0.15, 0); + break; + case "EAST": + location = b.getLocation().add(1.5, 0, 0); + location = location.add(0, 0.15, 0.5); + break; + case "WEST": + location = b.getLocation().subtract(0.5, 0, 0); + location = location.add(0, 0.15, 0.5); + break; + } + } catch (Exception e) { + Debugger.runReport(e); + } + return location; + } + + public void addHologram(Location location, Location olocation) { + try { + if (olocation.getBlock().getType() == Material.MOB_SPAWNER) { + Spawner spawner = new Spawner(olocation.getBlock()); + int multi = EpicSpawners.getInstance().dataFile.getConfig().getInt("data.spawner." + spawner.locationStr); + + + String name; + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + spawner.locationStr + ".type")) { + name = Methods.compileName(EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + spawner.locationStr + ".type"), multi, true); + } else { + name = Methods.formatName(spawner.spawner.getSpawnedType(), multi); + } + Arconix.pl().getApi().packetLibrary.getHologramManager().spawnHologram(location, name.trim()); + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void processChange(Block b) { + try { + if (!EpicSpawners.getInstance().v1_7) { + Block spawner = null; + if (b.getType() == Material.MOB_SPAWNER) { + spawner = b; + } else if (b.getRelative(BlockFace.UP).getType() == Material.MOB_SPAWNER) { + spawner = b.getRelative(BlockFace.UP); + } else if (b.getRelative(BlockFace.DOWN).getType() == Material.MOB_SPAWNER) { + spawner = b.getRelative(BlockFace.DOWN); + } else if (b.getRelative(BlockFace.NORTH).getType() == Material.MOB_SPAWNER) { + spawner = b.getRelative(BlockFace.NORTH); + } else if (b.getRelative(BlockFace.SOUTH).getType() == Material.MOB_SPAWNER) { + spawner = b.getRelative(BlockFace.SOUTH); + } else if (b.getRelative(BlockFace.WEST).getType() == Material.MOB_SPAWNER) { + spawner = b.getRelative(BlockFace.WEST); + } else if (b.getRelative(BlockFace.EAST).getType() == Material.MOB_SPAWNER) { + spawner = b.getRelative(BlockFace.EAST); + } + final Block spawn = spawner; + if (spawner != null) { + Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(EpicSpawners.getInstance(), () -> EpicSpawners.getInstance().holo.updateHologram(spawn), 1L); + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicspawners/handlers/HookHandler.java b/src/main/java/com/songoda/epicspawners/handlers/HookHandler.java new file mode 100644 index 0000000..78db09c --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/handlers/HookHandler.java @@ -0,0 +1,114 @@ +package com.songoda.epicspawners.handlers; + +import com.songoda.arconix.api.utils.ConfigWrapper; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.hooks.*; +import com.songoda.epicspawners.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(EpicSpawners.getInstance(), "", "hooks.yml"); + + public HookHandler() { + } + + public void hook() { + try { + hooksFile.createNewFile("Loading Hooks File", EpicSpawners.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/epicspawners/handlers/ItemHandler.java b/src/main/java/com/songoda/epicspawners/handlers/ItemHandler.java new file mode 100644 index 0000000..ae0038f --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/handlers/ItemHandler.java @@ -0,0 +1,242 @@ +package com.songoda.epicspawners.handlers; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.spawners.Spawner; +import com.songoda.epicspawners.spawners.SpawnerItem; +import com.songoda.epicspawners.utils.Debugger; +import com.songoda.epicspawners.utils.Methods; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Item; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.util.Vector; + +import java.util.*; +import java.util.concurrent.ThreadLocalRandom; + +/** + * Created by songo on 9/3/2017. + */ +public class ItemHandler { + + public ItemHandler() { + try { + Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(EpicSpawners.getInstance(), ItemHandler::dropItems, 10L, 20L); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + @SuppressWarnings("unchecked") + public static void dropItems() { + try { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawner")) { + ConfigurationSection cs3 = EpicSpawners.getInstance().dataFile.getConfig().getConfigurationSection("data.spawner"); + for (String key2 : cs3.getKeys(false)) { + Location spawnerLoc = Arconix.pl().getApi().serialize().unserializeLocation(key2); + int locx = spawnerLoc.getBlockX() >> 4; + int locz = spawnerLoc.getBlockZ() >> 4; + if (!spawnerLoc.getWorld().isChunkLoaded(locx, locz)) { + continue; + } + + boolean playerFound = false; + + Collection nearbyEntite = Methods.getNearbyEntities(spawnerLoc.clone().add(0.5, 0.5, 0.5), 16, 16, 16); + if (nearbyEntite.size() >= 1) { + for (Entity ee : nearbyEntite) { + if (ee instanceof LivingEntity) { + if (ee instanceof Player) { + playerFound = true; + } + } + } + } + + if (playerFound) { + Spawner sp = new Spawner(spawnerLoc); + //if (EpicSpawners.getInstance().hooksFile.getConfig().contains("Entities." + sp.spawnedTypeU + ".items") || sp.spawnedTypeU.equalsIgnoreCase("OMNI")) { + if (EpicSpawners.getInstance().spawnerFile.getConfig().contains("Entities." + sp.spawnedType + ".items")) { + try { + String type = Methods.getType(sp.getSpawner().getSpawnedType()); + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(spawnerLoc) + ".type")) { + if (!EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(spawnerLoc) + ".type").equals("OMNI")) { + type = Methods.getTypeFromString(EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(spawnerLoc) + ".type")); + } + } + List list = EpicSpawners.getInstance().getApi().convertFromList(EpicSpawners.getInstance().dataFile.getConfig().getStringList("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(spawnerLoc) + ".entities")); + if (list.size() == 0) + list.add(new SpawnerItem(type, 1)); + for (SpawnerItem omni : list) { + if (EpicSpawners.getInstance().spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(omni.getType()) + ".items")) { + String key3 = key2 + omni.getType(); + + int rate = EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + Methods.getTypeFromString(omni.getType()) + ".itemTickRate"); + if (EpicSpawners.getInstance().api.getSpawnerMultiplier(spawnerLoc) != 1) + rate = rate / EpicSpawners.getInstance().api.getSpawnerMultiplier(spawnerLoc); + + long cur = (System.currentTimeMillis() / 1000); + long next = cur + rate; + + if (EpicSpawners.getInstance().tickTracker.containsKey(key3)) { + long goal = EpicSpawners.getInstance().tickTracker.get(key3); + if (cur >= goal) { + if (!sp.getSpawner().getBlock().isBlockPowered() && EpicSpawners.getInstance().getConfig().getBoolean("Main.Redstone Power Deactivates Spawners")) { + for (ItemStack item : (ArrayList) EpicSpawners.getInstance().spawnerFile.getConfig().getList("Entities." + Methods.getTypeFromString(omni.getType()) + ".items")) { + Location loc = spawnerLoc.clone(); + loc.add(.5, .9, .5); + Item it = loc.getWorld().dropItemNaturally(loc, item); + + Random r = new Random(); + double rx = -.2 + (.2 - -.2) * r.nextDouble(); + r = new Random(); + double ry = 0 + (.5 - 0) * r.nextDouble(); + r = new Random(); + double rz = -.2 + (.2 - -.2) * r.nextDouble(); + it.setVelocity(new Vector(rx, ry, rz)); + } + } + EpicSpawners.getInstance().tickTracker.put(key3, next); + } + } else + EpicSpawners.getInstance().tickTracker.put(key3, next); + } + } + } catch (Exception ignore) { + } + } + if (EpicSpawners.getInstance().spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(sp.spawnedType) + ".blocks")) { + for (String m : (ArrayList) EpicSpawners.getInstance().spawnerFile.getConfig().getList("Entities." + Methods.getTypeFromString(sp.spawnedType) + ".blocks")) { + + Material mat = Material.valueOf(m); + if (mat.isBlock()) { + + double x = 1; + double y = 1; + double z = 1; + + Location loc = spawnerLoc.clone(); + loc.add(.5, 0, .5); + + boolean good = false; + int num = 0; + while (!good && num != 150) { + num ++; + double testX = ThreadLocalRandom.current().nextDouble(-1, 1); + double testY = ThreadLocalRandom.current().nextDouble(-1, 2); + double testZ = ThreadLocalRandom.current().nextDouble(-1, 1); + + x = loc.getX() + testX * (double) 3; + y = loc.getY() + testY; + z = loc.getZ() + testZ * (double) 3; + + Location loc2 = new Location(loc.getWorld(), x, y, z); + Methods.isAir(loc.getBlock().getType()); + Location loc3 = loc2.clone().subtract(0, 1, 0); + + if (Methods.isAir(loc2.getBlock().getType()) && !loc3.getBlock().getType().equals(Material.AIR)) + good = true; + } + if (good) { + Location location = new Location(loc.getWorld(), x,y,z); + location.getBlock().setType(mat); + } + + + } + } + } + if (EpicSpawners.getInstance().spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(sp.spawnedType) + ".commands")) { + try { + String key3 = key2 + sp.spawnedType; + + int rate = EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + Methods.getTypeFromString(sp.spawnedType) + ".commandTickRate"); + if (EpicSpawners.getInstance().api.getSpawnerMultiplier(spawnerLoc) != 1) + rate = rate / EpicSpawners.getInstance().api.getSpawnerMultiplier(spawnerLoc); + + long cur = (System.currentTimeMillis() / 1000); + long next = cur + rate; + + if (EpicSpawners.getInstance().tickTracker2.containsKey(key3)) { + long goal = EpicSpawners.getInstance().tickTracker2.get(key3); + if (cur >= goal) { + if (!sp.getSpawner().getBlock().isBlockPowered() && EpicSpawners.getInstance().getConfig().getBoolean("Main.Redstone Power Deactivates Spawners")) { + + for (String cmd : (ArrayList) EpicSpawners.getInstance().spawnerFile.getConfig().getList("Entities." + Methods.getTypeFromString(sp.spawnedType) + ".commands")) { + Location loc = spawnerLoc.clone(); + loc.add(.5, 0, .5); + + double x = 1; + double y = 1; + double z = 1; + + boolean good = false; + while (!good) { + double testX = ThreadLocalRandom.current().nextDouble(-1, 1); + double testY = ThreadLocalRandom.current().nextDouble(-1, 2); + double testZ = ThreadLocalRandom.current().nextDouble(-1, 1); + + x = loc.getX() + testX * (double) 3; + y = loc.getY() + testY; + z = loc.getZ() + testZ * (double) 3; + + Location loc2 = new Location(loc.getWorld(), x, y, z); + Methods.isAir(loc.getBlock().getType()); + Location loc3 = loc2.clone().subtract(0, 1, 0); + if (Methods.isAir(loc2.getBlock().getType()) && !loc3.getBlock().getType().equals(Material.AIR)) + good = true; + } + + if (cmd.toLowerCase().contains("@x") || cmd.toLowerCase().contains("@y") || cmd.toLowerCase().contains("@z")) { + if (Methods.countEntitiesAroundLoation(spawnerLoc) > EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + sp.spawnedType + ".commandSpawnLimit") && + EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + sp.spawnedType + ".commandSpawnLimit") != 0) + return; + } + boolean uP = true; + if (cmd.toLowerCase().contains("@p")) { + uP = false; + List arr = Arrays.asList(EpicSpawners.getInstance().getConfig().getString("Main.Radius To Search Around Spawner").split("x")); + Collection nearbyEntitee = Methods.getNearbyEntities(loc.clone().add(0.5, 0.5, 0.5), Integer.parseInt(arr.get(0)), Integer.parseInt(arr.get(1)), Integer.parseInt(arr.get(2))); + if (nearbyEntitee.size() >= 1) { + for (Entity ee : nearbyEntitee) { + if (ee instanceof LivingEntity) { + if (ee instanceof Player) { + uP = true; + cmd = cmd.replace("@p", ee.getName()); + } + } + } + } + } + cmd = cmd.replace("@x", Integer.toString((int) Math.ceil(x))); + cmd = cmd.replace("@y", Integer.toString((int) Math.ceil(y))); + cmd = cmd.replace("@z", Integer.toString((int) Math.ceil(z))); + cmd = cmd.replace("@X", Integer.toString((int) Math.ceil(x))); + cmd = cmd.replace("@Y", Integer.toString((int) Math.ceil(y))); + cmd = cmd.replace("@Z", Integer.toString((int) Math.ceil(z))); + + if (uP) + Bukkit.getServer().dispatchCommand(EpicSpawners.getInstance().getServer().getConsoleSender(), cmd); + + } + } + EpicSpawners.getInstance().tickTracker2.put(key3, next); + } + } else + EpicSpawners.getInstance().tickTracker2.put(key3, next); + } catch (Exception ignore) { + } + } + } + } + } + } catch (Exception ignore) { + } + } +} diff --git a/src/main/java/com/songoda/epicspawners/handlers/OmniHandler.java b/src/main/java/com/songoda/epicspawners/handlers/OmniHandler.java new file mode 100644 index 0000000..e6db21d --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/handlers/OmniHandler.java @@ -0,0 +1,79 @@ +package com.songoda.epicspawners.handlers; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.spawners.Spawner; +import com.songoda.epicspawners.spawners.SpawnerItem; +import com.songoda.epicspawners.utils.Debugger; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; + +import java.util.List; + +/** + * Created by songo on 5/17/2017. + */ +public class OmniHandler { + + public OmniHandler() { + try { + Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(EpicSpawners.getInstance(), OmniHandler::displayItems, 30L, 30L); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public static void displayItems() { + try { + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.OmniSpawners Enabled")) { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats")) { + ConfigurationSection cs = EpicSpawners.getInstance().dataFile.getConfig().getConfigurationSection("data.spawnerstats"); + for (String key : cs.getKeys(false)) { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + key + ".type")) { + if (EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + key + ".type").equals("OMNI")) { + + Location loc = Arconix.pl().getApi().serialize().unserializeLocation(key); + if (loc != null && loc.getWorld() != null) { + int destx = loc.getBlockX() >> 4; + int destz = loc.getBlockZ() >> 4; + if (!loc.getWorld().isChunkLoaded(destx, destz)) { + continue; + } + if (loc.getBlock().getType() == Material.MOB_SPAWNER) { + Spawner eSpawner = new Spawner(loc); + + String last = null; + String next = null; + List list = EpicSpawners.getInstance().getApi().convertFromList(EpicSpawners.getInstance().dataFile.getConfig().getStringList("data.spawnerstats." + key + ".entities")); + for (SpawnerItem item : list) { + if (item.getType().equals(eSpawner.getOmniState())) { + last = item.getType(); + } else if (last != null && next == null) { + next = item.getType(); + } + } + if (next == null) { + next = list.get(0).getType(); + } + EpicSpawners.getInstance().getApi().updateDisplayItem(next,loc); + eSpawner.setOmniState(next); + } else { + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + key + ".type", null); + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + key + ".entities", null); + } + } else { + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + key + ".type", null); + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + key + ".entities", null); + } + } + } + } + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + } +} diff --git a/src/main/java/com/songoda/epicspawners/hooks/ASkyBlockHook.java b/src/main/java/com/songoda/epicspawners/hooks/ASkyBlockHook.java new file mode 100644 index 0000000..60a1fd8 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/hooks/ASkyBlockHook.java @@ -0,0 +1,64 @@ +package com.songoda.epicspawners.hooks; + +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.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(); + EpicSpawners plugin = EpicSpawners.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/epicspawners/hooks/FactionsHook.java b/src/main/java/com/songoda/epicspawners/hooks/FactionsHook.java new file mode 100644 index 0000000..79063ac --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/hooks/FactionsHook.java @@ -0,0 +1,57 @@ +package com.songoda.epicspawners.hooks; + +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.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.Bukkit; +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"); + EpicSpawners plugin = EpicSpawners.pl(); + if (isEnabled() && Bukkit.getPluginManager().isPluginEnabled("FactionsFramework")) + 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 ignore) { + } + return null; + } + +} diff --git a/src/main/java/com/songoda/epicspawners/hooks/GriefPreventionHook.java b/src/main/java/com/songoda/epicspawners/hooks/GriefPreventionHook.java new file mode 100644 index 0000000..420a537 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/hooks/GriefPreventionHook.java @@ -0,0 +1,37 @@ +package com.songoda.epicspawners.hooks; + +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.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 { + + public GriefPreventionHook() { + super("GriefPrevention"); + EpicSpawners plugin = EpicSpawners.pl(); + 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/epicspawners/hooks/Hook.java b/src/main/java/com/songoda/epicspawners/hooks/Hook.java new file mode 100644 index 0000000..bbaaaa6 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/hooks/Hook.java @@ -0,0 +1,40 @@ +package com.songoda.epicspawners.hooks; + +import com.songoda.epicspawners.EpicSpawners; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.entity.Player; + +public abstract class Hook { + + final String pluginName; + + protected Hook(String pluginName) { + this.pluginName = pluginName; + if (isEnabled()) + EpicSpawners.getInstance().hooks.hooksFile.getConfig().addDefault("hooks." + pluginName, true); + } + + protected boolean isEnabled() { + return (Bukkit.getPluginManager().isPluginEnabled(pluginName) + && EpicSpawners.getInstance().hooks.hooksFile.getConfig().getBoolean("hooks." + pluginName,true)); + } + + boolean hasBypass(Player p) { + return p.hasPermission(EpicSpawners.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/epicspawners/hooks/KingdomsHook.java b/src/main/java/com/songoda/epicspawners/hooks/KingdomsHook.java new file mode 100644 index 0000000..acab90d --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/hooks/KingdomsHook.java @@ -0,0 +1,43 @@ +package com.songoda.epicspawners.hooks; + +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.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"); + EpicSpawners plugin = EpicSpawners.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/epicspawners/hooks/PlotSquaredHook.java b/src/main/java/com/songoda/epicspawners/hooks/PlotSquaredHook.java new file mode 100644 index 0000000..cacfa3a --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/hooks/PlotSquaredHook.java @@ -0,0 +1,38 @@ +package com.songoda.epicspawners.hooks; + +import com.intellectualcrafters.plot.api.PlotAPI; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.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()) { + EpicSpawners plugin = EpicSpawners.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/epicspawners/hooks/RedProtectHook.java b/src/main/java/com/songoda/epicspawners/hooks/RedProtectHook.java new file mode 100644 index 0000000..44a04c5 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/hooks/RedProtectHook.java @@ -0,0 +1,33 @@ +package com.songoda.epicspawners.hooks; + +import br.net.fabiozumbi12.RedProtect.Bukkit.API.RedProtectAPI; +import br.net.fabiozumbi12.RedProtect.Bukkit.RedProtect; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.utils.Debugger; +import org.bukkit.Location; +import org.bukkit.entity.Player; + +/** + * Created by songoda on 3/17/2017. + */ +public class RedProtectHook extends Hook { + + public RedProtectHook() { + super("RedProtect"); + EpicSpawners plugin = EpicSpawners.pl(); + 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/epicspawners/hooks/TownyHook.java b/src/main/java/com/songoda/epicspawners/hooks/TownyHook.java new file mode 100644 index 0000000..737f2b5 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/hooks/TownyHook.java @@ -0,0 +1,56 @@ +package com.songoda.epicspawners.hooks; + +import com.palmergames.bukkit.towny.object.Resident; +import com.palmergames.bukkit.towny.object.TownyUniverse; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.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"); + EpicSpawners plugin = EpicSpawners.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/epicspawners/hooks/USkyBlockHook.java b/src/main/java/com/songoda/epicspawners/hooks/USkyBlockHook.java new file mode 100644 index 0000000..4800a00 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/hooks/USkyBlockHook.java @@ -0,0 +1,49 @@ +package com.songoda.epicspawners.hooks; + +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.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; + + public USkyBlockHook() { + super("USkyBlock"); + if (isEnabled()) { + EpicSpawners plugin = EpicSpawners.pl(); + 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/epicspawners/hooks/WorldGuardHook.java b/src/main/java/com/songoda/epicspawners/hooks/WorldGuardHook.java new file mode 100644 index 0000000..e720505 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/hooks/WorldGuardHook.java @@ -0,0 +1,31 @@ +package com.songoda.epicspawners.hooks; + +import com.sk89q.worldguard.bukkit.WorldGuardPlugin; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.utils.Debugger; +import org.bukkit.Location; +import org.bukkit.entity.Player; + +/** + * Created by songoda on 3/17/2017. + */ +public class WorldGuardHook extends Hook { + + private EpicSpawners plugin = EpicSpawners.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() == null || WorldGuardPlugin.inst().canBuild(p, location); + } catch (Exception e) { + Debugger.runReport(e); + } + return false; + } +} diff --git a/src/main/java/com/songoda/epicspawners/listeners/BlockListeners.java b/src/main/java/com/songoda/epicspawners/listeners/BlockListeners.java new file mode 100644 index 0000000..00d4079 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/listeners/BlockListeners.java @@ -0,0 +1,317 @@ +package com.songoda.epicspawners.listeners; + +import com.songoda.arconix.api.utils.Serializer; +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.entity.EPlayer; +import com.songoda.epicspawners.spawners.Spawner; +import com.songoda.epicspawners.spawners.SpawnerBreakEvent; +import com.songoda.epicspawners.spawners.SpawnerPlaceEvent; +import com.songoda.epicspawners.utils.Debugger; +import com.songoda.epicspawners.utils.Methods; +import net.milkbowl.vault.economy.Economy; +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.enchantments.Enchantment; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +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.BlockFromToEvent; +import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.plugin.RegisteredServiceProvider; + +/** + * Created by songoda on 2/25/2017. + */ +public class BlockListeners implements Listener { + + private final EpicSpawners instance; + + public BlockListeners(EpicSpawners instance) { + this.instance = instance; + + } + + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) + public void onBlockFromTo(BlockFromToEvent e) { + try { + if (doLiquidRepel(e.getBlock(), false)) e.setCancelled(true); + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + private boolean doLiquidRepel(Block block, boolean from) { + int radius = instance.getConfig().getInt("Main.Spawner Repel Liquid Radius"); + if (radius == 0) return false; + if (!from) radius++; + int bx = block.getX(); + int by = block.getY(); + int bz = block.getZ(); + for (int fx = -radius; fx <= radius; fx++) { + for (int fy = -radius; fy <= radius; fy++) { + for (int fz = -radius; fz <= radius; fz++) { + Block b2 = block.getWorld().getBlockAt(bx + fx, by + fy, bz + fz); + + if (from) { + if ((b2.getType().equals(Material.STATIONARY_LAVA) || b2.getType().equals(Material.LAVA)) + || (b2.getType().equals(Material.STATIONARY_WATER) || b2.getType().equals(Material.WATER))) { + b2.setType(Material.AIR); + } + } else { + if (b2.getType().equals(Material.MOB_SPAWNER)) { + return true; + } + } + + } + } + } + return false; + } + + @EventHandler(ignoreCancelled = true) + public void onSpawnerPlace(BlockPlaceEvent e) { + try { + Player p = e.getPlayer(); + Block b = e.getBlockPlaced(); + + if (b.getType().equals(Material.MOB_SPAWNER)) doLiquidRepel(b, true); + + if (Methods.isOffhand(e)) { + if (p.getInventory().getItemInOffHand().getType() == Material.MOB_SPAWNER) + e.setCancelled(true); + return; + } + + ItemStack inh = p.getItemInHand(); + ItemMeta im = inh.getItemMeta(); + + if (im == null || b.getType() != Material.MOB_SPAWNER || im.getDisplayName() == null) + return; + + String type = instance.getApi().getIType(inh); + FileConfiguration dataFile = instance.dataFile.getConfig(); + + if (!p.hasPermission("epicspawners.place." + type) && !p.hasPermission("epicspawners.place." + Methods.getTypeFromString(type)) && !p.hasPermission("epicspawners.place.*")) { + e.setCancelled(true); + return; + } + + SpawnerPlaceEvent event = new SpawnerPlaceEvent(b.getLocation(), p, type); + Bukkit.getPluginManager().callEvent(event); + if (event.isCancelled()) { + return; + } + if (doForceCombine(p, b, dataFile, type)) { + e.setCancelled(true); + return; + } + + Spawner eSpawner = new Spawner(b); + boolean isCustom = false; + if (!type.equals("OMNI")) { + try { + eSpawner.setSpawner(EntityType.valueOf(type)); + } catch (Exception ex) { + isCustom = true; + eSpawner.setSpawner(EntityType.valueOf("DROPPED_ITEM")); + } + } + int multi = 0; + if (im.hasDisplayName()) { + if (instance.blacklist.isBlacklisted(p, true)) { + e.setCancelled(true); + } else { + multi = instance.getApi().getIMulti(inh); + eSpawner.updateDelay(); + dataFile.set("data.spawner." + Arconix.pl().getApi().serialize().serializeLocation(b), multi); + if (!type.equals("OMNI") && isCustom) { + dataFile.set("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(b) + ".type", type); + } + dataFile.set("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(b) + ".player", p.getUniqueId().toString()); + instance.getApi().saveCustomSpawner(inh, b); + } + } + if (instance.getConfig().getBoolean("Main.Alerts On Place And Break") && + (!instance.blacklist.isBlacklisted(p, false) || !im.hasDisplayName())) { + p.sendMessage(instance.getLocale().getMessage("event.block.place", Methods.compileName(type, multi, true))); + } + instance.getApi().updateDisplayItem(type, b.getLocation()); + if (multi <= 1) { + dataFile.set("data.spawner." + Arconix.pl().getApi().serialize().serializeLocation(b), 1); + if (!type.equals("OMNI") && isCustom) { + dataFile.set("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(b) + ".type", type); + } + dataFile.set("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(b) + ".player", p.getUniqueId().toString()); + + if (!p.isOp() && instance.spawnerFile.getConfig().getInt("Entities." + Methods.getTypeFromString(type) + ".Pickup-cost") != 0 && eSpawner.canCharge()) { + int cost = instance.spawnerFile.getConfig().getInt("Entities." + Methods.getTypeFromString(type) + ".Pickup-cost"); + p.sendMessage(instance.getLocale().getMessage("event.block.chargeplace", Arconix.pl().getApi().format().formatEconomy(cost))); + instance.freePickup.put(p, b.getLocation()); + Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(instance, () -> instance.freePickup.remove(p), 1200L); + } + + } + instance.holo.processChange(e.getBlock()); + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + public boolean doForceCombine(Player p, Block b, FileConfiguration dataFile, String type) { + if (instance.getConfig().getInt("Main.Force Combine Radius") == 0 || !dataFile.contains("data.spawner")) { + return false; + } + ConfigurationSection cs = dataFile.getConfigurationSection("data.spawner"); + for (String key : cs.getKeys(false)) { + if (Arconix.pl().getApi().serialize().unserializeLocation(key).getWorld() == null + || !Arconix.pl().getApi().serialize().unserializeLocation(key).getWorld().equals(b.getLocation().getWorld()) + || Arconix.pl().getApi().serialize().unserializeLocation(key).distance(b.getLocation()) >= instance.getConfig().getInt("Main.Force Combine Radius") + || p.getItemInHand().getItemMeta().getDisplayName() == null + || instance.getApi().isOmniBlock(Arconix.pl().getApi().serialize().unserializeLocation(key))) { + continue; + } + Spawner eSpawner = new Spawner(Arconix.pl().getApi().serialize().unserializeLocation(key).getBlock()); + + String name = eSpawner.getSpawner() == null || eSpawner.getSpawner().getSpawnedType().name().equals("DROPPED_ITEM") + ? EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + key + ".type") + : eSpawner.getSpawner().getSpawnedType().name(); + + if (name == null || !name.equals(type)) + continue; + + if (instance.getConfig().getBoolean("settings.serializer")) + p.sendMessage(instance.getLocale().getMessage("event.block.forcedeny")); + else if (eSpawner.processCombine(p, p.getItemInHand(), null)) + p.sendMessage(instance.getLocale().getMessage("event.block.mergedistance")); + return true; + } + return false; + } + + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) + //Leave this on high or WorldGuard will not work... + public void onBlockBreak(BlockBreakEvent e) { + try { + Block b = e.getBlock(); + if (b.getType() != Material.MOB_SPAWNER) { + return; + } + Spawner eSpawner = new Spawner(b); + Player p = e.getPlayer(); + e.setExpToDrop(0); + + if (!eSpawner.canBreak()) { + return; + } + + FileConfiguration dataFile = instance.dataFile.getConfig(); + FileConfiguration config = instance.getConfig(); + + Serializer serializer = Arconix.pl().getApi().serialize(); + + String type = Methods.getType(eSpawner.getSpawner().getSpawnedType()); + + if (dataFile.contains("data.spawnerstats." + serializer.serializeLocation(eSpawner.getSpawner().getBlock()) + ".type") + && !dataFile.getString("data.spawnerstats." + serializer.serializeLocation(eSpawner.getSpawner().getBlock()) + ".type").equals("OMNI")) + type = dataFile.getString("data.spawnerstats." + serializer.serializeLocation(eSpawner.getSpawner().getBlock()) + ".type"); + + int multi = eSpawner.getMulti(); + int omulti = multi; + + int newMulti = multi - 1; + if (instance.getApi().isOmniBlock(b.getLocation())) { + type = "Omni"; + if (omulti > 2) { + multi = instance.getApi().convertFromList(dataFile.getStringList("data.spawnerstats." + serializer.serializeLocation(b) + ".entities")).size(); + } else { + String old = dataFile.getStringList("data.spawnerstats." + serializer.serializeLocation(b) + ".entities").get(0); + newMulti = Integer.parseInt(old.split("-")[1]); + } + } + + if (config.getBoolean("Spawner Drops.Only Drop Stacked Spawners") || + p.isSneaking() && config.getBoolean("Main.Sneak To Receive A Stacked Spawner")) { + if (!instance.getApi().isOmniBlock(b.getLocation())) + newMulti = 0; + } + if (newMulti > 0) { + e.setCancelled(true); + } + + SpawnerBreakEvent event = new SpawnerBreakEvent(b.getLocation(), p); + Bukkit.getPluginManager().callEvent(event); + if (event.isCancelled()) { + return; + } + + if ((p.getItemInHand().getItemMeta() == null || !p.getItemInHand().getItemMeta().hasEnchant(Enchantment.SILK_TOUCH)) + && !p.hasPermission("epicspawners.no-silk-drop")) { + eSpawner.downgradeFinal(p, newMulti, omulti, type); + return; + } + if (!config.getBoolean("Spawner Drops.Drop On SilkTouch")) { + return; + } + if (!p.isOp() + && !instance.freePickup.containsValue(b.getLocation()) + && instance.spawnerFile.getConfig().getInt("Entities." + type + ".Pickup-cost") != 0) { + int cost = instance.spawnerFile.getConfig().getInt("Entities." + type + ".Pickup-cost"); + if (newMulti == 0) + cost = cost * multi; + if (!instance.pickup.containsKey(p)) { + p.sendMessage(instance.getLocale().getMessage("event.block.chargebreak", Arconix.pl().getApi().format().formatEconomy(cost))); + instance.pickup.put(p, true); + Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(instance, () -> instance.pickup.remove(p), 300L); + e.setCancelled(true); + return; + } else if (eSpawner.canCharge() + && instance.spawnerFile.getConfig().getInt("Entities." + type + ".Pickup-cost") != 0 + && instance.pickup.containsKey(p) + && 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(p, cost)) { + econ.withdrawPlayer(p, cost); + } else { + p.sendMessage(instance.getLocale().getMessage("event.block.cannotbreak")); + e.setCancelled(true); + return; + } + } else { + e.setCancelled(true); + return; + } + } + + instance.pickup.remove(p); + + int ch = Integer.parseInt(config.getString(dataFile.contains("data.spawner." + serializer.serializeLocation(b)) + ? "Spawner Drops.Chance On Placed Silktouch" : "Spawner Drops.Chance On Natural Silktouch").replace("%", "")); + + double rand = Math.random() * 100; + + if (!p.isSneaking() && !config.getBoolean("Spawner Drops.Only Drop Stacked Spawners") || p.isSneaking() && !config.getBoolean("Main.Sneak To Receive A Stacked Spawner")) { + multi = 1; + } + if (rand - ch < 0 || ch == 100) { + if (p.hasPermission("epicspawners.silkdrop." + type) || p.hasPermission("epicspawners.silkdrop.*")) { + new EPlayer(p).dropSpawner(b.getLocation(), multi, type); + } + } + eSpawner.downgradeFinal(p, newMulti, omulti, type); + Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(instance, () -> instance.holo.processChange(e.getBlock()), 10L); + } catch (Exception ex) { + Debugger.runReport(ex); + } + } +} diff --git a/src/main/java/com/songoda/epicspawners/listeners/ChatListeners.java b/src/main/java/com/songoda/epicspawners/listeners/ChatListeners.java new file mode 100644 index 0000000..067ee27 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/listeners/ChatListeners.java @@ -0,0 +1,98 @@ +package com.songoda.epicspawners.listeners; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.utils.Debugger; +import com.songoda.epicspawners.utils.Methods; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.AsyncPlayerChatEvent; + +/** + * Created by songoda on 2/25/2017. + */ +public class ChatListeners implements Listener { + + @EventHandler + public void chatListeners(AsyncPlayerChatEvent e) { + try { + if (!e.isCancelled()) { + if (EpicSpawners.getInstance().chatEditing.containsKey(e.getPlayer())) { + switch (EpicSpawners.getInstance().chatEditing.get(e.getPlayer())) { + case "destroy": + EpicSpawners.getInstance().editor.destroyFinal(e.getPlayer(), e.getMessage()); + break; + case "name": + EpicSpawners.getInstance().editor.saveSpawnerName(e.getPlayer(), e.getMessage()); + break; + case "tick": + EpicSpawners.getInstance().editor.saveChatEdit(e.getPlayer(), Integer.parseInt(e.getMessage())); + break; + case "addEntity": + EpicSpawners.getInstance().isEntityInstanceSaved = true; + EpicSpawners.getInstance().editor.addEntity(e.getPlayer(), e.getMessage()); + break; + case "Shop-Price": + if (Arconix.pl().getApi().doMath().isNumeric(e.getMessage())) { + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(e.getPlayer()))) + ".Shop-Price", Double.parseDouble(e.getMessage())); + } else { + e.getPlayer().sendMessage(Arconix.pl().getApi().format().formatText("&CYou must enter a number.")); + } + EpicSpawners.getInstance().editor.basicSettings(e.getPlayer()); + break; + case "Custom-ECO-Cost": + if (Arconix.pl().getApi().doMath().isNumeric(e.getMessage())) { + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(e.getPlayer()))) + ".Custom-ECO-Cost", Double.parseDouble(e.getMessage())); + } else { + e.getPlayer().sendMessage(Arconix.pl().getApi().format().formatText("&CYou must enter a number.")); + } + EpicSpawners.getInstance().editor.basicSettings(e.getPlayer()); + break; + case "Custom-XP-Cost": + if (Arconix.pl().getApi().doMath().isNumeric(e.getMessage())) { + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(e.getPlayer()))) + ".Custom-XP-Cost", Integer.parseInt(e.getMessage())); + } else { + e.getPlayer().sendMessage(Arconix.pl().getApi().format().formatText("&CYou must enter a number.")); + } + EpicSpawners.getInstance().editor.basicSettings(e.getPlayer()); + break; + case "Command": + String msg = e.getMessage(); + e.getPlayer().sendMessage(Arconix.pl().getApi().format().formatText(EpicSpawners.getInstance().references.getPrefix() + "&8Command &5" + msg + "&8 saved to your inventory.")); + EpicSpawners.getInstance().editor.addCommand(e.getPlayer(), e.getMessage()); + break; + case "CustomGoal": + if (Arconix.pl().getApi().doMath().isNumeric(e.getMessage())) { + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(e.getPlayer()))) + ".CustomGoal", Integer.parseInt(e.getMessage())); + } else { + e.getPlayer().sendMessage(Arconix.pl().getApi().format().formatText("&CYou must enter a number.")); + } + EpicSpawners.getInstance().editor.basicSettings(e.getPlayer()); + break; + case "Pickup-cost": + if (Arconix.pl().getApi().doMath().isNumeric(e.getMessage())) { + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(e.getPlayer()))) + ".Pickup-cost", Double.parseDouble(e.getMessage())); + } else { + e.getPlayer().sendMessage(Arconix.pl().getApi().format().formatText("&CYou must enter a number.")); + } + EpicSpawners.getInstance().editor.basicSettings(e.getPlayer()); + break; + case "spawnLimit": + if (Arconix.pl().getApi().doMath().isNumeric(e.getMessage())) { + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(e.getPlayer()))) + ".commandSpawnLimit", Double.parseDouble(e.getMessage())); + EpicSpawners.getInstance().editor.editor(e.getPlayer(), "Command"); + } else { + e.getPlayer().sendMessage(Arconix.pl().getApi().format().formatText("&CYou must enter a number.")); + } + EpicSpawners.getInstance().editor.basicSettings(e.getPlayer()); + break; + } + EpicSpawners.getInstance().chatEditing.remove(e.getPlayer()); + e.setCancelled(true); + } + } + } catch (Exception ex) { + Debugger.runReport(ex); + } + } +} diff --git a/src/main/java/com/songoda/epicspawners/listeners/EntityListeners.java b/src/main/java/com/songoda/epicspawners/listeners/EntityListeners.java new file mode 100644 index 0000000..b3dcbf9 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/listeners/EntityListeners.java @@ -0,0 +1,115 @@ +package com.songoda.epicspawners.listeners; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.entity.EPlayer; +import com.songoda.epicspawners.spawners.Spawner; +import com.songoda.epicspawners.utils.Debugger; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.entity.Creeper; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.entity.TNTPrimed; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.event.entity.EntityDeathEvent; +import org.bukkit.event.entity.EntityExplodeEvent; + +import java.util.List; + +/** + * Created by songoda on 2/25/2017. + */ +public class EntityListeners implements Listener { + + @EventHandler(priority = EventPriority.HIGHEST) + public void onBlow(EntityExplodeEvent e) { + try { + if (!e.isCancelled()) { + List destroyed = e.blockList(); + for (Block b : destroyed) { + if (b.getType() == Material.MOB_SPAWNER) { + Location spawnLocation = b.getLocation(); + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Prevent Spawners From Exploding")) + e.blockList().remove(b); + else if (e.getEntity() instanceof Creeper && EpicSpawners.getInstance().getConfig().getBoolean("Spawner Drops.Drop On Creeper Explosion") || e.getEntity() instanceof TNTPrimed && EpicSpawners.getInstance().getConfig().getBoolean("Spawner Drops.Drop On TNT Explosion")) { + int multi = 0; + + Spawner spawner = new Spawner(b); + boolean canDrop = spawner.canBreak(); + + String locationStr = Arconix.pl().getApi().serialize().serializeLocation(b); + if (EpicSpawners.getInstance().dataFile.getConfig().getInt("data.spawner." + locationStr) != 0) { + multi = EpicSpawners.getInstance().dataFile.getConfig().getInt("data.spawner." + locationStr); + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawner." + locationStr, null); + } + + String type = spawner.spawnedType; + String chance = ""; + if (e.getEntity() instanceof Creeper && EpicSpawners.getInstance().getConfig().getBoolean("Spawner Drops.Drop On Creeper Explosion")) + chance = EpicSpawners.getInstance().getConfig().getString("Spawner Drops.Chance On TNT Explosion"); + else if (e.getEntity() instanceof TNTPrimed && EpicSpawners.getInstance().getConfig().getBoolean("Spawner Drops.Drop On TNT Explosion")) + chance = EpicSpawners.getInstance().getConfig().getString("Spawner Drops.Chance On Creeper Explosion"); + int ch = Integer.parseInt(chance.replace("%", "")); + double rand = Math.random() * 100; + if (rand - ch < 0 || ch == 100) { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(b.getLocation()) + ".type")) { + if (EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(b.getLocation()) + ".type").equals("OMNI")) { + type = "Omni"; + multi = 100; + } + } + if (canDrop) + new EPlayer(null).dropSpawner(spawnLocation, multi, type); + } + } + EpicSpawners.getInstance().holo.processChange(b); + Location nloc = spawnLocation.clone(); + nloc.add(.5, -.4, .5); + List near = (List) nloc.getWorld().getNearbyEntities(nloc, 8, 8, 8); + for (Entity ee : near) { + if (ee.getLocation().getX() == nloc.getX() && ee.getLocation().getY() == nloc.getY() && ee.getLocation().getZ() == nloc.getZ()) { + ee.remove(); + } + } + } + } + } + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + @EventHandler + public void onDeath(EntityDeathEvent e) { + try { + if (e.getEntity().getKiller() != null) { + if (e.getEntity().getKiller() instanceof Player) { + Player p = e.getEntity().getKiller(); + if (!EpicSpawners.getInstance().dataFile.getConfig().getBoolean("data.Entities." + e.getEntity().getUniqueId()) || EpicSpawners.getInstance().getConfig().getBoolean("Spawner Drops.Count Unnatural Kills Towards Spawner Drop")) { + new EPlayer(p).plus(e.getEntity(), 1); + } + } + } + EpicSpawners.getInstance().dataFile.getConfig().set("data.Entities." + e.getEntity().getUniqueId(), null); + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + @EventHandler + public void onDeath(CreatureSpawnEvent e) { + try { + if (e.getSpawnReason() != CreatureSpawnEvent.SpawnReason.NATURAL && + e.getSpawnReason() != CreatureSpawnEvent.SpawnReason.CHUNK_GEN) { + EpicSpawners.getInstance().dataFile.getConfig().set("data.Entities." + e.getEntity().getUniqueId(), true); + } + } catch (Exception ex) { + Debugger.runReport(ex); + } + } +} diff --git a/src/main/java/com/songoda/epicspawners/listeners/InteractListeners.java b/src/main/java/com/songoda/epicspawners/listeners/InteractListeners.java new file mode 100644 index 0000000..d272364 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/listeners/InteractListeners.java @@ -0,0 +1,177 @@ +package com.songoda.epicspawners.listeners; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.spawners.Spawner; +import com.songoda.epicspawners.spawners.SpawnerChangeEvent; +import com.songoda.epicspawners.utils.Debugger; +import com.songoda.epicspawners.utils.Methods; +import com.songoda.epicspawners.utils.Reflection; +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.material.SpawnEgg; + +/** + * Created by songoda on 2/25/2017. + */ +public class InteractListeners implements Listener { + + EpicSpawners instance; + + public InteractListeners(EpicSpawners instance) { + this.instance = instance; + } + + @EventHandler(ignoreCancelled = true) + public void PlayerInteractEventEgg(PlayerInteractEvent e) { + try { + + if (!e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { + return; + } + Player p = e.getPlayer(); + Block b = e.getClickedBlock(); + ItemStack i = e.getItem(); + Material is = null; + if (e.getItem() != null) { + is = i.getType(); + } + int radius = instance.getConfig().getInt("Main.Spawner Repel Liquid Radius"); + if (e.getItem() != null + && is.equals(Material.WATER_BUCKET) + && radius != 0) { + Block block = e.getClickedBlock(); + int bx = block.getX(); + int by = block.getY(); + int bz = block.getZ(); + for (int fx = -radius; fx <= radius; fx++) { + for (int fy = -radius; fy <= radius; fy++) { + for (int fz = -radius; fz <= radius; fz++) { + Block b2 = e.getClickedBlock().getWorld().getBlockAt(bx + fx, by + fy, bz + fz); + if (b2.getType().equals(Material.MOB_SPAWNER)) { + e.setCancelled(true); + } + } + } + } + } + + if (e.getClickedBlock().getType() == Material.MOB_SPAWNER && is == Material.MONSTER_EGG && instance.blacklist.isBlacklisted(p, true)) + e.setCancelled(true); + if (!(e.getClickedBlock().getType() == Material.MOB_SPAWNER && is == Material.MONSTER_EGG && !instance.blacklist.isBlacklisted(p, true))) { + return; + } + Spawner eSpawner = new Spawner(b); + String btype = Methods.getType(eSpawner.getSpawner().getSpawnedType()); + + if (!instance.getConfig().getBoolean("Main.Convert Spawners With Eggs") + || !instance.spawnerFile.getConfig().getBoolean("Entities." + btype + ".Allowed")) { + e.setCancelled(true); + return; + } + + int bmulti = 1; + if (instance.dataFile.getConfig().getInt("data.spawner." + Arconix.pl().getApi().serialize().serializeLocation(b)) != 0) + bmulti = instance.dataFile.getConfig().getInt("data.spawner." + Arconix.pl().getApi().serialize().serializeLocation(b)); + int amt = p.getInventory().getItemInHand().getAmount(); + EntityType itype; + + if (instance.v1_7 || instance.v1_8) + itype = ((SpawnEgg) i.getData()).getSpawnedType(); + else { + String str = Reflection.getNBTTagCompound(Reflection.getNMSItemStack(i)).toString(); + if (str.contains("minecraft:")) + itype = EntityType.fromName(str.substring(str.indexOf("minecraft:") + 10, str.indexOf("\"}"))); + else + itype = EntityType.fromName(str.substring(str.indexOf("EntityTag:{id:") + 15, str.indexOf("\"}"))); + } + + if (!p.hasPermission("epicspawners.egg." + itype) && !p.hasPermission("epicspawners.egg.*")) { + return; + } + if (amt < bmulti) { + p.sendMessage(instance.getLocale().getMessage("event.egg.needmore", bmulti)); + e.setCancelled(true); + return; + } + SpawnerChangeEvent event = new SpawnerChangeEvent(b.getLocation(), p, btype, itype.name()); + Bukkit.getPluginManager().callEvent(event); + if (event.isCancelled()) { + return; + } + if (btype.equals(Methods.getType(itype))) { + p.sendMessage(instance.getLocale().getMessage("event.egg.sametype", btype)); + return; + } + eSpawner.getSpawner().setSpawnedType(itype); + eSpawner.update(); + instance.holo.processChange(b); + if (p.getGameMode() != GameMode.CREATIVE) { + Methods.takeItem(p, bmulti - 1); + } + } catch (Exception ee) { + Debugger.runReport(ee); + } + } + + @EventHandler(ignoreCancelled = true) + public void PlayerInteractEvent(PlayerInteractEvent e) { + try { + if (e.getClickedBlock().getType() == Material.MOB_SPAWNER) { + instance.holo.processChange(e.getClickedBlock()); + } + if (e.isCancelled() + || Methods.isOffhand(e)) { + return; + } + Player p = e.getPlayer(); + Block b = e.getClickedBlock(); + ItemStack i = e.getItem(); + String loc = Arconix.pl().getApi().serialize().serializeLocation(b); + if (instance.dataFile.getConfig().getString("data.blockshop." + loc) != null) { + e.setCancelled(true); + instance.shop.show(instance.dataFile.getConfig().getString("data.blockshop." + loc).toUpperCase(), 1, p); + return; + } + if (!instance.hooks.canBuild(e.getPlayer(), e.getClickedBlock().getLocation()) + || e.getClickedBlock() == null + || e.getAction() != Action.RIGHT_CLICK_BLOCK) { + return; + } + Material is = null; + if (e.getItem() != null) { + is = i.getType(); + } + if (is == Material.MONSTER_EGG) + return; + if (e.getClickedBlock().getType() == Material.MOB_SPAWNER && is == Material.MOB_SPAWNER && !instance.blacklist.isBlacklisted(p, true)) { + Spawner eSpawner = new Spawner(b); + if (!p.isSneaking() && i.getItemMeta().getDisplayName() != null) { + String itype = instance.getApi().getIType(i); + if (p.hasPermission("epicspawners.combine." + itype) || p.hasPermission("epicspawners.combine.*")) { + eSpawner.processCombine(p, i, null); + e.setCancelled(true); + } + } + } else if (e.getClickedBlock().getType() == Material.MOB_SPAWNER && !instance.blacklist.isBlacklisted(p, false)) { + if (!p.isSneaking()) { + Spawner eSpawner = new Spawner(b); + eSpawner.overView(p, 1); + instance.holo.processChange(b); + e.setCancelled(true); + } + } + } catch (Exception ex) { + Debugger.runReport(ex); + } + } +} diff --git a/src/main/java/com/songoda/epicspawners/listeners/InventoryListeners.java b/src/main/java/com/songoda/epicspawners/listeners/InventoryListeners.java new file mode 100644 index 0000000..2a5dc79 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/listeners/InventoryListeners.java @@ -0,0 +1,389 @@ +package com.songoda.epicspawners.listeners; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.spawners.Spawner; +import com.songoda.epicspawners.spawners.SpawnerItem; +import com.songoda.epicspawners.utils.Debugger; +import com.songoda.epicspawners.utils.Methods; +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.inventory.InventoryAction; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryCloseEvent; +import org.bukkit.event.inventory.InventoryType; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; + +import java.util.List; + +/** + * Created by songoda on 2/25/2017. + */ +public class InventoryListeners implements Listener { + + private EpicSpawners instance; + + public InventoryListeners(EpicSpawners instance) { + this.instance = instance; + } + + @EventHandler + public void onInventoryClick(InventoryClickEvent e) { + try { + if (e.getInventory() == null) return; + Inventory inv = e.getInventory(); + Player p = (Player) e.getWhoClicked(); + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Allow Stacking Spawners In Survival Inventories") + && p.getOpenInventory().getType().equals(InventoryType.CRAFTING)) { + if ((inv == null) + && (e.getCursor() == null) + && (e.getCurrentItem() == null)) { + return; + } + ItemStack c = e.getCursor(); + ItemStack item = e.getCurrentItem(); + if (!e.isRightClick() && item.getType() != Material.MOB_SPAWNER) { + return; + } + if (c.getType() == Material.MOB_SPAWNER) { + if (item.getAmount() != 1 || c.getAmount() != 1) { + p.sendMessage(instance.getLocale().getMessage("event.combine.onlyone")); + return; + } + if (item.getAmount() == 1 && c.getAmount() - item.getAmount() == 1 || c.getAmount() == 1) { + Spawner eSpawner = new Spawner(); + if (eSpawner.processCombine(p, item, c)) { + e.setCurrentItem(new ItemStack(Material.AIR)); + } + } + } else if (c.getType() == Material.AIR) { + if (item.getAmount() != 1) { + return; + } + if (EpicSpawners.getInstance().getApi().getType(item).equals("OMNI")) { + List items = EpicSpawners.getInstance().getApi().removeOmni(item); + e.setCurrentItem(items.get(0)); + e.setCursor(items.get(1)); + } else { + List items = EpicSpawners.getInstance().getApi().removeSpawner(item); + if (items.size() == 2) { + e.setCurrentItem(items.get(1)); + e.setCursor(items.get(0)); + } + } + } + } + + + if (EpicSpawners.getInstance().inShow.containsKey(e.getWhoClicked())) { + e.setCancelled(true); + int amt = e.getInventory().getItem(22).getAmount(); + if (e.getSlot() == 0) { + int page = EpicSpawners.getInstance().page.get(p); + EpicSpawners.getInstance().shop.open(p, page); + } else if (e.getSlot() == 8) { + p.closeInventory(); + } else if (e.getSlot() == 19) { + if (amt != 1) + amt = 1; + EpicSpawners.getInstance().shop.show(EpicSpawners.getInstance().inShow.get(p), amt, p); + } else if (e.getSlot() == 29) { + if ((amt - 10) <= 64 && (amt - 10) >= 1) + amt = amt - 10; + EpicSpawners.getInstance().shop.show(EpicSpawners.getInstance().inShow.get(p), amt, p); + } else if (e.getSlot() == 11) { + if ((amt - 1) <= 64 && (amt - 1) >= 1) + amt = amt - 1; + EpicSpawners.getInstance().shop.show(EpicSpawners.getInstance().inShow.get(p), amt, p); + } else if (e.getSlot() == 15) { + if ((amt + 1) <= 64 && (amt + 1) >= 1) + amt = amt + 1; + EpicSpawners.getInstance().shop.show(EpicSpawners.getInstance().inShow.get(p), amt, p); + } else if (e.getSlot() == 33) { + if ((amt + 10) <= 64 && (amt + 10) >= 1) + amt = amt + 10; + EpicSpawners.getInstance().shop.show(EpicSpawners.getInstance().inShow.get(p), amt, p); + } else if (e.getSlot() == 25) { + if (amt != 64) + amt = 64; + EpicSpawners.getInstance().shop.show(EpicSpawners.getInstance().inShow.get(p), amt, p); + } else if (e.getSlot() == 40) { + EpicSpawners.getInstance().shop.confirm(p, amt); + p.closeInventory(); + } + } else if (EpicSpawners.getInstance().boosting.contains(p)) { + e.setCancelled(true); + Spawner eSpawner = new Spawner(EpicSpawners.getInstance().lastSpawner.get(p)); + if (e.getSlot() == 8) { + EpicSpawners.getInstance().boostAmt.put(p, EpicSpawners.getInstance().boostAmt.get(p) + 1); + eSpawner.playerBoost(p); + } else if (e.getSlot() == 0) { + EpicSpawners.getInstance().boostAmt.put(p, EpicSpawners.getInstance().boostAmt.get(p) - 1); + eSpawner.playerBoost(p); + } else if (e.getSlot() == 10) { + eSpawner.purchaseBoost(p, 5); + } else if (e.getSlot() == 12) { + eSpawner.purchaseBoost(p, 15); + } else if (e.getSlot() == 14) { + eSpawner.purchaseBoost(p, 30); + } else if (e.getSlot() == 16) { + eSpawner.purchaseBoost(p, 60); + } + } else if (e.getInventory().getTitle().equals(instance.getLocale().getMessage("interface.convert.title"))) { + e.setCancelled(true); + ItemStack clicked = e.getCurrentItem(); + Spawner eSpawner = new Spawner(EpicSpawners.getInstance().spawnerLoc.get(p)); + + int page = EpicSpawners.getInstance().page.get(p); + + if (e.getInventory().getType() == InventoryType.CHEST) { + if (e.getSlot() == 8) { + p.closeInventory(); + } else if (e.getCurrentItem().getItemMeta().getDisplayName().equals(instance.getLocale().getMessage("general.nametag.back"))) { + if (page != 1) { + eSpawner.change(p, page - 1); + } + } else if (e.getCurrentItem().getItemMeta().getDisplayName().equals(instance.getLocale().getMessage("general.nametag.next"))) { + eSpawner.change(p, page + 1); + } else if (clicked.getType() == Material.SKULL_ITEM || clicked.getType() == Material.MOB_SPAWNER) { + eSpawner.convert(EpicSpawners.getInstance().getApi().getIType(clicked), p); + } + } + } else if (EpicSpawners.getInstance().spawnerLoc.containsKey(e.getWhoClicked())) { + e.setCancelled(true); + Spawner eSpawner = new Spawner(EpicSpawners.getInstance().spawnerLoc.get(p)); + + if (EpicSpawners.getInstance().spawnerFile.getConfig().getBoolean("Entities." + eSpawner.spawnedType + ".Upgradable")) { + if (e.getSlot() == 11) { + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Upgrade With XP")) { + if (!e.getCurrentItem().getItemMeta().getDisplayName().equals("§l")) { + eSpawner.upgrade(p, "XP"); + } + p.closeInventory(); + } + } else if (e.getSlot() == 8) { + int page = 2; + if (EpicSpawners.getInstance().infPage.containsKey(p)) + page = EpicSpawners.getInstance().infPage.get(p) + 1; + EpicSpawners.getInstance().infPage.put(p, page); + eSpawner.overView(p, page); + } else if (e.getSlot() == 13) { + if (e.getClick().isRightClick()) { + if (eSpawner.getBoost() == 0) { + eSpawner.playerBoost(p); + } + } else if (e.getClick().isLeftClick()) { + boolean omni = false; + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + eSpawner.locationStr + ".type")) { + if (EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + eSpawner.locationStr + ".type").equals("OMNI")) { + List list = EpicSpawners.getInstance().getApi().convertFromList(EpicSpawners.getInstance().dataFile.getConfig().getStringList("data.spawnerstats." + eSpawner.locationStr + ".entities")); + omni = true; + } + } + if (p.hasPermission("epicspawners.convert") && !omni) { + eSpawner.change(p, 1); + } + } + } else if (e.getSlot() == 15) { + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Upgrade With Economy")) { + if (!e.getCurrentItem().getItemMeta().getDisplayName().equals("§l")) { + eSpawner.upgrade(p, "ECO"); + p.closeInventory(); + } + } + } + } + } else if (EpicSpawners.getInstance().editing.containsKey(p)) { + if (!EpicSpawners.getInstance().subediting.containsKey(p)) { + e.setCancelled(true); + if (e.getCurrentItem().getItemMeta().getDisplayName().equals(instance.getLocale().getMessage("general.nametag.back"))) + EpicSpawners.getInstance().editor.open(p, EpicSpawners.getInstance().page.get(p)); + else if (e.getSlot() == 11) { + if (!e.getClick().isLeftClick() && !e.getClick().isRightClick()) { + String name = EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p)); + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(name) + ".Display-Item", p.getItemInHand().getType().toString()); + p.sendMessage(Arconix.pl().getApi().format().formatText(EpicSpawners.getInstance().references.getPrefix() + "&7Display Item for &6" + name + " &7set to &6" + p.getItemInHand().getType().toString() + "&7.")); + EpicSpawners.getInstance().editor.overview(p, EpicSpawners.getInstance().editing.get(p)); + } else if (e.getClick().isLeftClick()) { + EpicSpawners.getInstance().editor.editSpawnerName(p); + } + } else if (e.getSlot() == 25) + EpicSpawners.getInstance().editor.editor(p, "Entity"); + else if (e.getSlot() == 33) + EpicSpawners.getInstance().editor.editor(p, "Block"); + else if (e.getSlot() == 28) { + + boolean right = e.isRightClick(); + for (final EntityType val : EntityType.values()) { + if (val.isSpawnable() && val.isAlive()) { + if (val.name().equals(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p)))) { + right = false; + } + } + } + if (!right) { + if (EpicSpawners.getInstance().spawnerFile.getConfig().getBoolean("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Allowed")) + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Allowed", false); + else + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Allowed", true); + EpicSpawners.getInstance().editor.overview(p, EpicSpawners.getInstance().editing.get(p)); + } else { + EpicSpawners.getInstance().editor.destroy(p); + } + } else if (e.getSlot() == 23) { + EpicSpawners.getInstance().editor.basicSettings(p); + } else if (e.getSlot() == 30) { + EpicSpawners.getInstance().editor.save(p); + EpicSpawners.getInstance().editor.overview(p, EpicSpawners.getInstance().editing.get(p)); + } else if (e.getSlot() == 41) + EpicSpawners.getInstance().editor.editor(p, "Item"); + else if (e.getSlot() == 43) + EpicSpawners.getInstance().editor.editor(p, "Command"); + } else { + if (EpicSpawners.getInstance().subediting.get(p).equals("basic")) { + if (e.getInventory().equals(p.getOpenInventory().getTopInventory())) { + if (e.getCurrentItem().getItemMeta().getDisplayName().equals(instance.getLocale().getMessage("general.nametag.back"))) + EpicSpawners.getInstance().editor.overview(p, EpicSpawners.getInstance().editing.get(p)); + else if (e.getSlot() == 13) { + if (EpicSpawners.getInstance().spawnerFile.getConfig().getBoolean("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Upgradable")) + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Upgradable", false); + else + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Upgradable", true); + EpicSpawners.getInstance().editor.basicSettings(p); + } else if (e.getSlot() == 19) { + EpicSpawners.getInstance().editor.alterSetting(p, "Shop-Price"); + } else if (e.getSlot() == 20) { + if (EpicSpawners.getInstance().spawnerFile.getConfig().getBoolean("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".In-Shop")) + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".In-Shop", false); + else + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".In-Shop", true); + EpicSpawners.getInstance().editor.basicSettings(p); + } else if (e.getSlot() == 22) { + if (EpicSpawners.getInstance().spawnerFile.getConfig().getBoolean("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Spawn-On-Fire")) + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Spawn-On-Fire", false); + else + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Spawn-On-Fire", true); + EpicSpawners.getInstance().editor.basicSettings(p); + } else if (e.getSlot() == 24) { + EpicSpawners.getInstance().editor.alterSetting(p, "Custom-ECO-Cost"); + } else if (e.getSlot() == 25) { + EpicSpawners.getInstance().editor.alterSetting(p, "Custom-XP-Cost"); + } else if (e.getSlot() == 30) { + EpicSpawners.getInstance().editor.alterSetting(p, "CustomGoal"); + } else if (e.getSlot() == 32) { + EpicSpawners.getInstance().editor.alterSetting(p, "Pickup-cost"); + } + e.setCancelled(true); + } + } else { + if (e.getInventory().equals(p.getOpenInventory().getTopInventory())) { + if ((e.getSlot() < 10 || e.getSlot() > 25) || e.getSlot() == 17 || e.getSlot() == 18) { + e.setCancelled(true); + if (e.getCurrentItem().getItemMeta().getDisplayName().equals(instance.getLocale().getMessage("general.nametag.back"))) + EpicSpawners.getInstance().editor.overview(p, EpicSpawners.getInstance().editing.get(p)); + else if (e.getCurrentItem().getItemMeta().getDisplayName().equals(Arconix.pl().getApi().format().formatText("&6Add Command"))) + EpicSpawners.getInstance().editor.createCommand(p); + else if (e.getCurrentItem().getItemMeta().getDisplayName().equals(Arconix.pl().getApi().format().formatText("&6Add Entity"))) + EpicSpawners.getInstance().editor.addEntityInit(p); + else if (e.getCurrentItem().getItemMeta().getDisplayName().equals(Arconix.pl().getApi().format().formatText("&aSave"))) + EpicSpawners.getInstance().editor.saveInstance(p, EpicSpawners.getInstance().editor.getItems(p)); + else if (e.getSlot() == 40) + EpicSpawners.getInstance().editor.editChatInit(p); + else if (e.getSlot() == 49) + EpicSpawners.getInstance().editor.editSpawnLimit(p); + } + } + } + } + } else if (e.getInventory().getTitle().equals("Spawner Editor")) { + e.setCancelled(true); + int page = EpicSpawners.getInstance().page.get(p); + if (e.getSlot() == 8) { + p.closeInventory(); + } else if ((e.getCurrentItem().getType().equals(Material.SKULL_ITEM) || e.getCurrentItem().getType().equals(Material.MOB_SPAWNER)) && + !e.getCurrentItem().getItemMeta().getDisplayName().equals(instance.getLocale().getMessage("general.nametag.next")) && + !e.getCurrentItem().getItemMeta().getDisplayName().equals(instance.getLocale().getMessage("general.nametag.back"))) { + String idd = e.getCurrentItem().getItemMeta().getLore().get(1); + idd = idd.replace("§", ""); + int id = Integer.parseInt(idd); + //if (e.getClick().isLeftClick()) + EpicSpawners.getInstance().editor.overview(p, id); + } else if (e.getCurrentItem().getItemMeta().getDisplayName().equals(Arconix.pl().getApi().format().formatText("&9&lNew Spawner"))) { + EpicSpawners.getInstance().editor.overview(p, 0); + EpicSpawners.getInstance().editor.save(p); + EpicSpawners.getInstance().editor.open(p, 1); + } else if (e.getCurrentItem().getItemMeta().getDisplayName().equals(instance.getLocale().getMessage("general.nametag.back"))) { + if (page != 1) { + EpicSpawners.getInstance().editor.open(p, page - 1); + } + } else if (e.getCurrentItem().getItemMeta().getDisplayName().equals(instance.getLocale().getMessage("general.nametag.back"))) { + EpicSpawners.getInstance().editor.open(p, page + 1); + } + } else if (e.getInventory().getTitle().equals(instance.getLocale().getMessage("interface.spawnerstats.title"))) { + e.setCancelled(true); + if (e.getSlot() == 8) { + p.closeInventory(); + } + } else if (e.getInventory().getTitle().equals(instance.getLocale().getMessage("interface.shop.title"))) { + e.setCancelled(true); + ItemStack clicked = e.getCurrentItem(); + + int page = EpicSpawners.getInstance().page.get(p); + + if (e.getInventory().getType() == InventoryType.CHEST) { + if (e.getSlot() == 8) { + p.closeInventory(); + } else if (e.getCurrentItem().getItemMeta().getDisplayName().equals(instance.getLocale().getMessage("general.nametag.back"))) { + if (page != 1) { + EpicSpawners.getInstance().shop.open(p, page - 1); + } + } else if (e.getCurrentItem().getItemMeta().getDisplayName().equals(instance.getLocale().getMessage("general.nametag.next"))) { + EpicSpawners.getInstance().shop.open(p, page + 1); + } else if (e.getSlot() >= 10 && e.getSlot() <= (e.getInventory().getSize() - 10) && e.getSlot() != 17 && e.getSlot() != (e.getInventory().getSize() - 18)) + EpicSpawners.getInstance().shop.show(EpicSpawners.getInstance().getApi().getIType(clicked), 1, p); + } + } + if (e.getSlot() != 64537) { + if (e.getInventory().getType() == InventoryType.ANVIL) { + if (e.getAction() != InventoryAction.NOTHING) { + if (e.getCurrentItem().getType() != Material.AIR) { + ItemStack item = e.getCurrentItem(); + if (item.getType() == Material.MOB_SPAWNER) { + e.setCancelled(true); + } + } + } + } + } + + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + @EventHandler(priority = EventPriority.HIGHEST) + public void onClose(InventoryCloseEvent event) { + try { + final Player p = (Player) event.getPlayer(); + if (EpicSpawners.getInstance().boosting.contains(p) || EpicSpawners.getInstance().inShow.containsKey(p) || EpicSpawners.getInstance().spawnerLoc.containsKey(p)) { + EpicSpawners.getInstance().boosting.remove(p); + EpicSpawners.getInstance().inShow.remove(p); + EpicSpawners.getInstance().spawnerLoc.remove(p); + Bukkit.getScheduler().runTaskLater(EpicSpawners.getInstance(), () -> { + if (!p.getOpenInventory().getTopInventory().getType().equals(InventoryType.CHEST)) + p.closeInventory(); + }, 1L); + } + if (!p.getOpenInventory().getTopInventory().getTitle().contains("Editing")) + EpicSpawners.getInstance().editing.remove(p); + } catch (Exception e) { + Debugger.runReport(e); + } + } +} diff --git a/src/main/java/com/songoda/epicspawners/listeners/SpawnerListeners.java b/src/main/java/com/songoda/epicspawners/listeners/SpawnerListeners.java new file mode 100644 index 0000000..a85c3af --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/listeners/SpawnerListeners.java @@ -0,0 +1,339 @@ +package com.songoda.epicspawners.listeners; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.spawners.Spawner; +import com.songoda.epicspawners.spawners.SpawnerItem; +import com.songoda.epicspawners.utils.Debugger; +import com.songoda.epicspawners.utils.Methods; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.block.Block; +import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.LivingEntity; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.event.entity.EntityTargetLivingEntityEvent; +import org.bukkit.event.entity.SpawnerSpawnEvent; +import org.bukkit.metadata.FixedMetadataValue; + +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.concurrent.ThreadLocalRandom; +import java.util.function.Consumer; + +/** + * Created by songoda on 2/25/2017. + */ +public class SpawnerListeners implements Listener { + + @SuppressWarnings("unchecked") + @EventHandler + public void onSpawn(SpawnerSpawnEvent e) { + try { + String type = e.getEntityType().name(); + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(e.getSpawner().getBlock()) + ".type")) { + if (!EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(e.getSpawner().getBlock()) + ".type").equals("OMNI")) + type = EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(e.getSpawner().getBlock()) + ".type"); + } + + if (e.getEntityType() == EntityType.FALLING_BLOCK) + return; + String sloc = Arconix.pl().getApi().serialize().serializeLocation(e.getSpawner().getBlock()); + Spawner eSpawner = new Spawner(e.getSpawner().getBlock()); + + if (EpicSpawners.getInstance().dataFile.getConfig().getInt("data.spawner." + sloc) != 0) { + Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(EpicSpawners.getInstance(), eSpawner::updateDelay, 10L); + } + + if ((!e.getEntityType().equals(EntityType.IRON_GOLEM) && !e.getEntityType().equals(EntityType.GHAST) || !EpicSpawners.getInstance().getConfig().getBoolean("Entity.Use Default Minecraft Spawn Method For Large Entities")) && !e.isCancelled() && e.getLocation() != null) { + e.getEntity().remove(); + if (EpicSpawners.getInstance().getConfig().getBoolean("Spawner Drops.Allow Killing Mobs To Drop Spawners")) { + EpicSpawners.getInstance().dataFile.getConfig().set("data.Entities." + e.getEntity().getUniqueId(), true); + } + + + if (Methods.countEntitiesAroundLoation(e.getSpawner().getLocation()) < EpicSpawners.getInstance().getConfig().getInt("Main.Max Entities Around Single Spawner")) { + long lastSpawn = 1001; + if (EpicSpawners.getInstance().lastSpawn.containsKey(e.getSpawner().getLocation())) { + lastSpawn = (new Date()).getTime() - EpicSpawners.getInstance().lastSpawn.get(e.getSpawner().getLocation()).getTime(); + } + if (lastSpawn >= 1000) { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(e.getSpawner().getLocation()) + ".type") + && EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(e.getSpawner().getLocation()) + ".type").equals("OMNI")) { + List list = EpicSpawners.getInstance().getApi().convertFromList(EpicSpawners.getInstance().dataFile.getConfig().getStringList("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(e.getSpawner().getLocation()) + ".entities")); + for (SpawnerItem ent : list) { + if (ent.getType().equals(e.getSpawner().getSpawnedType())) continue; + + int high = eSpawner.getMulti(); + int low = eSpawner.getMulti(); + + if (ent.getMulti() > eSpawner.getMulti()) { + high = ent.getMulti(); + } else { + low = ent.getMulti(); + } + + String[] randomLowHigh = EpicSpawners.getInstance().getConfig().getString("Main.Random Amount Added To Each Spawn").split(":"); + + int rand = ThreadLocalRandom.current().nextInt(Integer.valueOf(randomLowHigh[0]), Integer.valueOf(randomLowHigh[1])); + int times = high - low + rand + eSpawner.getBoost(); + + for (String entt : (ArrayList) EpicSpawners.getInstance().spawnerFile.getConfig().getList("Entities." + Methods.getTypeFromString(ent.getType()) + ".entities")) { + spawnEntity(e.getSpawner().getLocation(), EntityType.valueOf(entt), times); + } + } + } + + + String[] randomLowHigh = EpicSpawners.getInstance().getConfig().getString("Main.Random Amount Added To Each Spawn").split(":"); + + int rand = ThreadLocalRandom.current().nextInt(Integer.valueOf(randomLowHigh[0]), Integer.valueOf(randomLowHigh[1])); + + String equation = EpicSpawners.getInstance().getConfig().getString("Main.Equations.Mobs Spawned Per Spawn"); + equation = equation.replace("{RAND}", rand + ""); + equation = equation.replace("{MULTI}", eSpawner.getMulti() + ""); + + int times; + if (!EpicSpawners.getInstance().cache.containsKey(equation)) { + ScriptEngineManager mgr = new ScriptEngineManager(); + ScriptEngine engine = mgr.getEngineByName("JavaScript"); + times = (int) Math.round(Double.parseDouble(engine.eval(equation).toString())); + EpicSpawners.getInstance().cache.put(equation, times); + } else { + times = EpicSpawners.getInstance().cache.get(equation); + } + int size = EpicSpawners.getInstance().spawnerFile.getConfig().getList("Entities." + Methods.getTypeFromString(type) + ".entities", new ArrayList<>()).size(); + if (size == 0) + size = 1; + times = (int) Math.ceil((times + eSpawner.getBoost()) / size); + + if (EpicSpawners.getInstance().spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(type) + ".entities")) { + for (String ent : (ArrayList) EpicSpawners.getInstance().spawnerFile.getConfig().getList("Entities." + Methods.getTypeFromString(type) + ".entities")) { + spawnEntity(e.getSpawner().getLocation(), EntityType.valueOf(ent), times); + } + } + EpicSpawners.getInstance().lastSpawn.put(e.getSpawner().getLocation(), new Date()); + } + + } + return; + } + + int spawnAmt = 1; + if (EpicSpawners.getInstance().dataFile.getConfig().getInt("data.spawnerstats." + sloc + ".spawns") != 0) { + spawnAmt = EpicSpawners.getInstance().dataFile.getConfig().getInt("data.spawnerstats." + sloc + ".spawns") + 1; + } + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + sloc + ".spawns", spawnAmt); + + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + public void spawnEntity(Location location, EntityType type, int times) { + try { + Block b = location.getBlock(); + if (b.isBlockPowered() && EpicSpawners.getInstance().getConfig().getBoolean("Main.Redstone Power Deactivates Spawners")) + return; + + String sloc = Arconix.pl().getApi().serialize().serializeLocation(location); + + int spawnAmt = 1; + if (EpicSpawners.getInstance().dataFile.getConfig().getInt("data.spawnerstats." + sloc + ".spawns") != 0) { + spawnAmt = EpicSpawners.getInstance().dataFile.getConfig().getInt("data.spawnerstats." + sloc + ".spawns") + 1; + } + int stack = 0; + if (EpicSpawners.getInstance().getServer().getPluginManager().getPlugin("StackMob") != null) { + stack = times; + times = 1; + } + int num = 0; + while (num != times) { + Location spot = null; + boolean in = false; + + int amt = 0; + while (!in && amt <= 25) { + double testX = ThreadLocalRandom.current().nextDouble(-1, 1); + double testY = ThreadLocalRandom.current().nextDouble(-1, 2); + double testZ = ThreadLocalRandom.current().nextDouble(-1, 1); + + double x = location.getX() + testX * (double) 3; + double y = location.getY() + testY; + double z = location.getZ() + testZ * (double) 3; + + spot = new Location(location.getWorld(), x, y, z); + if (canSpawn(type, spot)) + in = true; + + amt++; + } + if (in) { + + if (spot != null) { + float x = (float) (0 + (Math.random() * 1)); + float y = (float) (0 + (Math.random() * 2)); + float z = (float) (0 + (Math.random() * 1)); + Arconix.pl().getApi().packetLibrary.getParticleManager().broadcastParticle(spot, x, y, z, 0, EpicSpawners.getInstance().getConfig().getString("Entity.Spawn Particle Effect"), 5); + + Location loc = spot.clone(); + loc.subtract(0, 1, 0); + if (type.equals(EntityType.IRON_GOLEM)) { + + spot.add(.5, .5, .5); + + } else { + spot = spot.clone().getBlock().getLocation(); + + double spawnX = ThreadLocalRandom.current().nextDouble(0.4, 0.6); + double spawnZ = ThreadLocalRandom.current().nextDouble(0.4, 0.6); + + spot.add(spawnX, .5, spawnZ); + } + + spawnMob(location, spot, type, CreatureSpawnEvent.SpawnReason.SPAWNER, stack); + } + } + spawnAmt++; + num++; + } + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + sloc + ".spawns", spawnAmt); + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + private static Method spawnMethod = null; + private static Method methodGetHandle = null; + private static Method methodK = null; + + + public Entity spawnMob(Location spawnerLoc, Location loc, EntityType type, CreatureSpawnEvent.SpawnReason reason, int stack) { + try { + World world = loc.getWorld(); + Class clazz = type.getEntityClass(); + Entity e; + if (EpicSpawners.getInstance().v1_12 || EpicSpawners.getInstance().v1_11) { + if (spawnMethod == null) + spawnMethod = world.getClass().getMethod("spawn", Location.class, Class.class, Consumer.class, CreatureSpawnEvent.SpawnReason.class); + e = (Entity) spawnMethod.invoke(world, loc, clazz, null, reason); + } else { + if (spawnMethod == null) + spawnMethod = world.getClass().getMethod("spawn", Location.class, Class.class, CreatureSpawnEvent.SpawnReason.class); + e = (Entity) spawnMethod.invoke(world, loc, clazz, reason); + } + + Spawner spawner = new Spawner(spawnerLoc); + + if (spawner.isSpawningOnFire()) + e.setFireTicks(160); + + Bukkit.getScheduler().runTaskLater(EpicSpawners.getInstance(), () -> { + try { + if (!spawner.isSpawningWithAI() && !EpicSpawners.getInstance().v1_7) { + if (EpicSpawners.getInstance().v1_8) { + Class claz = e.getClass(); + + if (methodGetHandle == null) + methodGetHandle = claz.getDeclaredMethod("getHandle"); + Object nmsEntity = methodGetHandle.invoke(e); + + if (methodK == null) + methodK = nmsEntity.getClass().getMethod("k", Boolean.TYPE); + + methodK.invoke(nmsEntity, true); + } else { + ((LivingEntity) e).setAI(false); + } + } + } catch (Exception ex) { + Debugger.runReport(ex); + } + }, EpicSpawners.getInstance().getConfig().getLong("Main.Ticks Until AI Disabled")); + + if (EpicSpawners.getInstance().getServer().getPluginManager().getPlugin("StackMob") != null && stack != 0) { + uk.antiperson.stackmob.StackMob sm = ((uk.antiperson.stackmob.StackMob) Bukkit.getPluginManager().getPlugin("StackMob")); + if (!sm.config.getCustomConfig().getStringList("no-stack-types").contains(e.getType().toString())) { + e.setMetadata(uk.antiperson.stackmob.tools.extras.GlobalValues.METATAG, new FixedMetadataValue(sm, stack)); + e.setMetadata(uk.antiperson.stackmob.tools.extras.GlobalValues.NO_SPAWN_STACK, new FixedMetadataValue(sm, true)); + } + } + + if (EpicSpawners.getInstance().getConfig().getBoolean("Spawner Drops.Allow Killing Mobs To Drop Spawners")) { + EpicSpawners.getInstance().dataFile.getConfig().set("data.Entities." + e.getUniqueId(), true); + } + return e; + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + + public boolean canSpawn(EntityType type, Location location) { + boolean canSpawn = true; + try { + + String spawnBlocks = EpicSpawners.getInstance().spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(Methods.getType(type)) + ".Spawn-Block"); + + List blocks = Arrays.asList(spawnBlocks.split("\\s*,\\s*")); + + if (!Methods.isAir(location.getBlock().getType()) && (!isWater(location.getBlock().getType()) && !blocks.contains("WATER"))) { + canSpawn = false; + } + + boolean canSpawnUnder = false; + if (canSpawn != false) { + for (String block : blocks) { + Location loc = location.clone().subtract(0, 1, 0); + if (loc.getBlock().getType().toString().equalsIgnoreCase(block) || isWater(loc.getBlock().getType()) && blocks.contains("WATER")) { + canSpawnUnder = true; + } + } + canSpawn = canSpawnUnder; + } + } catch (Exception e) { + Debugger.runReport(e); + } + return canSpawn; + } + + public boolean isWater(Material type) { + try { + if (type == Material.WATER || type == Material.STATIONARY_WATER) { + return true; + } + + } catch (Exception e) { + Debugger.runReport(e); + } + return false; + } + + @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) + public void onTarget(EntityTargetLivingEntityEvent event) { + try { + if (EpicSpawners.getInstance().getConfig().getBoolean("Entity.Hostile Mobs Attack Second")) { + if (event.getEntity().getLastDamageCause() != null) { + if (event.getEntity().getLastDamageCause().getCause().name().equals("ENTITY_ATTACK")) { + return; + } + } + event.setCancelled(true); + } + } catch (Exception ex) { + Debugger.runReport(ex); + } + } +} diff --git a/src/main/java/com/songoda/epicspawners/listeners/TestListeners.java b/src/main/java/com/songoda/epicspawners/listeners/TestListeners.java new file mode 100644 index 0000000..c5dff98 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/listeners/TestListeners.java @@ -0,0 +1,59 @@ +package com.songoda.epicspawners.listeners; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.utils.Debugger; +import org.bukkit.Rotation; +import org.bukkit.entity.ItemFrame; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerInteractAtEntityEvent; +import org.bukkit.event.player.PlayerJoinEvent; + +/** + * Created by songoda on 3/13/2017. + */ +public class TestListeners implements Listener { + + @EventHandler(priority = EventPriority.HIGHEST) + public void onPlayerEntityInteract(PlayerInteractAtEntityEvent e) { + try { + if (e.getRightClicked() instanceof ItemFrame) { + if (EpicSpawners.getInstance().dataFile.getConfig().getString("data.entityshop") != null) { + String uuid = e.getRightClicked().getUniqueId().toString(); + if (EpicSpawners.getInstance().dataFile.getConfig().getString("data.entityshop." + uuid) != null) { + ((ItemFrame) e.getRightClicked()).setRotation(Rotation.CLOCKWISE_45); + EpicSpawners.getInstance().shop.show(EpicSpawners.getInstance().dataFile.getConfig().getString("data.entityshop." + uuid).toUpperCase(), 1, e.getPlayer()); + } + } + } + } catch (Exception ex) { + Debugger.runReport(ex); + } + } + + + @EventHandler + public void onPlayerJoin(PlayerJoinEvent e) { + try { + Player p = e.getPlayer(); + if (p.isOp() && EpicSpawners.getInstance().getConfig().getBoolean("Main.Display Helpful Tips For Operators")) { + if (EpicSpawners.getInstance().getServer().getPluginManager().getPlugin("Factions") != null && EpicSpawners.getInstance().hooks.FactionsHook == null) { + p.sendMessage(""); + p.sendMessage(Arconix.pl().getApi().format().formatText(EpicSpawners.getInstance().references.getPrefix() + "&7Here's the deal,")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7I cannot give you full support for Factions out of the box.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Things will work without it but if you wan't a flawless")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7experience you need to download")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7&6https://www.spigotmc.org/resources/54337/&7.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7If you don't care and don't want to see this message again")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7turn &6Helpful-Tips &7off in the config.")); + p.sendMessage(""); + } + } + } catch (Exception ee) { + Debugger.runReport(ee); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicspawners/spawners/Shop.java b/src/main/java/com/songoda/epicspawners/spawners/Shop.java new file mode 100644 index 0000000..f83f83e --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/spawners/Shop.java @@ -0,0 +1,343 @@ +package com.songoda.epicspawners.spawners; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.utils.Debugger; +import com.songoda.epicspawners.utils.Methods; +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.inventory.meta.SkullMeta; +import org.bukkit.plugin.RegisteredServiceProvider; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by songoda on 3/10/2017. + */ +public class Shop { + + private EpicSpawners instance; + + public Shop(EpicSpawners instance) { + this.instance = instance; + } + + public void open(Player p, int page) { + try { + EpicSpawners.getInstance().page.put(p, page); + + List entities = new ArrayList<>(); + + int num = 0; + int show = 0; + int start = (page - 1) * 32; + ConfigurationSection cs = EpicSpawners.getInstance().spawnerFile.getConfig().getConfigurationSection("Entities"); + for (String value : cs.getKeys(false)) { + if (!value.toLowerCase().equals("omni") + && EpicSpawners.getInstance().spawnerFile.getConfig().getBoolean("Entities." + Methods.getTypeFromString(value) + ".In-Shop") + && (p.hasPermission("epicspawners.*") || p.hasPermission("epicspawners.shop.*") + || p.hasPermission("epicspawners.shop." + Methods.getTypeFromString(value).replaceAll(" ", "_")))) { + if (num >= start && show <= 32) { + entities.add(value); + show++; + } + } + num++; + + + } + + int amt = entities.size(); + String title = Arconix.pl().getApi().format().formatTitle(instance.getLocale().getMessage("interface.shop.title")); + Inventory i = Bukkit.createInventory(null, 54, title); + int max2 = 54; + if (amt <= 7) { + i = Bukkit.createInventory(null, 27, title); + max2 = 27; + } else if (amt <= 15) { + i = Bukkit.createInventory(null, 36, title); + max2 = 36; + } else if (amt <= 25) { + i = Bukkit.createInventory(null, 45, title); + max2 = 45; + } + + final int max22 = max2; + int place = 10; + for (String value : entities) { + if (place == 17) + place++; + if (place == (max22 - 18)) + place++; + + + ItemStack it = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + + ItemStack item = EpicSpawners.getInstance().heads.addTexture(it, Methods.getTypeFromString(value)); + + + if (EpicSpawners.getInstance().spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(value) + ".Display-Item") != null) { + Material mat = Material.valueOf(EpicSpawners.getInstance().spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(value) + ".Display-Item")); + if (!mat.equals(Material.AIR)) + item = new ItemStack(mat, 1); + } + + ItemMeta itemmeta = item.getItemMeta(); + String name = Methods.compileName(value, 0, true); + ArrayList lore = new ArrayList<>(); + double price = EpicSpawners.getInstance().spawnerFile.getConfig().getDouble("Entities." + Methods.getTypeFromString(value) + ".Shop-Price"); + lore.add(Arconix.pl().getApi().format().formatText(instance.getLocale().getMessage("interface.shop.buyprice", Arconix.pl().getApi().format().formatEconomy(price)))); + String loreString = instance.getLocale().getMessage("interface.shop.lore", Methods.getTypeFromString(Methods.getTypeFromString(value))); + if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) { + loreString = me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(p, loreString.replace(" ", "_")).replace("_", " "); + } + lore.add(loreString); + itemmeta.setLore(lore); + itemmeta.setDisplayName(name); + item.setItemMeta(itemmeta); + i.setItem(place, item); + place++; + } + + int max = (int) Math.ceil((double) num / (double) 36); + num = 0; + while (num != 9) { + i.setItem(num, Methods.getGlass()); + num++; + } + int num2 = max2 - 9; + while (num2 != max2) { + i.setItem(num2, Methods.getGlass()); + num2++; + } + + ItemStack exit = new ItemStack(Material.valueOf(EpicSpawners.getInstance().getConfig().getString("Interfaces.Exit Icon")), 1); + ItemMeta exitmeta = exit.getItemMeta(); + exitmeta.setDisplayName(instance.getLocale().getMessage("general.nametag.exit")); + exit.setItemMeta(exitmeta); + + ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + ItemStack skull = head; + if (!EpicSpawners.getInstance().v1_7) + skull = Arconix.pl().getApi().getGUI().addTexture(head, "http://textures.minecraft.net/texture/1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b"); + SkullMeta skullMeta = (SkullMeta) skull.getItemMeta(); + if (EpicSpawners.getInstance().v1_7) + skullMeta.setOwner("MHF_ArrowRight"); + skull.setDurability((short) 3); + skullMeta.setDisplayName(instance.getLocale().getMessage("general.nametag.next")); + skull.setItemMeta(skullMeta); + + ItemStack head2 = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + ItemStack skull2 = head2; + if (!EpicSpawners.getInstance().v1_7) + skull2 = Arconix.pl().getApi().getGUI().addTexture(head2, "http://textures.minecraft.net/texture/3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23"); + SkullMeta skull2Meta = (SkullMeta) skull2.getItemMeta(); + if (EpicSpawners.getInstance().v1_7) + skull2Meta.setOwner("MHF_ArrowLeft"); + skull2.setDurability((short) 3); + skull2Meta.setDisplayName(instance.getLocale().getMessage("general.nametag.back")); + skull2.setItemMeta(skull2Meta); + + i.setItem(8, exit); + + i.setItem(0, Methods.getBackgroundGlass(true)); + i.setItem(1, Methods.getBackgroundGlass(true)); + i.setItem(9, Methods.getBackgroundGlass(true)); + + i.setItem(7, Methods.getBackgroundGlass(true)); + i.setItem(17, Methods.getBackgroundGlass(true)); + + i.setItem(max22 - 18, Methods.getBackgroundGlass(true)); + i.setItem(max22 - 9, Methods.getBackgroundGlass(true)); + i.setItem(max22 - 8, Methods.getBackgroundGlass(true)); + + i.setItem(max22 - 10, Methods.getBackgroundGlass(true)); + i.setItem(max22 - 2, Methods.getBackgroundGlass(true)); + i.setItem(max22 - 1, Methods.getBackgroundGlass(true)); + + i.setItem(2, Methods.getBackgroundGlass(false)); + i.setItem(6, Methods.getBackgroundGlass(false)); + i.setItem(max22 - 7, Methods.getBackgroundGlass(false)); + i.setItem(max22 - 3, Methods.getBackgroundGlass(false)); + + if (page != 1) { + i.setItem(max22 - 8, skull2); + } + if (page != max) { + i.setItem(max22 - 2, skull); + } + + p.openInventory(i); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void show(String type, int amt, Player p) { + try { + Inventory i = Bukkit.createInventory(null, 45, Arconix.pl().getApi().format().formatTitle(instance.getLocale().getMessage("interface.shop.spawnershowtitle", Methods.compileName(type, 1, false)))); + + int num = 0; + while (num != 9) { + i.setItem(num, Methods.getGlass()); + num++; + } + + num = 36; + while (num != 45) { + i.setItem(num, Methods.getGlass()); + num++; + } + + i.setItem(1, Methods.getBackgroundGlass(true)); + i.setItem(9, Methods.getBackgroundGlass(true)); + + i.setItem(7, Methods.getBackgroundGlass(true)); + i.setItem(17, Methods.getBackgroundGlass(true)); + + i.setItem(27, Methods.getBackgroundGlass(true)); + i.setItem(36, Methods.getBackgroundGlass(true)); + i.setItem(37, Methods.getBackgroundGlass(true)); + + i.setItem(35, Methods.getBackgroundGlass(true)); + i.setItem(43, Methods.getBackgroundGlass(true)); + i.setItem(44, Methods.getBackgroundGlass(true)); + + i.setItem(2, Methods.getBackgroundGlass(false)); + i.setItem(6, Methods.getBackgroundGlass(false)); + i.setItem(38, Methods.getBackgroundGlass(false)); + i.setItem(42, Methods.getBackgroundGlass(false)); + + double price = EpicSpawners.getInstance().spawnerFile.getConfig().getDouble("Entities." + Methods.getTypeFromString(type) + ".Shop-Price") * amt; + + ItemStack it = new ItemStack(Material.SKULL_ITEM, amt, (byte) 3); + + + ItemStack item = EpicSpawners.getInstance().heads.addTexture(it, Methods.getTypeFromString(type)); + + + if (EpicSpawners.getInstance().spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(type) + ".Display-Item") != null) { + Material mat = Material.valueOf(EpicSpawners.getInstance().spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(type) + ".Display-Item")); + if (!mat.equals(Material.AIR)) + item = new ItemStack(mat, 1); + } + + item.setAmount(amt); + ItemMeta itemmeta = item.getItemMeta(); + String name = Methods.compileName(type, 0, false); + itemmeta.setDisplayName(name); + ArrayList lore = new ArrayList<>(); + lore.add(instance.getLocale().getMessage("interface.shop.buyprice", Arconix.pl().getApi().format().formatEconomy(price))); + itemmeta.setLore(lore); + item.setItemMeta(itemmeta); + i.setItem(22, item); + + ItemStack plus = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 5); + ItemMeta plusmeta = plus.getItemMeta(); + plusmeta.setDisplayName(instance.getLocale().getMessage("interface.shop.add1")); + plus.setItemMeta(plusmeta); + if (item.getAmount() + 1 <= 64) { + i.setItem(15, plus); + } + + plus = new ItemStack(Material.STAINED_GLASS_PANE, 10, (short) 5); + plusmeta.setDisplayName(instance.getLocale().getMessage("interface.shop.add10")); + plus.setItemMeta(plusmeta); + if (item.getAmount() + 10 <= 64) { + i.setItem(33, plus); + } + + plus = new ItemStack(Material.STAINED_GLASS_PANE, 64, (short) 5); + plusmeta.setDisplayName(instance.getLocale().getMessage("interface.shop.set64")); + plus.setItemMeta(plusmeta); + if (item.getAmount() != 64) { + i.setItem(25, plus); + } + + ItemStack minus = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 14); + ItemMeta minusmeta = minus.getItemMeta(); + minusmeta.setDisplayName(instance.getLocale().getMessage("interface.shop.remove1")); + minus.setItemMeta(minusmeta); + if (item.getAmount() != 1) { + i.setItem(11, minus); + } + + minus = new ItemStack(Material.STAINED_GLASS_PANE, 10, (short) 14); + minusmeta.setDisplayName(instance.getLocale().getMessage("interface.shop.remove10")); + minus.setItemMeta(minusmeta); + if (item.getAmount() - 10 >= 0) { + i.setItem(29, minus); + } + + minus = new ItemStack(Material.STAINED_GLASS_PANE, 1, (short) 14); + minusmeta.setDisplayName(instance.getLocale().getMessage("interface.shop.set1")); + minus.setItemMeta(minusmeta); + if (item.getAmount() != 1) { + i.setItem(19, minus); + } + + ItemStack exit = new ItemStack(Material.valueOf(EpicSpawners.getInstance().getConfig().getString("Interfaces.Exit Icon")), 1); + ItemMeta exitmeta = exit.getItemMeta(); + exitmeta.setDisplayName(instance.getLocale().getMessage("general.nametag.exit")); + exit.setItemMeta(exitmeta); + i.setItem(8, exit); + + ItemStack head2 = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + ItemStack skull2 = head2; + if (!EpicSpawners.getInstance().v1_7) + skull2 = Arconix.pl().getApi().getGUI().addTexture(head2, "http://textures.minecraft.net/texture/3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23"); + SkullMeta skull2Meta = (SkullMeta) skull2.getItemMeta(); + if (EpicSpawners.getInstance().v1_7) + skull2Meta.setOwner("MHF_ArrowLeft"); + skull2.setDurability((short) 3); + skull2Meta.setDisplayName(instance.getLocale().getMessage("general.nametag.back")); + skull2.setItemMeta(skull2Meta); + + i.setItem(0, skull2); + + ItemStack buy = new ItemStack(Material.valueOf(EpicSpawners.getInstance().getConfig().getString("Interfaces.Buy Icon")), 1); + ItemMeta buymeta = buy.getItemMeta(); + buymeta.setDisplayName(instance.getLocale().getMessage("general.nametag.confirm")); + buy.setItemMeta(buymeta); + i.setItem(40, buy); + + p.openInventory(i); + EpicSpawners.getInstance().inShow.put(p, type); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void confirm(Player p, int amt) { + try { + String type = EpicSpawners.getInstance().inShow.get(p); + if (EpicSpawners.getInstance().getServer().getPluginManager().getPlugin("Vault") == null) { + p.sendMessage("Vault is not installed."); + return; + } + RegisteredServiceProvider rsp = EpicSpawners.getInstance().getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class); + net.milkbowl.vault.economy.Economy econ = rsp.getProvider(); + double price = EpicSpawners.getInstance().spawnerFile.getConfig().getDouble("Entities." + Methods.getTypeFromString(type) + ".Shop-Price") * amt; + if (!p.isOp() && !econ.has(p, price)) { + p.sendMessage(EpicSpawners.getInstance().references.getPrefix() + instance.getLocale().getMessage("event.shop.cannotafford")); + return; + } + ItemStack item = EpicSpawners.getInstance().getApi().newSpawnerItem(type, amt); + p.getInventory().addItem(item); + + p.sendMessage(EpicSpawners.getInstance().references.getPrefix() + instance.getLocale().getMessage("event.shop.purchasesuccess")); + + if (!p.isOp()) { + econ.withdrawPlayer(p, price); + } + } catch (Exception e) { + Debugger.runReport(e); + } + } +} diff --git a/src/main/java/com/songoda/epicspawners/spawners/Spawner.java b/src/main/java/com/songoda/epicspawners/spawners/Spawner.java new file mode 100644 index 0000000..c3e8f6e --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/spawners/Spawner.java @@ -0,0 +1,1373 @@ +package com.songoda.epicspawners.spawners; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.utils.Debugger; +import com.songoda.epicspawners.utils.Methods; +import org.bukkit.*; +import org.bukkit.block.Block; +import org.bukkit.block.CreatureSpawner; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.inventory.meta.SkullMeta; +import org.bukkit.plugin.RegisteredServiceProvider; + +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Created by songoda on 2/24/2017. + */ +public class Spawner { + + Location location = null; + public String locationStr = null; + public CreatureSpawner spawner = null; + public String spawnedType = null; + public String spawnedTypeU = null; + + public Spawner() { + } + + public Spawner(Block b) { + try { + if (b != null) { + if (b.getType() == Material.MOB_SPAWNER) { + String loc = Arconix.pl().getApi().serialize().serializeLocation(b); + defineBlockInformation(loc); + } + } + + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public Spawner(Location location) { + try { + if (location.getBlock() != null) { + if (location.getBlock().getType() == Material.MOB_SPAWNER) { + String loc = Arconix.pl().getApi().serialize().serializeLocation(location.getBlock()); + defineBlockInformation(loc); + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + private void defineBlockInformation(String loc) { + try { + locationStr = loc; + location = Arconix.pl().getApi().serialize().unserializeLocation(loc); + + spawner = (CreatureSpawner) location.getBlock().getState(); + + spawnedType = Methods.getType(spawner.getSpawnedType()); + spawnedTypeU = spawner.getSpawnedType().name(); + + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".type")) { + if (EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".type").equals("OMNI")) { + spawnedType = "Omni"; + spawnedTypeU = "OMNI"; + } else { + spawnedType = Methods.getTypeFromString(EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".type")); + spawnedTypeU = EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".type"); + } + } + + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public boolean isSpawningOnFire() { + try { + return EpicSpawners.getInstance().spawnerFile.getConfig().getBoolean("Entities." + Methods.getTypeFromString(Methods.getTypeFromString(spawnedType)) + ".Spawn-On-Fire"); + } catch (Exception e) { + Debugger.runReport(e); + } + return false; + } + + public boolean isSpawningWithAI() { + try { + return EpicSpawners.getInstance().spawnerFile.getConfig().getBoolean("Entities." + Methods.getTypeFromString(Methods.getTypeFromString(spawnedType)) + ".Has-AI"); + } catch (Exception e) { + Debugger.runReport(e); + } + return false; + } + + public int getMulti() { + try { + return EpicSpawners.getInstance().dataFile.getConfig().getInt("data.spawner." + locationStr); + } catch (Exception e) { + Debugger.runReport(e); + } + return 0; + } + + public int getSpawns() { + try { + return EpicSpawners.getInstance().dataFile.getConfig().getInt("data.spawnerstats." + locationStr + ".spawns"); + } catch (Exception e) { + Debugger.runReport(e); + } + return 0; + } + + public void updateDelay() { + try { + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Default Minecraft Spawner Cooldowns")) { + int multi = getMulti(); + + if (getMulti() == 0) + multi = 1; + + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + locationStr + ".type")) { + if (EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + locationStr + ".type").equals("OMNI")) { + List list = EpicSpawners.getInstance().getApi().convertFromList(EpicSpawners.getInstance().dataFile.getConfig().getStringList("data.spawnerstats." + locationStr + ".entities")); + for (SpawnerItem ent : list) { + if (multi > ent.getMulti()) + multi = ent.getMulti(); + } + } + } + + String equation = EpicSpawners.getInstance().getConfig().getString("Main.Equations.Cooldown Between Spawns"); + if (getSpawner() != null) { + + int delay; + if (!EpicSpawners.getInstance().cache.containsKey(equation)) { + ScriptEngineManager mgr = new ScriptEngineManager(); + ScriptEngine engine = mgr.getEngineByName("JavaScript"); + Random rand = new Random(); + equation = equation.replace("{DEFAULT}", Integer.toString(rand.nextInt(800) + 200)); + equation = equation.replace("{MULTI}", Integer.toString(multi)); + delay = (int) Math.round(Double.parseDouble(engine.eval(equation).toString())); + EpicSpawners.getInstance().cache.put(equation, delay); + } else { + delay = EpicSpawners.getInstance().cache.get(equation); + } + + getSpawner().setDelay(delay); + update(); + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public boolean processCombine(Player p, ItemStack item, ItemStack item2) { + try { + EpicSpawners instance = EpicSpawners.getInstance(); + + if (instance.getConfig().getBoolean("Main.OmniSpawners Enabled")) { + if (instance.getApi().getIType(item).equals("OMNI") && !instance.getApi().isOmniBlock(location) || instance.getApi().getIType(item2).equals("OMNI") && !instance.getApi().isOmniBlock(location)) { + if (instance.getApi().getIType(item).equals("OMNI") && instance.getApi().getIType(item2).equals("OMNI")) { + return false; + } else { + if (instance.getApi().getType(item).equals("OMNI")) { + if (instance.getApi().addOmniSpawner(new SpawnerItem(instance.getApi().getType(item2), instance.getApi().getIMulti(item2)), item) != null) { + item2.setItemMeta(instance.getApi().addOmniSpawner(new SpawnerItem(instance.getApi().getType(item2), instance.getApi().getIMulti(item2)), item).getItemMeta()); + return true; + } + } else { + if (instance.getApi().addOmniSpawner(new SpawnerItem(instance.getApi().getType(item), instance.getApi().getIMulti(item)), item2) != null) { + item2.setItemMeta(instance.getApi().addOmniSpawner(new SpawnerItem(instance.getApi().getType(item), instance.getApi().getIMulti(item)), item2).getItemMeta()); + return true; + } + } + return false; + } + } + } + + int bmulti; + String btype; + if (item2 == null) { + if (instance.dataFile.getConfig().contains("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(getSpawner().getBlock()) + ".type")) + btype = instance.dataFile.getConfig().getString("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(getSpawner().getBlock()) + ".type"); + else + btype = getSpawner().getSpawnedType().name(); + bmulti = getMulti(); + } else { + btype = instance.getApi().getType(item2); + bmulti = instance.getApi().getIMulti(item2); + } + + if (instance.getApi().isOmniBlock(location)) { + if (instance.getConfig().getBoolean("Main.OmniSpawners Enabled")) { + if (instance.getApi().getIType(item).equals("OMNI")) { + p.sendMessage(instance.getLocale().getMessage("event.omni.cannotmerge")); + return false; + } + List spawners = instance.getApi().convertFromList(instance.dataFile.getConfig().getStringList("data.spawnerstats." + locationStr + ".entities")); + + if (instance.getApi().addOmniSpawner(new SpawnerItem(instance.getApi().getType(item), instance.getApi().getIMulti(item)), instance.getApi().newOmniSpawner(spawners)) == null) { + p.sendMessage(instance.getLocale().getMessage("event.omni.combinefail")); + } else { + instance.getApi().saveCustomSpawner(instance.getApi().addOmniSpawner(new SpawnerItem(instance.getApi().getType(item), instance.getApi().getIMulti(item)), instance.getApi().newOmniSpawner(spawners)), location.getBlock()); + p.sendMessage(instance.getLocale().getMessage("event.omni.combinesuccess")); + if (item2 == null) { + if (p.getItemInHand().getType().equals(Material.MOB_SPAWNER)) + Methods.takeItem(p, 1); + } + } + } + } else { + int imulti = instance.getApi().getIMulti(item); + int newMulti = bmulti + imulti; + + String itype = instance.getApi().getType(item); + + if (!btype.equals(itype)) { + + if (instance.getConfig().getBoolean("Main.OmniSpawners Enabled")) { + if (item2 != null) { + item2.setItemMeta(instance.getApi().newOmniSpawner(new SpawnerItem(btype, bmulti), new SpawnerItem(itype, imulti)).getItemMeta()); //here + return true; + } else { + instance.getApi().saveCustomSpawner(instance.getApi().newOmniSpawner(new SpawnerItem(btype, bmulti), new SpawnerItem(itype, imulti)), location.getBlock()); + instance.holo.processChange(location.getBlock()); + if (p.getItemInHand().getType().equals(Material.MOB_SPAWNER)) + Methods.takeItem(p, 1); + return false; + } + } else { + p.sendMessage(instance.getLocale().getMessage("&7These spawners cannot be combined because they're different mobs.")); + } + } else { + if (newMulti <= instance.getConfig().getInt("Main.Spawner Max Upgrade")) { + if (p.getGameMode() != GameMode.CREATIVE) { + if (p.getItemInHand().getType().equals(Material.MOB_SPAWNER)) + Methods.takeItem(p, 1); + } + upgradeFinal(p, bmulti, newMulti, item, item2); + return true; + } else { + if (bmulti == instance.getConfig().getInt("Main.Spawner Max Upgrade")) { + p.sendMessage(instance.getLocale().getMessage("event.upgrade.maxed")); + } else { + if (p.getGameMode() != GameMode.CREATIVE) { + if (p.getItemInHand().getType().equals(Material.MOB_SPAWNER)) + Methods.takeItem(p, 1); + } + int newamt = imulti - (instance.getConfig().getInt("Main.Spawner Max Upgrade") - bmulti); + ItemStack spawnerItem = new ItemStack(Material.MOB_SPAWNER); + ItemMeta itemMeta = spawnerItem.getItemMeta(); + String name = Methods.compileName(itype, newamt, true); + itemMeta.setDisplayName(name); + spawnerItem.setItemMeta(itemMeta); + p.getInventory().addItem(spawnerItem); + upgradeFinal(p, bmulti, instance.getConfig().getInt("Main.Spawner Max Upgrade"), item, item2); + return true; + } + } + } + } + + } catch (Exception e) { + Debugger.runReport(e); + } + return false; + } + + public void upgrade(Player p, String type) { + try { + int multi = getMulti(); + if (multi == 0) { + multi = 1; + } + String typ = spawnedType; + + + int cost = getCost(type, typ, multi); + + boolean maxed = false; + + if (multi == EpicSpawners.getInstance().getConfig().getInt("Main.Spawner Max Upgrade")) { + maxed = true; + } + if (maxed) { + p.sendMessage(EpicSpawners.getInstance().getLocale().getMessage("event.upgrade.maxed")); + } else { + if (type.equals("ECO")) { + if (EpicSpawners.getInstance().getServer().getPluginManager().getPlugin("Vault") != null) { + RegisteredServiceProvider rsp = EpicSpawners.getInstance().getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class); + net.milkbowl.vault.economy.Economy econ = rsp.getProvider(); + if (econ.has(p, cost)) { + econ.withdrawPlayer(p, cost); + upgradeFinal(p, multi, multi + 1, null, null); + } else { + p.sendMessage(EpicSpawners.getInstance().getLocale().getMessage("event.upgrade.cannotafford")); + } + } else { + p.sendMessage("Vault is not installed."); + } + } else if (type.equals("XP")) { + if (p.getLevel() >= cost || p.getGameMode() == GameMode.CREATIVE) { + if (p.getGameMode() != GameMode.CREATIVE) { + p.setLevel(p.getLevel() - cost); + } + upgradeFinal(p, multi, multi + 1, null, null); + } else { + p.sendMessage(EpicSpawners.getInstance().getLocale().getMessage("event.upgrade.cannotafford")); + } + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public boolean canBreak() { + try { + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Only Drop Placed Spawners")) { + return EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawner." + locationStr); + } + } catch (Exception e) { + Debugger.runReport(e); + } + return true; + } + + public boolean canCharge() { + try { + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Only Charge Natural Spawners")) { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawner." + locationStr)) { + return false; + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + return true; + } + + public void upgradeFinal(Player p, int oldMulti, int multi, ItemStack item, ItemStack item2) { + try { + String amt = Integer.toString(multi); + + if ((EpicSpawners.getInstance().getConfig().getBoolean("Main.Named Spawners Tiers")) && multi >= 0) { + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Named Spawners Tiers") && EpicSpawners.getInstance().getConfig().getStringList("Main.Tier Names").size() + 1 > multi) { + amt = EpicSpawners.getInstance().getConfig().getStringList("Main.Tier Names").get(multi - 1); + } + } + if (multi != EpicSpawners.getInstance().getConfig().getInt("Main.Spawner Max Upgrade")) { + p.sendMessage(EpicSpawners.getInstance().getLocale().getMessage("event.upgrade.success", amt)); + } else { + p.sendMessage(EpicSpawners.getInstance().getLocale().getMessage("event.upgrade.successmaxed", amt)); + } + if (item2 == null) { + SpawnerChangeEvent event = new SpawnerChangeEvent(location, p, multi, oldMulti); + Bukkit.getPluginManager().callEvent(event); + if (event.isCancelled()) { + return; + } + + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawner." + locationStr, multi); + Location loc = location.clone(); + loc.setX(loc.getX() + .5); + loc.setY(loc.getY() + .5); + loc.setZ(loc.getZ() + .5); + if (!EpicSpawners.getInstance().v1_8 && !EpicSpawners.getInstance().v1_7) { + p.getWorld().spawnParticle(org.bukkit.Particle.valueOf(EpicSpawners.getInstance().getConfig().getString("Main.Upgrade Particle Type")), loc, 100, .5, .5, .5); + } else { + p.getWorld().playEffect(loc, org.bukkit.Effect.valueOf(EpicSpawners.getInstance().getConfig().getString("Main.Upgrade Particle Type")), 1, 0); + //Doesn't resolve --Nova + //p.getWorld().spigot().playEffect(loc, org.bukkit.Effect.valueOf(EpicSpawners.getInstance().getConfig().getString("Main.Upgrade Particle Type")), 1, 0, (float) 1, (float) 1, (float) 1, 1, 100, 10); + } + float x = (float) (0 + (Math.random() * 1)); + float y = (float) (0 + (Math.random() * 2)); + float z = (float) (0 + (Math.random() * 1)); + Arconix.pl().getApi().packetLibrary.getParticleManager().broadcastParticle(loc, x, y, z, 0, EpicSpawners.getInstance().getConfig().getString("Entity.Spawn Particle Effect"), 15); + } else { + ItemMeta meta = item.getItemMeta().clone(); + meta.setDisplayName(Methods.compileName(EpicSpawners.getInstance().getApi().getType(item.clone()), multi, true)); + item2.setItemMeta(meta); + } + if (!EpicSpawners.getInstance().getConfig().getBoolean("Main.Sounds Enabled")) { + return; + } + if (multi != EpicSpawners.getInstance().getConfig().getInt("Main.Spawner Max Upgrade")) { + if (!EpicSpawners.getInstance().v1_8 && !EpicSpawners.getInstance().v1_7) { + p.playSound(p.getLocation(), Sound.ENTITY_PLAYER_LEVELUP, 0.6F, 15.0F); + } else { + p.playSound(p.getLocation(), Sound.valueOf("LEVEL_UP"), 2F, 15.0F); + } + } else { + if (!EpicSpawners.getInstance().v1_10 && !EpicSpawners.getInstance().v1_9 && !EpicSpawners.getInstance().v1_8 && !EpicSpawners.getInstance().v1_7) { + p.playSound(p.getLocation(), Sound.ENTITY_PLAYER_LEVELUP, 2F, 25.0F); + p.playSound(p.getLocation(), Sound.BLOCK_NOTE_CHIME, 2F, 25.0F); + Bukkit.getScheduler().scheduleSyncDelayedTask(EpicSpawners.getInstance(), () -> p.playSound(p.getLocation(), Sound.BLOCK_NOTE_CHIME, 1.2F, 35.0F), 5L); + Bukkit.getScheduler().scheduleSyncDelayedTask(EpicSpawners.getInstance(), () -> p.playSound(p.getLocation(), Sound.BLOCK_NOTE_CHIME, 1.8F, 35.0F), 10L); + } else { + p.playSound(p.getLocation(), Sound.valueOf("LEVEL_UP"), 2F, 25.0F); + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public Date getBoostEnd() { + try { + if (!EpicSpawners.getInstance().dataFile.getConfig().contains("data.boosts")) { + return null; + } + ConfigurationSection cs = EpicSpawners.getInstance().dataFile.getConfig().getConfigurationSection("data.boosts"); + for (String key : cs.getKeys(true)) { + if (!EpicSpawners.getInstance().dataFile.getConfig().contains("data.boosts." + key + ".boosted")) { + continue; + } + long endd = EpicSpawners.getInstance().dataFile.getConfig().getLong("data.boosts." + key + ".end"); + Date end; + Calendar calendar = Calendar.getInstance(); + calendar.setTimeInMillis(endd); + end = calendar.getTime(); + return end; + } + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public String getOmniState() { + try { + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + locationStr + ".OmniState")) { + return EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + locationStr + ".OmniState"); + } + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public void setOmniState(String state) { + try { + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + locationStr + ".OmniState", state); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public int getBoost() { + try { + if (!EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + locationStr + ".player")) { + return 0; + } + OfflinePlayer p = Bukkit.getOfflinePlayer(UUID.fromString(EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + locationStr + ".player"))); + if (!EpicSpawners.getInstance().dataFile.getConfig().contains("data.boosts")) { + return 0; + } + ConfigurationSection cs = EpicSpawners.getInstance().dataFile.getConfig().getConfigurationSection("data.boosts"); + for (String key : cs.getKeys(false)) { + if (!EpicSpawners.getInstance().dataFile.getConfig().contains("data.boosts." + key + ".boosted")) { + continue; + } + + int boost = EpicSpawners.getInstance().dataFile.getConfig().getInt("data.boosts." + key + ".boosted"); + + Date today = new Date(); + Date end = getBoostEnd(); + if (today.after(end)) { + EpicSpawners.getInstance().dataFile.getConfig().set("data.boosts." + key, null); + continue; + } + + boolean go = false; + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.boosts." + key + ".player")) { + OfflinePlayer p2 = Bukkit.getOfflinePlayer(UUID.fromString(EpicSpawners.getInstance().dataFile.getConfig().getString("data.boosts." + key + ".player"))); + if (p2.equals(p)) + go = true; + } else if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.boosts." + key + ".faction")) { + String id = EpicSpawners.getInstance().dataFile.getConfig().getString("data.boosts." + key + ".faction"); + if (EpicSpawners.getInstance().hooks.isInFaction(id, location)) + go = true; + } else if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.boosts." + key + ".town")) { + String id = EpicSpawners.getInstance().dataFile.getConfig().getString("data.boosts." + key + ".town"); + if (EpicSpawners.getInstance().hooks.isInTown(id, location)) + go = true; + } else if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.boosts." + key + ".island")) { + String id = EpicSpawners.getInstance().dataFile.getConfig().getString("data.boosts." + key + ".island"); + if (EpicSpawners.getInstance().hooks.isInIsland(id, location)) + go = true; + } else if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.boosts." + key + ".location")) { + String loc = EpicSpawners.getInstance().dataFile.getConfig().getString("data.boosts." + key + ".location"); + if (loc.equals(locationStr)) + go = true; + } + if (go) { + return boost; + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + return 0; + } + + public void downgradeFinal(Player p, int multi, int oldMulti, String type) { + try { + EpicSpawners.getInstance().holo.processChange(location.getBlock()); + if (multi >= 1) { + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawner." + locationStr, multi); + + if (type.equals("Omni")) { + List spawners = EpicSpawners.getInstance().getApi().convertFromList(EpicSpawners.getInstance().dataFile.getConfig().getStringList("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".entities")); + List items = EpicSpawners.getInstance().getApi().getOmniList(EpicSpawners.getInstance().getApi().newOmniSpawner(spawners)); + List items2 = EpicSpawners.getInstance().getApi().removeOmni(EpicSpawners.getInstance().getApi().newOmniSpawner(spawners)); + if (items.size() != 0) { + p.sendMessage(EpicSpawners.getInstance().getLocale().getMessage("event.omni.takespawner", Methods.compileName(items.get(items.size() - 1).getType(), items.get(items.size() - 1).getMulti(), true))); + EpicSpawners.getInstance().getApi().clearOmni(location); + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawner." + Arconix.pl().getApi().serialize().serializeLocation(location), EpicSpawners.getInstance().getApi().getIMulti(items2.get(1))); + + + boolean isCustom = false; + try { + setSpawner(EntityType.valueOf(type)); + } catch (Exception ex) { + isCustom = true; + } + if (isCustom) { + setSpawner(EntityType.valueOf("DROPPED_ITEM")); + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".type", EpicSpawners.getInstance().getApi().getIType(items2.get(1))); + } else { + getSpawner().setSpawnedType(EntityType.valueOf(EpicSpawners.getInstance().getApi().getIType(items2.get(1)))); + } + spawner.update(); + } + } else { + String amt = Integer.toString(multi); + + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Named Spawners Tiers")) { + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Named Spawners Tiers") && EpicSpawners.getInstance().getConfig().getStringList("Main.Tier Names").size() + 1 > multi) { + amt = EpicSpawners.getInstance().getConfig().getStringList("Main.Tier Names").get(multi - 1); + } + } + p.sendMessage(EpicSpawners.getInstance().getLocale().getMessage("event.downgrade.success", Arconix.pl().getApi().format().formatText(amt))); + } + } else { + SpawnerChangeEvent event = new SpawnerChangeEvent(location, p, multi, oldMulti); + Bukkit.getPluginManager().callEvent(event); + if (event.isCancelled()) { + return; + } + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Alerts On Place And Break")) { + + p.sendMessage(EpicSpawners.getInstance().getLocale().getMessage("event.block.break", Methods.compileName(type, oldMulti, true))); + } + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + locationStr, null); + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawner." + locationStr, null); + + Location nloc = location.clone(); + nloc.add(.5, -.4, .5); + + List near = (List) nloc.getWorld().getNearbyEntities(nloc, 8, 8, 8); + for (Entity e : near) { + if (e.getLocation().getX() == nloc.getX() && e.getLocation().getY() == nloc.getY() && e.getLocation().getZ() == nloc.getZ()) { + e.remove(); + } + } + } + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Sounds Enabled")) { + if (!EpicSpawners.getInstance().v1_8 && !EpicSpawners.getInstance().v1_7) { + p.playSound(p.getLocation(), Sound.ENTITY_ARROW_HIT_PLAYER, 0.6F, 15.0F); + } else { + p.playSound(p.getLocation(), Sound.valueOf("ARROW_HIT"), 0.6F, 15.0F); + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public int getCost(String type, String entity, int multi) { + try { + ScriptEngineManager mgr = new ScriptEngineManager(); + ScriptEngine engine = mgr.getEngineByName("JavaScript"); + + int cost = 0; + if (type.equals("ECO")) { + if (EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + entity + ".Custom-ECO-Cost") != 0) + cost = EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + entity + ".Custom-ECO-Cost"); + else + cost = EpicSpawners.getInstance().getConfig().getInt("Main.Cost To Upgrade With Economy"); + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Use Custom Equations for Upgrade Costs")) { + String math = EpicSpawners.getInstance().getConfig().getString("Main.Equations.Calculate Economy Upgrade Cost").replace("{ECOCost}", Integer.toString(cost)).replace("{Level}", Integer.toString(multi)); + cost = (int) Math.round(Double.parseDouble(engine.eval(math).toString())); + } + } else if (type.equals("XP")) { + if (EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + entity + ".Custom-XP-Cost") != 0) + cost = EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + entity + ".Custom-XP-Cost"); + else + cost = EpicSpawners.getInstance().getConfig().getInt("Main.Cost To Upgrade With XP"); + if (EpicSpawners.getInstance().getConfig().getBoolean("Main.Use Custom Equations for Upgrade Costs")) { + String math = EpicSpawners.getInstance().getConfig().getString("Main.Equations.Calculate XP Upgrade Cost").replace("{XPCost}", Integer.toString(cost)).replace("{Level}", Integer.toString(multi)); + cost = (int) Math.round(Double.parseDouble(engine.eval(math).toString())); + } + } + return cost; + } catch (Exception e) { + Debugger.runReport(e); + } + return 999999999; + } + + public void overView(Player p, int infPage) { + try { + EpicSpawners instance = EpicSpawners.getInstance(); + if (p.hasPermission("epicspawners.view")) { + int multi = getMulti(); + int spawns = getSpawns(); + String type = spawnedType; + + Inventory i = Bukkit.createInventory(null, 27, Arconix.pl().getApi().format().formatTitle(Methods.compileName(type, multi, false))); + + + int showAmt = multi; + if (showAmt > 64) + showAmt = 1; + else if (showAmt == 0) + showAmt = 1; + + ItemStack item = new ItemStack(Material.SKULL_ITEM, showAmt, (byte) 3); + try { + item = instance.heads.addTexture(item, type); + } catch (Exception e) { + item = new ItemStack(Material.MOB_SPAWNER, showAmt); + } + + + if (instance.spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(type) + ".Display-Item") != null) { + Material mat = Material.valueOf(instance.spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(type) + ".Display-Item")); + if (!mat.equals(Material.AIR)) + item = new ItemStack(mat, 1); + } + + ItemMeta itemmeta = item.getItemMeta(); + itemmeta.setDisplayName(instance.getLocale().getMessage("interface.spawner.statstitle")); + ArrayList lore = new ArrayList<>(); + + String spawnBlocks = instance.spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(Methods.getTypeFromString(type)) + ".Spawn-Block"); + + List blocks = Arrays.asList(spawnBlocks.split("\\s*,\\s*")); + + StringBuilder only = new StringBuilder(blocks.get(0)); + + int num = 1; + for (String block : blocks) { + if (num != 1) + only.append("&8, &6").append(Methods.getTypeFromString(block)); + num++; + } + + lore.add(instance.getLocale().getMessage("interface.spawner.stats", spawns, spawnedType)); + + boolean omni = false; + if (instance.dataFile.getConfig().contains("data.spawnerstats." + locationStr + ".type")) { + if (instance.dataFile.getConfig().getString("data.spawnerstats." + locationStr + ".type").equals("OMNI")) { + List list = instance.getApi().convertFromList(instance.dataFile.getConfig().getStringList("data.spawnerstats." + locationStr + ".entities")); + lore.add(Arconix.pl().getApi().format().formatText(instance.getApi().getOmniString(list))); + omni = true; + } + } + lore.add(instance.getLocale().getMessage("interface.spawner.onlyspawnson", only.toString())); + if (p.hasPermission("epicspawners.convert") && !omni) { + lore.add(""); + lore.add(instance.getLocale().getMessage("interface.spawner.convert")); + } + if (p.hasPermission("epicspawners.canboost")) { + if (getBoost() == 0) { + if (!p.hasPermission("epicspawners.convert." + Methods.getTypeFromString(type)) && !p.hasPermission("epicspawners.convert." + type)) { + lore.add(""); + } + lore.add(instance.getLocale().getMessage("interface.spawner.boost")); + } + } + if (getBoost() != 0) { + + Date today = new Date(); + + String[] parts = instance.getLocale().getMessage("interface.spawner.boostedstats", Integer.toString(getBoost()), type, Arconix.pl().getApi().format().readableTime(getBoostEnd().getTime() - today.getTime())).split("\\|"); + lore.add(""); + for (String line : parts) + lore.add(Arconix.pl().getApi().format().formatText(line)); + } + itemmeta.setLore(lore); + item.setItemMeta(itemmeta); + + int xpCost = getCost("XP", type, multi); + + int ecoCost = getCost("ECO", type, multi); + + boolean maxed = false; + if (multi == instance.getConfig().getInt("Main.Spawner Max Upgrade")) + maxed = true; + + ItemStack itemXP = new ItemStack(Material.valueOf(instance.getConfig().getString("Interfaces.XP Icon")), 1); + ItemMeta itemmetaXP = itemXP.getItemMeta(); + itemmetaXP.setDisplayName(instance.getLocale().getMessage("interface.spawner.upgradewithxp")); + ArrayList loreXP = new ArrayList<>(); + if (!maxed) + loreXP.add(instance.getLocale().getMessage("interface.spawner.upgradewithxplore", Integer.toString(xpCost))); + else + loreXP.add(instance.getLocale().getMessage("event.upgrade.maxed")); + 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(instance.getLocale().getMessage("interface.spawner.upgradewitheconomy")); + ArrayList loreECO = new ArrayList<>(); + if (!maxed) + loreECO.add(instance.getLocale().getMessage("interface.spawner.upgradewitheconomylore", Arconix.pl().getApi().format().formatEconomy(ecoCost))); + else + loreECO.add(instance.getLocale().getMessage("event.upgrade.maxed")); + itemmetaECO.setLore(loreECO); + itemECO.setItemMeta(itemmetaECO); + + int nu = 0; + while (nu != 27) { + i.setItem(nu, Methods.getGlass()); + nu++; + } + i.setItem(13, item); + + i.setItem(0, Methods.getBackgroundGlass(true)); + i.setItem(1, Methods.getBackgroundGlass(true)); + i.setItem(2, Methods.getBackgroundGlass(false)); + i.setItem(6, Methods.getBackgroundGlass(false)); + i.setItem(7, Methods.getBackgroundGlass(true)); + i.setItem(8, Methods.getBackgroundGlass(true)); + i.setItem(9, Methods.getBackgroundGlass(true)); + i.setItem(10, Methods.getBackgroundGlass(false)); + i.setItem(16, Methods.getBackgroundGlass(false)); + i.setItem(17, Methods.getBackgroundGlass(true)); + i.setItem(18, Methods.getBackgroundGlass(true)); + i.setItem(19, Methods.getBackgroundGlass(true)); + i.setItem(20, Methods.getBackgroundGlass(false)); + i.setItem(24, Methods.getBackgroundGlass(false)); + i.setItem(25, Methods.getBackgroundGlass(true)); + i.setItem(26, Methods.getBackgroundGlass(true)); + + if (instance.getConfig().getBoolean("Main.Display Help Button In Spawner Overview")) { + ItemStack itemO = new ItemStack(Material.PAPER, 1); + ItemMeta itemmetaO = itemO.getItemMeta(); + itemmetaO.setDisplayName(instance.getLocale().getMessage("interface.spawner.howtotitle")); + ArrayList loreO = new ArrayList<>(); + String text = EpicSpawners.getInstance().getLocale().getMessage("interface.spawner.howtoinfo"); + + int start = (14 * infPage) - 14; + int li = 1; // 12 + int added = 0; + boolean max = false; + + String[] parts = text.split("\\|"); + for (String line : parts) { + line = compileHow(p, line); + if (line.equals(".") || line.equals("")) { + + } else { + Pattern regex = Pattern.compile("(.{1,28}(?:\\s|$))|(.{0,28})", Pattern.DOTALL); + Matcher m = regex.matcher(line); + while (m.find()) { + if (li > start) { + if (li < start + 15) { + loreO.add(Arconix.pl().getApi().format().formatText("&7" + m.group())); + added++; + } else { + max = true; + } + } + li++; + } + } + } + if (added == 0) { + overView(p, 1); + instance.infPage.remove(p); + return; + } + if (max) { + loreO.add(instance.getLocale().getMessage("interface.spawner.howtonext")); + } else { + loreO.add(instance.getLocale().getMessage("interface.spawner.howtoback")); + } + itemmetaO.setLore(loreO); + itemO.setItemMeta(itemmetaO); + i.setItem(8, itemO); + } + if (!type.equals("Omni")) { + if (instance.spawnerFile.getConfig().getBoolean("Entities." + Methods.getTypeFromString(Methods.getTypeFromString(type)) + ".Upgradable")) { + if (instance.getConfig().getBoolean("Main.Upgrade With XP")) + i.setItem(11, itemXP); + if (instance.getConfig().getBoolean("Main.Upgrade With Economy")) + i.setItem(15, itemECO); + } + } + p.openInventory(i); + instance.spawnerLoc.put(p, spawner.getBlock()); + instance.lastSpawner.put(p, spawner.getBlock()); + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public String compileHow(Player p, String text) { + try { + Matcher m = Pattern.compile("\\{(.*?)\\}").matcher(text); + while (m.find()) { + Matcher mi = Pattern.compile("\\[(.*?)\\]").matcher(text); + int nu = 0; + int a = 0; + String type = ""; + while (mi.find()) { + if (nu == 0) { + type = mi.group().replace("[", "").replace("]", ""); + text = text.replace(mi.group(), ""); + } else { + switch (type) { + case "LEVELUP": + if (nu == 1) { + if (!p.hasPermission("epicspawners.combine." + spawner.getSpawnedType()) && !p.hasPermission("epicspawners.combine." + spawnedType)) { + text = text.replace(mi.group(), ""); + } else { + text = text.replace(mi.group(), a(a, mi.group())); + a++; + } + } else if (nu == 2) { + if (!EpicSpawners.getInstance().getConfig().getBoolean("Main.Upgrade With XP")) { + text = text.replace(mi.group(), ""); + } else { + text = text.replace(mi.group(), a(a, mi.group())); + a++; + } + } else if (nu == 3) { + if (!EpicSpawners.getInstance().getConfig().getBoolean("Main.Upgrade With Economy")) { + text = text.replace(mi.group(), ""); + } else { + text = text.replace(mi.group(), a(a, mi.group())); + a++; + } + } + break; + case "WATER": + if (nu == 1) { + if (!EpicSpawners.getInstance().getConfig().getBoolean("settings.spawners-repel-liquid")) { + text = text.replace(mi.group(), ""); + } else { + text = text.replace(mi.group(), a(a, mi.group())); + } + } + break; + case "INVSTACK": + if (nu == 1) { + if (!EpicSpawners.getInstance().getConfig().getBoolean("Main.Allow Stacking Spawners In Survival Inventories")) { + text = text.replace(mi.group(), ""); + } else { + text = text.replace(mi.group(), a(a, mi.group())); + } + } + break; + case "REDSTONE": + if (nu == 1) { + if (!EpicSpawners.getInstance().getConfig().getBoolean("Main.Redstone Power Deactivates Spawners")) { + text = text.replace(mi.group(), ""); + } else { + text = text.replace(mi.group(), a(a, mi.group())); + } + } + break; + case "OMNI": + if (nu == 1) { + if (!EpicSpawners.getInstance().getConfig().getBoolean("Main.OmniSpawners Enabled")) { + text = text.replace(mi.group(), ""); + } else { + text = text.replace(mi.group(), a(a, mi.group())); + } + } + break; + case "DROP": + if (!EpicSpawners.getInstance().getConfig().getBoolean("Spawner Drops.Allow Killing Mobs To Drop Spawners") || !p.hasPermission("epicspawners.Killcounter")) { + text = ""; + } else { + text = text.replace("", spawnedType.toLowerCase()); + if (EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + Methods.getTypeFromString(spawnedType) + ".CustomGoal") != 0) + text = text.replace("", Integer.toString(EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + Methods.getTypeFromString(spawnedType) + ".CustomGoal"))); + else + text = text.replace("", Integer.toString(EpicSpawners.getInstance().getConfig().getInt("Spawner Drops.Kills Needed for Drop"))); + } + if (nu == 1) { + if (EpicSpawners.getInstance().getConfig().getBoolean("Spawner Drops.Count Unnatural Kills Towards Spawner Drop")) { + text = text.replace(mi.group(), ""); + } else { + text = text.replace(mi.group(), a(a, mi.group())); + } + } + break; + } + } + nu++; + } + + } + text = text.replace("[", "").replace("]", "").replace("{", "").replace("}", ""); + return text; + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public String a(int a, String text) { + try { + if (a != 0) { + text = ", " + text; + } + } catch (Exception e) { + Debugger.runReport(e); + } + return text; + } + + public void change(Player p, int page) { + try { + EpicSpawners.getInstance().page.put(p, page); + + List entities = new ArrayList<>(); + + int num = 0; + int show = 0; + int start = (page - 1) * 32; + ConfigurationSection cs = EpicSpawners.getInstance().spawnerFile.getConfig().getConfigurationSection("Entities"); + for (String value : cs.getKeys(false)) { + if (!value.toLowerCase().equals("omni")) { + if (EpicSpawners.getInstance().spawnerFile.getConfig().getBoolean("Entities." + Methods.getTypeFromString(value) + ".Convertible")) { + if (p.hasPermission("epicspawners.*") || p.hasPermission("epicspawners.convert.*") || p.hasPermission("epicspawners.convert." + Methods.getTypeFromString(value).replaceAll(" ", "_"))) { + if (num >= start) { + if (show <= 32) { + entities.add(value); + show++; + } + } + } + num++; + } + } + } + + int amt = entities.size(); + String title = EpicSpawners.getInstance().getLocale().getMessage("interface.convert.title"); + Inventory i = Bukkit.createInventory(null, 54, Arconix.pl().getApi().format().formatTitle(title)); + int max2 = 54; + if (amt <= 7) { + i = Bukkit.createInventory(null, 27, Arconix.pl().getApi().format().formatTitle(title)); + max2 = 27; + } else if (amt <= 15) { + i = Bukkit.createInventory(null, 36, Arconix.pl().getApi().format().formatTitle(title)); + max2 = 36; + } else if (amt <= 25) { + i = Bukkit.createInventory(null, 45, Arconix.pl().getApi().format().formatTitle(title)); + max2 = 45; + } + + final int max22 = max2; + int place = 10; + for (String value : entities) { + if (place == 17) + place++; + if (place == (max22 - 18)) + place++; + ItemStack it = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + + ItemStack item = EpicSpawners.getInstance().heads.addTexture(it, Methods.getTypeFromString(value)); + + if (EpicSpawners.getInstance().spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(value) + ".Display-Item") != null) { + Material mat = Material.valueOf(EpicSpawners.getInstance().spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(value) + ".Display-Item")); + if (!mat.equals(Material.AIR)) + item = new ItemStack(mat, 1); + } + + ItemMeta itemmeta = item.getItemMeta(); + String name = Methods.compileName(value, 0, true); + ArrayList lore = new ArrayList<>(); + String per = EpicSpawners.getInstance().spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(value) + ".Convert-Price"); + double sprice = EpicSpawners.getInstance().spawnerFile.getConfig().getDouble("Entities." + Methods.getTypeFromString(value) + ".Shop-Price"); + + int ch = Integer.parseInt(per.replace("%", "")); + + ScriptEngineManager mgr = new ScriptEngineManager(); + ScriptEngine engine = mgr.getEngineByName("JavaScript"); + double price = Math.round(Double.parseDouble(engine.eval("(" + ch + " / 100) * " + sprice).toString()) * getMulti()); + + lore.add(EpicSpawners.getInstance().getLocale().getMessage("interface.shop.buyprice", Arconix.pl().getApi().format().formatEconomy(price))); + String loreString = EpicSpawners.getInstance().getLocale().getMessage("interface.convert.lore", Methods.getTypeFromString(Methods.getTypeFromString(value))); + if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) { + loreString = me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(p, loreString.replace(" ", "_")).replace("_", " "); + } + lore.add(loreString); + itemmeta.setLore(lore); + itemmeta.setDisplayName(name); + item.setItemMeta(itemmeta); + i.setItem(place, item); + place++; + } + + int max = (int) Math.ceil((double) num / (double) 36); + num = 0; + while (num != 9) { + i.setItem(num, Methods.getGlass()); + num++; + } + int num2 = max2 - 9; + while (num2 != max2) { + i.setItem(num2, Methods.getGlass()); + num2++; + } + + ItemStack exit = new ItemStack(Material.valueOf(EpicSpawners.getInstance().getConfig().getString("Interfaces.Exit Icon")), 1); + ItemMeta exitmeta = exit.getItemMeta(); + exitmeta.setDisplayName(EpicSpawners.getInstance().getLocale().getMessage("general.nametag.exit")); + exit.setItemMeta(exitmeta); + + ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + ItemStack skull = head; + if (!EpicSpawners.getInstance().v1_7) + skull = Arconix.pl().getApi().getGUI().addTexture(head, "http://textures.minecraft.net/texture/1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b"); + SkullMeta skullMeta = (SkullMeta) skull.getItemMeta(); + if (EpicSpawners.getInstance().v1_7) + skullMeta.setOwner("MHF_ArrowRight"); + skull.setDurability((short) 3); + skullMeta.setDisplayName(EpicSpawners.getInstance().getLocale().getMessage("general.nametag.next")); + skull.setItemMeta(skullMeta); + + ItemStack head2 = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + ItemStack skull2 = head2; + if (!EpicSpawners.getInstance().v1_7) + skull2 = Arconix.pl().getApi().getGUI().addTexture(head2, "http://textures.minecraft.net/texture/3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23"); + SkullMeta skull2Meta = (SkullMeta) skull2.getItemMeta(); + if (EpicSpawners.getInstance().v1_7) + skull2Meta.setOwner("MHF_ArrowLeft"); + skull2.setDurability((short) 3); + skull2Meta.setDisplayName(EpicSpawners.getInstance().getLocale().getMessage("general.nametag.back")); + skull2.setItemMeta(skull2Meta); + + i.setItem(8, exit); + + i.setItem(0, Methods.getBackgroundGlass(true)); + i.setItem(1, Methods.getBackgroundGlass(true)); + i.setItem(9, Methods.getBackgroundGlass(true)); + + i.setItem(7, Methods.getBackgroundGlass(true)); + i.setItem(17, Methods.getBackgroundGlass(true)); + + i.setItem(max22 - 18, Methods.getBackgroundGlass(true)); + i.setItem(max22 - 9, Methods.getBackgroundGlass(true)); + i.setItem(max22 - 8, Methods.getBackgroundGlass(true)); + + i.setItem(max22 - 10, Methods.getBackgroundGlass(true)); + i.setItem(max22 - 2, Methods.getBackgroundGlass(true)); + i.setItem(max22 - 1, Methods.getBackgroundGlass(true)); + + i.setItem(2, Methods.getBackgroundGlass(false)); + i.setItem(6, Methods.getBackgroundGlass(false)); + i.setItem(max22 - 7, Methods.getBackgroundGlass(false)); + i.setItem(max22 - 3, Methods.getBackgroundGlass(false)); + + if (page != 1) { + i.setItem(max22 - 8, skull2); + } + if (page != max) { + i.setItem(max22 - 2, skull); + } + + p.openInventory(i); + EpicSpawners.getInstance().change.add(p); + EpicSpawners.getInstance().spawnerLoc.put(p, spawner.getBlock()); + EpicSpawners.getInstance().lastSpawner.put(p, spawner.getBlock()); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + + public void convert(String type, Player p) { + try { + if (EpicSpawners.getInstance().getServer().getPluginManager().getPlugin("Vault") == null) { + p.sendMessage("Vault is not installed."); + return; + } + RegisteredServiceProvider rsp = EpicSpawners.getInstance().getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class); + net.milkbowl.vault.economy.Economy econ = rsp.getProvider(); + + String per = EpicSpawners.getInstance().spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(type) + ".Convert-Price"); + double sprice = EpicSpawners.getInstance().spawnerFile.getConfig().getDouble("Entities." + Methods.getTypeFromString(type) + ".Shop-Price"); + + int ch = Integer.parseInt(per.replace("%", "")); + + ScriptEngineManager mgr = new ScriptEngineManager(); + ScriptEngine engine = mgr.getEngineByName("JavaScript"); + double price = Math.round(Double.parseDouble(engine.eval("(" + ch + " / 100) * " + sprice).toString())) * getMulti(); + + if (!(econ.has(p, price) || p.isOp())) { + p.sendMessage(EpicSpawners.getInstance().references.getPrefix() + EpicSpawners.getInstance().getLocale().getMessage("event.upgrade.cannotafford")); + return; + } + SpawnerChangeEvent event = new SpawnerChangeEvent(location, p, spawnedType, type); + Bukkit.getPluginManager().callEvent(event); + if (event.isCancelled()) { + return; + } + EpicSpawners.getInstance().dataFile.getConfig().set("data.spawnerstats." + locationStr + ".type", Methods.getTypeFromString(type)); + try { + getSpawner().setSpawnedType(EntityType.valueOf(type)); + update(); + } catch (Exception ignore) { + } + + p.sendMessage(EpicSpawners.getInstance().references.getPrefix() + EpicSpawners.getInstance().getLocale().getMessage("event.convert.success")); + + EpicSpawners.getInstance().holo.processChange(location.getBlock()); + p.closeInventory(); + if (!p.isOp()) { + econ.withdrawPlayer(p, price); + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void playerBoost(Player p) { + try { + if (!p.hasPermission("epicspawners.canboost")) { + return; + } + if (EpicSpawners.getInstance().boostAmt.containsKey(p)) { + if (EpicSpawners.getInstance().boostAmt.get(p) > EpicSpawners.getInstance().getConfig().getInt("Spawner Boosting.Max Multiplier For A Spawner Boost")) { + EpicSpawners.getInstance().boostAmt.put(p, EpicSpawners.getInstance().getConfig().getInt("Spawner Boosting.Max Multiplier For A Spawner Boost")); + return; + } else if (EpicSpawners.getInstance().boostAmt.get(p) < 1) { + EpicSpawners.getInstance().boostAmt.put(p, 1); + } + } + + int amt = 1; + + if (EpicSpawners.getInstance().boostAmt.containsKey(p)) + amt = EpicSpawners.getInstance().boostAmt.get(p); + else + EpicSpawners.getInstance().boostAmt.put(p, amt); + + + int multi = EpicSpawners.getInstance().dataFile.getConfig().getInt("data.spawner." + locationStr); + + String type = Methods.getType(spawner.getSpawnedType()); + + if (EpicSpawners.getInstance().dataFile.getConfig().contains("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".type")) { + if (EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".type").equals("OMNI")) + type = "Omni"; + else + type = EpicSpawners.getInstance().dataFile.getConfig().getString("data.spawnerstats." + Arconix.pl().getApi().serialize().serializeLocation(location) + ".type"); + } + + Inventory i = Bukkit.createInventory(null, 27, EpicSpawners.getInstance().getLocale().getMessage("interface.boost.title", Integer.toString(amt), Methods.compileName(type, multi, false))); + + int num = 0; + while (num != 27) { + i.setItem(num, Methods.getGlass()); + num++; + } + + ItemStack coal = new ItemStack(Material.COAL); + ItemMeta coalMeta = coal.getItemMeta(); + coalMeta.setDisplayName(EpicSpawners.getInstance().getLocale().getMessage("interface.boost.boostfor", "5")); + ArrayList coalLore = new ArrayList<>(); + coalLore.add(Arconix.pl().getApi().format().formatText("&7Costs &6&l" + Methods.getBoostCost(5, amt) + ".")); + coalMeta.setLore(coalLore); + coal.setItemMeta(coalMeta); + + ItemStack iron = new ItemStack(Material.IRON_INGOT); + ItemMeta ironMeta = iron.getItemMeta(); + ironMeta.setDisplayName(EpicSpawners.getInstance().getLocale().getMessage("interface.boost.boostfor", "15")); + ArrayList ironLore = new ArrayList<>(); + ironLore.add(Arconix.pl().getApi().format().formatText("&7Costs &6&l" + Methods.getBoostCost(15, amt) + ".")); + ironMeta.setLore(ironLore); + iron.setItemMeta(ironMeta); + + ItemStack diamond = new ItemStack(Material.DIAMOND); + ItemMeta diamondMeta = diamond.getItemMeta(); + diamondMeta.setDisplayName(EpicSpawners.getInstance().getLocale().getMessage("interface.boost.boostfor", "30")); + ArrayList diamondLore = new ArrayList<>(); + diamondLore.add(Arconix.pl().getApi().format().formatText("&7Costs &6&l" + Methods.getBoostCost(30, amt) + ".")); + diamondMeta.setLore(diamondLore); + diamond.setItemMeta(diamondMeta); + + ItemStack emerald = new ItemStack(Material.EMERALD); + ItemMeta emeraldMeta = emerald.getItemMeta(); + emeraldMeta.setDisplayName(EpicSpawners.getInstance().getLocale().getMessage("interface.boost.boostfor", "60")); + ArrayList emeraldLore = new ArrayList<>(); + emeraldLore.add(Arconix.pl().getApi().format().formatText("&7Costs &6&l" + Methods.getBoostCost(60, amt) + ".")); + emeraldMeta.setLore(emeraldLore); + emerald.setItemMeta(emeraldMeta); + + i.setItem(10, coal); + i.setItem(12, iron); + i.setItem(14, diamond); + i.setItem(16, emerald); + + i.setItem(0, Methods.getBackgroundGlass(true)); + i.setItem(1, Methods.getBackgroundGlass(true)); + i.setItem(2, Methods.getBackgroundGlass(false)); + i.setItem(6, Methods.getBackgroundGlass(false)); + i.setItem(7, Methods.getBackgroundGlass(true)); + i.setItem(8, Methods.getBackgroundGlass(true)); + i.setItem(9, Methods.getBackgroundGlass(true)); + i.setItem(17, Methods.getBackgroundGlass(true)); + i.setItem(18, Methods.getBackgroundGlass(true)); + i.setItem(19, Methods.getBackgroundGlass(true)); + i.setItem(20, Methods.getBackgroundGlass(false)); + i.setItem(24, Methods.getBackgroundGlass(false)); + i.setItem(25, Methods.getBackgroundGlass(true)); + i.setItem(26, Methods.getBackgroundGlass(true)); + + ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + ItemStack skull = head; + if (!EpicSpawners.getInstance().v1_7) + skull = Arconix.pl().getApi().getGUI().addTexture(head, "http://textures.minecraft.net/texture/1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b"); + SkullMeta skullMeta = (SkullMeta) skull.getItemMeta(); + if (EpicSpawners.getInstance().v1_7) + skullMeta.setOwner("MHF_ArrowRight"); + skull.setDurability((short) 3); + skullMeta.setDisplayName(Arconix.pl().getApi().format().formatText("&6&l+1")); + skull.setItemMeta(skullMeta); + + ItemStack head2 = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + ItemStack skull2 = head2; + if (!EpicSpawners.getInstance().v1_7) + skull2 = Arconix.pl().getApi().getGUI().addTexture(head2, "http://textures.minecraft.net/texture/3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23"); + SkullMeta skull2Meta = (SkullMeta) skull2.getItemMeta(); + if (EpicSpawners.getInstance().v1_7) + skullMeta.setOwner("MHF_ArrowLeft"); + skull2.setDurability((short) 3); + skull2Meta.setDisplayName(Arconix.pl().getApi().format().formatText("&6&l-1")); + skull2.setItemMeta(skull2Meta); + + if (amt != 1) { + i.setItem(0, skull2); + } + if (amt < EpicSpawners.getInstance().getConfig().getInt("Spawner Boosting.Max Multiplier For A Spawner Boost")) { + i.setItem(8, skull); + } + + p.openInventory(i); + EpicSpawners.getInstance().boosting.add(p); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void purchaseBoost(Player p, int time) { + try { + int amt = EpicSpawners.getInstance().boostAmt.get(p); + boolean yes = false; + + String un = EpicSpawners.getInstance().getConfig().getString("Spawner Boosting.Item Charged For A Boost"); + + String[] parts = un.split(":"); + + String type = parts[0]; + String multi = parts[1]; + int cost = Methods.boostCost(multi, time, amt); + if (!type.equals("ECO") && !type.equals("XP")) { + ItemStack stack = new ItemStack(Material.valueOf(type)); + int invAmt = Arconix.pl().getApi().getGUI().getAmount(p.getInventory(), stack); + if (invAmt >= cost) { + stack.setAmount(cost); + Arconix.pl().getApi().getGUI().removeFromInventory(p.getInventory(), stack); + yes = true; + } else { + p.sendMessage(EpicSpawners.getInstance().getLocale().getMessage("event.upgrade.cannotafford")); + } + } else if (type.equals("ECO")) { + if (EpicSpawners.getInstance().getServer().getPluginManager().getPlugin("Vault") != null) { + RegisteredServiceProvider rsp = EpicSpawners.getInstance().getServer().getServicesManager().getRegistration(net.milkbowl.vault.economy.Economy.class); + net.milkbowl.vault.economy.Economy econ = rsp.getProvider(); + if (econ.has(p, cost)) { + econ.withdrawPlayer(p, cost); + yes = true; + } else { + p.sendMessage(EpicSpawners.getInstance().getLocale().getMessage("event.upgrade.cannotafford")); + } + } else { + p.sendMessage("Vault is not installed."); + } + } else if (type.equals("XP")) { + if (p.getLevel() >= cost || p.getGameMode() == GameMode.CREATIVE) { + if (p.getGameMode() != GameMode.CREATIVE) { + p.setLevel(p.getLevel() - cost); + } + yes = true; + } else { + p.sendMessage(EpicSpawners.getInstance().getLocale().getMessage("event.upgrade.cannotafford")); + } + } + if (yes) { + Calendar c = Calendar.getInstance(); + Date currentDate = new Date(); + c.setTime(currentDate); + c.add(Calendar.MINUTE, time); + + String uuid = UUID.randomUUID().toString(); + EpicSpawners.getInstance().dataFile.getConfig().set("data.boosts." + uuid + ".location", locationStr); + EpicSpawners.getInstance().dataFile.getConfig().set("data.boosts." + uuid + ".boosted", amt); + + EpicSpawners.getInstance().dataFile.getConfig().set("data.boosts." + uuid + ".end", c.getTime().getTime()); + p.sendMessage(EpicSpawners.getInstance().getLocale().getMessage("event.boost.applied")); + } + p.closeInventory(); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void setSpawner(EntityType ent) { + try { + spawner = ((CreatureSpawner) spawner.getBlock().getState()); + spawner.setSpawnedType(ent); + update(); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public CreatureSpawner getSpawner() { + try { + return spawner; + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public void update() { + try { + spawner.update(); + } catch (Exception e) { + Debugger.runReport(e); + } + } +} diff --git a/src/main/java/com/songoda/epicspawners/spawners/SpawnerBreakEvent.java b/src/main/java/com/songoda/epicspawners/spawners/SpawnerBreakEvent.java new file mode 100644 index 0000000..2772ed4 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/spawners/SpawnerBreakEvent.java @@ -0,0 +1,66 @@ +package com.songoda.epicspawners.spawners; + +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; + +/** + * Created by songoda on 4/22/2017. + */ +public class SpawnerBreakEvent extends Event implements Cancellable { + private static final HandlerList HANDLERS = new HandlerList(); + + private Location location; + private Player player; + private int multi; + private String type; + + private boolean canceled = false; + + public SpawnerBreakEvent(Location location, Player player) { + Spawner spawner = new Spawner(location); + this.location = location; + this.player = player; + this.multi = spawner.getMulti(); + if (spawner.getSpawner() == null) + this.type = null; + else + this.type = spawner.spawnedType; + } + + public Location getLocation() { + return location; + } + + public Player getPlayer() { + return player; + } + + public int getMulti() { + return multi; + } + + public String getType() { + return type; + } + + @Override + public HandlerList getHandlers() { + return HANDLERS; + } + public static HandlerList getHandlerList() { + return HANDLERS; + } + + @Override + public boolean isCancelled() { + return canceled; + } + + @Override + public void setCancelled(boolean canceled) { + this.canceled = canceled; + } +} diff --git a/src/main/java/com/songoda/epicspawners/spawners/SpawnerChangeEvent.java b/src/main/java/com/songoda/epicspawners/spawners/SpawnerChangeEvent.java new file mode 100644 index 0000000..d51e722 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/spawners/SpawnerChangeEvent.java @@ -0,0 +1,82 @@ +package com.songoda.epicspawners.spawners; + +import org.bukkit.Location; +import org.bukkit.block.Block; +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; + +/** + * Created by songoda on 4/22/2017. + */ +public class SpawnerChangeEvent extends Event implements Cancellable { + private static final HandlerList HANDLERS = new HandlerList(); + private Location location; + + private Player player; + + private int multi; + private int oldMulti; + + private String type; + private String oldType; + + private boolean canceled = false; + + public SpawnerChangeEvent(Location location, Player player, int multi, int oldMulti) { + this.location = location; + this.player = player; + this.multi = multi; + this.oldMulti = oldMulti; + } + + public SpawnerChangeEvent(Location location, Player player, String type, String oldType) { + this.location = location; + this.player = player; + this.type = type; + this.oldType = oldType; + } + + public Block getSpawner() { + return location.getBlock(); + } + + public int getCurrentMulti() { + return multi; + } + + public int getOldMulti() { + return oldMulti; + } + + public String getType() { + return type; + } + + public String getOldType() { + return oldType; + } + + public Player getPlayer() { + return player; + } + + @Override + public HandlerList getHandlers() { + return HANDLERS; + } + public static HandlerList getHandlerList() { + return HANDLERS; + } + + @Override + public boolean isCancelled() { + return canceled; + } + + @Override + public void setCancelled(boolean canceled) { + this.canceled = canceled; + } +} diff --git a/src/main/java/com/songoda/epicspawners/spawners/SpawnerDropEvent.java b/src/main/java/com/songoda/epicspawners/spawners/SpawnerDropEvent.java new file mode 100644 index 0000000..3036f80 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/spawners/SpawnerDropEvent.java @@ -0,0 +1,68 @@ +package com.songoda.epicspawners.spawners; + +import org.bukkit.Location; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; + +/** + * Created by songoda on 4/22/2017. + */ +public class SpawnerDropEvent extends Event implements Cancellable { + private static final HandlerList HANDLERS = new HandlerList(); + + private Location location; + private Player player; + private int multi; + private EntityType type; + + private boolean canceled = false; + + public SpawnerDropEvent(Location location, Player player) { + Spawner spawner = new Spawner(location); + this.location = location; + this.player = player; + this.multi = spawner.getMulti(); + if (spawner.getSpawner() == null) + this.type = null; + else + this.type = spawner.getSpawner().getSpawnedType(); + } + + public Location getLocation() { + return location; + } + + public Player getPlayer() { + return player; + } + + public int getMulti() { + return multi; + } + + public EntityType getType() { + return type; + } + + @Override + public HandlerList getHandlers() { + return HANDLERS; + } + public static HandlerList getHandlerList() { + return HANDLERS; + } + + @Override + public boolean isCancelled() { + return canceled; + } + + @Override + public void setCancelled(boolean canceled) { + this.canceled = canceled; + + } +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicspawners/spawners/SpawnerEditor.java b/src/main/java/com/songoda/epicspawners/spawners/SpawnerEditor.java new file mode 100644 index 0000000..2b82a9d --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/spawners/SpawnerEditor.java @@ -0,0 +1,1095 @@ +package com.songoda.epicspawners.spawners; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import com.songoda.epicspawners.utils.Debugger; +import com.songoda.epicspawners.utils.Methods; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.inventory.meta.SkullMeta; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by songo on 9/3/2017. + */ +public class SpawnerEditor { + + EpicSpawners instance; + + public SpawnerEditor(EpicSpawners instance) { + this.instance = instance; + } + + public void open(Player p, int page) { + try { + EpicSpawners.getInstance().itemEditorInstance = new ArrayList<>(); + EpicSpawners.getInstance().entityEditorInstance = new ArrayList<>(); + EpicSpawners.getInstance().commandEditorInstance = new ArrayList<>(); + EpicSpawners.getInstance().editing.remove(p); + EpicSpawners.getInstance().isEntityInstanceSaved = false; + EpicSpawners.getInstance().isItemInstanceSaved = false; + EpicSpawners.getInstance().isBlockInstanceSaved = false; + EpicSpawners.getInstance().isCommandInstanceSaved = false; + EpicSpawners.getInstance().newSpawnerName = ""; + EpicSpawners.getInstance().page.put(p, page); + + List entities = new ArrayList<>(); + + int num = 0; + int show = 0; + int start = (page - 1) * 32; + + ConfigurationSection cs = EpicSpawners.getInstance().spawnerFile.getConfig().getConfigurationSection("Entities"); + for (String key : cs.getKeys(false)) { + if (num >= start && !key.equals("Omni")) { + if (show <= 32) { + key = key.toUpperCase().replace(" ", "_"); + entities.add(key); + show++; + } + } + num++; + } + + int max = (int) Math.ceil((double) num / (double) 36); + int amt = entities.size(); + Inventory i = Bukkit.createInventory(null, 54, Arconix.pl().getApi().format().formatTitle("Spawner Editor")); + int max2 = 54; + if (amt <= 7) { + i = Bukkit.createInventory(null, 27, Arconix.pl().getApi().format().formatTitle("Spawner Editor")); + max2 = 27; + } else if (amt <= 15) { + i = Bukkit.createInventory(null, 36, Arconix.pl().getApi().format().formatTitle("Spawner Editor")); + max2 = 36; + } else if (amt <= 25) { + i = Bukkit.createInventory(null, 45, Arconix.pl().getApi().format().formatTitle("Spawner Editor")); + max2 = 45; + } + + ItemStack exit = new ItemStack(Material.WOOD_DOOR, 1); + ItemMeta exitMeta = exit.getItemMeta(); + exitMeta.setDisplayName(instance.getLocale().getMessage("general.nametag.exit")); + exit.setItemMeta(exitMeta); + i.setItem(8, exit); + + + ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + ItemStack skull = head; + if (!EpicSpawners.getInstance().v1_7) + skull = Arconix.pl().getApi().getGUI().addTexture(head, "http://textures.minecraft.net/texture/1b6f1a25b6bc199946472aedb370522584ff6f4e83221e5946bd2e41b5ca13b"); + SkullMeta skullMeta = (SkullMeta) skull.getItemMeta(); + if (EpicSpawners.getInstance().v1_7) + skullMeta.setOwner("MHF_ArrowRight"); + skull.setDurability((short) 3); + skullMeta.setDisplayName(instance.getLocale().getMessage("general.nametag.next")); + skull.setItemMeta(skullMeta); + + ItemStack head2 = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + ItemStack skull2 = head2; + if (!EpicSpawners.getInstance().v1_7) + skull2 = Arconix.pl().getApi().getGUI().addTexture(head2, "http://textures.minecraft.net/texture/3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23"); + SkullMeta skull2Meta = (SkullMeta) skull2.getItemMeta(); + if (EpicSpawners.getInstance().v1_7) + skull2Meta.setOwner("MHF_ArrowLeft"); + skull2.setDurability((short) 3); + skull2Meta.setDisplayName(instance.getLocale().getMessage("general.nametag.last")); + skull2.setItemMeta(skull2Meta); + + final int max22 = max2; + int place = 10; + int dis = start + 1; + for (String value : entities) { + if (place == 17) + place++; + if (place == (max22 - 18)) + place++; + ItemStack it = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + + ItemStack item = EpicSpawners.getInstance().heads.addTexture(it, Methods.getTypeFromString(value)); + + ItemMeta itemmeta = item.getItemMeta(); + String name = Methods.compileName(value, 0, false); + ArrayList lore = new ArrayList<>(); + lore.add(Arconix.pl().getApi().format().formatText("&7Click to &a&lEdit&7.")); + lore.add(Arconix.pl().getApi().format().convertToInvisibleString(Integer.toString(dis))); + itemmeta.setLore(lore); + itemmeta.setDisplayName(name); + item.setItemMeta(itemmeta); + i.setItem(place, item); + place++; + dis++; + } + + num = 0; + while (num != 8) { + i.setItem(num, Methods.getGlass()); + num++; + } + num = max22 - 9; + while (num != max22) { + i.setItem(num, Methods.getGlass()); + num++; + } + + i.setItem(0, Methods.getBackgroundGlass(true)); + i.setItem(1, Methods.getBackgroundGlass(true)); + i.setItem(9, Methods.getBackgroundGlass(true)); + + i.setItem(7, Methods.getBackgroundGlass(true)); + i.setItem(17, Methods.getBackgroundGlass(true)); + + i.setItem(max22 - 18, Methods.getBackgroundGlass(true)); + i.setItem(max22 - 9, Methods.getBackgroundGlass(true)); + i.setItem(max22 - 8, Methods.getBackgroundGlass(true)); + + i.setItem(max22 - 10, Methods.getBackgroundGlass(true)); + i.setItem(max22 - 2, Methods.getBackgroundGlass(true)); + i.setItem(max22 - 1, Methods.getBackgroundGlass(true)); + + i.setItem(2, Methods.getBackgroundGlass(false)); + i.setItem(6, Methods.getBackgroundGlass(false)); + i.setItem(max22 - 7, Methods.getBackgroundGlass(false)); + i.setItem(max22 - 3, Methods.getBackgroundGlass(false)); + + if (page != 1) { + i.setItem(max22 - 8, skull2); + } + + if (page != max) { + i.setItem(max22 - 2, skull); + } + + ItemStack newSpawner = new ItemStack(Material.PAPER, 1); + ItemMeta newSpawnerMeta = newSpawner.getItemMeta(); + newSpawnerMeta.setDisplayName(Arconix.pl().getApi().format().formatText("&9&lNew Spawner")); + newSpawner.setItemMeta(newSpawnerMeta); + i.setItem(max22 - 4, newSpawner); + + p.openInventory(i); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void overview(Player p, int id) { + try { + if (!EpicSpawners.getInstance().isEntityInstanceSaved) + EpicSpawners.getInstance().entityEditorInstance = new ArrayList<>(); + if (!EpicSpawners.getInstance().isItemInstanceSaved) + EpicSpawners.getInstance().itemEditorInstance = new ArrayList<>(); + if (!EpicSpawners.getInstance().isBlockInstanceSaved) + EpicSpawners.getInstance().blockEditorInstance = new ArrayList<>(); + if (!EpicSpawners.getInstance().isCommandInstanceSaved) + EpicSpawners.getInstance().commandEditorInstance = new ArrayList<>(); + EpicSpawners.getInstance().subediting.remove(p); + + int csp = 1; + ConfigurationSection cs = EpicSpawners.getInstance().spawnerFile.getConfig().getConfigurationSection("Entities"); + for (String key : cs.getKeys(false)) { + if (key.contains("Custom")) + csp++; + } + + String type = "Custom " + csp; + + if (!EpicSpawners.getInstance().newSpawnerName.equals("")) + type = EpicSpawners.getInstance().newSpawnerName; + + if (id != 0) + type = getType(id); + else + EpicSpawners.getInstance().newSpawnerName = type; + String name; + + name = Methods.compileName(type, 0, false); + Inventory i = Bukkit.createInventory(null, 54, Arconix.pl().getApi().format().formatTitle(Arconix.pl().getApi().format().formatText("&8Editing: " + name + "&8."))); + + int num = 0; + while (num != 54) { + i.setItem(num, Methods.getGlass()); + num++; + } + + i.setItem(0, Methods.getBackgroundGlass(false)); + i.setItem(1, Methods.getBackgroundGlass(false)); + i.setItem(2, Methods.getBackgroundGlass(false)); + i.setItem(3, Methods.getBackgroundGlass(true)); + i.setItem(4, Methods.getBackgroundGlass(true)); + + i.setItem(9, Methods.getBackgroundGlass(false)); + i.setItem(13, Methods.getBackgroundGlass(true)); + i.setItem(14, Methods.getBackgroundGlass(false)); + i.setItem(15, Methods.getBackgroundGlass(true)); + i.setItem(16, Methods.getBackgroundGlass(true)); + i.setItem(17, Methods.getBackgroundGlass(true)); + + i.setItem(18, Methods.getBackgroundGlass(false)); + i.setItem(22, Methods.getBackgroundGlass(false)); + i.setItem(26, Methods.getBackgroundGlass(true)); + + i.setItem(27, Methods.getBackgroundGlass(true)); + i.setItem(31, Methods.getBackgroundGlass(false)); + i.setItem(35, Methods.getBackgroundGlass(false)); + + i.setItem(36, Methods.getBackgroundGlass(true)); + i.setItem(37, Methods.getBackgroundGlass(true)); + i.setItem(38, Methods.getBackgroundGlass(false)); + i.setItem(39, Methods.getBackgroundGlass(true)); + i.setItem(40, Methods.getBackgroundGlass(true)); + i.setItem(44, Methods.getBackgroundGlass(false)); + + i.setItem(49, Methods.getBackgroundGlass(true)); + i.setItem(50, Methods.getBackgroundGlass(true)); + i.setItem(51, Methods.getBackgroundGlass(false)); + i.setItem(52, Methods.getBackgroundGlass(false)); + i.setItem(53, Methods.getBackgroundGlass(false)); + + + ItemStack head2 = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + ItemStack skull2 = head2; + if (!EpicSpawners.getInstance().v1_7) + skull2 = Arconix.pl().getApi().getGUI().addTexture(head2, "http://textures.minecraft.net/texture/3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23"); + SkullMeta skull2Meta = (SkullMeta) skull2.getItemMeta(); + if (EpicSpawners.getInstance().v1_7) + skull2Meta.setOwner("MHF_ArrowLeft"); + skull2.setDurability((short) 3); + skull2Meta.setDisplayName(instance.getLocale().getMessage("general.nametag.back")); + skull2.setItemMeta(skull2Meta); + + i.setItem(8, skull2); + + ItemStack it = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + + ItemStack item = EpicSpawners.getInstance().heads.addTexture(it, type); + + ItemMeta itemmeta = item.getItemMeta(); + ArrayList lore = new ArrayList<>(); + lore.add(Arconix.pl().getApi().format().formatText("&7Left-Click to &9Change Spawner Name&7.")); + lore.add(Arconix.pl().getApi().format().formatText("&7Middle-Click to &bChange Spawner Display Item&7.")); + if (EpicSpawners.getInstance().getConfig().getBoolean("settings.beta-features")) + lore.add(Arconix.pl().getApi().format().formatText("&7Right-Click to &9Change Spawner Head&7.")); + lore.add(Arconix.pl().getApi().format().formatText("&6-----------------------------")); + + lore.add(Arconix.pl().getApi().format().formatText("&6Display Name: &7" + EpicSpawners.getInstance().spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(type) + ".Display-Name") + "&7.")); + if (EpicSpawners.getInstance().spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(type) + ".Display-Item")) { + lore.add(Arconix.pl().getApi().format().formatText("&6Display Item: &7" + EpicSpawners.getInstance().spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(type) + ".Display-Item") + "&7.")); + } else { + if (!name.contains("Custom")) { + lore.add(Arconix.pl().getApi().format().formatText("&6Display Item: &7Unavailable&7.")); + } else { + lore.add(Arconix.pl().getApi().format().formatText("&6Display Item: &7Dirt&7.")); + } + } + lore.add(Arconix.pl().getApi().format().formatText("&6Config Name: &7" + type + "&7.")); + itemmeta.setLore(lore); + itemmeta.setDisplayName(name); + item.setItemMeta(itemmeta); + i.setItem(11, item); + + ItemStack destroy = new ItemStack(Material.TNT); + ItemMeta destroymeta = destroy.getItemMeta(); + boolean dont = false; + for (final EntityType val : EntityType.values()) { + if (val.isSpawnable() && val.isAlive()) { + if (val.name().equals(type)) { + dont = true; + } + } + } + lore = new ArrayList<>(); + if (!dont) { + destroymeta.setDisplayName(Arconix.pl().getApi().format().formatText("&7Left-Click to: &cDisable Spawner")); + lore.add(Arconix.pl().getApi().format().formatText("&7Right-Click to: &cDestroy Spawner")); + } else + destroymeta.setDisplayName(Arconix.pl().getApi().format().formatText("&7Click to: &cDisable Spawner")); + lore.add(Arconix.pl().getApi().format().formatText("&6---------------------------")); + if (!EpicSpawners.getInstance().spawnerFile.getConfig().getBoolean("Entities." + Methods.getTypeFromString(type) + ".Allowed")) + lore.add(Arconix.pl().getApi().format().formatText("&6Currently:&c Disabled.")); + else + lore.add(Arconix.pl().getApi().format().formatText("&6Currently:&a Enabled.")); + destroymeta.setLore(lore); + + destroy.setItemMeta(destroymeta); + i.setItem(28, destroy); + + ItemStack save = new ItemStack(Material.REDSTONE); + ItemMeta savemeta = save.getItemMeta(); + savemeta.setDisplayName(Arconix.pl().getApi().format().formatText("&a&lSave Spawner")); + save.setItemMeta(savemeta); + i.setItem(30, save); + + ItemStack settings = new ItemStack(Material.LEVER); + ItemMeta settingsmeta = settings.getItemMeta(); + settingsmeta.setDisplayName(Arconix.pl().getApi().format().formatText("&9&lGeneral Settings")); + settings.setItemMeta(settingsmeta); + i.setItem(23, settings); + + ItemStack it2 = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + + ItemStack entity = EpicSpawners.getInstance().heads.addTexture(it2, "OMNI"); + ItemMeta entitymeta = entity.getItemMeta(); + entitymeta.setDisplayName(Arconix.pl().getApi().format().formatText("&a&lEntity Settings")); + entity.setItemMeta(entitymeta); + i.setItem(25, entity); + + ItemStack item2 = new ItemStack(Material.CHEST); + ItemMeta item2meta = item2.getItemMeta(); + item2meta.setDisplayName(Arconix.pl().getApi().format().formatText("&5&lItem Settings")); + item2.setItemMeta(item2meta); + i.setItem(41, item2); + + ItemStack item3 = new ItemStack(Material.GOLD_BLOCK); + ItemMeta item3meta = item3.getItemMeta(); + item3meta.setDisplayName(Arconix.pl().getApi().format().formatText("&c&lBlock Settings")); + item3.setItemMeta(item3meta); + i.setItem(33, item3); + + ItemStack command = new ItemStack(Material.PAPER); + ItemMeta commandmeta = command.getItemMeta(); + commandmeta.setDisplayName(Arconix.pl().getApi().format().formatText("&6&lCommand Settings")); + command.setItemMeta(commandmeta); + i.setItem(43, command); + + p.openInventory(i); + EpicSpawners.getInstance().editing.put(p, id); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public String getType(int id) { + String type = "PIG"; + try { + ConfigurationSection cs = EpicSpawners.getInstance().spawnerFile.getConfig().getConfigurationSection("Entities"); + int num = 1; + for (String key : cs.getKeys(false)) { + if (!key.equals("Omni")) { + if (num == id) { + key = key.toUpperCase().replace(" ", "_"); + type = key; + } + num++; + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + return type; + } + + @SuppressWarnings("unchecked") + public void editor(Player p, String type) { + try { + EpicSpawners.getInstance().subediting.put(p, type); + String typee; + if (EpicSpawners.getInstance().editing.get(p) != 0) + typee = getType(EpicSpawners.getInstance().editing.get(p)); + else + typee = EpicSpawners.getInstance().newSpawnerName; + String name = Methods.compileName(typee, 0, false); + Inventory i = Bukkit.createInventory(null, 54, Arconix.pl().getApi().format().formatTitle(Arconix.pl().getApi().format().formatText(name + "&8 " + type + " &8Settings."))); + + int num = 0; + while (num != 54) { + i.setItem(num, Methods.getGlass()); + num++; + } + List itemList = new ArrayList<>(); + List entityList = new ArrayList<>(); + List commandList = new ArrayList<>(); + List blockList = new ArrayList<>(); + switch (type) { + case "Item": + if (EpicSpawners.getInstance().itemEditorInstance.size() == 0) { + //EpicSpawners.getInstance().isItemInstanceSaved = false; + } + if (EpicSpawners.getInstance().isItemInstanceSaved) { + itemList = EpicSpawners.getInstance().itemEditorInstance; + } else { + if (EpicSpawners.getInstance().spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(typee) + ".items")) { + List list = (List) EpicSpawners.getInstance().spawnerFile.getConfig().getList("Entities." + Methods.getTypeFromString(typee) + ".items"); + if (list != null) + itemList = list; + } + } + break; + case "Entity": + if (EpicSpawners.getInstance().isEntityInstanceSaved) { + entityList = EpicSpawners.getInstance().entityEditorInstance; + } else { + List list = (List) EpicSpawners.getInstance().spawnerFile.getConfig().getList("Entities." + Methods.getTypeFromString(typee) + ".entities"); + if (list != null) + entityList = list; + EpicSpawners.getInstance().entityEditorInstance = entityList; + } + break; + case "Command": + if (EpicSpawners.getInstance().isCommandInstanceSaved) { + commandList = EpicSpawners.getInstance().commandEditorInstance; + } else { + List list = (List) EpicSpawners.getInstance().spawnerFile.getConfig().getList("Entities." + Methods.getTypeFromString(typee) + ".commands"); + if (list != null) + commandList = list; + EpicSpawners.getInstance().commandEditorInstance = commandList; + } + break; + case "Block": + if (EpicSpawners.getInstance().isBlockInstanceSaved) { + blockList = EpicSpawners.getInstance().blockEditorInstance; + } else { + List list = (List) EpicSpawners.getInstance().spawnerFile.getConfig().getList("Entities." + Methods.getTypeFromString(typee) + ".blocks"); + if (list != null) + blockList = list; + EpicSpawners.getInstance().blockEditorInstance = blockList; + } + break; + } + + num = 10; + int spot = 0; + while (num != 26) { + if (num == 17) + num = num + 2; + + if (itemList.size() >= spot + 1 && type.equals("Item")) { + i.setItem(num, itemList.get(spot)); + } else if (blockList.size() >= spot + 1 && type.equals("Block")) { + i.setItem(num, new ItemStack(Material.valueOf(blockList.get(spot)))); + } else if (entityList.size() >= spot + 1 && type.equals("Entity")) { + ItemStack it = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + ItemStack item = EpicSpawners.getInstance().heads.addTexture(it, entityList.get(spot)); + ItemMeta meta = item.getItemMeta(); + meta.setDisplayName(Arconix.pl().getApi().format().formatText("&e" + Methods.getTypeFromString(entityList.get(spot)))); + item.setItemMeta(meta); + i.setItem(num, item); + } else if (commandList.size() >= spot + 1 && type.equals("Command")) { + ItemStack parseStack = new ItemStack(Material.PAPER, 1); + ItemMeta meta = parseStack.getItemMeta(); + meta.setDisplayName(Arconix.pl().getApi().format().formatText("&a/" + commandList.get(spot))); + parseStack.setItemMeta(meta); + i.setItem(num, parseStack); + } else { + i.setItem(num, new ItemStack(Material.AIR)); + } + spot++; + num++; + } + + i.setItem(1, Methods.getBackgroundGlass(true)); + i.setItem(7, Methods.getBackgroundGlass(true)); + i.setItem(8, Methods.getBackgroundGlass(true)); + + i.setItem(9, Methods.getBackgroundGlass(true)); + i.setItem(17, Methods.getBackgroundGlass(true)); + + i.setItem(36, Methods.getBackgroundGlass(false)); + i.setItem(37, Methods.getBackgroundGlass(false)); + i.setItem(38, Methods.getBackgroundGlass(false)); + i.setItem(42, Methods.getBackgroundGlass(false)); + i.setItem(43, Methods.getBackgroundGlass(false)); + i.setItem(44, Methods.getBackgroundGlass(false)); + + i.setItem(45, Methods.getBackgroundGlass(true)); + i.setItem(46, Methods.getBackgroundGlass(true)); + i.setItem(47, Methods.getBackgroundGlass(false)); + i.setItem(51, Methods.getBackgroundGlass(false)); + i.setItem(52, Methods.getBackgroundGlass(true)); + i.setItem(53, Methods.getBackgroundGlass(true)); + + ItemStack head2 = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + ItemStack skull2 = head2; + if (!EpicSpawners.getInstance().v1_7) + skull2 = Arconix.pl().getApi().getGUI().addTexture(head2, "http://textures.minecraft.net/texture/3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23"); + SkullMeta skull2Meta = (SkullMeta) skull2.getItemMeta(); + if (EpicSpawners.getInstance().v1_7) + skull2Meta.setOwner("MHF_ArrowLeft"); + skull2.setDurability((short) 3); + skull2Meta.setDisplayName(instance.getLocale().getMessage("general.nametag.back")); + skull2.setItemMeta(skull2Meta); + + i.setItem(0, skull2); + + if (type.equals("Item") || type.equals("Command") || type.equals("Block")) { + ItemStack command = new ItemStack(Material.LEVER); + ItemMeta commandmeta = command.getItemMeta(); + commandmeta.setDisplayName(Arconix.pl().getApi().format().formatText("&7Left-Click to &9Modify Global Tick Rate&7.")); + ArrayList lore = new ArrayList<>(); + lore.add(Arconix.pl().getApi().format().formatText("&7(1 tick is half a second)")); + switch (type) { + case "Command": + lore.add(Arconix.pl().getApi().format().formatText("&7Currently: &c" + EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + Methods.getTypeFromString(typee) + ".commandTickRate"))); + break; + case "Item": + lore.add(Arconix.pl().getApi().format().formatText("&7Currently: &c" + EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + Methods.getTypeFromString(typee) + ".itemTickRate"))); + break; + case "Block": + lore.add(Arconix.pl().getApi().format().formatText("&7Currently: &c" + EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + Methods.getTypeFromString(typee) + ".blockTickRate"))); + break; + } + lore.add(Arconix.pl().getApi().format().formatText("&7Right-Click to &bModify Amount&7.")); + commandmeta.setLore(lore); + command.setItemMeta(commandmeta); + i.setItem(40, command); + if (type.equals("Command")) { + ItemStack item = new ItemStack(Material.WATCH); + ItemMeta meta = item.getItemMeta(); + meta.setDisplayName(Arconix.pl().getApi().format().formatText("&bSpawn Limit")); + lore = new ArrayList<>(); + lore.add(Arconix.pl().getApi().format().formatText("&7Currently: &c" + EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + Methods.getTypeFromString(typee) + ".commandSpawnLimit"))); + lore.add(""); + lore.add(Arconix.pl().getApi().format().formatText("&7This is the spawn limit for entities you spawn")); + lore.add(Arconix.pl().getApi().format().formatText("&7from this spawner. Set to &60 &7to disable this.")); + meta.setLore(lore); + item.setItemMeta(meta); + i.setItem(49, item); + } + } + + if (!type.equals("Item") && !type.equals("Block")) { + ItemStack add; + String addName; + if (type.equals("Command")) { + add = new ItemStack(Material.PAPER); + addName = "&6Add Command"; + } else { + add = new ItemStack(Material.MONSTER_EGG); + addName = "&6Add Entity"; + } + ItemMeta addmeta = add.getItemMeta(); + addmeta.setDisplayName(Arconix.pl().getApi().format().formatText(addName)); + + add.setItemMeta(addmeta); + i.setItem(39, add); + } + + ItemStack save = new ItemStack(Material.REDSTONE); + ItemMeta savemeta = save.getItemMeta(); + savemeta.setDisplayName(Arconix.pl().getApi().format().formatText("&aSave")); + ArrayList lore = new ArrayList<>(); + lore.add(Arconix.pl().getApi().format().formatText("")); + lore.add(Arconix.pl().getApi().format().formatText("&7This only saves the instance you will")); + lore.add(Arconix.pl().getApi().format().formatText("&7need to click save on the main screen")); + lore.add(Arconix.pl().getApi().format().formatText("&7to finalize changes.")); + savemeta.setLore(lore); + save.setItemMeta(savemeta); + if (!type.equals("Item")) + i.setItem(41, save); + else + i.setItem(49, save); + + p.openInventory(i); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void basicSettings(Player p) { + try { + EpicSpawners.getInstance().subediting.put(p, "basic"); + String typee; + if (EpicSpawners.getInstance().editing.get(p) != 0) + typee = getType(EpicSpawners.getInstance().editing.get(p)); + else + typee = EpicSpawners.getInstance().newSpawnerName; + String name = Methods.compileName(typee, 0, false); + Inventory i = Bukkit.createInventory(null, 45, Arconix.pl().getApi().format().formatTitle(Arconix.pl().getApi().format().formatText(name + " &8Settings."))); + int num = 0; + while (num != 45) { + i.setItem(num, Methods.getGlass()); + num++; + } + + ItemStack head2 = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3); + ItemStack skull2 = head2; + if (!EpicSpawners.getInstance().v1_7) + skull2 = Arconix.pl().getApi().getGUI().addTexture(head2, "http://textures.minecraft.net/texture/3ebf907494a935e955bfcadab81beafb90fb9be49c7026ba97d798d5f1a23"); + SkullMeta skull2Meta = (SkullMeta) skull2.getItemMeta(); + if (EpicSpawners.getInstance().v1_7) + skull2Meta.setOwner("MHF_ArrowLeft"); + skull2.setDurability((short) 3); + skull2Meta.setDisplayName(instance.getLocale().getMessage("general.nametag.back")); + skull2.setItemMeta(skull2Meta); + + i.setItem(0, skull2); + + i.setItem(1, Methods.getBackgroundGlass(true)); + i.setItem(2, Methods.getBackgroundGlass(false)); + i.setItem(9, Methods.getBackgroundGlass(true)); + + i.setItem(6, Methods.getBackgroundGlass(false)); + i.setItem(7, Methods.getBackgroundGlass(true)); + i.setItem(8, Methods.getBackgroundGlass(true)); + i.setItem(17, Methods.getBackgroundGlass(true)); + + i.setItem(27, Methods.getBackgroundGlass(true)); + + i.setItem(35, Methods.getBackgroundGlass(true)); + i.setItem(36, Methods.getBackgroundGlass(true)); + i.setItem(37, Methods.getBackgroundGlass(true)); + i.setItem(38, Methods.getBackgroundGlass(false)); + + i.setItem(42, Methods.getBackgroundGlass(false)); + i.setItem(43, Methods.getBackgroundGlass(true)); + i.setItem(44, Methods.getBackgroundGlass(true)); + + + ItemStack item2 = new ItemStack(Material.DOUBLE_PLANT); + ItemMeta item2meta = item2.getItemMeta(); + item2meta.setDisplayName(Arconix.pl().getApi().format().formatText("&6&lShop Price")); + + ArrayList lore = new ArrayList<>(); + lore.add(Arconix.pl().getApi().format().formatText("&7Currently: &a" + EpicSpawners.getInstance().spawnerFile.getConfig().getDouble("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Shop-Price"))); + + lore.add(Arconix.pl().getApi().format().formatText("&7This is the price of the")); + lore.add(Arconix.pl().getApi().format().formatText("&7spawner in the shop.")); + item2meta.setLore(lore); + + item2.setItemMeta(item2meta); + i.setItem(19, item2); + + item2 = new ItemStack(Material.DIAMOND); + item2meta = item2.getItemMeta(); + item2meta.setDisplayName(Arconix.pl().getApi().format().formatText("&6&lIn Shop")); + lore = new ArrayList<>(); + lore.add(Arconix.pl().getApi().format().formatText("&7Currently: &a" + EpicSpawners.getInstance().spawnerFile.getConfig().getBoolean("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".In-Shop"))); + + lore.add(Arconix.pl().getApi().format().formatText("&7If this is true this spawner")); + lore.add(Arconix.pl().getApi().format().formatText("&7will show up in the shop GUI.")); + item2meta.setLore(lore); + item2.setItemMeta(item2meta); + i.setItem(20, item2); + + item2 = new ItemStack(Material.FIREBALL); + item2meta = item2.getItemMeta(); + item2meta.setDisplayName(Arconix.pl().getApi().format().formatText("&c&lSpawn On Fire")); + lore = new ArrayList<>(); + lore.add(Arconix.pl().getApi().format().formatText("&7Currently: &a" + EpicSpawners.getInstance().spawnerFile.getConfig().getBoolean("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Spawn-On-Fire"))); + + lore.add(Arconix.pl().getApi().format().formatText("&7If this is true this spawner")); + lore.add(Arconix.pl().getApi().format().formatText("&7will spawn entities on fire.")); + item2meta.setLore(lore); + item2.setItemMeta(item2meta); + i.setItem(22, item2); + + item2 = new ItemStack(Material.HOPPER); + item2meta = item2.getItemMeta(); + item2meta.setDisplayName(Arconix.pl().getApi().format().formatText("&5&lUpgradable")); + lore = new ArrayList<>(); + lore.add(Arconix.pl().getApi().format().formatText("&7Currently: &a" + EpicSpawners.getInstance().spawnerFile.getConfig().getBoolean("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Upgradable"))); + + lore.add(Arconix.pl().getApi().format().formatText("&7Setting this to true will define")); + lore.add(Arconix.pl().getApi().format().formatText("&7whether or not this spawner is")); + lore.add(Arconix.pl().getApi().format().formatText("&7upgradable.")); + item2meta.setLore(lore); + item2.setItemMeta(item2meta); + i.setItem(13, item2); + + item2 = new ItemStack(Material.DOUBLE_PLANT); + item2meta = item2.getItemMeta(); + item2meta.setDisplayName(Arconix.pl().getApi().format().formatText("&6&lCustom ECO cost")); + lore = new ArrayList<>(); + lore.add(Arconix.pl().getApi().format().formatText("&7Currently: &a" + EpicSpawners.getInstance().spawnerFile.getConfig().getDouble("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Custom-ECO-Cost"))); + + lore.add(Arconix.pl().getApi().format().formatText("&7This is the custom Economy cost")); + lore.add(Arconix.pl().getApi().format().formatText("&7to upgrade this spawner.")); + item2meta.setLore(lore); + item2.setItemMeta(item2meta); + i.setItem(24, item2); + + item2 = new ItemStack(Material.EXP_BOTTLE); + item2meta = item2.getItemMeta(); + item2meta.setDisplayName(Arconix.pl().getApi().format().formatText("&5&lCustom XP cost")); + lore = new ArrayList<>(); + lore.add(Arconix.pl().getApi().format().formatText("&7Currently: &a" + EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Custom-XP-Cost"))); + + lore.add(Arconix.pl().getApi().format().formatText("&7This is the custom XP cost")); + lore.add(Arconix.pl().getApi().format().formatText("&7to upgrade this spawner.")); + item2meta.setLore(lore); + item2.setItemMeta(item2meta); + i.setItem(25, item2); + + item2 = new ItemStack(Material.DOUBLE_PLANT); + item2meta = item2.getItemMeta(); + item2meta.setDisplayName(Arconix.pl().getApi().format().formatText("&5&lCustom Goal")); + lore = new ArrayList<>(); + lore.add(Arconix.pl().getApi().format().formatText("&7Currently: &a" + EpicSpawners.getInstance().spawnerFile.getConfig().getInt("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".CustomGoal"))); + + lore.add(Arconix.pl().getApi().format().formatText("&7If this is set to anything ")); + lore.add(Arconix.pl().getApi().format().formatText("&7but 0 the default kill goal ")); + lore.add(Arconix.pl().getApi().format().formatText("&7will be adjusted for this spawner.")); + item2meta.setLore(lore); + item2.setItemMeta(item2meta); + i.setItem(30, item2); + + item2 = new ItemStack(Material.DIAMOND); + item2meta = item2.getItemMeta(); + item2meta.setDisplayName(Arconix.pl().getApi().format().formatText("&b&lPickup Cost")); + lore = new ArrayList<>(); + lore.add(Arconix.pl().getApi().format().formatText("&7Currently: &a" + EpicSpawners.getInstance().spawnerFile.getConfig().getDouble("Entities." + Methods.getTypeFromString(EpicSpawners.getInstance().editor.getType(EpicSpawners.getInstance().editing.get(p))) + ".Pickup-cost"))); + + lore.add(Arconix.pl().getApi().format().formatText("&7Setting this to anything but 0")); + lore.add(Arconix.pl().getApi().format().formatText("&7will allow you to charge players")); + lore.add(Arconix.pl().getApi().format().formatText("&7for breaking this spawner.")); + item2meta.setLore(lore); + item2.setItemMeta(item2meta); + i.setItem(32, item2); + + int ty = EpicSpawners.getInstance().editing.get(p); + p.openInventory(i); + EpicSpawners.getInstance().editing.put(p, ty); + } catch (Exception e) { + Debugger.runReport(e); + } + + } + + public void save(Player p) { + try { + String type; + if (EpicSpawners.getInstance().editing.get(p) != 0) + type = getType(EpicSpawners.getInstance().editing.get(p)); + else + type = EpicSpawners.getInstance().newSpawnerName; + EpicSpawners.getInstance().subediting.put(p, type); + + String name = Methods.getTypeFromString(type); + if (EpicSpawners.getInstance().isItemInstanceSaved) { + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + name + ".items", EpicSpawners.getInstance().itemEditorInstance); + } + if (EpicSpawners.getInstance().isEntityInstanceSaved) { + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + name + ".entities", EpicSpawners.getInstance().entityEditorInstance); + } + if (EpicSpawners.getInstance().isCommandInstanceSaved) { + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + name + ".commands", EpicSpawners.getInstance().commandEditorInstance); + } + if (EpicSpawners.getInstance().isBlockInstanceSaved) { + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + name + ".blocks", EpicSpawners.getInstance().blockEditorInstance); + } + EpicSpawners.getInstance().processDefault(name); + EpicSpawners.getInstance().spawnerFile.saveConfig(); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void alterSetting(Player p, String type) { + try { + int typ = EpicSpawners.getInstance().editing.get(p); + String entity = getType(typ); + p.sendMessage(""); + switch (type) { + case "Shop-Price": + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Enter a sale price for &6" + Methods.getTypeFromString(entity) + "&7.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Example: &619.99&7.")); + break; + case "Custom-ECO-Cost": + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Enter a custom eco cost for " + Methods.getTypeFromString(entity) + "&7.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Use &60 &7to use the default cost.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Example: &619.99&7.")); + break; + case "Custom-XP-Cost": + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Enter a custom xp cost for " + Methods.getTypeFromString(entity) + "&7.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Use &60 &7to use the default cost.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Example: &625&7.")); + break; + case "Pickup-cost": + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Enter a pickup cost for " + Methods.getTypeFromString(entity) + "&7.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Use &60 &7to disable.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Example: &719.99&6.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Example: &625&7.")); + break; + case "CustomGoal": + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Enter a custom goal for " + Methods.getTypeFromString(entity) + "&7.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Use &60 &7to use the default price.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Example: &35&6.")); + break; + } + p.sendMessage(""); + EpicSpawners.getInstance().chatEditing.put(p, type); + p.closeInventory(); + EpicSpawners.getInstance().editing.put(p, typ); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public List getItems(Player p) { + try { + ItemStack[] items2 = p.getOpenInventory().getTopInventory().getContents(); + //items2 = Arrays.copyOf(items2, items2.length - 9); + + List items = new ArrayList<>(); + + int num = 0; + for (ItemStack item : items2) { + if (num >= 10 && num <= 25 && num != 17 && num != 18 && item != null) { + items.add(items2[num]); + } + num++; + } + return items; + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public void saveInstance(Player p, List items) { + try { + switch (EpicSpawners.getInstance().subediting.get(p)) { + case "Item": + EpicSpawners.getInstance().itemEditorInstance = items; + EpicSpawners.getInstance().isItemInstanceSaved = true; + break; + case "Block": { + List list = new ArrayList<>(); + for (ItemStack item : items) { + String name = item.getType().name(); + list.add(name); + } + + EpicSpawners.getInstance().blockEditorInstance = list; + EpicSpawners.getInstance().isBlockInstanceSaved = true; + break; + } + case "Entity": { + List list = new ArrayList<>(); + for (ItemStack item : items) { + String name = ChatColor.stripColor(item.getItemMeta().getDisplayName()).toUpperCase().replace(" ", "_"); + list.add(name); + } + EpicSpawners.getInstance().entityEditorInstance = list; + EpicSpawners.getInstance().isEntityInstanceSaved = true; + break; + } + case "Command": { + List list = new ArrayList<>(); + for (ItemStack item : items) { + String name = ChatColor.stripColor(item.getItemMeta().getDisplayName()).substring(1); + list.add(name); + } + EpicSpawners.getInstance().commandEditorInstance = list; + EpicSpawners.getInstance().isCommandInstanceSaved = true; + break; + } + } + p.sendMessage(Arconix.pl().getApi().format().formatText(EpicSpawners.getInstance().references.getPrefix() + "&7Instance Saved.")); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + + public void addEntityInit(Player p) { + try { + int type = EpicSpawners.getInstance().editing.get(p); + p.sendMessage(""); + StringBuilder list = new StringBuilder(); + for (final EntityType value : EntityType.values()) { + if (value.isSpawnable() && value.isAlive()) { + list.append(value.toString()).append("&7, &6"); + } + } + p.sendMessage(Arconix.pl().getApi().format().formatText("&6" + list)); + p.sendMessage("Enter an entity type."); + p.sendMessage(""); + EpicSpawners.getInstance().chatEditing.put(p, "addEntity"); + p.closeInventory(); + EpicSpawners.getInstance().editing.put(p, type); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void destroy(Player p) { + try { + int type = EpicSpawners.getInstance().editing.get(p); + + p.sendMessage(""); + p.sendMessage(Arconix.pl().getApi().format().formatText("&cAre you sure you want to destroy &6" + getType(type) + "&7.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Type &l&6CONFIRM &7to continue. Otherwise type anything else to cancel.")); + p.sendMessage(""); + EpicSpawners.getInstance().chatEditing.put(p, "destroy"); + p.closeInventory(); + EpicSpawners.getInstance().editing.put(p, type); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void destroyFinal(Player p, String msg) { + try { + int type = EpicSpawners.getInstance().editing.get(p); + + EpicSpawners.getInstance().chatEditing.remove(p); + EpicSpawners.getInstance().editing.put(p, type); + if (msg.toLowerCase().equals("confirm")) { + p.sendMessage(Arconix.pl().getApi().format().formatText("&6" + getType(type) + " Spawner &7 has been destroyed successfully")); + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(getType(type)), null); + open(p, 1); + } else { + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Action canceled...")); + overview(p, EpicSpawners.getInstance().editing.get(p)); + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void editChatInit(Player p) { + try { + int type = EpicSpawners.getInstance().editing.get(p); + String entity = getType(type); + + p.sendMessage(""); + switch (EpicSpawners.getInstance().subediting.get(p)) { + case "Item": + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Enter a tick rate for &6" + Methods.getTypeFromString(entity) + "&7.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7This is the amount of ticks that will pass in between every item spawn.")); + break; + case "Block": + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Enter a tick rate for &6" + Methods.getTypeFromString(entity) + "&7.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7This is the amount of ticks that will pass in between every block spawn.")); + break; + case "Command": + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Enter a tick rate for &6" + Methods.getTypeFromString(entity) + "&7.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7This is the amount of ticks that will pass in between every command.")); + break; + } + p.sendMessage(""); + EpicSpawners.getInstance().chatEditing.put(p, "tick"); + p.closeInventory(); + EpicSpawners.getInstance().editing.put(p, type); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void editSpawnLimit(Player p) { + try { + if (EpicSpawners.getInstance().subediting.get(p).equals("Command")) { + int type = EpicSpawners.getInstance().editing.get(p); + String entity = getType(type); + + p.sendMessage(""); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Enter a spawn limit for &6" + Methods.getTypeFromString(entity) + "&7.")); + p.sendMessage(""); + EpicSpawners.getInstance().chatEditing.put(p, "spawnLimit"); + p.closeInventory(); + EpicSpawners.getInstance().editing.put(p, type); + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void createCommand(Player p) { + try { + int type = EpicSpawners.getInstance().editing.get(p); + p.sendMessage(""); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Please type a command. Example: &6eco give @p 1000&7.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7You can use @X @Y and @Z for random X Y and Z coordinates around the spawner.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7If you're getting command output try &6/gamerule sendCommandFeedback false&7.")); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7do not include a &a/")); + p.sendMessage(""); + + EpicSpawners.getInstance().chatEditing.put(p, "Command"); + p.closeInventory(); + EpicSpawners.getInstance().editing.put(p, type); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void addCommand(Player p, String cmd) { + try { + if (!EpicSpawners.getInstance().commandEditorInstance.contains(cmd)) { + EpicSpawners.getInstance().commandEditorInstance.add(cmd); + } + EpicSpawners.getInstance().isCommandInstanceSaved = true; + editor(p, "Command"); + EpicSpawners.getInstance().chatEditing.remove(p); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void editSpawnerName(Player p) { + try { + int type = EpicSpawners.getInstance().editing.get(p); + String entity = getType(type); + + p.sendMessage(""); + p.sendMessage(Arconix.pl().getApi().format().formatText("&7Enter a display name for &6" + Methods.getTypeFromString(entity) + "&7.")); + p.sendMessage(""); + EpicSpawners.getInstance().chatEditing.put(p, "name"); + p.closeInventory(); + EpicSpawners.getInstance().editing.put(p, type); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void saveSpawnerName(Player p, String name) { + try { + String entity = getType(EpicSpawners.getInstance().editing.get(p)); + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(entity) + ".Display-Name", name); + overview(p, EpicSpawners.getInstance().editing.get(p)); + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void addEntity(Player p, String ent) { + try { + if (!EpicSpawners.getInstance().entityEditorInstance.contains(ent)) { + EpicSpawners.getInstance().entityEditorInstance.add(ent); + } + EpicSpawners.getInstance().isEntityInstanceSaved = true; + editor(p, "Entity"); + EpicSpawners.getInstance().chatEditing.remove(p); + + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public void saveChatEdit(Player p, int amt) { + try { + String entity = getType(EpicSpawners.getInstance().editing.get(p)); + switch (EpicSpawners.getInstance().subediting.get(p)) { + case "Item": + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(entity) + ".itemTickRate", amt); + break; + case "Command": + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(entity) + ".commandTickRate", amt); + break; + case "Block": + EpicSpawners.getInstance().spawnerFile.getConfig().set("Entities." + Methods.getTypeFromString(entity) + ".blockTickRate", amt); + break; + } + switch (EpicSpawners.getInstance().subediting.get(p)) { + case "Item": + editor(p, "Item"); + break; + case "Command": + editor(p, "Command"); + break; + case "Block": + editor(p, "Block"); + break; + } + } catch (Exception e) { + Debugger.runReport(e); + } + } +} diff --git a/src/main/java/com/songoda/epicspawners/spawners/SpawnerItem.java b/src/main/java/com/songoda/epicspawners/spawners/SpawnerItem.java new file mode 100644 index 0000000..e7d9f2d --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/spawners/SpawnerItem.java @@ -0,0 +1,31 @@ +package com.songoda.epicspawners.spawners; + +/** + * Created by songo on 5/21/2017. + */ +public class SpawnerItem { + + private String type = "PIG"; + private int multi = 1; + + public SpawnerItem(String type, int multi) { + this.type = type; + this.multi = multi; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public int getMulti() { + return multi; + } + + public void setMulti(int multi) { + this.multi = multi; + } +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicspawners/spawners/SpawnerPlaceEvent.java b/src/main/java/com/songoda/epicspawners/spawners/SpawnerPlaceEvent.java new file mode 100644 index 0000000..36b6aee --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/spawners/SpawnerPlaceEvent.java @@ -0,0 +1,63 @@ +package com.songoda.epicspawners.spawners; + +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; + +/** + * Created by songoda on 4/22/2017. + */ +public class SpawnerPlaceEvent extends Event implements Cancellable { + private static final HandlerList HANDLERS = new HandlerList(); + + private Location location; + private Player player; + private int multi; + private String type; + + private boolean canceled = false; + + public SpawnerPlaceEvent(Location location, Player player, String type) { + Spawner spawner = new Spawner(location); + this.location = location; + this.player = player; + this.multi = spawner.getMulti(); + this.type = type; + } + + public Location getLocation() { + return location; + } + + public Player getPlayer() { + return player; + } + + public int getMulti() { + return multi; + } + + public String getType() { + return type; + } + + @Override + public HandlerList getHandlers() { + return HANDLERS; + } + public static HandlerList getHandlerList() { + return HANDLERS; + } + + @Override + public boolean isCancelled() { + return canceled; + } + + @Override + public void setCancelled(boolean canceled) { + this.canceled = canceled; + } +} diff --git a/src/main/java/com/songoda/epicspawners/utils/Debugger.java b/src/main/java/com/songoda/epicspawners/utils/Debugger.java new file mode 100644 index 0000000..44c23ff --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/utils/Debugger.java @@ -0,0 +1,31 @@ +package com.songoda.epicspawners.utils; + +import com.songoda.epicspawners.EpicSpawners; + +/** + * 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 EpicSpawners."); + System.out.println("--------------------------------------------------------------"); + e.printStackTrace(); + System.out.println("=============================================================="); + } + sendReport(e); + } + + public static void sendReport(Exception e) { + + } + + public static boolean isDebug() { + EpicSpawners plugin = EpicSpawners.pl(); + return plugin.getConfig().getBoolean("System.Debugger Enabled"); + } + +} diff --git a/src/main/java/com/songoda/epicspawners/utils/HeadType.java b/src/main/java/com/songoda/epicspawners/utils/HeadType.java new file mode 100644 index 0000000..88fa5ae --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/utils/HeadType.java @@ -0,0 +1,68 @@ +package com.songoda.epicspawners.utils; + +/** + * Created by songoda on 3/20/2017. + */ +public enum HeadType { + BAT("http://textures.minecraft.net/texture/978862a56119227aaad4b7c246c8b2256db985db0951f55b0a1f8616c191f"), + BLAZE("http://textures.minecraft.net/texture/b78ef2e4cf2c41a2d14bfde9caff10219f5b1bf5b35a49eb51c6467882cb5f0"), + CHICKEN("http://textures.minecraft.net/texture/1638469a599ceef7207537603248a9ab11ff591fd378bea4735b346a7fae893"), + COW("http://textures.minecraft.net/texture/5d6c6eda942f7f5f71c3161c7306f4aed307d82895f9d2b07ab4525718edc5"), + CREEPER("http://textures.minecraft.net/texture/295ef836389af993158aba27ff37b6567185f7a721ca90fdfeb937a7cb5747"), + CAVE_SPIDER("http://textures.minecraft.net/texture/41645dfd77d09923107b3496e94eeb5c30329f97efc96ed76e226e98224"), + DONKEY("http://textures.minecraft.net/texture/9ffca9f0859834da81af524c2865fa3186b5bf58bd1c4e3742837c4fd6853887"), + ELDER_GUARDIAN("http://textures.minecraft.net/texture/dbb9491b7a1768e3291959796232eb6f61b9c39aa2f81e13d287a3ab5d16dec"), + ENDERMAN("http://textures.minecraft.net/texture/7a59bb0a7a32965b3d90d8eafa899d1835f424509eadd4e6b709ada50b9cf"), + ENDERMITE("http://textures.minecraft.net/texture/e8c6cb8ceaad5a2ad5cc9a67bce6d5bdbf5cbb7e312955ccf9f162509355b1"), + ENDER_DRAGON("http://textures.minecraft.net/texture/74ecc040785e54663e855ef0486da72154d69bb4b7424b7381ccf95b095a"), + EVOKER("http://textures.minecraft.net/texture/bb48ed634196b7ded7455fdde56f3fa9f51b28f7b73839f0c6783b3961d"), + GHAST("http://textures.minecraft.net/texture/8b6a72138d69fbbd2fea3fa251cabd87152e4f1c97e5f986bf685571db3cc0"), + GIANT("http://textures.minecraft.net/texture/56fc854bb84cf4b7697297973e02b79bc10698460b51a639c60e5e417734e11"), + GUARDIAN( "http://textures.minecraft.net/texture/932c24524c82ab3b3e57c2052c533f13dd8c0beb8bdd06369bb2554da86c123"), + HORSE("http://textures.minecraft.net/texture/61902898308730c4747299cb5a5da9c25838b1d059fe46fc36896fee662729"), + HUSK("http://textures.minecraft.net/texture/6ae3a5bfcaa943d126988ed17ce8e4a7fb4231b05a5c5c947e5cc9752a199962"), + ILLUSIONER("http://textures.minecraft.net/texture/c269a9dabe4f9fd6b4d74b7cd9c7ee6b24d87549b5acabbeb36cd756cc373"), + IRON_GOLEM("http://textures.minecraft.net/texture/89091d79ea0f59ef7ef94d7bba6e5f17f2f7d4572c44f90f76c4819a714"), + LLAMA("http://textures.minecraft.net/texture/6bc438fc1fbbaea2289aabecedd3fdf269ddc979bf8b5c6a8fc4bb8dcd4e1fe"), + MAGMA_CUBE("http://textures.minecraft.net/texture/38957d5023c937c4c41aa2412d43410bda23cf79a9f6ab36b76fef2d7c429"), + MULE("http://textures.minecraft.net/texture/36fcd3ec3bc84bafb4123ea479471f9d2f42d8fb9c5f11cf5f4e0d93226"), + MUSHROOM_COW("http://textures.minecraft.net/texture/d0bc61b9757a7b83e03cd2507a2157913c2cf016e7c096a4d6cf1fe1b8db"), + OCELOT("http://textures.minecraft.net/texture/5657cd5c2989ff97570fec4ddcdc6926a68a3393250c1be1f0b114a1db1"), + OMNI("http://textures.minecraft.net/texture/afe097f7f7a6568884198b562cb58cfb84a3936fbf72828954aaa1f58cba32"), + PARROT("http://textures.minecraft.net/texture/fd7cca30a1dc2fb25d3b7fb16318330ac79742d97deeeabe5393fb8a2cb878"), + PIG("http://textures.minecraft.net/texture/621668ef7cb79dd9c22ce3d1f3f4cb6e2559893b6df4a469514e667c16aa4"), + PIG_ZOMBIE("http://textures.minecraft.net/texture/74e9c6e98582ffd8ff8feb3322cd1849c43fb16b158abb11ca7b42eda7743eb"), + POLAR_BEAR("http://textures.minecraft.net/texture/d46d23f04846369fa2a3702c10f759101af7bfe8419966429533cd81a11d2b"), + RABBIT("http://textures.minecraft.net/texture/dc7a317ec5c1ed7788f89e7f1a6af3d2eeb92d1e9879c05343c57f9d863de130"), + SHEEP("http://textures.minecraft.net/texture/f31f9ccc6b3e32ecf13b8a11ac29cd33d18c95fc73db8a66c5d657ccb8be70"), + SHULKER("http://textures.minecraft.net/texture/1433a4b73273a64c8ab2830b0fff777a61a488c92f60f83bfb3e421f428a44"), + SILVERFISH("http://textures.minecraft.net/texture/453a6aedbc9e4a22266cd70d2d4a2850a7e4b5864fbcbddf952b748fbabdb2"), + SKELETON("http://textures.minecraft.net/texture/2e5be6a3c0159d2c1f3b1e4e1d8384b6f7ebac993d58b10b9f8989c78a232"), + SKELETON_HORSE("http://textures.minecraft.net/texture/39be68887f5cf8c8044ebcdc5e768a172b2ef3e99545acd75b5ff74a263a"), + SLIME("http://textures.minecraft.net/texture/16ad20fc2d579be250d3db659c832da2b478a73a698b7ea10d18c9162e4d9b5"), + SNOWMAN("http://textures.minecraft.net/texture/a528df1653962e4e995dfd064a72b2cbff9b7197912880143f941a37db46c"), + SPIDER("http://textures.minecraft.net/texture/cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1"), + SQUID("http://textures.minecraft.net/texture/01433be242366af126da434b8735df1eb5b3cb2cede39145974e9c483607bac"), + STRAY("http://textures.minecraft.net/texture/96e58aeeaf75e9695813aeaabd3973c83d5ff8c285fe6b944550bc41b953"), + VEX("http://textures.minecraft.net/texture/6dc4b59be077f7f2f6b488666afb85e45d96cc57b57934ae11ba9734bb4811"), + VILLAGER("http://textures.minecraft.net/texture/822d8e751c8f2fd4c8942c44bdb2f5ca4d8ae8e575ed3eb34c18a86e93b"), + VINDICATOR("http://textures.minecraft.net/texture/7a5b31aeab7f728cd7e90f81e2ffad4cd198c1907574f57be2b7c42f49ddd"), + WITCH("http://textures.minecraft.net/texture/2e139130d7efd41fbad53735f64f8aff265bd7c54977189c02babbec4b0d07b"), + WITHER("http://textures.minecraft.net/texture/cdf74e323ed41436965f5c57ddf2815d5332fe999e68fbb9d6cf5c8bd4139f"), + WITHER_SKELETON("http://textures.minecraft.net/texture/233b41fa79cd53a230e2db942863843183a70404533bbc01fab744769bcb"), + WOLF("http://textures.minecraft.net/texture/e95cbb4f75ea87617f2f713c6d49dac3209ba1bd4b9369654b1459ea15317"), + ZOMBIE("http://textures.minecraft.net/texture/56fc854bb84cf4b7697297973e02b79bc10698460b51a639c60e5e417734e11"), + ZOMBIE_HORSE("http://textures.minecraft.net/texture/d898e3eacff9949a9de9777ddfada8a7f62a4102de47b54db35f9f843e1ce4"), + ZOMBIE_VILLAGER("http://textures.minecraft.net/texture/1a207a2b872fe8dd22ce5e27fc3263622621635efd8ea6abbdf317f99c5843"), + UNKNOWN("http://textures.minecraft.net/texture/452fe4ce1f1d53a12ed443eeba7297e81da581e0c7a39954d9d7bba7de59c46"); + + private String url; + + HeadType(String url) { + this.url = url; + } + + public String getUrl() { + return url; + } +} diff --git a/src/main/java/com/songoda/epicspawners/utils/Heads.java b/src/main/java/com/songoda/epicspawners/utils/Heads.java new file mode 100644 index 0000000..f6c539e --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/utils/Heads.java @@ -0,0 +1,47 @@ +package com.songoda.epicspawners.utils; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import org.bukkit.Material; +import org.bukkit.inventory.ItemStack; + +import java.util.HashMap; +import java.util.Map; + +/** + * Created by songoda on 3/19/2017. + */ +public class Heads { + + private Map textureURL = new HashMap<>(); + + private final EpicSpawners plugin = EpicSpawners.pl(); + + public Heads() { + try { + for (HeadType type : HeadType.values()) { + textureURL.put(type.name(), type.getUrl()); + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public ItemStack addTexture(ItemStack item, String name) { + try { + String headURL = textureURL.get(name.toUpperCase().replace(" ", "_")); + if (headURL == null) { + headURL = textureURL.get("UNKNOWN"); + } + if (plugin.v1_7) { + item = new ItemStack(Material.MOB_SPAWNER, 1); + return item; + } else { + return Arconix.pl().getApi().getGUI().addTexture(item, headURL); + } + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicspawners/utils/Methods.java b/src/main/java/com/songoda/epicspawners/utils/Methods.java new file mode 100644 index 0000000..4560606 --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/utils/Methods.java @@ -0,0 +1,283 @@ +package com.songoda.epicspawners.utils; + +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +import net.minecraft.server.v1_7_R4.AxisAlignedBB; +import org.bukkit.*; +import org.bukkit.craftbukkit.v1_7_R4.CraftWorld; +import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.EquipmentSlot; +import org.bukkit.inventory.ItemStack; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * Created by songoda on 2/24/2017. + */ +public class Methods { + + public static String formatName(EntityType type, int multi) { + try { + if (multi <= 0) + multi = 1; + return compileName(type.name(), multi, true); + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public static void takeItem(Player p, int amt) { + try { + if (p.getGameMode() != GameMode.CREATIVE) { + int result = p.getInventory().getItemInHand().getAmount() - amt; + if (result > 0) { + ItemStack is = p.getItemInHand(); + is.setAmount(is.getAmount() - amt); + p.setItemInHand(is); + } else { + p.setItemInHand(null); + } + } + } catch (Exception e) { + Debugger.runReport(e); + } + } + + public static boolean isOffhand(PlayerInteractEvent e) { + try { + EpicSpawners plugin = EpicSpawners.pl(); + if (!plugin.v1_8 && !plugin.v1_7) { + if (e.getHand() == EquipmentSlot.OFF_HAND) + return true; + } + } catch (Exception ee) { + Debugger.runReport(ee); + } + return false; + } + + public static boolean isOffhand(BlockPlaceEvent e) { + try { + EpicSpawners plugin = EpicSpawners.pl(); + if (!plugin.v1_8 && !plugin.v1_7 && e.getHand() == EquipmentSlot.OFF_HAND) + return true; + } catch (Exception ee) { + Debugger.runReport(ee); + } + return false; + } + + public static String getBoostCost(int time, int amt) { + try { + EpicSpawners plugin = EpicSpawners.pl(); + + String cost = ""; + + String un = plugin.getConfig().getString("Spawner Boosting.Item Charged For A Boost"); + + String[] parts = un.split(":"); + + String type = parts[0]; + + String multi = parts[1]; + + int co = boostCost(multi, time, amt); + if (!type.equals("ECO") && !type.equals("XP")) { + cost += "&6&l" + co; + cost += " &7" + type.substring(0, 1).toUpperCase() + type.toLowerCase().substring(1); + if (co != 1) + cost += "s"; + } else if (type.equals("ECO")) { + cost += "&6&l$" + Arconix.pl().getApi().format().formatEconomy(co); + } else if (type.equals("XP")) { + cost += "&6&l" + co; + cost += " &7Levels"; + } + + return cost; + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public static int boostCost(String multi, int time, int amt) { + try { + return (int) Math.ceil((Double.parseDouble(multi) * time) * amt); + } catch (Exception e) { + Debugger.runReport(e); + } + return 99999; + } + + public static String compileName(String type, int multi, boolean full) { + try { + if (multi == 0) multi = 1; + + EpicSpawners plugin = EpicSpawners.pl(); + + String name = plugin.getConfig().getString("Main.Spawner Name Format"); + String nme = getTypeFromString(type); + if (plugin.spawnerFile.getConfig().contains("Entities." + Methods.getTypeFromString(type) + ".Display-Name")) { + nme = plugin.spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(type) + ".Display-Name"); + } + + name = name.replace("{TYPE}", nme); + + if ((multi > 1 || plugin.getConfig().getBoolean("Main.Display Level In Spawner Title If Level 1") || plugin.getConfig().getBoolean("Main.Named Spawners Tiers")) && multi >= 0) { + if (plugin.getConfig().getBoolean("Main.Named Spawners Tiers") && plugin.getConfig().getStringList("Main.Tier Names").size() + 1 > multi) { + name = name.replace("{AMT}", plugin.getConfig().getStringList("Main.Tier Names").get(multi - 1)); + } else { + name = name.replace("{AMT}", Integer.toString(multi)); + } + name = name.replace("[", "").replace("]", ""); + } else { + name = name.replaceAll("\\[.*?]", ""); + } + + String info = ""; + if (full) { + info += Arconix.pl().getApi().format().convertToInvisibleString(type.toUpperCase().replaceAll(" ", "_") + ":" + multi + ":"); + } + + return info + Arconix.pl().getApi().format().formatText(name).trim(); + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public static ItemStack getGlass() { + try { + EpicSpawners plugin = EpicSpawners.pl(); + return Arconix.pl().getApi().getGUI().getGlass(plugin.getConfig().getBoolean("Interfaces.Replace Glass Type 1 With Rainbow Glass"), plugin.getConfig().getInt("Interfaces.Glass Type 1")); + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public static ItemStack getBackgroundGlass(boolean type) { + try { + EpicSpawners plugin = EpicSpawners.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 e) { + Debugger.runReport(e); + } + return null; + } + + public static String properType(String type) { + try { + EpicSpawners plugin = EpicSpawners.pl(); + return plugin.spawnerFile.getConfig().getString("Entities." + Methods.getTypeFromString(type) + ".Display-Name"); + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public static String getType(EntityType typ) { + try { + String type = typ.toString().replaceAll("_", " "); + type = ChatColor.stripColor(type.substring(0, 1).toUpperCase() + type.toLowerCase().substring(1)); + return type; + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public static String getTypeFromString(String typ) { + try { + if (typ == null) + return null; + String type = typ.replaceAll("_", " "); + type = ChatColor.stripColor(type.substring(0, 1).toUpperCase() + type.toLowerCase().substring(1)); + return type; + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public static String restoreType(String typ) { + try { + String type = typ.replace(" ", "_"); + type = type.toUpperCase(); + return type; + } catch (Exception e) { + Debugger.runReport(e); + } + return null; + } + + public static boolean isAir(Material type) { + try { + if (type == Material.AIR || type == Material.WOOD_PLATE + || type == Material.STONE_PLATE || type == Material.IRON_PLATE + || type == Material.GOLD_PLATE) + return true; + } catch (Exception e) { + Debugger.runReport(e); + } + return false; + } + + + @SuppressWarnings("unchecked") + public static Collection getNearbyEntities(Location location, double x, double y, double z) { + if (!EpicSpawners.getInstance().v1_7) return location.getWorld().getNearbyEntities(location,x,y,z); + + if (location == null) return Collections.emptyList(); + + World world = location.getWorld(); + AxisAlignedBB aabb = AxisAlignedBB.a(location.getX() - x, location.getY() - y, location.getZ() - z, location.getX() + x, location.getY() + y, location.getZ() + z); + List entityList = ((CraftWorld) world).getHandle().getEntities(null, aabb, null); + List bukkitEntityList = new ArrayList<>(); + + for (Object entity : entityList) { + bukkitEntityList.add(((net.minecraft.server.v1_7_R4.Entity) entity).getBukkitEntity()); + } + + return bukkitEntityList; + } + + public static int countEntitiesAroundLoation(Location location) { + try { + int amt = 0; + + String[] arr = EpicSpawners.getInstance().getConfig().getString("Main.Radius To Search Around Spawner").split("x"); + Collection nearbyEntite = getNearbyEntities(location.clone().add(0.5, 0.5, 0.5), Integer.parseInt(arr[0]), Integer.parseInt(arr[1]), Integer.parseInt(arr[2])); + if (nearbyEntite.size() < 1) return amt; + + for (Entity ee : nearbyEntite) { + if (!(ee instanceof LivingEntity) || ee instanceof Player || ee.getType().name().toLowerCase().contains("armor")) { + continue; + } + if (EpicSpawners.getInstance().getServer().getPluginManager().getPlugin("StackMob") != null + && ee.getMetadata(uk.antiperson.stackmob.tools.extras.GlobalValues.METATAG).size() != 0) { + amt = amt + ee.getMetadata(uk.antiperson.stackmob.tools.extras.GlobalValues.METATAG).get(0).asInt(); + } else { + amt++; + } + } + return amt; + } catch (Exception e) { + Debugger.runReport(e); + } + return 0; + } +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicspawners/utils/Reflection.java b/src/main/java/com/songoda/epicspawners/utils/Reflection.java new file mode 100644 index 0000000..ebe081b --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/utils/Reflection.java @@ -0,0 +1,54 @@ +package com.songoda.epicspawners.utils; + +import org.bukkit.Bukkit; +import org.bukkit.inventory.ItemStack; + +/** + * Created by songoda on 2/25/2017. + */ +@SuppressWarnings({"unchecked", "ConstantConditions"}) +public class Reflection { + + public static Object getNMSItemStack(ItemStack item) { + @SuppressWarnings("rawtypes") + Class cis = getCraftItemStack(); + java.lang.reflect.Method method; + try { + method = cis.getMethod("asNMSCopy", ItemStack.class); + return method.invoke(cis, item); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return null; + } + + @SuppressWarnings({"unchecked"}) + public static Object getNBTTagCompound(Object nmsitem) { + @SuppressWarnings("rawtypes") + Class c = nmsitem.getClass(); + java.lang.reflect.Method method; + try { + method = c.getMethod("getTag"); + return method.invoke(nmsitem); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return null; + } + + @SuppressWarnings("rawtypes") + public static Class getCraftItemStack() { + String version = Bukkit.getServer().getClass().getPackage().getName().replace(".", ",").split(",")[3]; + try { + //Constructor cons = c.getConstructor(ItemStack.class); + //return cons.newInstance(item); + return Class.forName("org.bukkit.craftbukkit." + version + ".inventory.CraftItemStack"); + } catch (Exception ex) { + System.out.println("Error in ItemNBTAPI! (Outdated plugin?)"); + ex.printStackTrace(); + return null; + } + } +} \ No newline at end of file diff --git a/src/main/java/com/songoda/epicspawners/utils/SettingsManager.java b/src/main/java/com/songoda/epicspawners/utils/SettingsManager.java new file mode 100644 index 0000000..966ff8d --- /dev/null +++ b/src/main/java/com/songoda/epicspawners/utils/SettingsManager.java @@ -0,0 +1,310 @@ +package com.songoda.epicspawners.utils; + +import com.songoda.arconix.api.utils.ConfigWrapper; +import com.songoda.arconix.plugin.Arconix; +import com.songoda.epicspawners.EpicSpawners; +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.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Created by songo on 6/4/2017. + */ +public class SettingsManager implements Listener { + + private EpicSpawners instance = EpicSpawners.pl(); + + private String pluginName = "EpicSpawners"; + + private Map cat = new HashMap<>(); + + private static ConfigWrapper defs; + + public SettingsManager() { + instance.saveResource("SettingDefinitions.yml", true); + defs = new ConfigWrapper(instance, "", "SettingDefinitions.yml"); + defs.createNewFile("Loading data file", pluginName + " 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 (instance.getConfig().contains("settings." + s.oldSetting)) { + instance.getConfig().addDefault(s.setting, instance.getConfig().get("settings." + s.oldSetting)); + instance.getConfig().set("settings." + s.oldSetting, null); + } else 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); + } + instance.getConfig().set("settings", null); + } + + public enum settings { + o1("Spawner-max", "Main.Spawner Max Upgrade", 5), + o58("Name-format", "Main.Spawner Name Format", "&e{TYPE} &fSpawner [&c{AMT}x]"), + o2("Force-Combine-Radius", "Main.Force Combine Radius", 0), + o49("Force-Combine-Deny", "Main.Deny Place On Force Combine", false), + o3("Search-Radius", "Main.Radius To Search Around Spawner", "8x4x8"), + o10("Alter-Delay", "Main.Default Minecraft Spawner Cooldowns", true), + o17("Alert-place-break", "Main.Alerts On Place And Break", true), + o18("Sneak-for-stack", "Main.Sneak To Receive A Stacked Spawner", true), + o32("Spawner-holograms", "Main.Spawners Have Holograms", true), + o4("Only-drop-placed", "Main.Only Drop Placed Spawners", false), + o5("Only-charge-natural", "Main.Only Charge Natural Spawners", false), + o43("Random-Low & Random-High", "Main.Random Amount Added To Each Spawn", "1:3"), + o63("Sounds", "Main.Sounds Enabled", true), + o23("Display-Level-One", "Main.Display Level In Spawner Title If Level 1", false), + o19("OmniSpawners", "Main.OmniSpawners Enabled", true), + o21("Omni-Limit", "Main.Max Spawners Inside A OmniSpawner", 3), + o215("Eggs-convert-spawners", "Main.Convert Spawners With Eggs", true), + o42("Helpful-Tips", "Main.Display Helpful Tips For Operators", true), + o33("Upgrade-with-eco", "Main.Upgrade With Economy", true), + o34("Upgrade-with-xp", "Main.Upgrade With XP", true), + o35("Upgrade-xp-cost", "Main.Cost To Upgrade With XP", 50), + o36("Upgrade-eco-cost", "Main.Cost To Upgrade With Economy", 10000), + o55("Use-equations", "Main.Use Custom Equations for Upgrade Costs", false), + o62("spawners-repel-radius", "Main.Spawner Repel Liquid Radius", 1), + o60("redstone-activate", "Main.Redstone Power Deactivates Spawners", true), + o51("Max-Entities-Around-Single-Spawner", "Main.Max Entities Around Single Spawner", 6), + o523("How-to", "Main.Display Help Button In Spawner Overview", true), + o24("Inventory-Stacking", "Main.Allow Stacking Spawners In Survival Inventories", true), + o27("Spawners-dont-explode", "Main.Prevent Spawners From Exploding", false), + o53("Add-Spawner-To-Inventory-On-Drop", "Main.Add Spawner To Inventory On Drop", false), + o54("Upgrade-particle-type", "Main.Upgrade Particle Type", "SPELL_WITCH"), + o5344("ticks-until-disabled", "Main.Ticks Until AI Disabled", 20L), + + o99("-", "Main.Named Spawners Tiers", false), + o98("-", "Main.Tier Names", Arrays.asList("&7Common", "&6Uncommon", "&4Rare", "&5Mythic")), + + o56("XP-cost-equation", "Main.Equations.Calculate XP Upgrade Cost", "{XPCost} * {Level}"), + o57("ECO-cost-equation", "Main.Equations.Calculate Economy Upgrade Cost", "{ECOCost} * {Level}"), + o554("Spawner-Spawn-Equation", "Main.Equations.Mobs Spawned Per Spawn", "{MULTI} + {RAND}"), + o6("Spawner-Rate-Equation", "Main.Equations.Cooldown Between Spawns", "{DEFAULT} / {MULTI}"), + + + o81("Boost-Multiplier", "Spawner Boosting.Boost Multiplier", "0.5"), + o82("Max-Player-Boost", "Spawner Boosting.Max Multiplier For A Spawner Boost", 5), + o83("Boost-cost", "Spawner Boosting.Item Charged For A Boost", "DIAMOND:2"), + + + o30("Hostile-mobs-attack-second", "Entity.Hostile Mobs Attack Second", false), + o50("SpawnEffect", "Entity.Spawn Particle Effect", "EXPLOSION_NORMAL"), + o52("Large-Entity-Safe-Spawning", "Entity.Use Default Minecraft Spawn Method For Large Entities", true), + + + o41("Only-drop-stacked", "Spawner Drops.Only Drop Stacked Spawners", false), + o31("Mob-kill-counting", "Spawner Drops.Allow Killing Mobs To Drop Spawners", true), + o40("Count-unnatural-kills", "Spawner Drops.Count Unnatural Kills Towards Spawner Drop", false), + o623("Goal", "Spawner Drops.Kills Needed for Drop", 100), + o7("Alert-every", "Spawner Drops.Alert Every X Before Drop", 10), + o25("Drop-on-creeper-explosion", "Spawner Drops.Drop On Creeper Explosion", true), + o26("Drop-on-tnt-explosion", "Spawner Drops.Drop On TNT Explosion", true), + o28("Tnt-explosion-drop-chance", "Spawner Drops.Chance On TNT Explosion", "100%"), + o29("Creeper-explosion-drop-chance", "Spawner Drops.Chance On Creeper Explosion", "100%"), + o13("Silktouch-spawners", "Spawner Drops.Drop On SilkTouch", true), + o14("Silktouch-natural-drop-chance", "Spawner Drops.Chance On Natural Silktouch", "100%"), + o15("Silktouch-placed-drop-chance", "Spawner Drops.Chance On Placed Silktouch", "100%"), + + o8("Exit-Icon", "Interfaces.Exit Icon", "WOOD_DOOR"), + o9("Buy-Icon", "Interfaces.Buy Icon", "EMERALD"), + o37("ECO-Icon", "Interfaces.Economy Icon", "DOUBLE_PLANT"), + o39("XP-Icon", "Interfaces.XP Icon", "EXP_BOTTLE"), + o11("Glass-Type-1", "Interfaces.Glass Type 1", 7), + o112("Glass-Type-2", "Interfaces.Glass Type 2", 11), + o113("Glass-Type-3", "Interfaces.Glass Type 3", 3), + o12("Rainbow-Glass", "Interfaces.Replace Glass Type 1 With Rainbow Glass", false), + + o45("Thin-Entity-data", "System.Remove Dead Entities from Data File", true), + o48("Debug-Mode", "System.Debugger Enabled", false); + + private String setting; + private String oldSetting; + private Object option; + + settings(String oldSetting, String setting, Object option) { + this.oldSetting = oldSetting; + this.setting = setting; + this.option = option; + } + + } +} 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/blacklist.yml b/src/main/resources/blacklist.yml similarity index 100% rename from src/blacklist.yml rename to src/main/resources/blacklist.yml diff --git a/src/config.yml b/src/main/resources/config.yml similarity index 100% rename from src/config.yml rename to src/main/resources/config.yml diff --git a/src/en_US.lang b/src/main/resources/en_US.lang similarity index 100% rename from src/en_US.lang rename to src/main/resources/en_US.lang diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml new file mode 100644 index 0000000..f182134 --- /dev/null +++ b/src/main/resources/plugin.yml @@ -0,0 +1,21 @@ +name: EpicSpawners +description: EpicSpawners +version: 4.2.5 +depend: [Arconix] +softdepend: [Towny, RedProtect Kingdoms, PlotSquared, GriefPrevention, USkyBlock, ASkyBlock, WorldGuard, Factions, Vault, PlaceholderAPI] +main: com.songoda.epicspawners.EpicSpawners +author: songoda +commands: + EpicSpawners: + description: I have no idea. + default: true + aliases: [es] + usage: / [reload] + SpawnerStats: + description: I have no idea. + default: false + usage: / [reload] + SpawnerShop: + description: I have no idea. + default: false + usage: / [reload] \ No newline at end of file diff --git a/src/plugin.yml b/src/plugin.yml deleted file mode 100644 index b7ea4dc7975ab60e3738f567673b89d744a57ca3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1238 zcmdUuNlOD!5QOV2_#g5EB!cKgM2MggyaeNN5D!CUVg{2;oWiLUdj^0;O zd)x;z)(My~{N}n-iweEKo$6Kh0aftdr>1*YMqiO}pKsb>^(FaO9T+mu2|Ojy3wj;v zflP+dA|N{&2258^s?eH;mF74P3KQy?Cy^D5XL^me#-B$jo&=5_-;TD{MsKN-gNxy< z>%;+lMoo8D`%?FGL#zT@&N?(E(EtuJcrRLX)&6p21m4Q*n;jeBs-3dd41C1D{ql|$ zD?8f!cCXz>8S3VNeVNtMP}g$@-njylqYbW2Gc-pSwRxJ_WC!rt_Xg}4&otnzXIf>- z(Fa+3W*15vs#v#(itsK4RST|HGqZNh6VV&o}a}&|eeEsri j>C#2Sz39ob+x6$?H;S!)NUdeff2qdPH(A)