Compare commits

...

209 Commits

Author SHA1 Message Date
sigonasr2 3c08b366ae Mob spawn rates above ground reduced. Zombie Ninja fixes. Diablodrops 11 years ago
sigonasr2 0e1bc2320e Resolved Issues 114-119 (-118). 11 years ago
sigonasr2 090603dec4 Force players to exit minecarts correctly. (Override 1.7 default 11 years ago
sigonasr2 42355d475a Fix typo with commandBankEconomy 11 years ago
sigonasr2 fdb753b9c7 Disable lv30 buff selection reminder messages for now. 11 years ago
sigonasr2 aa4167f61a Powered mobs fix. Added a few more item drops. 11 years ago
sigonasr2 abada6ded4 NullPointerException Fix for no null check on custom mob name. 11 years ago
sigonasr2 e4bfcc023a Compatibility with 1.7.3. ProjectileShooter instances handled. 11 years ago
sigonasr2 8f97b8b94b Prevent jobs from earning players money. Add temporary revenue source. 11 years ago
sigonasr2 e3e199c1e3 Finalized changes to regen_chunk generator. Disabled new mobs + 11 years ago
sigonasr2 f43440b680 A per-layer regeneration algorithm for refreshing chunks. 11 years ago
sigonasr2 772b28ff95 Charge Zombie behavior refined yet again. Removed all possibilities of 11 years ago
sigonasr2 9b8b26fb41 Add in new upgrade recipes. 11 years ago
sigonasr2 dd8eff7ab3 Swords as a weapon has been nerfed. In place for the 'upgrading' patch 11 years ago
sigonasr2 f9b2fb23d9 Fix typos, mob head properties, add in Airborne effect for Blaze heads. 11 years ago
sigonasr2 950b85cf34 Add in Ignite duration for Blaze Heads. Fixed Charge Zombie II spawning 11 years ago
sigonasr2 56bcfde492 Add in custom poison functionality to allow all mobs to be poisoned via 11 years ago
sigonasr2 8eadef2e35 Minor fixes. 11 years ago
sigonasr2 d74ae124c3 A much much better cave renewal system without screwing over people's 11 years ago
sigonasr2 3082887b1f Mob Heads now bug-free (Crafting + looting + identification all work 11 years ago
sigonasr2 2b40b15d50 Mob Heads are added, MobHead class implemented. Just need to add 11 years ago
sigonasr2 8cbffd75e1 Wither difficulty increased. 11 years ago
sigonasr2 0e81c98b05 Add ability to open a bookshelf's inventory by right-clicking. Made the 11 years ago
sigonasr2 4a9ee5da19 Added new enchantments functionality. 11 years ago
sigonasr2 6942dbfadd Removed Hound Caller functionality (May be the cause of glitches), Set 11 years ago
sigonasr2 959064b983 Modifications to Powered mobs. 11 years ago
sigonasr2 9688c1b34f Add in Powered Mobs. 11 years ago
sigonasr2 ca45f2a673 Added shapeless versions of flint & steel and sticky pistons. Sticky 11 years ago
sigonasr2 21cff3cb51 Ender Item Cubes functioning 99.9%. All synchronization issues + duping 11 years ago
sigonasr2 eef59e0d35 Rename name tag functionality. Fix Ender Cubes. 11 years ago
sigonasr2 9781185282 Fix sortEnchantments() so it works in all situations. Fixed issue with 11 years ago
sigonasr2 e6e0fd9df2 Fix run-time error. bonus_enchantment_list was not initialized. 11 years ago
sigonasr2 88990bdb43 getGoodie() updated to latest bonus enchantment system. Added 11 years ago
sigonasr2 350f818c77 Fixes to Charge Zombie spawning. Verify blocks are natural blocks and 11 years ago
sigonasr2 97417c7280 Forgot to add oldamt to amt for Roman Numeral adding in 11 years ago
sigonasr2 0eb06c137a Merge branch 'dev' into devbranch 11 years ago
sigonasr2 7ec51d2453 Misc. bugfixes. Made a BonusEnchantment class for easier handling of 11 years ago
Nonoriri eb6816277e Miner level 20 buff moved to right click, debug equipment repository 11 years ago
Nonoriri d775a20155 Witherless Rose mechanic reworked from halving wither damage to having a 11 years ago
sigonasr2 7db09a34a1 Random fixes. Durability, fishing, digger(?), nullpointerexceptions, fix 11 years ago
sigonasr2 26d4b33a83 Logic fixes, minor typos to durability system. 11 years ago
sigonasr2 a53cfaf67b Changes and fixes to durability. Proper dye/wool color references. 11 years ago
sigonasr2 4ee2ad5f3b Add in Powersurge Zombie. 11 years ago
sigonasr2 f38755b7bf Remove unnecessary imports. 11 years ago
Nonoriri d6f8ab1270 Chaos chest buffed. 11 years ago
sigonasr2 41fb9bda5f Suicidal Creeper, Powersurge Zombie, Fish Caller fixes. 11 years ago
sigonasr2 4b99beaef8 'Hound Caller' fixes. 11 years ago
sigonasr2 9d6428d58e Brewer job buffs + The start of new mobs. 11 years ago
sigonasr2 762b127548 Brewer job buffs almost completed. 11 years ago
sigonasr2 5fe020b68a Cook job complete. 11 years ago
sigonasr2 27deec38e0 Fix Digger job. 11 years ago
sigonasr2 dae2daba04 Fixes to Woodcutter. 11 years ago
sigonasr2 295f748961 More fixes. 11 years ago
sigonasr2 4eca8c6574 Woodcutter fixes 11 years ago
sigonasr2 91b8f4d0fc Start Cook job buffs. 11 years ago
sigonasr2 24aec85f85 Weaponsmith jobs buffs implemented. 11 years ago
sigonasr2 5b11795dce Fisherman job buffs completed. 11 years ago
sigonasr2 29b743a142 Implement all Hunter job buffs. 11 years ago
sigonasr2 25795c00f9 Implement all Digger job buffs. Add in artifact crafting / identifying 11 years ago
sigonasr2 9f4978751b Merge branch 'master' into dev 11 years ago
sigonasr2 8a362a0e6a Fix PlayerBuffData entry removal. (toLowerCase() mismatch issue) 11 years ago
sigonasr2 4bc85772da Minor fixes to crafting recipes. 11 years ago
sigonasr2 a901466361 Fix Mythical drop rate. Added in toString() debug output command for 11 years ago
Nonoriri 8846e32a31 Added witherless rose recipe. For each rose you own, wither damage taken 11 years ago
sigonasr2 4f8ceaea49 Work on artifact conversion. 11 years ago
Nonoriri c0c2321a7c Merge branch 'master_event2' into master_event 11 years ago
Nonoriri a6725ff100 Fixed comments to be consistent with code, added chaos chests, several 11 years ago
sigonasr2 8e0c9aee38 Merge branch 'master' into dev 11 years ago
sigonasr2 191c2c183f Add a Thanksgiving check for eating cooked chicken. 11 years ago
sigonasr2 b242bfd49b Forgot a DiabloDropsHook import. 11 years ago
sigonasr2 a6b848777a Merge branch 'master' into dev 11 years ago
sigonasr2 12967289c8 Fix slowdowns with new fire mechanic system with Fire Resistant targets. 11 years ago
sigonasr2 51d12f53e7 Added in DiabloDropsHook patch. 11 years ago
sigonasr2 9e8c7b9a91 Add in more test commands for DiabloDropsHook. Added comments detailing 11 years ago
sigonasr2 ee564d496d More Digger changes. Add in DiabloDropsHook API first implementation. 11 years ago
sigonasr2 1ac4c6ea1a Fix double '/jobs members' commands. 11 years ago
sigonasr2 5f2bc1310f Add missing generateLootChest() function. 11 years ago
sigonasr2 972d217589 Remove duplicate openLootChest() function. 11 years ago
sigonasr2 e05cdbe5cf Merge branch 'master' into dev 11 years ago
sigonasr2 bb0060b0ed Add in ability to teleport to Town spawn locations. 11 years ago
sigonasr2 b6a692c058 Fix to teleportation cost. 11 years ago
sigonasr2 0d0d08d03c Minor changes to teleportation formula. Still not solved. 11 years ago
sigonasr2 25f10a7a46 Fix major crash issue with '/jobs members'. Added Scaling health with 11 years ago
sigonasr2 9819405e9d Add toLowerCase() to Pick up notifications. 11 years ago
sigonasr2 bfeb976e89 Fix teleport issues. 11 years ago
sigonasr2 60b158cede Merge remote-tracking branch 'origin/master_event' 11 years ago
Nonoriri b977e080be Added four types of loot chests. Loot chest probabilities slightly 11 years ago
sigonasr2 485bbf930b Fixed places where toLowerCase() was not needed/ was missing. 11 years ago
sigonasr2 1a70610120 Make Mob Spawners extremely difficult again. 11 years ago
sigonasr2 65263a474e Use offline version of getJobLv(). 11 years ago
sigonasr2 0e1fe37493 Fix to /jobs members. Meant to sort by level, not name. 11 years ago
sigonasr2 0b98c8c74b Fixes to '/jobs members' before official release. 11 years ago
sigonasr2 9fdb87addb Add in '/jobs members' command. 11 years ago
sigonasr2 70a92aeaac Remove all saveAccountsConfig() calls. Add in 30 second account save 11 years ago
sigonasr2 6f05142cc6 Merge branch 'master' into masterdev 11 years ago
sigonasr2 ac7fb86fb1 Merge branch 'master' into dev 11 years ago
sigonasr2 3ff7004716 Make anvil sounds play globally. 11 years ago
sigonasr2 cbbbd87f15 Added '\n' to ItemSet descriptions to differentiate new lines. 11 years ago
sigonasr2 8c668fccc1 Add in new ItemSet references. 11 years ago
sigonasr2 00fc5c4baa Apply Thanksgiving / Crafting Items Patch 11 years ago
sigonasr2 f2e6ac0ca9 Fix duplicate method error. 11 years ago
sigonasr2 cba0fd8038 Add in new ItemSet references. 11 years ago
sigonasr2 c3e762d89e Merge branch 'masterdev' into dev 11 years ago
sigonasr2 fb45458428 Add in configuration compatibility default for "thanksgiving-enabled" 11 years ago
sigonasr2 97456967fc Add in framework for Item Sets. 11 years ago
Nonoriri 53267fadcf Thanksgiving event added. Use /event thanksgiving to toggle. Eggs give a 11 years ago
Nonoriri 64fb7e6e02 Added recipe for crafting a nether star from wither skeleton skulls, 11 years ago
sigonasr2 53bfd54fb3 Merge branch 'master' into dev 11 years ago
sigonasr2 df4a0b905a Revert "Fire modifications. Move of tick code." 11 years ago
sigonasr2 b9d1039844 Add in new fire mechanics. Increase Recycling Center numbers. 11 years ago
sigonasr2 35c249bc8f Fire modifications. Move of tick code. 11 years ago
sigonasr2 28255ca10a Push changes for anvil. 11 years ago
sigonasr2 0a4bde3866 Merge branch 'master' into dev 11 years ago
Nonoriri 61ed29266b Fixed a bug that was making the application of item bonuses cost less XP 11 years ago
Nonoriri ca8de45ef8 Fixed Trader's Enchanted Books not being properly multiplied. 11 years ago
Nonoriri 52dc2d0e7a Fixed a merging error that somehow slipped through. Disenchanting will 11 years ago
Nonoriri 6a152d0204 Fixed error due to getEnchantmentNumb being called for halloween item 11 years ago
Nonoriri 8007ddb83e Fixed leather armor being not disenchantable due to LeatherArmorMeta 11 years ago
Nonoriri 00e5df5718 Fixed rounding error due to using int instead of double. Bonuses are now 11 years ago
Nonoriri d409918bd6 Properly capped unenchanting cost to 60. 11 years ago
Nonoriri 5a9dd42345 Fixed dye colors being displayed incorrectly. Added high efficiency 11 years ago
Nonoriri 8ccb4c4c26 Fixed nullpointerexception causing unenchanted items to be unrepairable. 11 years ago
Nonoriri 84c305dd9c Anvil changes added to master. 11 years ago
sigonasr2 287328e29a Wither fix for Nether / other worlds. 11 years ago
sigonasr2 5013b49ae1 Starting work on Digger job. 11 years ago
sigonasr2 abb39330a7 Builder Job Buffs complete. 11 years ago
sigonasr2 271c40553b Merge branch 'newdev' into dev 11 years ago
Nonoriri 2c7883ebc3 Re-added deleted anvil code. 11 years ago
sigonasr2 703542f531 Merge branch 'devcolor' into dev 11 years ago
sigonasr2 c9e27397c0 Builder job buffs Lv5&10. 11 years ago
Nonoriri 8f47621a2a Fixed dye color copy-paste error. 11 years ago
sigonasr2 b8f9274fbb Merge lost new Functions. 11 years ago
sigonasr2 1bf0f549f4 Merge branch 'dev' 11 years ago
sigonasr2 8da2eb1f43 Traders now can give really good enchantments on tools and weapons. 11 years ago
sigonasr2 1d48d639e8 Fixed some issues with the Wither boss. 11 years ago
sigonasr2 80957a8788 Blocking provides 'Sturdy III' for players. 11 years ago
sigonasr2 4f7ad5a62f Fix Charge Zombie III's not starting with full health. 11 years ago
sigonasr2 3e0c2d0f29 Charge Zombie new behavior. 1)Does not wreck chunks that are under a 11 years ago
sigonasr2 a59c956c81 Starting Builder job buff updates. 11 years ago
sigonasr2 32cde13d79 Miner job buffs completed. Moved account saving to a periodic interval 11 years ago
sigonasr2 c02eee252b Merge branch 'newdev' into dev 11 years ago
sigonasr2 b188407559 Forgot HP boost part of the woodcutter buff. 11 years ago
sigonasr2 979e0c497d Implement all Woodcutter job buffs. 11 years ago
Nonoriri d14ee534b7 Trivial logic fixing for harrowing item disabling 11 years ago
sigonasr2 6c5729447a All irrelevant old job buffs have been removed and are inactive. 11 years ago
sigonasr2 6387e121a2 Whoops, missed a few things. Now Farmer is officially gone. Mwahaha. 11 years ago
sigonasr2 4f2fd3f962 Added Lv30 A & B Buff listings. 11 years ago
sigonasr2 8d2fb9268c Merge branch 'newjobs' into dev 11 years ago
sigonasr2 d961bb9bbe Merge branch 'temp' into dev 11 years ago
sigonasr2 0588c76871 Finished all job descriptions. Farmer is not a valid job anymore. 11 years ago
sigonasr2 999788db6e Added '/jobs members' function. 11 years ago
sigonasr2 2898e12506 Fixed all references of string names for account configs to have 11 years ago
Nonoriri 4f21929012 Enchanting fully implemented. Unenchanting no longer buggy. Added check 11 years ago
sigonasr2 2b64b6ba3d Merge branch 'master' into dev 11 years ago
sigonasr2 8166be6614 Fix an error with the Haste buff not being applied right when getting 11 years ago
sigonasr2 38e9321c1a Job description updates. 11 years ago
sigonasr2 2aabd4c801 Merge branch 'jobs_2.1' into newjobs 11 years ago
yl589 b207796945 Enchanted books can now be combined. Enchanted book bonuses are now 11 years ago
sigonasr2 c5a992c418 Forgot to add new invulnerability code to reviving. 11 years ago
sigonasr2 c46c4e52df Add a fix to prevent players from teleporting to others and being below 11 years ago
sigonasr2 df4abe0ef5 Add more logic for super zombie checks in hopes of further preventing 11 years ago
sigonasr2 0c4e92f710 Fix issues with leaving the game with an open inventory not properly 11 years ago
sigonasr2 d92a25ab33 Fix issues with Boss causing disconnects. 11 years ago
sigonasr2 575780c200 Give some leniency for hunger color bar for player list / name tags. Fix 11 years ago
sigonasr2 bbc6537837 Delete .classpath 11 years ago
sigonasr2 f2ef2c9c88 Add in an inventory refresh for using Polymorph Wands so they still 11 years ago
sigonasr2 e9c4ff2317 Fatal Survivor fix. Equipment that drops gets re-equipped on you when 11 years ago
sigonasr2 5623d4995d Fixed the accidental deletion of getting cube type. Added a function to 11 years ago
sigonasr2 c0efc8e9c8 Fixed the accidental deletion of ID setting for Item Cubes. Added a 11 years ago
sigonasr2 e00f04bf30 Some Item Cube null fixes. 11 years ago
sigonasr2 b315a5a3eb Fix Revive bug. Make boss healthbar less glitchy, hopefully fixing 11 years ago
sigonasr2 c935896d60 Added is_PermanentProperty() to contain all lore phrases where the 11 years ago
sigonasr2 3b8d4195e4 Fix Item Cube functionality when first inserting an item to a newly 11 years ago
sigonasr2 c4108da16d Add healthbar changes for PlayerBuffData. 11 years ago
sigonasr2 8291b4a690 Wither Skeleton count added in. 11 years ago
sigonasr2 7abdc22d0a Merge branch 'dev' into devAnvil 11 years ago
sigonasr2 77cdd6328d Make Enchantment merges 11 years ago
sigonasr2 2b6a439970 Fixed Wither Skeleton Merge. 11 years ago
Nonoriri 9072286213 Removed two lines that SHOULD NOT be there. 11 years ago
Nonoriri a79767fdff Bonuses code added, but nonfunctional. 11 years ago
sigonasr2 d2ee12928e src.me.kaZep.Base fix. 11 years ago
sigonasr2 388564edcf One final fix to Recycling Centers that I missed. 11 years ago
sigonasr2 482e1814dd Add 5 seconds of invincibility for the reviving player. 11 years ago
sigonasr2 76b2ece1d0 Fix removing mobs on revive. Did not remove mobs with nametags (That 11 years ago
sigonasr2 6777d458ff Fix errors with Super Zombies. 11 years ago
sigonasr2 ddbd1f75ae Remove the NOT for naturalBlock check. 11 years ago
sigonasr2 e11780cebc Final hotfixes to Recycling Center. Modify Charge Zombie block 11 years ago
Nonoriri 0c167081e1 Enchanted book support added in anvil. 11 years ago
sigonasr2 75f59a94c6 Revert "Commit class changes." 11 years ago
sigonasr2 c45a58937b Commit class changes. 11 years ago
sigonasr2 305f00ccda Final hotfixes to Recycling Center. Modify Charge Zombie block 11 years ago
sigonasr2 663637467c Recycling center fixes. Bedrock dropping fix. 11 years ago
sigonasr2 310a0964a5 Recycling Center Number modification. 11 years ago
sigonasr2 8014931d6d Recycling Center slight modification. 11 years ago
Nonoriri a9eddad724 Logs and smooth stone are now valid repair materials. 11 years ago
Nonoriri b632fb3e74 Anvil code fixed. Repair functionality is complete. 11 years ago
Nonoriri 291e6e4668 sendToInventory rewritten. 11 years ago
sigonasr2 a069027a33 Merge branch 'dev' into devAnvil 11 years ago
Nonoriri c97f048847 Anvil code largely implemented. Shift-clicking from inventory still 11 years ago
sigonasr2 01a8ab6398 Fix unkillable super zombies. 11 years ago
sigonasr2 f3994f0269 Fix Chainmail boots recipe. 11 years ago
sigonasr2 932acf87e9 Quickfixes. 11 years ago
sigonasr2 0b50c66934 Finish support for Fireproof slabs. Breaking them yields 1 or 2 slabs 11 years ago
sigonasr2 b459674483 Merge branch 'super_zombie_solution' into dev 11 years ago
sigonasr2 3eb5393d9b Wither gonna hurt. 11 years ago
sigonasr2 24eacda963 Add Wither Skeleton spawning possibility to the world. Keep track of 11 years ago
sigonasr2 246205d3f5 Add some descriptions for the new Jobs. 11 years ago
sigonasr2 fd55550308 Attempt at fixing super zombies again. 11 years ago
sigonasr2 15a67d4836 Updated some item ratios. 11 years ago
  1. 1
      BankEconomyMod/bin/.gitignore
  2. 2
      BankEconomyMod/bin/me/kaZep/Base/.gitignore
  3. BIN
      BankEconomyMod/bin/me/kaZep/Base/ArrowShooter.class
  4. BIN
      BankEconomyMod/bin/me/kaZep/Base/EnchantLevelDatabase.class
  5. BIN
      BankEconomyMod/bin/me/kaZep/Base/Main$1.class
  6. BIN
      BankEconomyMod/bin/me/kaZep/Base/Main$2.class
  7. BIN
      BankEconomyMod/bin/me/kaZep/Base/Main$3.class
  8. BIN
      BankEconomyMod/bin/me/kaZep/Base/Main$4.class
  9. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerBuffData.class
  10. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerData.class
  11. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$1.class
  12. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$10.class
  13. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$11.class
  14. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$12.class
  15. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$13.class
  16. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$14.class
  17. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$15.class
  18. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$16.class
  19. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$17.class
  20. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$2.class
  21. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$3.class
  22. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$4.class
  23. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$5.class
  24. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class
  25. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$7.class
  26. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$8.class
  27. BIN
      BankEconomyMod/bin/me/kaZep/Base/PlayerListener$9.class
  28. BIN
      BankEconomyMod/bin/me/kaZep/Commands/JobsDataInfo.class
  29. BIN
      BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy$1.class
  30. BIN
      BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy$2.class
  31. BIN
      BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy$3.class
  32. BIN
      BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy$4.class
  33. BIN
      BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy$5.class
  34. BIN
      BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy$6.class
  35. BIN
      BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy.class
  36. 10
      BankEconomyMod/plugin.yml
  37. 2
      BankEconomyMod/src/me/kaZep/Base/.gitignore
  38. 13
      BankEconomyMod/src/me/kaZep/Base/ArrowShooter.java
  39. 1143
      BankEconomyMod/src/me/kaZep/Base/EnchantLevelDatabase.java
  40. 5212
      BankEconomyMod/src/me/kaZep/Base/Main.java
  41. 987
      BankEconomyMod/src/me/kaZep/Base/MobHead.java
  42. 61
      BankEconomyMod/src/me/kaZep/Base/MobManager.java
  43. 132
      BankEconomyMod/src/me/kaZep/Base/PlayerBuffData.java
  44. 27
      BankEconomyMod/src/me/kaZep/Base/PlayerData.java
  45. 30133
      BankEconomyMod/src/me/kaZep/Base/PlayerListener.java
  46. 12
      BankEconomyMod/src/me/kaZep/Base/PoweredMob.java
  47. 52
      BankEconomyMod/src/me/kaZep/Base/RecyclingCenterNode.java
  48. 12
      BankEconomyMod/src/me/kaZep/Base/TempBlock.java
  49. 149
      BankEconomyMod/src/me/kaZep/Base/TerrainManager.java
  50. 38
      BankEconomyMod/src/me/kaZep/Commands/JobsDataInfo.java
  51. 1370
      BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java
  52. 24
      BankEconomyMod/src/sig/ItemSets/ColorSet.java
  53. 46
      BankEconomyMod/src/sig/ItemSets/DiabloDropsHook.java
  54. 30
      BankEconomyMod/src/sig/ItemSets/ItemSet.java
  55. 151
      BankEconomyMod/src/sig/ItemSets/ItemSetList.java
  56. 6
      Plugin/.classpath
  57. 17
      Plugin/.project
  58. 11
      Plugin/.settings/org.eclipse.jdt.core.prefs

@ -0,0 +1,2 @@
/._PlayerListener.java1265619304918501342.tmp
/._PlayerListener.java3998199996590245987.tmp

@ -1,6 +1,6 @@
name: BankEconomy
main: me.kaZep.Base.Main
version: 261
version: 262
description: Bank plugin which stores money.
commands:
bankeconomy:
@ -24,4 +24,10 @@ commands:
event:
description: Toggles or untoggles events.
ticktime:
description: Displays the server tick time.
description: Displays the server tick time.
rename:
description: Renames a name tag item.
line:
description: Gives the player a line builder tool.
rectangle:
description: Gives the player a rectangle builder tool.

@ -0,0 +1,2 @@
/._PlayerListener.java1265619304918501342.tmp
/._PlayerListener.java3998199996590245987.tmp

@ -7,14 +7,21 @@ import org.bukkit.util.Vector;
public class ArrowShooter {
public int timer=0;
public int frequency=0;
public Vector spd;
public Vector dir;
public Location loc;
public LivingEntity shooter;
public ArrowShooter(Vector spd, Location loc, int duration, int frequency, LivingEntity shooter) {
this.spd=spd;
public float spd = 0.6f;
public float spread = 12f;
public ArrowShooter(Vector dir, Location loc, int duration, int frequency, LivingEntity shooter) {
this(dir, loc, duration, frequency, shooter, 0.6f, 12f);
}
public ArrowShooter(Vector dir, Location loc, int duration, int frequency, LivingEntity shooter, float spd, float spread) {
this.dir=dir;
this.loc=loc;
this.frequency=frequency;
this.timer=duration;
this.shooter=shooter;
this.spd=spd;
this.spread=spread;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,987 @@
package me.kaZep.Base;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.SkullType;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.SkullMeta;
/**
* Represents a mob head
*/
public class MobHead {
public enum MobHeadType {
SKELETON, WITHER_SKELETON, ZOMBIE, CREEPER,
SPIDER, ENDERMAN, CAVE_SPIDER, BLAZE, GHAST,
ZOMBIE_PIGMAN, MAGMA_CUBE
}
public enum MobHeadRareType {
RARE_TYPE_A, RARE_TYPE_B
}
MobHeadType head_type = null;
MobHeadRareType rare_head_type =null;
boolean rare_head=false;
boolean is_powered=false;
/**
* Compares if two MobHeads are equal to each other
* @param m The MobHead to compare to this MobHead.
* @return true if the two mob heads are the same,
* false otherwise.
*/
public boolean equals(MobHead m) {
if (head_type.equals(m.head_type) &&
rare_head_type.equals(m.rare_head_type) &&
is_powered==m.is_powered && rare_head==m.rare_head) {
return true;
}
return false;
}
/**
* Returns the ItemStack version of this defined Mob Head.
* This is useful for creating new heads that have specific
* attributes.
* @return
*/
public ItemStack getItemStack() {
ItemStack finalhead = new ItemStack(Material.AIR);
if (!rare_head) {
switch (head_type) {
case SKELETON:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
ItemMeta meta = newhead.getItemMeta();
String key = "mob.skeleton";
meta.setDisplayName(ChatColor.WHITE+"Skeleton Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Ranged Damage");
meta.setLore(newlore);
newhead.setItemMeta(meta);
finalhead = newhead;
}break;
case WITHER_SKELETON:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)1);
ItemMeta meta = newhead.getItemMeta();
String key = "mob.witherskeleton";
meta.setDisplayName(ChatColor.WHITE+"Wither Skeleton Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.LIGHT_PURPLE+"+5 "+ChatColor.GOLD+"second "+ChatColor.GRAY+"Wither I"+ChatColor.GOLD+" duration");
newlore.add(ChatColor.GOLD+" on hit.");
meta.setLore(newlore);
newhead.setItemMeta(meta);
finalhead = newhead;
}break;
case ZOMBIE:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)2);
ItemMeta meta = newhead.getItemMeta();
String key = "mob.zombie";
meta.setDisplayName(ChatColor.WHITE+"Zombie Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Lifesteal");
meta.setLore(newlore);
newhead.setItemMeta(meta);
finalhead = newhead;
}break;
case CREEPER:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)4);
ItemMeta meta = newhead.getItemMeta();
String key = "mob.creeper";
meta.setDisplayName(ChatColor.WHITE+"Creeper Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"AoE Damage");
meta.setLore(newlore);
newhead.setItemMeta(meta);
finalhead = newhead;
}break;
case SPIDER:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
String key = "mob.spider";
skullMeta.setDisplayName(ChatColor.WHITE+"Spider Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
skullMeta.setOwner("MHF_Spider");
newhead.setItemMeta(skullMeta);
ItemMeta meta = newhead.getItemMeta();
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"Slow on hit");
meta.setLore(newlore);
newhead.setItemMeta(meta);
finalhead = newhead;
}break;
case ENDERMAN:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
String key = "mob.enderman";
skullMeta.setDisplayName(ChatColor.WHITE+"Enderman Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
skullMeta.setOwner("MHF_Enderman");
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Critical Chance");
skullMeta.setLore(newlore);
newhead.setItemMeta(skullMeta);
finalhead = newhead;
}break;
case CAVE_SPIDER:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
String key = "mob.cavespider";
skullMeta.setDisplayName(ChatColor.WHITE+"Cave Spider Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
skullMeta.setOwner("MHF_CaveSpider");
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"second Poison duration");
newlore.add(ChatColor.GOLD+" on hit.");
skullMeta.setLore(newlore);
newhead.setItemMeta(skullMeta);
finalhead = newhead;
}break;
case BLAZE:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
String key = "mob.blaze";
skullMeta.setDisplayName(ChatColor.WHITE+"Blaze Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
skullMeta.setOwner("MHF_Blaze");
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"second ignite duration");
newlore.add(ChatColor.GOLD+" on hit.");
skullMeta.setLore(newlore);
newhead.setItemMeta(skullMeta);
finalhead = newhead;
}break;
case GHAST:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
String key = "mob.ghast";
skullMeta.setDisplayName(ChatColor.WHITE+"Ghast Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
skullMeta.setOwner("MHF_Ghast");
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.LIGHT_PURPLE+"-1% "+ChatColor.GOLD+"damage taken on hit");
skullMeta.setLore(newlore);
newhead.setItemMeta(skullMeta);
finalhead = newhead;
}break;
case ZOMBIE_PIGMAN:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
String key = "mob.zombiepigman";
skullMeta.setDisplayName(ChatColor.WHITE+"Zombie Pigman Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
skullMeta.setOwner("MHF_PigZombie");
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"chance of being fully");
newlore.add(ChatColor.GOLD+" healed on kill.");
skullMeta.setLore(newlore);
newhead.setItemMeta(skullMeta);
finalhead = newhead;
}break;
case MAGMA_CUBE:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
String key = "mob.magmacube";
skullMeta.setDisplayName(ChatColor.WHITE+"Magma Cube Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
skullMeta.setOwner("MHF_LavaSlime");
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"chance of setting the");
newlore.add(ChatColor.GOLD+" mob and surrounding mobs on fire");
newlore.add(ChatColor.GOLD+" for 10 seconds.");
skullMeta.setLore(newlore);
newhead.setItemMeta(skullMeta);
finalhead = newhead;
}break;
}
} else {
switch (head_type) {
case WITHER_SKELETON:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)1);
ItemMeta meta = newhead.getItemMeta();
String key = "mob.rarewitherskeleton";
meta.setDisplayName(ChatColor.BLUE+"Rare Wither Skeleton Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.LIGHT_PURPLE+"+15 "+ChatColor.GOLD+"second "+ChatColor.GRAY+"Wither III"+ChatColor.GOLD+" duration");
newlore.add(ChatColor.GOLD+" on hit.");
meta.setLore(newlore);
newhead.setItemMeta(meta);
newhead.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
finalhead = newhead;
}break;
case SKELETON:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
ItemMeta meta = newhead.getItemMeta();
String key = "mob.rareskeleton";
meta.setDisplayName(ChatColor.BLUE+"Rare Skeleton Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
List<String> newlore = new ArrayList<String>();
if (rare_head_type==MobHeadRareType.RARE_TYPE_A) {
newlore.add(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"Ranged Damage");
} else {
newlore.add(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"m/s Projectile Speed");
}
meta.setLore(newlore);
newhead.setItemMeta(meta);
newhead.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
finalhead = newhead;
}break;
case ZOMBIE:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)2);
ItemMeta meta = newhead.getItemMeta();
String key = "mob.rarezombie";
meta.setDisplayName(ChatColor.BLUE+"Rare Zombie Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
List<String> newlore = new ArrayList<String>();
if (rare_head_type==MobHeadRareType.RARE_TYPE_A) {
newlore.add(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"Lifesteal");
} else {
newlore.add(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"Max Health");
}
meta.setLore(newlore);
newhead.setItemMeta(meta);
newhead.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
finalhead = newhead;
}break;
case CREEPER:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)4);
ItemMeta meta = newhead.getItemMeta();
String key = "mob.rarecreeper";
meta.setDisplayName(ChatColor.BLUE+"Rare Creeper Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
List<String> newlore = new ArrayList<String>();
if (rare_head_type==MobHeadRareType.RARE_TYPE_A) {
newlore.add(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"Damage to all nearby enemies.");
} else {
newlore.add(ChatColor.LIGHT_PURPLE+"+20% "+ChatColor.GOLD+"AoE Damage");
}
meta.setLore(newlore);
newhead.setItemMeta(meta);
newhead.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
finalhead = newhead;
}break;
case SPIDER:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
skullMeta.setOwner("MHF_Spider");
String key = "mob.rarespider";
skullMeta.setDisplayName(ChatColor.BLUE+"Rare Spider Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
newhead.setItemMeta(skullMeta);
ItemMeta meta = newhead.getItemMeta();
//meta.setDisplayName(ChatColor.BLUE+"Rare Spider Head");
List<String> newlore = new ArrayList<String>();
if (rare_head_type==MobHeadRareType.RARE_TYPE_A) {
newlore.add(ChatColor.LIGHT_PURPLE+"+2 "+ChatColor.GOLD+"second Poison duration");
newlore.add(ChatColor.GOLD+" on hit.");
} else {
newlore.add(ChatColor.LIGHT_PURPLE+"+15% "+ChatColor.GOLD+"Slow on hit");
}
meta.setLore(newlore);
newhead.setItemMeta(meta);
newhead.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
finalhead = newhead;
}break;
case ENDERMAN:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
skullMeta.setOwner("MHF_Enderman");
String key = "mob.rareenderman";
skullMeta.setDisplayName(ChatColor.BLUE+"Rare Enderman Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
List<String> newlore = new ArrayList<String>();
if (rare_head_type==MobHeadRareType.RARE_TYPE_A) {
newlore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Item Drop Amount Increase");
} else {
newlore.add(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"Critical Chance");
}
skullMeta.setLore(newlore);
newhead.setItemMeta(skullMeta);
newhead.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
finalhead = newhead;
}break;
case CAVE_SPIDER:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
String key = "mob.rarecavespider";
skullMeta.setDisplayName(ChatColor.BLUE+"Rare Cave Spider Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
skullMeta.setOwner("MHF_CaveSpider");
List<String> newlore = new ArrayList<String>();
if (rare_head_type==MobHeadRareType.RARE_TYPE_A) {
newlore.add(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"of snaring a target");
newlore.add(ChatColor.GOLD+" for 5 seconds.");
} else {
newlore.add(ChatColor.LIGHT_PURPLE+"+3 "+ChatColor.GOLD+"second Poison duration");
newlore.add(ChatColor.GOLD+" on hit.");
}
skullMeta.setLore(newlore);
newhead.setItemMeta(skullMeta);
newhead.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
finalhead = newhead;
}break;
case BLAZE:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
String key = "mob.rareblaze";
skullMeta.setDisplayName(ChatColor.BLUE+"Rare Blaze Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
skullMeta.setOwner("MHF_Blaze");
List<String> newlore = new ArrayList<String>();
if (rare_head_type==MobHeadRareType.RARE_TYPE_A) {
newlore.add(ChatColor.LIGHT_PURPLE+"+3 "+ChatColor.GOLD+"second ignite duration");
newlore.add(ChatColor.GOLD+" on hit.");
} else {
newlore.add(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"chance to send enemy");
newlore.add(ChatColor.GOLD+" airborne.");
}
skullMeta.setLore(newlore);
newhead.setItemMeta(skullMeta);
newhead.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
finalhead = newhead;
}break;
case GHAST:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
String key = "mob.rareghast";
skullMeta.setDisplayName(ChatColor.BLUE+"Rare Ghast Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
skullMeta.setOwner("MHF_Ghast");
List<String> newlore = new ArrayList<String>();
if (rare_head_type==MobHeadRareType.RARE_TYPE_A) {
newlore.add(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"chance to send down");
newlore.add(ChatColor.GOLD+" lightning on a target.");
} else {
newlore.add(ChatColor.LIGHT_PURPLE+"-5% "+ChatColor.GOLD+"damage taken on hit");
}
skullMeta.setLore(newlore);
newhead.setItemMeta(skullMeta);
newhead.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
finalhead = newhead;
}break;
case ZOMBIE_PIGMAN:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
String key = "mob.rarezombiepigman";
skullMeta.setDisplayName(ChatColor.BLUE+"Rare Pig Zombie Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
skullMeta.setOwner("MHF_PigZombie");
List<String> newlore = new ArrayList<String>();
if (rare_head_type==MobHeadRareType.RARE_TYPE_A) {
newlore.add(ChatColor.LIGHT_PURPLE+"+10% "+ChatColor.GOLD+"chance of dropping a");
newlore.add(ChatColor.GOLD+" Golden Nugget on a kill.");
} else {
newlore.add(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"chance of being fully");
newlore.add(ChatColor.GOLD+" healed on kill.");
}
skullMeta.setLore(newlore);
newhead.setItemMeta(skullMeta);
newhead.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
finalhead = newhead;
}break;
case MAGMA_CUBE:{
ItemStack newhead = new ItemStack(Material.SKULL_ITEM);
newhead.setDurability((short)SkullType.PLAYER.ordinal());
SkullMeta skullMeta = (SkullMeta) newhead.getItemMeta();
String key = "mob.raremagmacube";
skullMeta.setDisplayName(ChatColor.BLUE+"Rare Magma Cube Head "+ChatColor.ITALIC+"#"+Main.plugin.getConfig().getInt(key));
Main.plugin.getConfig().set(key, Main.plugin.getConfig().getInt(key)+1);
skullMeta.setOwner("MHF_LavaSlime");
List<String> newlore = new ArrayList<String>();
if (rare_head_type==MobHeadRareType.RARE_TYPE_A) {
newlore.add(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"chance of burning an");
newlore.add(ChatColor.GOLD+" enemy to a crisp.");
} else {
newlore.add(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"chance of setting the");
newlore.add(ChatColor.GOLD+" mob and surrounding mobs on fire");
newlore.add(ChatColor.GOLD+" for 10 seconds.");
}
skullMeta.setLore(newlore);
newhead.setItemMeta(skullMeta);
newhead.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
finalhead = newhead;
}break;
}
}
//Bukkit.getLogger().info("Mobhead is "+toString()+" currently.");
if (is_powered) {
short numb = finalhead.clone().getDurability();
ItemStack poweredhead = convertToPoweredHead(finalhead.clone());
//Bukkit.getLogger().info("Converted head item is "+this.plugin.convertToPoweredHead(result.getMatrix()[i]).toString());
poweredhead.setDurability(numb);
finalhead = poweredhead;
}
return finalhead;
}
/**
* Attempts to get the mob head object that
* corresponds to this item, by checking its lore.
* @param item The item to check for.
* @return Returns null if this item is not a
* valid mob head. Returns the MobHead object
* otherwise.
*/
static public MobHead getMobHead(ItemStack item) {
if (item!=null && item.getType()==Material.SKULL_ITEM && item.hasItemMeta() && item.getItemMeta().hasLore()) {
List<String> getLore = item.getItemMeta().getLore();
MobHeadType headtype = null;
MobHeadRareType raretype = null;
boolean powered = false;
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5 "+ChatColor.GOLD+"second "+ChatColor.GRAY+"Wither I"+ChatColor.GOLD+" duration")) {
//return new MobHead(MobHeadType.WITHER_SKELETON);
headtype=MobHeadType.WITHER_SKELETON;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Ranged Damage")) {
//return new MobHead(MobHeadType.SKELETON);
headtype=MobHeadType.SKELETON;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Lifesteal")) {
//return new MobHead(MobHeadType.ZOMBIE);
headtype=MobHeadType.ZOMBIE;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"AoE Damage") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"AoE Damage"+ChatColor.BLUE+" &")) {
//return new MobHead(MobHeadType.CREEPER);
headtype=MobHeadType.CREEPER;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"Slow on hit") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"Slow on hit"+ChatColor.BLUE+" &")) {
//return new MobHead(MobHeadType.SPIDER);
headtype=MobHeadType.SPIDER;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Critical Chance") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Critical Chance"+ChatColor.BLUE+" &")) {
//return new MobHead(MobHeadType.ENDERMAN);
headtype=MobHeadType.ENDERMAN;
}
if ((getLore.contains(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"second Poison duration") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"+2 "+ChatColor.GOLD+"second Poison duration")) &&
!getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"Slow on hit"+ChatColor.BLUE+" &")) {
//return new MobHead(MobHeadType.CAVE_SPIDER);
headtype=MobHeadType.CAVE_SPIDER;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"second ignite duration")) {
//return new MobHead(MobHeadType.BLAZE);
headtype=MobHeadType.BLAZE;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"-1% "+ChatColor.GOLD+"damage taken on hit") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"-1% "+ChatColor.GOLD+"damage taken on hit"+ChatColor.BLUE+" &")) {
//return new MobHead(MobHeadType.GHAST);
headtype=MobHeadType.GHAST;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"chance of being fully")) {
//return new MobHead(MobHeadType.ZOMBIE_PIGMAN);
headtype=MobHeadType.ZOMBIE_PIGMAN;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"chance of setting the")) {
//return new MobHead(MobHeadType.MAGMA_CUBE);
headtype=MobHeadType.MAGMA_CUBE;
}
boolean ampersand=false;
for (int i=0;i<getLore.size();i++) {
if (getLore.get(i).contains(ChatColor.BLUE+" &")) {
powered=true;
ampersand=true;
}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+15 "+ChatColor.GOLD+"second "+ChatColor.GRAY+"Wither III"+ChatColor.GOLD+" duration")) {
//return new MobHead(MobHeadType.WITHER_SKELETON, true, MobHeadRareType.RARE_TYPE_A);
headtype=MobHeadType.WITHER_SKELETON;
raretype=MobHeadRareType.RARE_TYPE_A;
}
if (getLore.contains(ChatColor.GOLD+"Stacks Wither effect by 1")) {
headtype=MobHeadType.WITHER_SKELETON;
powered=true;
}
if (getLore.contains(ChatColor.GOLD+"Stacks Wither effect by 2")) {
headtype=MobHeadType.WITHER_SKELETON;
raretype=MobHeadRareType.RARE_TYPE_A;
powered=true;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"Ranged Damage")) {
//return new MobHead(MobHeadType.SKELETON, true, MobHeadRareType.RARE_TYPE_A);
headtype=MobHeadType.SKELETON;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_A;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"m/s Projectile Speed")) {
//return new MobHead(MobHeadType.SKELETON, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.SKELETON;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_B;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"Lifesteal")) {
//return new MobHead(MobHeadType.ZOMBIE, true, MobHeadRareType.RARE_TYPE_A);
headtype=MobHeadType.ZOMBIE;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_A;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"Max Health")) {
//return new MobHead(MobHeadType.ZOMBIE, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.ZOMBIE;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_B;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"Damage to all nearby enemies.")) {
//return new MobHead(MobHeadType.CREEPER, true, MobHeadRareType.RARE_TYPE_A);
headtype=MobHeadType.ZOMBIE;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_A;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+20% "+ChatColor.GOLD+"AoE Damage")) {
//return new MobHead(MobHeadType.CREEPER, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.CREEPER;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_B;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+2 "+ChatColor.GOLD+"second Poison duration") &&
!getLore.contains(ChatColor.GOLD+" on hit."+ChatColor.BLUE+" &")) {
//return new MobHead(MobHeadType.SPIDER, true, MobHeadRareType.RARE_TYPE_A);
headtype=MobHeadType.SPIDER;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_A;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+15% "+ChatColor.GOLD+"Slow on hit")) {
//return new MobHead(MobHeadType.SPIDER, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.SPIDER;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_B;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Item Drop Amount Increase")) {
//return new MobHead(MobHeadType.ENDERMAN, true, MobHeadRareType.RARE_TYPE_A);
headtype=MobHeadType.ENDERMAN;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_A;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"Critical Chance")) {
//return new MobHead(MobHeadType.ENDERMAN, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.ENDERMAN;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_B;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"of snaring a target")) {
//return new MobHead(MobHeadType.CAVE_SPIDER, true, MobHeadRareType.RARE_TYPE_A);
headtype=MobHeadType.CAVE_SPIDER;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_A;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+3 "+ChatColor.GOLD+"second Poison duration")) {
//return new MobHead(MobHeadType.CAVE_SPIDER, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.CAVE_SPIDER;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_B;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"chance to send enemy")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_A);
headtype=MobHeadType.BLAZE;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_B;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+3 "+ChatColor.GOLD+"second ignite duration")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.BLAZE;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_A;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"chance to send down")) {
//return new MobHead(MobHeadType.GHAST, true, MobHeadRareType.RARE_TYPE_A);
headtype=MobHeadType.GHAST;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_A;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"-5% "+ChatColor.GOLD+"damage taken on hit")) {
//return new MobHead(MobHeadType.GHAST, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.GHAST;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_B;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+10% "+ChatColor.GOLD+"chance of dropping a")) {
//return new MobHead(MobHeadType.ZOMBIE_PIGMAN, true, MobHeadRareType.RARE_TYPE_A);
headtype=MobHeadType.ZOMBIE_PIGMAN;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_A;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"chance of being fully")) {
//return new MobHead(MobHeadType.ZOMBIE_PIGMAN, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.ZOMBIE_PIGMAN;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_B;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"chance of burning an")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_A);
headtype=MobHeadType.BLAZE;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_A;}
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"chance of setting the")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.BLAZE;
if (!ampersand) {raretype=MobHeadRareType.RARE_TYPE_B;}
}
////////////////////////////////////////////
if (getLore.contains(ChatColor.LIGHT_PURPLE+"-10% "+ChatColor.GOLD+"damage taken on hit"+ChatColor.BLUE+" &")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.GHAST;
raretype=MobHeadRareType.RARE_TYPE_A;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5 "+ChatColor.GOLD+"second ignite duration")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.BLAZE;
raretype=MobHeadRareType.RARE_TYPE_A;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5 "+ChatColor.GOLD+"second Poison duration")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.CAVE_SPIDER;
raretype=MobHeadRareType.RARE_TYPE_A;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+10% "+ChatColor.GOLD+"Critical Chance"+ChatColor.BLUE+" &")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.ENDERMAN;
raretype=MobHeadRareType.RARE_TYPE_A;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+30% "+ChatColor.GOLD+"Slow on hit"+ChatColor.BLUE+" &")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.SPIDER;
raretype=MobHeadRareType.RARE_TYPE_A;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+30% "+ChatColor.GOLD+"AoE Damage"+ChatColor.BLUE+" &")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.CREEPER;
raretype=MobHeadRareType.RARE_TYPE_A;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"Lifesteal"+ChatColor.BLUE+" &")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.ZOMBIE;
raretype=MobHeadRareType.RARE_TYPE_A;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"Ranged Damage"+ChatColor.BLUE+" &")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.SKELETON;
raretype=MobHeadRareType.RARE_TYPE_A;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+10% "+ChatColor.GOLD+"chance of setting the")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.MAGMA_CUBE;
raretype=MobHeadRareType.RARE_TYPE_A;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"chance of being fully")) {
//return new MobHead(MobHeadType.BLAZE, true, MobHeadRareType.RARE_TYPE_B);
headtype=MobHeadType.ZOMBIE_PIGMAN;
raretype=MobHeadRareType.RARE_TYPE_A;
}
if (getLore.contains(ChatColor.GOLD+"Stacks Wither effect by 2") || getLore.contains(ChatColor.GOLD+"Stacks Wither effect by 1")) {
powered=true;
}
if (raretype!=null) {
return new MobHead(headtype,true,raretype,powered);
} else {
return new MobHead(headtype,false,powered);
}
}
return null;
}
/**
* Checks if the given head is powered or
* unpowered.
* @param head The mob head to check for.
* @return Returns true if the head is unpowered
* or false otherwise.
*/
static public boolean isUnpoweredHead(MobHead head) {
return !head.is_powered;
}
/**
* Converts an unpowered mob head to a powered
* version. If this head is not an unpowered version
* or something bad happens along the way, it
* simply returns the same ItemStack that was
* given.
* @param item The head item we are converting.
* @return The converted mob head. (Or the same
* mob head that was given if something bad
* happened.)
*/
static public ItemStack convertToPoweredHead(ItemStack item) {
if (item!=null && item.getType()==Material.SKULL_ITEM && item.hasItemMeta() && item.getItemMeta().hasLore()) {
ItemStack newitem = new ItemStack(Material.SKULL_ITEM);
List<String> getLore = item.getItemMeta().getLore();
ItemMeta newitem_meta = item.getItemMeta();
newitem.setData(item.getData());
if (newitem_meta.getDisplayName().contains("Rare")) {
newitem_meta.setDisplayName(ChatColor.BLUE+"Powered "+newitem_meta.getDisplayName());
} else {
newitem_meta.setDisplayName(ChatColor.RESET+"Powered "+newitem_meta.getDisplayName());
}
newitem.setItemMeta(newitem_meta);
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5 "+ChatColor.GOLD+"second "+ChatColor.GRAY+"Wither I"+ChatColor.GOLD+" duration")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.GOLD+"Stacks Wither effect by 1");
newLore.add(ChatColor.GOLD+"per hit for 5 seconds.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Ranged Damage")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Ranged Damage "+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"m/s Projectile Speed");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Lifesteal")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Lifesteal"+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"Max Health");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"AoE Damage")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"AoE Damage"+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"Damage over time to");
newLore.add(ChatColor.GOLD+" all nearby enemies.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"Slow on hit")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"Slow on hit"+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"second Poison duration");
newLore.add(ChatColor.GOLD+" on hit.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Critical Chance")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Critical Chance"+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Item Drop Increase");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"second Poison duration")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+2 "+ChatColor.GOLD+"second Poison duration");
newLore.add(ChatColor.GOLD+" on hit."+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"chance of snaring the");
newLore.add(ChatColor.GOLD+" target for 5 seconds.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"second ignite duration")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"second ignite duration");
newLore.add(ChatColor.GOLD+" on hit."+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"chance of sending the");
newLore.add(ChatColor.GOLD+" enemy airborne.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"-1% "+ChatColor.GOLD+"damage taken on hit")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"-1% "+ChatColor.GOLD+"damage taken on hit"+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"chance to send down");
newLore.add(ChatColor.GOLD+" lightning onto your enemy.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"chance of being fully")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"chance of being fully");
newLore.add(ChatColor.GOLD+" healed on a kill."+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"chance of dropping a");
newLore.add(ChatColor.GOLD+" Golden Nugget on a kill");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"chance of setting the")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"chance of setting the");
newLore.add(ChatColor.GOLD+" mob and surrounding mobs on fire");
newLore.add(ChatColor.GOLD+" for 10 seconds."+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"chance of burning an");
newLore.add(ChatColor.GOLD+" enemy to a crisp.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+15 "+ChatColor.GOLD+"second "+ChatColor.GRAY+"Wither III"+ChatColor.GOLD+" duration")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.GOLD+"Stacks Wither effect by 2");
newLore.add(ChatColor.GOLD+"per hit for 20 seconds.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"Ranged Damage") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"m/s Projectile Speed")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"Ranged Damage"+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+3 "+ChatColor.GOLD+"m/s Projectile Speed");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"Lifesteal") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"Max Health")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"Lifesteal"+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+4 "+ChatColor.GOLD+"Max Health");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1 "+ChatColor.GOLD+"Damage to all nearby enemies.") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"+20% "+ChatColor.GOLD+"AoE Damage")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+30% "+ChatColor.GOLD+"AoE Damage"+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+3 "+ChatColor.GOLD+"Damage over time to");
newLore.add(ChatColor.GOLD+" all nearby enemies.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+2 "+ChatColor.GOLD+"second Poison duration") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"+15% "+ChatColor.GOLD+"Slow on hit")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+30% "+ChatColor.GOLD+"Slow on hit"+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+5 "+ChatColor.GOLD+"second Poison duration");
newLore.add(ChatColor.GOLD+" on hit.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+1% "+ChatColor.GOLD+"Item Drop Amount Increase") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"Critical Chance")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+10% "+ChatColor.GOLD+"Critical Chance"+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"Item Drop Increase");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"of snaring a target") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"+3 "+ChatColor.GOLD+"second Poison duration")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+5 "+ChatColor.GOLD+"second Poison duration");
newLore.add(ChatColor.GOLD+" on hit."+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+8% "+ChatColor.GOLD+"chance of snaring the");
newLore.add(ChatColor.GOLD+" target for 5 seconds.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"chance to send enemy") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"+3 "+ChatColor.GOLD+"second ignite duration")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+5 "+ChatColor.GOLD+"second ignite duration");
newLore.add(ChatColor.GOLD+" on hit."+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+10% "+ChatColor.GOLD+"chance of sending the");
newLore.add(ChatColor.GOLD+" enemy airborne.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"chance to send down") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"-5% "+ChatColor.GOLD+"damage taken on hit")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"-10% "+ChatColor.GOLD+"damage taken on hit"+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+10% "+ChatColor.GOLD+"chance to send down");
newLore.add(ChatColor.GOLD+" lightning onto your enemy.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+10% "+ChatColor.GOLD+"chance of dropping a") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"+3% "+ChatColor.GOLD+"chance of being fully")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"chance of being fully");
newLore.add(ChatColor.GOLD+" healed on a kill."+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+20% "+ChatColor.GOLD+"chance of dropping a");
newLore.add(ChatColor.GOLD+" Golden Nugget on a kill");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
if (getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"chance of burning an") ||
getLore.contains(ChatColor.LIGHT_PURPLE+"+5% "+ChatColor.GOLD+"chance of setting the")) {
ItemMeta meta = newitem.getItemMeta();
List<String> newLore = new ArrayList<String>();
newLore.add(ChatColor.LIGHT_PURPLE+"+10% "+ChatColor.GOLD+"chance of setting the");
newLore.add(ChatColor.GOLD+" mob and surrounding mobs on fire");
newLore.add(ChatColor.GOLD+" for 10 seconds."+ChatColor.BLUE+" &");
newLore.add(ChatColor.LIGHT_PURPLE+"+10% "+ChatColor.GOLD+"chance of burning an");
newLore.add(ChatColor.GOLD+" enemy to a crisp.");
meta.setLore(newLore);
newitem.setItemMeta(meta);
return newitem;
}
}
return item;
}
@Override
public String toString() {
return "MobHead(Type: "+(head_type!=null?head_type.name():"null")+", Rare Type: "+(rare_head_type!=null?rare_head_type.name():"null")+", is_rare:"+rare_head+", is_powered:"+is_powered+")";
}
public MobHead(MobHeadType head_type) {
MobHead(head_type, false, MobHeadRareType.RARE_TYPE_A, false);
}
public MobHead(MobHeadType head_type, boolean is_rare) {
MobHead(head_type, is_rare, MobHeadRareType.RARE_TYPE_A, false);
}
public MobHead(MobHeadType head_type, boolean is_rare, MobHeadRareType rare_head_type) {
MobHead(head_type, is_rare, rare_head_type, false);
}
public MobHead(MobHeadType head_type, boolean is_rare, boolean is_powered) {
MobHead(head_type, is_rare, MobHeadRareType.RARE_TYPE_A, is_powered);
}
public MobHead(MobHeadType head_type, boolean is_rare, MobHeadRareType rare_head_type, boolean is_powered) {
MobHead(head_type, is_rare, rare_head_type, is_powered);
}
void MobHead(MobHeadType head_type, boolean is_rare, MobHeadRareType rare_head_type, boolean is_powered) {
this.head_type=head_type;
this.rare_head_type=rare_head_type;
this.rare_head=is_rare;
this.is_powered=is_powered;
}
}

@ -0,0 +1,61 @@
package me.kaZep.Base;
import java.util.UUID;
/**
* The MobManager class handles a certain mob in the game.
* It will allow you to define new properties for mobs
* to keep track of. This is similar to the PlayerData
* class for players.
*/
public class MobManager {
UUID id;
long poison_time;
/**
* Adds a new mob to be tracked.
* @param id The UUID of the mob.
*/
public MobManager(UUID id) {
this.id=id;
this.poison_time=Main.SERVER_TICK_TIME;
}
/**
* If there are already poison ticks on this mob,
* adds to the duration in ticks for the poison
* to last. Otherwise works just like setPoison().
* @param ticks
*/
public void addPoison(long ticks) {
if (poison_time>=Main.SERVER_TICK_TIME) {
poison_time+=ticks;
} else {
setPoison(ticks);
}
}
/**
* Sets the poison ticks directly, overwriting
* any previous poison tick data.
* @param ticks
*/
public void setPoison(long ticks) {
poison_time=Main.SERVER_TICK_TIME+ticks;
}
/**
* Removes the poison ticks from this mob.
*/
public void removePoison() {
poison_time=Main.SERVER_TICK_TIME;
}
/**
* Returns the number of ticks of poison
* left on this mob.
* @return
*/
public long getPoisonTicks() {
if (poison_time>=Main.SERVER_TICK_TIME) {
return poison_time-Main.SERVER_TICK_TIME;
} else {
return 0; //0 ticks, since the stored time is smaller.
}
}
}

@ -8,6 +8,10 @@ import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.List;
import me.kaZep.Base.MobHead.MobHeadRareType;
import me.kaZep.Base.MobHead.MobHeadType;
import me.kaZep.Commands.JobsDataInfo.Job;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
@ -22,14 +26,23 @@ public class PlayerBuffData {
List<Player> armorbufflist;
double base_hplv;
List<Player> hpbufflist;
short helmet_durability,chestplate_durability,leggings_durability,boots_durability;
int potion_spdlv;
long potion_time;
long hpbuff_time;
double extra_hp=0;
double money_gained=0;
long last_money_report_time=0;
long last_sneak_time=0;
public Main plugin;
public String toString() {
//A method that outputs this class as a string.
return "PlayerBuffData@{p = "+((p!=null)?p.toString():"null")+", base_spdlv = "+base_spdlv+", base_armorlv = "+base_armorlv+", armorbufflist = "+
((armorbufflist!=null)?armorbufflist.toString():"null")+", base_hplv = "+base_hplv+", hpbufflist = "+((hpbufflist!=null)?hpbufflist.toString():"null")+
", potion_spdlv = "+potion_spdlv+", potion_time = "+potion_time+", hpbuff_time = "+
hpbuff_time+", extra_hp = "+extra_hp+", money_gained = "+money_gained+", last_money_report_time = "+last_money_report_time+"," +
"plugin = "+((plugin!=null)?plugin.toString():"null")+"}";
}
public String healthbar(double curHP,double maxHP) {
//笆<EFBFBD><EFBFBD>
@ -52,6 +65,40 @@ public class PlayerBuffData {
}
return bar;
}
public String healthbar(double curHP,double maxHP,int hunger) {
//笆<EFBFBD><EFBFBD>
int bits=(int)(Math.ceil(curHP/maxHP*10));
String bar=" ";
if (hunger>=17) {
if (bits>6) {
bar+=ChatColor.GREEN+"";
} else
if (bits>3) {
bar+=ChatColor.YELLOW+"";
} else
{
bar+=ChatColor.RED+"";
}
} else {
if (bits>6) {
bar+=ChatColor.DARK_GREEN+"";
} else
if (bits>3) {
bar+=ChatColor.GOLD+"";
} else
{
bar+=ChatColor.DARK_RED+"";
}
}
for (int i=0;i<bits/2;i++) {
bar+=Character.toString((char)0x2588);
}
if (bits%2!=0) {
bar+=Character.toString((char)0x258C);
}
return bar;
}
public PlayerBuffData(Player p, Main thisplugin) {
this.p=p;
@ -62,26 +109,6 @@ public class PlayerBuffData {
this.hpbufflist=new ArrayList<Player>();
this.last_money_report_time=Main.SERVER_TICK_TIME;
this.money_gained=0;
if (p.getInventory().getHelmet()!=null) {
this.helmet_durability=p.getInventory().getHelmet().getDurability();
} else {
this.helmet_durability=-1;
}
if (p.getInventory().getChestplate()!=null) {
this.chestplate_durability=p.getInventory().getChestplate().getDurability();
} else {
this.chestplate_durability=-1;
}
if (p.getInventory().getLeggings()!=null) {
this.leggings_durability=p.getInventory().getLeggings().getDurability();
} else {
this.leggings_durability=-1;
}
if (p.getInventory().getBoots()!=null) {
this.boots_durability=p.getInventory().getBoots().getDurability();
} else {
this.boots_durability=-1;
}
this.plugin=thisplugin;
try {
Iterator<PotionEffect> effects = p.getActivePotionEffects().iterator();
@ -112,8 +139,11 @@ public class PlayerBuffData {
if (!p.isDead()) { //Don't even try to set things if we're dead.
base_hplv=20;
base_hplv+=hpbufflist.size()*10;
if (this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat8")>0) {
base_hplv+=this.plugin.getStatBonus(7, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat8")/2);
if (this.plugin.hasJobBuff("Hunter", p, Job.JOB40)) {
base_hplv+=20;
}
if (this.plugin.getAccountsConfig().getInt(p.getName().toLowerCase()+".stats.stat8")>0) {
base_hplv+=this.plugin.getStatBonus(7, this.plugin.getAccountsConfig().getInt(p.getName().toLowerCase()+".stats.stat8")/2);
}
//Check player equipment to see if an item could possibly have a health buff.
for (int i=0;i<p.getEquipment().getArmorContents().length;i++) {
@ -129,6 +159,17 @@ public class PlayerBuffData {
}
}
}
if (p.getInventory()!=null) {
List<MobHead> playerheads = this.plugin.getMobHeads(p);
int zombierarebheads = this.plugin.getMobHeadAmt(new MobHead(MobHeadType.ZOMBIE,true,MobHeadRareType.RARE_TYPE_B), playerheads);
int zombiepoweredheads = this.plugin.getMobHeadAmt(new MobHead(MobHeadType.ZOMBIE,false,true), playerheads);
int zombiepoweredrareheads = this.plugin.getMobHeadAmt(new MobHead(MobHeadType.ZOMBIE,true,true), playerheads);
//Bukkit.getLogger().info("Base Health is "+base_hplv+".");
base_hplv+=zombierarebheads;
base_hplv+=zombiepoweredheads;
base_hplv+=zombiepoweredrareheads*4;
//Bukkit.getLogger().info("Base Health is "+base_hplv+".");
}
extra_hp=0;
//p.setMaxHealth(base_hplv);
boolean hasabsorption=false;
@ -150,39 +191,31 @@ public class PlayerBuffData {
} catch (ConcurrentModificationException ex_e) {
Bukkit.getLogger().warning("Potion Effect Collection not accessible while finalizing player speed.");
}
if (!hasabsorption && this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat4")>0) {
if (!hasabsorption && this.plugin.getAccountsConfig().getInt(p.getName().toLowerCase()+".stats.stat4")>0) {
p.removePotionEffect(PotionEffectType.ABSORPTION);
p.addPotionEffect(new PotionEffect(PotionEffectType.ABSORPTION,3590,this.plugin.getStatBonus(3, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat4")/3)/4-1));
//p.sendMessage("Absorption level is "+(this.plugin.getStatBonus(3, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat4")/4)/4-1));
p.addPotionEffect(new PotionEffect(PotionEffectType.ABSORPTION,3600,this.plugin.getStatBonus(3, this.plugin.getAccountsConfig().getInt(p.getName().toLowerCase()+".stats.stat4")/3)/4-1),true);
//p.sendMessage("Absorption level is "+(this.plugin.getStatBonus(3, this.plugin.getAccountsConfig().getInt(p.getName().toLowerCase()+".stats.stat4")/4)/4-1));
}
if (this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat2")>0) {
if (this.plugin.getAccountsConfig().getInt(p.getName().toLowerCase()+".stats.stat2")>0) {
p.removePotionEffect(PotionEffectType.FAST_DIGGING);
p.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING,399,this.plugin.getStatBonus(1, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat2")/4)/20-1));
p.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING,399,this.plugin.getStatBonus(1, this.plugin.getAccountsConfig().getInt(p.getName().toLowerCase()+".stats.stat2")/5)/20-1));
}
//p.sendMessage("Health: "+p.getHealth()+"/"+p.getMaxHealth()+" Base HP Level: "+base_hplv);
if (p.getHealth()>p.getMaxHealth()) {
p.setHealth(p.getMaxHealth());
//p.sendMessage("Health: "+p.getHealth()+"/"+p.getMaxHealth()+" Set new health: "+p.getMaxHealth()+"+"+extra_hp);
}
//Bukkit.getLogger().info("Base hp level: "+base_hplv+" Max Health: "+p.getMaxHealth());
if (base_hplv!=p.getMaxHealth()) {
double temphp=0;
if (base_hplv<p.getMaxHealth()) {
p.setMaxHealth(base_hplv-extra_hp);
p.setHealth(base_hplv);
temphp = p.getHealth();
p.setMaxHealth(base_hplv-extra_hp);
if (temphp>p.getMaxHealth()) {
p.setHealth(p.getMaxHealth());
} else {
temphp = p.getHealth();
p.setMaxHealth(base_hplv-extra_hp);
p.setHealth(temphp);
}
}
/*if (base_hplv!=p.getMaxHealth()) {
p.setMaxHealth(base_hplv-extra_hp);
}*/
/*
if (p.getHealth()>base_hplv) {
p.setHealth(base_hplv);
//p.sendMessage("Health too high. Lowering to "+p.getMaxHealth());
}*/
//Send new speed totals so the player's speed can be manually adjusted.
if (potion_spdlv>0 && potion_time<Main.SERVER_TICK_TIME) {
//Remove the potion speed buff.
@ -193,12 +226,13 @@ public class PlayerBuffData {
//Figure out potion effects when player joins.
while (effects.hasNext()) {
PotionEffect nexteffect = effects.next();
/*
if (nexteffect.getType().getName().compareTo(PotionEffectType.INCREASE_DAMAGE.getName())==0) {
if (nexteffect.getAmplifier()>0) {
p.removePotionEffect(PotionEffectType.INCREASE_DAMAGE);
p.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE,nexteffect.getDuration()*4,0));
}
}
}*/
if (nexteffect.getType().getName().compareTo(PotionEffectType.SPEED.getName())==0) {
if (nexteffect.getDuration()<47479999) {
//This is not a buff we applied via our plugin.
@ -221,18 +255,20 @@ public class PlayerBuffData {
p.removePotionEffect(PotionEffectType.SPEED);
if ((base_spdlv+potion_spdlv)>0) {
//Bukkit.getPlayer("AaMay").sendMessage("Explorer giving speed buff: "+(base_spdlv-1+potion_spdlv));
p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 2147479999, base_spdlv-1+potion_spdlv, true));
}
if (last_money_report_time+72000<Main.SERVER_TICK_TIME) {
last_money_report_time=Main.SERVER_TICK_TIME;
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify6")) {
if (this.plugin.getAccountsConfig().getBoolean(p.getName().toLowerCase()+".settings.notify6")) {
DecimalFormat df = new DecimalFormat("#0.00");
p.sendMessage(ChatColor.YELLOW+""+ChatColor.ITALIC+"You have earned $"+df.format(money_gained)+" from your jobs in the past hour.");
//p.sendMessage(ChatColor.YELLOW+""+ChatColor.ITALIC+"You have earned $"+df.format(money_gained)+" from your jobs in the past hour.");
}
money_gained=0;
}
p.getScoreboard().getTeam(p.getName()).setSuffix(healthbar(p.getHealth(),p.getMaxHealth()));
p.getScoreboard().getTeam(p.getName().toLowerCase()).setSuffix(healthbar(p.getHealth(),p.getMaxHealth(),p.getFoodLevel()));
} else {
base_hplv=20;
p.setMaxHealth(base_hplv);
}
}
}

@ -1,21 +1,38 @@
package me.kaZep.Base;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
public class PlayerData {
int buildamt=10;
Material lastblocktype=null;
int gameinteractions=0;
long lastinteracttime=0;
long lastminetime=0;
long lastsneaktime=0;
int minestreak=0;
long furytime=0;
long invulntime=0;
int furyamt=0;
boolean is_renaming_item=false;
boolean haslanded=true;
long lasteattime=Main.SERVER_TICK_TIME;
int blockstack=0; //The amount of times you've gotten hit (The amount of "blocking" stacks you now have)
int fishingstreak=0;
int fishingrodfails=0; //The amount of times in a row you've failed to catch fish.
long fishingroduse=Main.SERVER_TICK_TIME; //The last time you threw the fishing rod in the water.
double fishingrodcatchrate = 0.002; //The current chance of catching a fish.
Location clickedblock1=null; //Stores the location of a clicked block.
Player data=null;
long lastflighttime=0;
public PlayerData(Player p) {
this.data=p;
this.lastblocktype=Material.DIRT;
lastinteracttime=Main.SERVER_TICK_TIME;
lastminetime=Main.SERVER_TICK_TIME;
lastinteracttime=
lastminetime=
lastflighttime=Main.SERVER_TICK_TIME;
minestreak=0;
}
public boolean CheckMineStreak() {
@ -63,6 +80,12 @@ public class PlayerData {
buildamt+=2;
}
}
public void SetClickedBlock(Location l) {
clickedblock1 = l;
}
public Location GetClickedBlock() {
return clickedblock1;
}
public Player getPlayer() {
return data;
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,12 @@
package me.kaZep.Base;
import java.util.UUID;
public class PoweredMob {
UUID id;
long power_time;
public PoweredMob(UUID id, long power_time) {
this.id=id;
this.power_time=power_time;
}
}

@ -3,6 +3,8 @@ package me.kaZep.Base;
import java.util.ArrayList;
import java.util.List;
import me.kaZep.Base.Main;
import org.bukkit.Location;
import org.bukkit.block.Chest;
import org.bukkit.inventory.ItemStack;
@ -13,8 +15,13 @@ import org.bukkit.plugin.Plugin;
//deposit, choosing the closest one.
public class RecyclingCenterNode {
public static double chanceincrease = 1.0; //The amount of chance that each item will increase the chest as it gets placed. Increase this for less items.
public static double chestdecrease = 0.2; //The amount of chance that each item will decrease the chest. Increase this for more items.
public static double chanceincrease = 1.5; //The amount of chance that each item will increase the chest as it gets placed. Increase this for less items.
public static double chestdecrease = 0.25; //The amount of chance that each item will decrease the chest. Increase this for more items.
//Store our items we can give out array along with our rare items we might potentially track.
public static int[] items = {1,3,4,5,6,12,13,14,15,17,18,20,22,23,24,25,27,28,39,31,32,33,35,37,38,39,40,41,42,44,45,46,47,48,49,50,53,54,57,58,61,65,66,67,69,70,72,76,77,78,80,81,82,84,85,86,87,88,89,91,96,98,101,102,103,106,107,108,109,111,112,113,114,116,121,122,123,126,128,130,131,133,134,135,136,138,139,143,145,146,147,148,151,152,154,155,156,157,158,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267};
//Rare items can only be given out in quantities of 1. To prevent massive amounts of OP.
public static int[] rareitems = {173,263,256,257,258,265,267,306,307,308,309,417,266,283,284,285,286,314,315,316,317,322,399,418,57,264,276,277,278,279,310,311,312,313,419,14,15,16,21,73,56,129,41,46,57,116,122,133,130,146,151,264,266,276,277,278,279,293,310,311,312,313,368,381,406};
public static int[] unalloweditems = {127,7,11,9,19,32,34,59,141,142,405,26,31,51,63,64,68,71,78,90,117,118,119,127,137,140,144,383};
List<Location> locations; //List of all chest locations for this Node.
int itemslot; //Stores the current item we are on in that chest. From 0-26.
double chance; //The chance we will let an item in. This increases over time to prevent overpopulation.
@ -84,7 +91,9 @@ public class RecyclingCenterNode {
}
public void recycleItem(ItemStack item) {
if (item.getItemMeta().hasDisplayName()==false) {
boolean allowed=true;
if (item.getItemMeta().hasDisplayName() && item.getItemMeta().getDisplayName().toLowerCase().contains("quickshop")) {allowed=false;}
if (allowed) {
//Choose one of the random recycling centers.
int center=(int)(Math.random()*locations.size());
double tempchance = chance; //Store the current chance so we can check for duplicates.
@ -95,24 +104,29 @@ public class RecyclingCenterNode {
tempchance*=2.0d;
}
}
if (Math.random()*tempchance<1.0d) {
//Deposit item. Set chance higher.
if (c.getBlockInventory().getItem(itemslot)!=null) {
c.getBlockInventory().remove(itemslot);
if (Math.random()*tempchance<1.0d || (Main.SERVER_TICK_TIME-this.plugin.last_player_death_time<=12000 && Math.random()*tempchance<3.0d)) {
boolean contains=false;
for (int k=0;k<unalloweditems.length;k++) {
if (itemslot==unalloweditems[k]) {
contains=true;
break;
}
}
c.getBlockInventory().setItem(itemslot,item);
itemslot=(itemslot+1)%27;
chance+=chanceincrease;
//Random item chance increases as we get more and more drops.
if (this.plugin.randomitemchance>8.0d) {
this.plugin.randomitemchance-=1d;
if (!contains) { //Make sure this is not an invalid item.
//Deposit item. Set chance higher.
if (c.getBlockInventory().getItem(itemslot)!=null) {
c.getBlockInventory().remove(itemslot);
}
c.getBlockInventory().setItem(itemslot,item);
itemslot=(itemslot+1)%27;
chance+=chanceincrease;
//Random item chance increases as we get more and more drops.
if (this.plugin.randomitemchance>8.0d) {
this.plugin.randomitemchance-=1d;
}
}
} else {
if (Math.random()*this.plugin.randomitemchance<1.0d) {
//Store our items we can give out array along with our rare items we might potentially track.
int[] items = {1,3,4,5,6,1,13,14,15,17,18,20,22,23,24,25,27,28,39,31,32,33,35,37,38,39,40,41,42,44,45,46,47,48,49,50,53,54,57,58,61,65,66,67,69,70,72,76,77,78,80,81,82,84,85,86,87,88,89,91,96,98,101,102,103,106,107,108,109,111,112,113,114,116,121,122,123,126,128,130,131,133,134,135,136,138,139,143,145,146,147,148,151,152,154,155,156,157,158,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267};
//Rare items can only be given out in quantities of 1. To prevent massive amounts of OP.
int[] rareitems = {41,46,57,116,122,133,130,146,151,264,266,276,277,278,279,293,310,311,312,313,368,381,406};
int item1 = items[(int)(Math.random()*items.length)];
ItemStack newitem = item;
newitem.setTypeId(item1);
@ -126,14 +140,14 @@ public class RecyclingCenterNode {
if (contains) {
//This is a rare item! We increase the random item chance a ton! Also only allow 1 to be in there.
newitem.setAmount(1);
this.plugin.randomitemchance+=400d;
this.plugin.randomitemchance+=1600d;
}
if (c.getBlockInventory().getItem(itemslot)!=null) {
c.getBlockInventory().remove(itemslot);
}
c.getBlockInventory().setItem(itemslot,newitem);
//Regardless if it's rare or not, increase the random item chance by 100. We won't do this again for awhile.
this.plugin.randomitemchance+=100d;
this.plugin.randomitemchance+=300d;
} else {
if (this.plugin.randomitemchance>8.0d) {
this.plugin.randomitemchance-=1d;

@ -0,0 +1,12 @@
package me.kaZep.Base;
import org.bukkit.Location;
public class TempBlock {
public Location loc;
public int timer;
public TempBlock(Location loc, int timer) {
this.loc=loc;
this.timer=timer;
}
}

@ -0,0 +1,149 @@
package me.kaZep.Base;
import java.io.File;
import java.io.IOException;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import com.sk89q.worldedit.CuboidClipboard;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.EmptyClipboardException;
import com.sk89q.worldedit.FilenameException;
import com.sk89q.worldedit.LocalPlayer;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.bukkit.BukkitWorld;
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import com.sk89q.worldedit.data.DataException;
import com.sk89q.worldedit.schematic.SchematicFormat;
/**
* @author desht
*
* A wrapper class for the WorldEdit terrain loading & saving API to make things a little
* simple for other plugins to use.
*/
public class TerrainManager {
private static final String EXTENSION = "schematic";
private final WorldEdit we;
private final LocalSession localSession;
private final EditSession editSession;
private final LocalPlayer localPlayer;
/**
* Constructor
*
* @param wep the WorldEdit plugin instance
* @param player the player to work with
*/
public TerrainManager(WorldEditPlugin wep, Player player) {
we = wep.getWorldEdit();
localPlayer = wep.wrapPlayer(player);
localSession = we.getSession(localPlayer);
editSession = localSession.createEditSession(localPlayer);
}
/**
* Constructor
*
* @param wep the WorldEdit plugin instance
* @param world the world to work in
*/
public TerrainManager(WorldEditPlugin wep, World world) {
we = wep.getWorldEdit();
localPlayer = null;
localSession = new LocalSession(we.getConfiguration());
editSession = new EditSession(new BukkitWorld(world), we.getConfiguration().maxChangeLimit);
}
/**
* Write the terrain bounded by the given locations to the given file as a MCedit format
* schematic.
*
* @param saveFile a File representing the schematic file to create
* @param l1 one corner of the region to save
* @param l2 the corner of the region to save, opposite to l1
* @throws DataException
* @throws IOException
*/
public void saveTerrain(File saveFile, Location l1, Location l2) throws FilenameException, DataException, IOException {
Vector min = getMin(l1, l2);
Vector max = getMax(l1, l2);
saveFile = we.getSafeSaveFile(localPlayer,
saveFile.getParentFile(), saveFile.getName(),
EXTENSION, new String[] { EXTENSION });
editSession.enableQueue();
CuboidClipboard clipboard = new CuboidClipboard(max.subtract(min).add(new Vector(1, 1, 1)), min);
clipboard.copy(editSession);
SchematicFormat.MCEDIT.save(clipboard, saveFile);
editSession.flushQueue();
}
/**
* Load the data from the given schematic file and paste it at the given location. If the location is null, then
* paste it at the saved data's origin.
*
* @param saveFile a File representing the schematic file to load
* @param loc the location to paste the clipboard at (may be null)
* @throws FilenameException
* @throws DataException
* @throws IOException
* @throws MaxChangedBlocksException
* @throws EmptyClipboardException
*/
public void loadSchematic(File saveFile, Location loc) throws FilenameException, DataException, IOException, MaxChangedBlocksException, EmptyClipboardException {
saveFile = we.getSafeSaveFile(localPlayer,
saveFile.getParentFile(), saveFile.getName(),
EXTENSION, new String[] { EXTENSION });
editSession.enableQueue();
localSession.setClipboard(SchematicFormat.MCEDIT.load(saveFile));
localSession.getClipboard().place(editSession, getPastePosition(loc), false);
editSession.flushQueue();
we.flushBlockBag(localPlayer, editSession);
}
/**
* Load the data from the given schematic file and paste it at the saved clipboard's origin.
*
* @param saveFile
* @throws FilenameException
* @throws DataException
* @throws IOException
* @throws MaxChangedBlocksException
* @throws EmptyClipboardException
*/
public void loadSchematic(File saveFile) throws FilenameException, DataException, IOException, MaxChangedBlocksException, EmptyClipboardException {
loadSchematic(saveFile, null);
}
private Vector getPastePosition(Location loc) throws EmptyClipboardException {
if (loc == null)
return localSession.getClipboard().getOrigin();
else
return new Vector(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
}
private Vector getMin(Location l1, Location l2) {
return new Vector(
Math.min(l1.getBlockX(), l2.getBlockX()),
Math.min(l1.getBlockY(), l2.getBlockY()),
Math.min(l1.getBlockZ(), l2.getBlockZ())
);
}
private Vector getMax(Location l1, Location l2) {
return new Vector(
Math.max(l1.getBlockX(), l2.getBlockX()),
Math.max(l1.getBlockY(), l2.getBlockY()),
Math.max(l1.getBlockZ(), l2.getBlockZ())
);
}
}

@ -8,6 +8,7 @@ import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
public class JobsDataInfo {
public enum Job {JOB5,JOB10,JOB20,JOB30A,JOB30B,JOB40};
String jobname;
String introstring;
String actionname1;
@ -22,6 +23,8 @@ public class JobsDataInfo {
String lv5buff;
String lv10buff;
String lv20buff;
String lv30_1buff;
String lv30_2buff;
String lv40buff;
List<Double> dataprice1;
List<Double> dataprice2;
@ -50,6 +53,8 @@ public class JobsDataInfo {
lv5buff = "";
lv10buff = "";
lv20buff = "";
lv30_1buff = "";
lv30_2buff = "";
lv40buff = "";
dataprice1 = new ArrayList<Double>();
dataprice2 = new ArrayList<Double>();
@ -73,6 +78,7 @@ public class JobsDataInfo {
public void addExtraData(String info) {
extrainfo.add(info);
}
@Deprecated
public String getBuffData(int lv) {
switch (lv) {
case 5:{
@ -90,12 +96,44 @@ public class JobsDataInfo {
}
return "";
}
public String getBuffData(Job job) {
switch (job) {
case JOB5:{
return this.lv5buff;
}
case JOB10:{
return this.lv10buff;
}
case JOB20:{
return this.lv20buff;
}
case JOB30A:{
return this.lv30_1buff;
}
case JOB30B:{
return this.lv30_2buff;
}
case JOB40:{
return this.lv40buff;
}
}
return "";
}
@Deprecated
public void setBuffData(String lv5,String lv10,String lv20,String lv40) {
this.lv5buff=lv5;
this.lv10buff=lv10;
this.lv20buff=lv20;
this.lv40buff=lv40;
}
public void setBuffData(String lv5,String lv10,String lv20,String lv30_1,String lv30_2,String lv40) {
this.lv5buff=lv5;
this.lv10buff=lv10;
this.lv20buff=lv20;
this.lv30_1buff=lv30_1;
this.lv30_2buff=lv30_2;
this.lv40buff=lv40;
}
public void setAction(int numb, String name) {
switch (numb) {
case 0:{

File diff suppressed because it is too large Load Diff

@ -0,0 +1,24 @@
package sig.ItemSets;
import org.bukkit.Color;
/**
* A collection of colors that defines an item set.
*/
public class ColorSet {
Color helmet, chestplate, leggings, boots;
/**
*
* @param helmet The helmet's Color.
* @param chestplate The chestplate's Color.
* @param leggings The leggings' Color.
* @param boots The boots' Color.
*/
public ColorSet(Color helmet, Color chestplate, Color leggings, Color boots) {
this.helmet=helmet;
this.chestplate=chestplate;
this.leggings=leggings;
this.boots=boots;
}
}

@ -0,0 +1,46 @@
package sig.ItemSets;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.inventory.ItemStack;
import com.modcrafting.diablodrops.DiabloDrops;
public class DiabloDropsHook {
/**
*
* (Note that these are defined in /plugins/Diablodrops/tier.yml. They could be modified if you really wanted to!
* Legendary - (Gold Color) Up to 7 enchantments, up to level 10.
* Lore - (Yellow Color) Up to 7 enchantments, up to level 9.
* Magical - (Blue Color) Up to 3 enchantments, up to level 4.
* Rare - (Red Color) Up to 5 enchantments, up to level 5.
* Set - (Green Color) Up to 7 enchantments, up to level 6.
* Unidentified - (Magic Letters) Up to 10 enchantments, up to level 10.
*
*/
public enum Tier {Legendary, Lore, Magical, Rare, Set, Unidentified};
public static ItemStack getRandomItem() {
return DiabloDrops.getInstance().getDropAPI().getItem();
}
public static ItemStack getRandomItem(Material mat) {
//Returns a random Diablodrops item that is of a certain material type..
return DiabloDrops.getInstance().getDropAPI().getItem(mat);
}
public static ItemStack getTierItem(Tier tier) {
//Returns a random Diablodrops item that is of a certain tier type.. (Use the Tier enum types)
return DiabloDrops.getInstance().getDropAPI().getItem(DiabloDrops.getInstance().getDropAPI().getTier(tier.name()));
}
public static ItemStack getTierItem(Material mat, Tier tier) {
//Returns a random Diablodrops item that is of a certain material type and tier type.. (Use the Tier enum types)
return DiabloDrops.getInstance().getDropAPI().getItem(mat, DiabloDrops.getInstance().getDropAPI().getTier(tier.name()));
}
public static ItemStack getItem(ItemStack i) {
//Turns an item into a Diablodrops special item.
return DiabloDrops.getInstance().getDropAPI().getItem(i);
}
public static void fillChest(Block b, int size) {
//Fills a specified chest in the world with loot.
DiabloDrops.getInstance().getDropAPI().fillChest(b, size);
}
}

@ -0,0 +1,30 @@
package sig.ItemSets;
import org.bukkit.Color;
public class ItemSet {
String name = ""; //The name of the ItemSet.
String description = ""; //The description of the ItemSet.
String[] effectlist = {"","",""};
ColorSet colors = null;
public ItemSet(String name, ColorSet colors, String description,
String effect1, String effect2, String effect3) {
this.name=name;
this.colors=colors;
this.description=description;
this.effectlist[0]=effect1;
this.effectlist[1]=effect2;
this.effectlist[2]=effect3;
}
/*
private static String[] sets = {"Acrobat", "Angel", "Berserker", "Blackguard", "Chilling", "Flaming",
"Glacial", "Guardian", "Holy", "Meteoric", "Monk", "Nature", "Priest", "Ruby", "Sapphire", "Spiritual",
"Summoner", "Trickster", "Venomous", "Visionary", "Warrior", "Witch-hunter"}; //Holds all the sets that exist.
private static ColorSet[] colorsets = { ColorSet(Color.AQUA,Color.AQUA,Color.AQUA,Color.AQUA),
};
private static ColorSet ColorSet(Color col1, Color col2, Color col3,
Color col4) {
return ColorSet(col1,col2,col3,col4);
}*/
}

@ -0,0 +1,151 @@
package sig.ItemSets;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.ChatColor;
import org.bukkit.Color;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
public class ItemSetList {
enum Armor {HELMET, CHESTPLATE, LEGGINGS, BOOTS};
List<ItemSet> itemsetlist = null;
/**
* Initializes the Item Set list for adding data and manipulating.
*/
public void Init() {
itemsetlist = new ArrayList<ItemSet>();
}
/**
*
* @param set The ItemSet to add to the list.
* @return Returns the size of the item set list after adding in the ItemSet.
*/
public int addSet(ItemSet set) {
itemsetlist.add(set);
return itemsetlist.size();
}
/**
*
* @param title The title of the item set.
* @return Returns the size of the item list after removing the ItemSet.
*/
public int removeSet(String title) {
int itemset_slot=-1;
if ((itemset_slot=getSetSlot(title))!=-1) {
itemsetlist.remove(itemset_slot);
}
return itemsetlist.size();
}
/**
* Generates a random set item.
* @return Returns the ItemStack of the new set item.
*/
public ItemStack randomizeSetItem() {
}
/**
* The function that hooks into the rest of the item sets.
* @param item The ItemStack to check.
* @return Returns true if this item is identified as a set item,
* false otherwise.
*/
public boolean isSetItem(ItemStack item) {
//A set item is identified by its name. It could be unidentified too.
if (item.hasItemMeta()) {
ItemMeta meta = item.getItemMeta();
String name = meta.getDisplayName();
//Parse the name and see if it has the characteristics of a set item.
if (name.contains(ChatColor.GREEN+"") || name.contains(ChatColor.GREEN+""+ChatColor.MAGIC+"")) {
//It is considered a set item.
return true;
} else {
return false;
}
} else {
//If it has no metadata, it can't possible be a set item.
return false;
}
}
/**
* Extracts the set name from the item.
* @param item The ItemStack to extract the item from.
* @return Returns the name of the set. Returns null
* if this item is not a set item.
*/
public String getSetName(ItemStack item) {
if (item.hasItemMeta()) {
ItemMeta meta = item.getItemMeta();
String name = meta.getDisplayName();
//Parse the name and see if it has the characteristics of a set item.
if (name.contains(ChatColor.GREEN+"") || name.contains(ChatColor.GREEN+""+ChatColor.MAGIC+"")) {
//Return the first name.
if (name.contains(ChatColor.GREEN+""+ChatColor.MAGIC+"")) {
return name.substring(name.indexOf(ChatColor.GREEN+""+ChatColor.MAGIC+""), name.indexOf(" "));
} else {
return name.substring(name.indexOf(ChatColor.GREEN+""), name.indexOf(" "));
}
} else {
return null;
}
} else {
//If it has no metadata, it can't possible be a set item.
return null;
}
}
/**
*
* @param set_slot The slot in the item set list.
* @return Returns the title of the item set.
*/
public String getSetTitle(int set_slot) {
return itemsetlist.get(set_slot).name;
}
/**
*
* @param title The title of the set.
* @param type The armor type.
* @return Returns the color of the specified armor type in the item set.
* Returns null if it couldn't find the item set or an invalid armor
* type was provided.
*/
public Color getSetColor(String title,Armor type) {
int set_slot=-1;
if ((set_slot=getSetSlot(title))!=-1) {
switch (type) {
case HELMET: {
return itemsetlist.get(set_slot).colors.helmet;
}
case CHESTPLATE: {
return itemsetlist.get(set_slot).colors.chestplate;
}
case LEGGINGS: {
return itemsetlist.get(set_slot).colors.leggings;
}
case BOOTS: {
return itemsetlist.get(set_slot).colors.boots;
}
default:{
return null;
}
}
} else {
return null;
}
}
/**
*
* @param title A title of an item set.
* @return Returns the number of the slot in the itemsetlist if it is found.
* Otherwise returns -1.
*/
private int getSetSlot(String title) {
for (int i=0;i<itemsetlist.size();i++) {
if (itemsetlist.get(i).name.equalsIgnoreCase(title)) {
return i;
}
}
return -1;
}
}

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="output" path="bin"/>
</classpath>

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Plugin</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

@ -1,11 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
Loading…
Cancel
Save