From 2db98613ab4e5a4168e9c06df50c9893afeabf57 Mon Sep 17 00:00:00 2001 From: xGamingDudex Date: Thu, 12 May 2016 23:42:37 +0200 Subject: [PATCH] Cosmetic Update * Redid the Reward manager Added new rewards to the chest and changed some values * Fixed some MineStrike skin bugs * Removed particles/death effects from Minestrike * Removed old test minestrike skins * Moved minestrike skins to correct package * Changed the illuminated chest animation a bit * Fixed other minor bugs --- .../mineplex/core/common/util/UtilGear.java | 7 + .../mineplex/core/common/util/UtilText.java | 9 +- .../mineplex/core/bonuses/BonusManager.java | 10 +- .../mineplex/core/bonuses/gui/SpinGui.java | 5 +- .../cosmetic/ui/page/GameModifierPage.java | 2 +- .../cosmetic/ui/page/GameModifierSubPage.java | 4 +- .../cosmetic/ui/page/KitGameModifierPage.java | 6 +- .../mineplex/core/gadget/GadgetManager.java | 155 ++++++--- .../gamemodifiers/GameModifierType.java | 2 +- .../gamemodifiers/kits/KitGameModifier.java | 5 +- .../gamemodifiers/kits/KitModifierType.java | 4 +- .../kits/bridges/PotatoKitGameModifier.java | 9 +- .../beastmaster/ChickenKitGameModifier.java | 9 +- .../MiniGuardianKitGameModifier.java | 9 +- .../beastmaster/PigKitGameModifier.java | 9 +- .../beastmaster/SquidKitGameModifier.java | 9 +- .../horseman/MuleKitGameModifier.java | 9 +- .../SkeletonHorseKitGameModifier.java | 9 +- .../WitherSkeletonKitGameModifier.java | 9 +- .../GameModifierMineStrikeSkin.java | 36 ++- .../minestrike/MineStrikeSkin.java | 63 ++++ .../wineffect/WinEffectLightningStrike.java | 2 +- .../wineffect/WinEffectMrPunchMan.java | 4 +- .../wineffect/WinEffectSnowTrails.java | 3 + .../core/gadget/types/GadgetGameModifier.java | 2 +- .../minestrike/MineStrikeSkinAK47Torch.java | 19 -- .../MineStrikeSkinDesertEagleSand.java | 19 -- .../MineStrikeSkinDesertEagleStick.java | 19 -- .../globalpacket/GlobalPacketManager.java | 10 +- .../mineplex/core/reward/RewardManager.java | 303 +++++++++++++----- .../src/mineplex/core/reward/RewardPool.java | 3 +- .../src/mineplex/core/treasure/Treasure.java | 2 +- .../core/treasure/TreasureLocation.java | 4 +- .../core/treasure/TreasureManager.java | 9 +- .../animation/BlockChangeAnimation.java | 20 +- .../animation/ChestSpawnAnimation.java | 18 +- .../Mineplex.Hub/src/mineplex/hub/Hub.java | 2 +- .../src/mineplex/hub/HubManager.java | 22 +- .../src/nautilus/game/arcade/Arcade.java | 4 +- .../nautilus/game/arcade/ArcadeManager.java | 77 +++-- .../game/games/minestrike/MineStrike.java | 24 +- .../game/games/minestrike/ShopManager.java | 6 +- .../games/minestrike/items/StrikeItem.java | 48 +-- .../items/equipment/armor/Armor.java | 4 +- .../minestrike/items/grenades/Grenade.java | 4 +- .../game/games/minestrike/items/guns/Gun.java | 10 +- .../game/arcade/managers/GameLootManager.java | 10 +- 47 files changed, 670 insertions(+), 358 deletions(-) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/{types => gadgets}/gamemodifiers/GameModifierType.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/{types => gadgets}/gamemodifiers/kits/KitGameModifier.java (92%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/{types => gadgets}/gamemodifiers/kits/KitModifierType.java (93%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/{types => gadgets}/gamemodifiers/kits/bridges/PotatoKitGameModifier.java (65%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/{types => gadgets}/gamemodifiers/kits/survivalgames/beastmaster/ChickenKitGameModifier.java (69%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/{types => gadgets}/gamemodifiers/kits/survivalgames/beastmaster/MiniGuardianKitGameModifier.java (70%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/{types => gadgets}/gamemodifiers/kits/survivalgames/beastmaster/PigKitGameModifier.java (69%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/{types => gadgets}/gamemodifiers/kits/survivalgames/beastmaster/SquidKitGameModifier.java (69%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/{types => gadgets}/gamemodifiers/kits/survivalgames/horseman/MuleKitGameModifier.java (64%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/{types => gadgets}/gamemodifiers/kits/survivalgames/horseman/SkeletonHorseKitGameModifier.java (66%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/{types => gadgets}/gamemodifiers/kits/survivalgames/necromancer/WitherSkeletonKitGameModifier.java (67%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/{types => gadgets}/gamemodifiers/minestrike/GameModifierMineStrikeSkin.java (53%) create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/minestrike/MineStrikeSkin.java delete mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/MineStrikeSkinAK47Torch.java delete mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/MineStrikeSkinDesertEagleSand.java delete mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/MineStrikeSkinDesertEagleStick.java diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilGear.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilGear.java index 88139390a..7fd5f679d 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilGear.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilGear.java @@ -192,6 +192,13 @@ public class UtilGear return item.getType() == mat; } + + public static boolean isMatAndData(ItemStack item, Material mat, byte data) + { + if (item == null) return false; + + return item.getType() == mat && item.getData().getData() == data; + } public static boolean isRepairable(ItemStack item) { diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilText.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilText.java index b495ba8c7..f9b989789 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilText.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilText.java @@ -285,12 +285,7 @@ public class UtilText public static String[] splitLineToArray(String string, LineFormat lineFormat) { - ArrayList lineList = splitLine(string, lineFormat); - - String[] lineArray = new String[lineList.size()]; - lineArray = lineList.toArray(lineArray); - - return lineArray; + return splitLinesToArray(string.split("\n"), lineFormat); } public static ArrayList splitLine(String string, LineFormat lineFormat) @@ -307,7 +302,7 @@ public class UtilText // Empty if (string.equals("") || string.equals(" ")) { - strings.add(string); + strings.add(" "); return strings; } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java index d2a4b9b52..a76dee06f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java @@ -31,6 +31,7 @@ import mineplex.serverdata.database.DBPool; import mineplex.core.donation.DonationManager; import mineplex.core.donation.GiveDonorData; import mineplex.core.facebook.FacebookManager; +import mineplex.core.gadget.GadgetManager; import mineplex.core.hologram.Hologram; import mineplex.core.hologram.HologramManager; import mineplex.core.inventory.ClientItem; @@ -169,7 +170,7 @@ public class BonusManager extends MiniClientPlugin implements I updateOffSet(); } - public BonusManager(JavaPlugin plugin, CoreClientManager clientManager, ServerStatusManager statusManager, DonationManager donationManager, PollManager pollManager, NpcManager npcManager, HologramManager hologramManager, StatsManager statsManager, InventoryManager inventoryManager, PetManager petManager, FacebookManager facebookManager) + public BonusManager(JavaPlugin plugin, CoreClientManager clientManager, ServerStatusManager statusManager, DonationManager donationManager, PollManager pollManager, NpcManager npcManager, HologramManager hologramManager, StatsManager statsManager, InventoryManager inventoryManager, PetManager petManager, FacebookManager facebookManager, GadgetManager gadgetManager) { super("Bonus", plugin); _repository = new BonusRepository(plugin, this, donationManager); @@ -179,12 +180,7 @@ public class BonusManager extends MiniClientPlugin implements I _hologramManager = hologramManager; _inventoryManager = inventoryManager; - _rewardManager = new RewardManager(clientManager, statusManager, donationManager, inventoryManager, petManager, statsManager, - 100, 250, - 500, 1000, - 4000, 6000, - 12000, 32000, - true, true); + _rewardManager = new RewardManager(_clientManager, _donationManager, _inventoryManager, petManager, statsManager, gadgetManager, 1); _pollManager = pollManager; _statsManager = statsManager; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java index 3f7d56312..b1d9bdbb2 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java @@ -12,6 +12,7 @@ import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.reward.Reward; import mineplex.core.reward.RewardData; import mineplex.core.reward.RewardManager; +import mineplex.core.reward.RewardPool.Type; import mineplex.core.reward.RewardRarity; import mineplex.core.reward.RewardType; import mineplex.core.shop.item.ShopItem; @@ -101,11 +102,11 @@ public class SpinGui extends SimpleGui { if (i != _stopSpinnerAt + 4) { - _rewards[i] = rewardManager.nextReward(player, null, false, RewardType.SpinnerFiller, true); + _rewards[i] = rewardManager.nextReward(player, Type.CARL_SPINNER, null, false, RewardType.SpinnerFiller, true); } else { - _rewards[i] = rewardManager.nextReward(player, null, false, RewardType.SpinnerReal, true); + _rewards[i] = rewardManager.nextReward(player, Type.CARL_SPINNER, null, false, RewardType.SpinnerReal, true); _reward = _rewards[i]; } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GameModifierPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GameModifierPage.java index 1c27218c2..37bad96d0 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GameModifierPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GameModifierPage.java @@ -14,8 +14,8 @@ import mineplex.core.common.util.C; import mineplex.core.cosmetic.CosmeticManager; import mineplex.core.cosmetic.ui.CosmeticShop; import mineplex.core.donation.DonationManager; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; import mineplex.core.gadget.types.GadgetGameModifier; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; import mineplex.core.shop.item.IButton; import mineplex.core.shop.item.ShopItem; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GameModifierSubPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GameModifierSubPage.java index 9c0036f6e..56607167c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GameModifierSubPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GameModifierSubPage.java @@ -1,6 +1,5 @@ package mineplex.core.cosmetic.ui.page; -import mineplex.core.gadget.types.gamemodifiers.kits.KitModifierType; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.inventory.ClickType; @@ -10,8 +9,9 @@ import mineplex.core.common.util.C; import mineplex.core.cosmetic.CosmeticManager; import mineplex.core.cosmetic.ui.CosmeticShop; import mineplex.core.donation.DonationManager; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; import mineplex.core.gadget.types.GadgetGameModifier; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; import mineplex.core.shop.item.IButton; import mineplex.core.shop.item.ShopItem; import org.bukkit.inventory.ItemStack; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/KitGameModifierPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/KitGameModifierPage.java index 764c00fb9..cddd9cc83 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/KitGameModifierPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/KitGameModifierPage.java @@ -5,10 +5,10 @@ import mineplex.core.common.util.C; import mineplex.core.cosmetic.CosmeticManager; import mineplex.core.cosmetic.ui.CosmeticShop; import mineplex.core.donation.DonationManager; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; import mineplex.core.gadget.types.GadgetGameModifier; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; -import mineplex.core.gadget.types.gamemodifiers.kits.KitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.KitModifierType; import mineplex.core.shop.item.IButton; import mineplex.core.shop.item.ShopItem; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java index d3ccc87d4..5ce745a08 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java @@ -1,36 +1,11 @@ package mineplex.core.gadget; -import java.util.*; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import java.util.function.Predicate; -import mineplex.core.gadget.commands.AmmoCommand; -import mineplex.core.gadget.commands.UnlockCosmeticsCommand; -import mineplex.core.gadget.gadgets.item.*; -import mineplex.core.gadget.gadgets.outfit.*; -import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitBoots; -import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitChestplate; -import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitHelmet; -import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitLeggings; -import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitBoots; -import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitChestplate; -import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitHelmet; -import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitLeggings; -import mineplex.core.gadget.gadgets.outfit.windupsuit.*; -import mineplex.core.gadget.gadgets.particle.*; -import mineplex.core.gadget.set.*; -import mineplex.core.gadget.set.suits.SetRaveSuit; -import mineplex.core.gadget.set.suits.SetSpaceSuit; -import mineplex.core.gadget.set.suits.SetWindUpSuit; -import mineplex.core.gadget.types.gamemodifiers.kits.KitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.KitModifierType; -import mineplex.core.gadget.types.gamemodifiers.kits.bridges.PotatoKitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.beastmaster.ChickenKitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.beastmaster.MiniGuardianKitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.beastmaster.PigKitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.beastmaster.SquidKitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.horseman.MuleKitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.horseman.SkeletonHorseKitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.necromancer.WitherSkeletonKitGameModifier; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; @@ -56,6 +31,8 @@ import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTime; import mineplex.core.disguise.DisguiseManager; import mineplex.core.donation.DonationManager; +import mineplex.core.gadget.commands.AmmoCommand; +import mineplex.core.gadget.commands.UnlockCosmeticsCommand; import mineplex.core.gadget.event.GadgetCollideEntityEvent; import mineplex.core.gadget.event.GadgetEnableEvent; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailBlood; @@ -75,7 +52,6 @@ import mineplex.core.gadget.gadgets.death.DeathCupidsBrokenHeart; import mineplex.core.gadget.gadgets.death.DeathEmerald; import mineplex.core.gadget.gadgets.death.DeathEnchant; import mineplex.core.gadget.gadgets.death.DeathFrostLord; -import mineplex.core.gadget.gadgets.death.DeathHearts; import mineplex.core.gadget.gadgets.death.DeathMusic; import mineplex.core.gadget.gadgets.death.DeathPinataBurst; import mineplex.core.gadget.gadgets.death.DeathShadow; @@ -92,6 +68,19 @@ import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMusic; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpShadow; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpStorm; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpTitan; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.bridges.PotatoKitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.beastmaster.ChickenKitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.beastmaster.MiniGuardianKitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.beastmaster.PigKitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.beastmaster.SquidKitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.horseman.MuleKitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.horseman.SkeletonHorseKitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.necromancer.WitherSkeletonKitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.minestrike.GameModifierMineStrikeSkin; +import mineplex.core.gadget.gadgets.gamemodifiers.minestrike.MineStrikeSkin; import mineplex.core.gadget.gadgets.hat.HatCoal; import mineplex.core.gadget.gadgets.hat.HatCompanionBlock; import mineplex.core.gadget.gadgets.hat.HatGrinch; @@ -102,6 +91,23 @@ import mineplex.core.gadget.gadgets.hat.HatSanta; import mineplex.core.gadget.gadgets.hat.HatSecretPackage; import mineplex.core.gadget.gadgets.hat.HatSnowman; import mineplex.core.gadget.gadgets.hat.HatTeddyBear; +import mineplex.core.gadget.gadgets.item.ItemBatGun; +import mineplex.core.gadget.gadgets.item.ItemBow; +import mineplex.core.gadget.gadgets.item.ItemCoal; +import mineplex.core.gadget.gadgets.item.ItemCoinBomb; +import mineplex.core.gadget.gadgets.item.ItemDuelingSword; +import mineplex.core.gadget.gadgets.item.ItemEtherealPearl; +import mineplex.core.gadget.gadgets.item.ItemFirework; +import mineplex.core.gadget.gadgets.item.ItemFleshHook; +import mineplex.core.gadget.gadgets.item.ItemFlowerGift; +import mineplex.core.gadget.gadgets.item.ItemFreezeCannon; +import mineplex.core.gadget.gadgets.item.ItemLovePotion; +import mineplex.core.gadget.gadgets.item.ItemMelonLauncher; +import mineplex.core.gadget.gadgets.item.ItemPaintballGun; +import mineplex.core.gadget.gadgets.item.ItemPaintbrush; +import mineplex.core.gadget.gadgets.item.ItemPartyPopper; +import mineplex.core.gadget.gadgets.item.ItemSnowball; +import mineplex.core.gadget.gadgets.item.ItemTNT; import mineplex.core.gadget.gadgets.morph.MorphBat; import mineplex.core.gadget.gadgets.morph.MorphBlaze; import mineplex.core.gadget.gadgets.morph.MorphBlock; @@ -117,6 +123,40 @@ import mineplex.core.gadget.gadgets.morph.MorphSnowman; import mineplex.core.gadget.gadgets.morph.MorphTitan; import mineplex.core.gadget.gadgets.morph.MorphVillager; import mineplex.core.gadget.gadgets.morph.MorphWither; +import mineplex.core.gadget.gadgets.outfit.OutfitTeam; +import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitBoots; +import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitChestplate; +import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitHelmet; +import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitLeggings; +import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitBoots; +import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitChestplate; +import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitHelmet; +import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitLeggings; +import mineplex.core.gadget.gadgets.outfit.windupsuit.OutfitWindUpSuitBoosterManager; +import mineplex.core.gadget.gadgets.outfit.windupsuit.OutfitWindUpSuitBoots; +import mineplex.core.gadget.gadgets.outfit.windupsuit.OutfitWindUpSuitChestplate; +import mineplex.core.gadget.gadgets.outfit.windupsuit.OutfitWindUpSuitHelmet; +import mineplex.core.gadget.gadgets.outfit.windupsuit.OutfitWindUpSuitLeggings; +import mineplex.core.gadget.gadgets.particle.ParticleBlood; +import mineplex.core.gadget.gadgets.particle.ParticleCandyCane; +import mineplex.core.gadget.gadgets.particle.ParticleCoalFumes; +import mineplex.core.gadget.gadgets.particle.ParticleEmerald; +import mineplex.core.gadget.gadgets.particle.ParticleEnchant; +import mineplex.core.gadget.gadgets.particle.ParticleFairy; +import mineplex.core.gadget.gadgets.particle.ParticleFireRings; +import mineplex.core.gadget.gadgets.particle.ParticleFoot; +import mineplex.core.gadget.gadgets.particle.ParticleFrostLord; +import mineplex.core.gadget.gadgets.particle.ParticleHeart; +import mineplex.core.gadget.gadgets.particle.ParticleLegend; +import mineplex.core.gadget.gadgets.particle.ParticleMusic; +import mineplex.core.gadget.gadgets.particle.ParticlePartyTime; +import mineplex.core.gadget.gadgets.particle.ParticleRain; +import mineplex.core.gadget.gadgets.particle.ParticleTitan; +import mineplex.core.gadget.gadgets.particle.ParticleWingsAngel; +import mineplex.core.gadget.gadgets.particle.ParticleWingsDemons; +import mineplex.core.gadget.gadgets.particle.ParticleWingsInfernal; +import mineplex.core.gadget.gadgets.particle.ParticleWingsPixie; +import mineplex.core.gadget.gadgets.particle.ParticleYinYang; import mineplex.core.gadget.gadgets.wineffect.WinEffectBabyChicken; import mineplex.core.gadget.gadgets.wineffect.WinEffectDragonRider; import mineplex.core.gadget.gadgets.wineffect.WinEffectFireworks; @@ -127,6 +167,20 @@ import mineplex.core.gadget.gadgets.wineffect.WinEffectMrPunchMan; import mineplex.core.gadget.gadgets.wineffect.WinEffectPodium; import mineplex.core.gadget.gadgets.wineffect.WinEffectRiseOfTheElderGuardian; import mineplex.core.gadget.gadgets.wineffect.WinEffectSnowTrails; +import mineplex.core.gadget.set.SetCandyCane; +import mineplex.core.gadget.set.SetCupidsLove; +import mineplex.core.gadget.set.SetEmerald; +import mineplex.core.gadget.set.SetFrostLord; +import mineplex.core.gadget.set.SetHowlingWinds; +import mineplex.core.gadget.set.SetMusic; +import mineplex.core.gadget.set.SetParty; +import mineplex.core.gadget.set.SetShadow; +import mineplex.core.gadget.set.SetTitan; +import mineplex.core.gadget.set.SetVampire; +import mineplex.core.gadget.set.SetWisdom; +import mineplex.core.gadget.set.suits.SetRaveSuit; +import mineplex.core.gadget.set.suits.SetSpaceSuit; +import mineplex.core.gadget.set.suits.SetWindUpSuit; import mineplex.core.gadget.types.ArrowEffectGadget; import mineplex.core.gadget.types.DeathEffectGadget; import mineplex.core.gadget.types.DoubleJumpEffectGadget; @@ -140,10 +194,6 @@ import mineplex.core.gadget.types.OutfitGadget; import mineplex.core.gadget.types.OutfitGadget.ArmorSlot; import mineplex.core.gadget.types.ParticleGadget; import mineplex.core.gadget.types.WinEffectGadget; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; -import mineplex.core.gadget.types.gamemodifiers.minestrike.MineStrikeSkinAK47Torch; -import mineplex.core.gadget.types.gamemodifiers.minestrike.MineStrikeSkinDesertEagleSand; -import mineplex.core.gadget.types.gamemodifiers.minestrike.MineStrikeSkinDesertEagleStick; import mineplex.core.hologram.HologramManager; import mineplex.core.inventory.InventoryManager; import mineplex.core.mount.MountManager; @@ -383,7 +433,7 @@ public class GadgetManager extends MiniPlugin addGadget(new WinEffectFireworks(this)); addGadget(new WinEffectFlames(this)); addGadget(new WinEffectSnowTrails(this)); - addGadget(new WinEffectDragonRider(this)); + //addGadget(new WinEffectDragonRider(this)); addGadget(new WinEffectBabyChicken(this)); addGadget(new WinEffectLightningStrike(this)); addGadget(new WinEffectRiseOfTheElderGuardian(this)); @@ -406,9 +456,28 @@ public class GadgetManager extends MiniPlugin // Game Modifiers // MineStrike - addGadget(new MineStrikeSkinDesertEagleStick(this)); - addGadget(new MineStrikeSkinDesertEagleSand(this)); - addGadget(new MineStrikeSkinAK47Torch(this)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.P250_Muertos, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.CZ75_Auto_Tigris, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Desert_Eagle_Blaze, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Nova_Koi, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.XM1014_Tranquility, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.PP_Bizon_Streak, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.P90_Asiimov, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.SSG_08_Blood_in_the_Water, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.AWP_Asiimov, 1)); + + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Knife_M9_Bayonette_Fade, 1)); + + //Blue only + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.P2000_Fire_Elemental, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.FAMAS_Pulse, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.M4A4_Howl, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Steyr_AUG_Torque, 1)); + //Red only + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Glock_18_Fade, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.Galil_AR_Eco, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.AK_47_Vulcan, 1)); + addGadget(new GameModifierMineStrikeSkin(this, MineStrikeSkin.SG553_Pulse, 1)); // Survival Games @@ -519,6 +588,16 @@ public class GadgetManager extends MiniPlugin } return list; } + + public GameModifierMineStrikeSkin getGameModifier(MineStrikeSkin skin) + { + for(GadgetGameModifier g : getGameModifiers(GameModifierType.MineStrike)) + { + GameModifierMineStrikeSkin gskin = (GameModifierMineStrikeSkin) g; + if(g.GetName().equals(skin.getSkinName())) return gskin; + } + return null; + } public List getGameModifiers(KitModifierType kitType) { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/GameModifierType.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/GameModifierType.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/GameModifierType.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/GameModifierType.java index a0e24c4fd..80bc35eae 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/GameModifierType.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/GameModifierType.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.types.gamemodifiers; +package mineplex.core.gadget.gadgets.gamemodifiers; import java.util.List; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/KitGameModifier.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/KitGameModifier.java similarity index 92% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/KitGameModifier.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/KitGameModifier.java index 3eda33364..10a619821 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/KitGameModifier.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/KitGameModifier.java @@ -1,9 +1,10 @@ -package mineplex.core.gadget.types.gamemodifiers.kits; +package mineplex.core.gadget.gadgets.gamemodifiers.kits; import com.sun.org.apache.xalan.internal.xsltc.dom.KeyIndex; import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; import mineplex.core.gadget.types.GadgetGameModifier; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; + import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/KitModifierType.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/KitModifierType.java similarity index 93% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/KitModifierType.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/KitModifierType.java index 95b83cf5e..15b89d36d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/KitModifierType.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/KitModifierType.java @@ -1,10 +1,10 @@ -package mineplex.core.gadget.types.gamemodifiers.kits; +package mineplex.core.gadget.gadgets.gamemodifiers.kits; import mineplex.core.common.util.C; import mineplex.core.common.util.LineFormat; import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilText; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; import mineplex.core.itemstack.ItemStackFactory; import org.bukkit.Material; import org.bukkit.entity.EntityType; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/bridges/PotatoKitGameModifier.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/bridges/PotatoKitGameModifier.java similarity index 65% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/bridges/PotatoKitGameModifier.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/bridges/PotatoKitGameModifier.java index b383bed1e..5f70403bf 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/bridges/PotatoKitGameModifier.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/bridges/PotatoKitGameModifier.java @@ -1,9 +1,10 @@ -package mineplex.core.gadget.types.gamemodifiers.kits.bridges; +package mineplex.core.gadget.gadgets.gamemodifiers.kits.bridges; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; -import mineplex.core.gadget.types.gamemodifiers.kits.KitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.KitModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; + import org.bukkit.Material; public class PotatoKitGameModifier extends KitGameModifier diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/beastmaster/ChickenKitGameModifier.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/beastmaster/ChickenKitGameModifier.java similarity index 69% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/beastmaster/ChickenKitGameModifier.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/beastmaster/ChickenKitGameModifier.java index cd98b3ef2..6667c14b3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/beastmaster/ChickenKitGameModifier.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/beastmaster/ChickenKitGameModifier.java @@ -1,10 +1,11 @@ -package mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.beastmaster; +package mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.beastmaster; import mineplex.core.common.util.UtilEnt; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; -import mineplex.core.gadget.types.gamemodifiers.kits.KitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.KitModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; + import org.bukkit.Material; import org.bukkit.entity.EntityType; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/beastmaster/MiniGuardianKitGameModifier.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/beastmaster/MiniGuardianKitGameModifier.java similarity index 70% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/beastmaster/MiniGuardianKitGameModifier.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/beastmaster/MiniGuardianKitGameModifier.java index 3ecbc225e..f95a1fe6c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/beastmaster/MiniGuardianKitGameModifier.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/beastmaster/MiniGuardianKitGameModifier.java @@ -1,10 +1,11 @@ -package mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.beastmaster; +package mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.beastmaster; import mineplex.core.common.util.UtilEnt; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; -import mineplex.core.gadget.types.gamemodifiers.kits.KitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.KitModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; + import org.bukkit.Material; import org.bukkit.entity.EntityType; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/beastmaster/PigKitGameModifier.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/beastmaster/PigKitGameModifier.java similarity index 69% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/beastmaster/PigKitGameModifier.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/beastmaster/PigKitGameModifier.java index d2d3f3c2c..37f0142a3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/beastmaster/PigKitGameModifier.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/beastmaster/PigKitGameModifier.java @@ -1,10 +1,11 @@ -package mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.beastmaster; +package mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.beastmaster; import mineplex.core.common.util.UtilEnt; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; -import mineplex.core.gadget.types.gamemodifiers.kits.KitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.KitModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; + import org.bukkit.Material; import org.bukkit.entity.EntityType; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/beastmaster/SquidKitGameModifier.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/beastmaster/SquidKitGameModifier.java similarity index 69% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/beastmaster/SquidKitGameModifier.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/beastmaster/SquidKitGameModifier.java index d6a9942b9..201a38a4b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/beastmaster/SquidKitGameModifier.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/beastmaster/SquidKitGameModifier.java @@ -1,10 +1,11 @@ -package mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.beastmaster; +package mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.beastmaster; import mineplex.core.common.util.UtilEnt; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; -import mineplex.core.gadget.types.gamemodifiers.kits.KitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.KitModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; + import org.bukkit.Material; import org.bukkit.entity.EntityType; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/horseman/MuleKitGameModifier.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/horseman/MuleKitGameModifier.java similarity index 64% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/horseman/MuleKitGameModifier.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/horseman/MuleKitGameModifier.java index 8fb866d55..856dee70e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/horseman/MuleKitGameModifier.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/horseman/MuleKitGameModifier.java @@ -1,9 +1,10 @@ -package mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.horseman; +package mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.horseman; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; -import mineplex.core.gadget.types.gamemodifiers.kits.KitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.KitModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; + import org.bukkit.Material; public class MuleKitGameModifier extends KitGameModifier diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/horseman/SkeletonHorseKitGameModifier.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/horseman/SkeletonHorseKitGameModifier.java similarity index 66% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/horseman/SkeletonHorseKitGameModifier.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/horseman/SkeletonHorseKitGameModifier.java index 0bcc960ae..d2a2ffc19 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/horseman/SkeletonHorseKitGameModifier.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/horseman/SkeletonHorseKitGameModifier.java @@ -1,9 +1,10 @@ -package mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.horseman; +package mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.horseman; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; -import mineplex.core.gadget.types.gamemodifiers.kits.KitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.KitModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; + import org.bukkit.Material; public class SkeletonHorseKitGameModifier extends KitGameModifier diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/necromancer/WitherSkeletonKitGameModifier.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/necromancer/WitherSkeletonKitGameModifier.java similarity index 67% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/necromancer/WitherSkeletonKitGameModifier.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/necromancer/WitherSkeletonKitGameModifier.java index 4f88bbc16..a029aa2f8 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/kits/survivalgames/necromancer/WitherSkeletonKitGameModifier.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/kits/survivalgames/necromancer/WitherSkeletonKitGameModifier.java @@ -1,9 +1,10 @@ -package mineplex.core.gadget.types.gamemodifiers.kits.survivalgames.necromancer; +package mineplex.core.gadget.gadgets.gamemodifiers.kits.survivalgames.necromancer; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; -import mineplex.core.gadget.types.gamemodifiers.kits.KitGameModifier; -import mineplex.core.gadget.types.gamemodifiers.kits.KitModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier; +import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; + import org.bukkit.Material; public class WitherSkeletonKitGameModifier extends KitGameModifier diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/GameModifierMineStrikeSkin.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/minestrike/GameModifierMineStrikeSkin.java similarity index 53% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/GameModifierMineStrikeSkin.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/minestrike/GameModifierMineStrikeSkin.java index 0d862f1ba..bdadcf029 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/GameModifierMineStrikeSkin.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/minestrike/GameModifierMineStrikeSkin.java @@ -1,29 +1,44 @@ -package mineplex.core.gadget.types.gamemodifiers.minestrike; +package mineplex.core.gadget.gadgets.gamemodifiers.minestrike; import java.util.function.Predicate; import org.bukkit.Material; import org.bukkit.entity.Player; +import mineplex.core.common.util.C; import mineplex.core.common.util.LineFormat; import mineplex.core.common.util.UtilText; import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; import mineplex.core.gadget.types.GadgetGameModifier; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; -public abstract class GameModifierMineStrikeSkin extends GadgetGameModifier +public class GameModifierMineStrikeSkin extends GadgetGameModifier { private String _weapon; - private Material _skin; + private Material _skinMat; + private byte _skinData; - public GameModifierMineStrikeSkin(GadgetManager manager, String name, String[] lore, String weaponName, Material newSkin, + public GameModifierMineStrikeSkin(GadgetManager manager, String name, String[] lore, String weaponName, Material newSkin, byte newSkinData, int cost, Material displayMat, int displayData) { super(manager, GameModifierType.MineStrike, name, UtilText.splitLinesToArray(lore, LineFormat.LORE), cost, displayMat, (byte) displayData); _weapon = weaponName; - _skin = newSkin; + _skinMat = newSkin; + _skinData = newSkinData; + } + + public GameModifierMineStrikeSkin(GadgetManager manager, MineStrikeSkin skin, int cost) + { + this(manager, skin, UtilText.splitLineToArray(C.cYellow+ skin.getSkinName() + C.cGray + " skin for the " + C.cYellow + skin.getWeaponName(), + LineFormat.LORE), cost); + } + + public GameModifierMineStrikeSkin(GadgetManager manager, MineStrikeSkin skin, String[] lore, int cost) + { + this(manager, skin.getSkinName(), lore, skin.getWeaponName(), skin.getSkinMaterial(), skin.getSkinData(), cost, + skin.getSkinMaterial(), skin.getSkinData()); } public String getWeaponName() @@ -31,9 +46,14 @@ public abstract class GameModifierMineStrikeSkin extends GadgetGameModifier return _weapon; } - public Material getSkin() + public Material getSkinMaterial() { - return _skin; + return _skinMat; + } + + public byte getSkinData() + { + return _skinData; } @Override diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/minestrike/MineStrikeSkin.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/minestrike/MineStrikeSkin.java new file mode 100644 index 000000000..e756048c9 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/gamemodifiers/minestrike/MineStrikeSkin.java @@ -0,0 +1,63 @@ +package mineplex.core.gadget.gadgets.gamemodifiers.minestrike; + +import org.bukkit.Material; + +public enum MineStrikeSkin +{ + + P250_Muertos( "P250", "Muertos", Material.INK_SACK, (byte) 3), + CZ75_Auto_Tigris( "CZ75-Auto", "Tigris", Material.CLAY_BRICK, (byte) 0), + Desert_Eagle_Blaze( "Desert_Eagle", "Blaze", Material.NETHER_STALK, (byte) 0), + Nova_Koi( "Nova", "Koi", Material.INK_SACK, (byte) 14), + XM1014_Tranquility( "XM1014", "Tranquility", Material.SULPHUR, (byte) 0), + PP_Bizon_Streak( "PP Bizon", "Streak", Material.INK_SACK, (byte) 4), + P90_Asiimov( "P90", "Asiimov", Material.INK_SACK, (byte) 0), + SSG_08_Blood_in_the_Water( "SSG 08", "Blood in the Water", Material.INK_SACK, (byte) 12), + AWP_Asiimov( "AWP", "Asiimov", Material.DIAMOND, (byte) 0), + P2000_Fire_Elemental( "P2000", "Fire Elemental", Material.INK_SACK, (byte) 6), + FAMAS_Pulse( "FAMAS", "Pulse", Material.CLAY_BALL, (byte) 0), + M4A4_Howl( "M4A4", "Howl", Material.INK_SACK, (byte) 11), + Steyr_AUG_Torque( "Steyr_AUG", "Torque", Material.BLAZE_ROD, (byte) 0), + Glock_18_Fade( "Glock 18", "Fade", Material.INK_SACK, (byte) 13), + Galil_AR_Eco( "Galil_AR", "Eco", Material.INK_SACK, (byte) 10), + AK_47_Vulcan( "AK_47", "Vulcan", Material.INK_SACK, (byte) 7), + SG553_Pulse( "SG553", "Pulse", Material.INK_SACK, (byte) 5), + + Knife_M9_Bayonette_Fade( "Knife", "M9 Bayonette Fade", Material.DIAMOND_SWORD, (byte) 0); + + + + private String _weaponName; + private String _skinName; + private Material _skinMaterial; + private byte _skinData; + + MineStrikeSkin(String weaponName, String skinName, Material newMaterial, byte newData) + { + _weaponName = weaponName; + _skinName = skinName; + _skinMaterial = newMaterial; + _skinData = newData; + } + + public String getWeaponName() + { + return _weaponName; + } + + public String getSkinName() + { + return _skinName; + } + + public Material getSkinMaterial() + { + return _skinMaterial; + } + + public byte getSkinData() + { + return _skinData; + } + +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectLightningStrike.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectLightningStrike.java index c0b1cd6a2..902b685c9 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectLightningStrike.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectLightningStrike.java @@ -20,7 +20,7 @@ public class WinEffectLightningStrike extends WinEffectGadget public WinEffectLightningStrike(GadgetManager manager) { - super(manager, "Lightning Strike", UtilText.splitLineToArray(C.cGray + "They say lightning doesn’t strike twice, but they must lose a lot.", LineFormat.LORE), + super(manager, "Lightning Strike", UtilText.splitLineToArray(C.cGray + "They say lightning doesn't strike twice, but they must lose a lot.", LineFormat.LORE), 1, Material.DIAMOND_SWORD, (byte) 0); } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectMrPunchMan.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectMrPunchMan.java index 9dd250067..73fc2782e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectMrPunchMan.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectMrPunchMan.java @@ -29,8 +29,10 @@ public class WinEffectMrPunchMan extends WinEffectGadget public WinEffectMrPunchMan(GadgetManager manager) { - super(manager, "Mr.Punchman", UtilText.splitLineToArray(C.cGray + "Some say he’s still punching on that oversized punching bag in the sky.", LineFormat.LORE), + super(manager, "Mr.Punchman", UtilText.splitLineToArray(C.cGray + "Some say he's still punching on that oversized punching bag in the sky.", LineFormat.LORE), 1, Material.IRON_AXE, (byte) 0); + + _schematicName = "flatPodium"; } @Override diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectSnowTrails.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectSnowTrails.java index 249d9a0ad..a4f3f4116 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectSnowTrails.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectSnowTrails.java @@ -4,6 +4,7 @@ import java.util.List; import org.bukkit.Location; import org.bukkit.Material; +import org.bukkit.Sound; import org.bukkit.WeatherType; import org.bukkit.block.Biome; import org.bukkit.entity.Player; @@ -75,6 +76,8 @@ public class WinEffectSnowTrails extends WinEffectGadget UtilParticle.PlayParticleToAll(ParticleType.SNOW_SHOVEL, loc.clone().add(0, 1, 0), 0.3f, 1, 0.3f, 0, 20, ViewDist.NORMAL); UtilParticle.PlayParticleToAll(ParticleType.SNOW_SHOVEL, loc.clone().add(0, 0.2, 0), 0.6f, 0.2f, 0.6f, 0, 20, ViewDist.NORMAL); + if(event.getTick()%3 == 0) loc.getWorld().playSound(loc, Sound.STEP_SNOW, 1.25f, 0.75f); + } @Override diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetGameModifier.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetGameModifier.java index a745d6eab..537882ac4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetGameModifier.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetGameModifier.java @@ -6,7 +6,7 @@ import org.bukkit.entity.Player; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; public abstract class GadgetGameModifier extends Gadget { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/MineStrikeSkinAK47Torch.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/MineStrikeSkinAK47Torch.java deleted file mode 100644 index 435fcc473..000000000 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/MineStrikeSkinAK47Torch.java +++ /dev/null @@ -1,19 +0,0 @@ -package mineplex.core.gadget.types.gamemodifiers.minestrike; - -import org.bukkit.Material; - -import mineplex.core.common.util.C; -import mineplex.core.gadget.GadgetManager; - -public class MineStrikeSkinAK47Torch extends GameModifierMineStrikeSkin -{ - - public MineStrikeSkinAK47Torch(GadgetManager manager) - { - super(manager, "AK-47 Torch", new String[] {C.cGray + "Your gun is shooting so fast that it seems to glow"}, - "AK-47", Material.TORCH, 1, Material.TORCH, 0); - } - - - -} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/MineStrikeSkinDesertEagleSand.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/MineStrikeSkinDesertEagleSand.java deleted file mode 100644 index 9377da099..000000000 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/MineStrikeSkinDesertEagleSand.java +++ /dev/null @@ -1,19 +0,0 @@ -package mineplex.core.gadget.types.gamemodifiers.minestrike; - -import org.bukkit.Material; - -import mineplex.core.common.util.C; -import mineplex.core.gadget.GadgetManager; - -public class MineStrikeSkinDesertEagleSand extends GameModifierMineStrikeSkin -{ - - public MineStrikeSkinDesertEagleSand(GadgetManager manager) - { - super(manager, "Desert Sand", new String[] {C.cGray + "You know what is better than Desert Eagle?", " ", C.cGray + "Desert Sand"}, - "Desert Eagle", Material.SAND, 1, Material.SAND, 0); - } - - - -} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/MineStrikeSkinDesertEagleStick.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/MineStrikeSkinDesertEagleStick.java deleted file mode 100644 index 1008f6ac4..000000000 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/gamemodifiers/minestrike/MineStrikeSkinDesertEagleStick.java +++ /dev/null @@ -1,19 +0,0 @@ -package mineplex.core.gadget.types.gamemodifiers.minestrike; - -import org.bukkit.Material; - -import mineplex.core.common.util.C; -import mineplex.core.gadget.GadgetManager; - -public class MineStrikeSkinDesertEagleStick extends GameModifierMineStrikeSkin -{ - - public MineStrikeSkinDesertEagleStick(GadgetManager manager) - { - super(manager, "Desert Stick", new String[] {C.cGray + "You thought Desert Eagle was badass. You haven't seen my stick yet..."}, - "Desert Eagle", Material.STICK, 1, Material.STICK, 0); - } - - - -} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/globalpacket/GlobalPacketManager.java b/Plugins/Mineplex.Core/src/mineplex/core/globalpacket/GlobalPacketManager.java index e6d4a4897..b05a3d4ac 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/globalpacket/GlobalPacketManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/globalpacket/GlobalPacketManager.java @@ -34,7 +34,7 @@ public class GlobalPacketManager extends MiniPlugin private DonationManager _donationManager; private RewardManager _rewardManager; - public GlobalPacketManager(JavaPlugin plugin, CoreClientManager clientManager, ServerStatusManager statusManager, InventoryManager inventoryManager, DonationManager donationManager, PetManager petManager, StatsManager statsManager) + public GlobalPacketManager(JavaPlugin plugin, CoreClientManager clientManager, ServerStatusManager statusManager, InventoryManager inventoryManager, DonationManager donationManager, PetManager petManager, StatsManager statsManager, RewardManager rewardmanager) { super("Global Packet Manager", plugin); @@ -42,13 +42,7 @@ public class GlobalPacketManager extends MiniPlugin _statusManager = statusManager; _inventoryManager = inventoryManager; _donationManager = donationManager; - - _rewardManager = new RewardManager(clientManager, statusManager, donationManager, inventoryManager, petManager, statsManager, - 100, 250, - 500, 1000, - 1500, 2500, - 6000, 12000, - false, false); + _rewardManager = rewardmanager; ServerCommandManager.getInstance().registerCommandType("GlobalPacketMessage", GlobalPacketMessage.class, new GlobalPacketHandler(statusManager)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java index 3898dba4a..45b771b65 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java @@ -8,14 +8,12 @@ import java.util.Random; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -import org.bukkit.plugin.java.JavaPlugin; import mineplex.core.account.CoreClientManager; import mineplex.core.common.Rank; import mineplex.core.donation.DonationManager; import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailBlood; -import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCandyCane; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailConfetti; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCupid; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEmerald; @@ -25,29 +23,45 @@ import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailMusic; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailShadow; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailStorm; import mineplex.core.gadget.gadgets.death.DeathBlood; +import mineplex.core.gadget.gadgets.death.DeathCandyCane; +import mineplex.core.gadget.gadgets.death.DeathCupidsBrokenHeart; import mineplex.core.gadget.gadgets.death.DeathEmerald; import mineplex.core.gadget.gadgets.death.DeathEnchant; +import mineplex.core.gadget.gadgets.death.DeathFrostLord; import mineplex.core.gadget.gadgets.death.DeathMusic; import mineplex.core.gadget.gadgets.death.DeathPinataBurst; import mineplex.core.gadget.gadgets.death.DeathShadow; import mineplex.core.gadget.gadgets.death.DeathStorm; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpBlood; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCupidsWings; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEmerald; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEnchant; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFirecracker; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFrostLord; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMusic; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpShadow; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpStorm; +import mineplex.core.gadget.gadgets.gamemodifiers.minestrike.MineStrikeSkin; +import mineplex.core.gadget.gadgets.hat.HatCompanionBlock; +import mineplex.core.gadget.gadgets.hat.HatGrinch; +import mineplex.core.gadget.gadgets.hat.HatLovestruck; +import mineplex.core.gadget.gadgets.hat.HatPresent; +import mineplex.core.gadget.gadgets.hat.HatSecretPackage; +import mineplex.core.gadget.gadgets.hat.HatSnowman; +import mineplex.core.gadget.gadgets.hat.HatTeddyBear; import mineplex.core.gadget.gadgets.item.ItemBatGun; +import mineplex.core.gadget.gadgets.item.ItemBow; import mineplex.core.gadget.gadgets.item.ItemCoal; import mineplex.core.gadget.gadgets.item.ItemCoinBomb; import mineplex.core.gadget.gadgets.item.ItemEtherealPearl; import mineplex.core.gadget.gadgets.item.ItemFirework; import mineplex.core.gadget.gadgets.item.ItemFleshHook; import mineplex.core.gadget.gadgets.item.ItemFreezeCannon; +import mineplex.core.gadget.gadgets.item.ItemLovePotion; import mineplex.core.gadget.gadgets.item.ItemMelonLauncher; import mineplex.core.gadget.gadgets.item.ItemPaintballGun; import mineplex.core.gadget.gadgets.item.ItemPartyPopper; +import mineplex.core.gadget.gadgets.item.ItemSnowball; import mineplex.core.gadget.gadgets.item.ItemTNT; import mineplex.core.gadget.gadgets.morph.MorphBat; import mineplex.core.gadget.gadgets.morph.MorphBlock; @@ -55,6 +69,7 @@ import mineplex.core.gadget.gadgets.morph.MorphChicken; import mineplex.core.gadget.gadgets.morph.MorphCow; import mineplex.core.gadget.gadgets.morph.MorphEnderman; import mineplex.core.gadget.gadgets.morph.MorphSlime; +import mineplex.core.gadget.gadgets.morph.MorphSnowman; import mineplex.core.gadget.gadgets.morph.MorphVillager; import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitBoots; import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitChestplate; @@ -65,11 +80,13 @@ import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitChestplate; import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitHelmet; import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitLeggings; import mineplex.core.gadget.gadgets.particle.ParticleBlood; +import mineplex.core.gadget.gadgets.particle.ParticleCandyCane; import mineplex.core.gadget.gadgets.particle.ParticleEmerald; import mineplex.core.gadget.gadgets.particle.ParticleEnchant; import mineplex.core.gadget.gadgets.particle.ParticleFairy; import mineplex.core.gadget.gadgets.particle.ParticleFireRings; import mineplex.core.gadget.gadgets.particle.ParticleFoot; +import mineplex.core.gadget.gadgets.particle.ParticleFrostLord; import mineplex.core.gadget.gadgets.particle.ParticleHeart; import mineplex.core.gadget.gadgets.particle.ParticleMusic; import mineplex.core.gadget.gadgets.particle.ParticleRain; @@ -92,6 +109,7 @@ import mineplex.core.gadget.types.HatGadget; import mineplex.core.gadget.types.ItemGadget; import mineplex.core.inventory.InventoryManager; import mineplex.core.mount.Mount; +import mineplex.core.mount.types.MountBabyReindeer; import mineplex.core.mount.types.MountCart; import mineplex.core.mount.types.MountFrost; import mineplex.core.mount.types.MountMule; @@ -100,6 +118,8 @@ import mineplex.core.mount.types.MountUndead; import mineplex.core.pet.Pet; import mineplex.core.pet.PetManager; import mineplex.core.reward.RewardPool.Type; +import mineplex.core.reward.rewards.ExperienceReward; +import mineplex.core.reward.rewards.GemReward; import mineplex.core.reward.rewards.InventoryReward; import mineplex.core.reward.rewards.PetReward; import mineplex.core.reward.rewards.RankReward; @@ -110,51 +130,33 @@ import mineplex.core.status.ServerStatusManager; public class RewardManager { - private JavaPlugin _plugin; private EnumMap _rewardPools; private Random _random; - private boolean _carlSpinner; private CoreClientManager _clientManager; private DonationManager _donationManager; - private ServerStatusManager _statusManager; - private InventoryManager _iInventoryManager; + private StatsManager _statsManager; + private InventoryManager _inventoryManager; private GadgetManager _gadgetManager; private PetManager _petManager; - private boolean _doubleGadgetValue; + private double _gadgetMultiplier; - private int _commonAmmoMin, _commonAmmoMax, - _uncommonAmmoMin, _uncommonAmmoMax, - _rareAmmoMin, _rareAmmoMax, - _legendAmmoMin, _legendAmmoMax; + private int _commonAmmoMin = 20, _commonAmmoMax = 50, + _uncommonAmmoMin = 50, _uncommonAmmoMax = 100, + _rareAmmoMin = 100, _rareAmmoMax = 200, + _legendAmmoMin = 200, _legendAmmoMax = 300; private int _uncommonShards = 100; private int _rareShards = 500; private int _legendaryShards = 5000; - - public RewardManager(CoreClientManager clientManager, ServerStatusManager statusManager, DonationManager donationManager, InventoryManager inventoryManager, PetManager petManager, StatsManager statsManager, - int commonValueMin, int commonValueMax, - int uncommonValueMin, int uncommonValueMax, - int rareValueMin, int rareValueMax, - int legendValueMin, int legendValueMax, - boolean doubleGadgetValue, boolean carlSpinner) + public RewardManager(CoreClientManager clientManager, DonationManager donationManager, InventoryManager inventoryManager, + PetManager petManager, StatsManager statsManager, GadgetManager gadgetManager, + double gadgetValueMultiplier) { - _plugin = donationManager.getPlugin(); _rewardPools = new EnumMap(RewardPool.Type.class); _random = new Random(); - - int mult = _doubleGadgetValue? 2 : 1; - - _commonAmmoMin = commonValueMin * mult; - _commonAmmoMax = commonValueMax * mult; - _uncommonAmmoMin = uncommonValueMin * mult; - _uncommonAmmoMax = uncommonValueMax * mult; - _rareAmmoMin = rareValueMin * mult; - _rareAmmoMax = rareValueMax * mult; - _legendAmmoMin = legendValueMin * mult; - _legendAmmoMax = legendValueMax * mult; for (RewardPool.Type type : RewardPool.Type.values()) { @@ -162,14 +164,27 @@ public class RewardManager } _clientManager = clientManager; - _statusManager = statusManager; _donationManager = donationManager; + _statsManager = statsManager; + _inventoryManager = inventoryManager; + _gadgetManager = gadgetManager; _petManager = petManager; - - _doubleGadgetValue = doubleGadgetValue; - _carlSpinner = carlSpinner; + _gadgetMultiplier = gadgetValueMultiplier; + _commonAmmoMin *= _gadgetMultiplier; + _commonAmmoMax *= _gadgetMultiplier; + _uncommonAmmoMin *= _gadgetMultiplier; + _uncommonAmmoMax *= _gadgetMultiplier; + _rareAmmoMin *= _gadgetMultiplier; + _rareAmmoMax *= _gadgetMultiplier; + _legendAmmoMin *= _gadgetMultiplier; + _legendAmmoMax *= _gadgetMultiplier; + + addCommon(); + addUncommon(); + addRare(); + addLegendary(); // addCommon(donationManager, inventoryManager, petManager, statsManager, commonValueMin, commonValueMax); // addUncommon(donationManager, inventoryManager, petManager, statsManager, uncommonValueMin, uncommonValueMax); @@ -564,89 +579,119 @@ public class RewardManager { RewardRarity rarity = RewardRarity.COMMON; - addInventoryReward(Type.NORMAL, getGadget(ItemEtherealPearl.class), rarity, 10, 0); - addInventoryReward(Type.NORMAL, getGadget(ItemFirework.class), rarity, 10, 0); - addInventoryReward(Type.NORMAL, getGadget(ItemTNT.class), rarity, 10, 0); - addInventoryReward(Type.NORMAL, getGadget(ItemMelonLauncher.class), rarity, 10, 0); - addInventoryReward(Type.NORMAL, getGadget(ItemFleshHook.class), rarity, 10, 0); - addInventoryReward(Type.NORMAL, getGadget(ItemPaintballGun.class), rarity, 10, 0); - addInventoryReward(Type.NORMAL, getGadget(ItemBatGun.class), rarity, 10, 0); - addInventoryReward(Type.NORMAL, getGadget(ItemCoinBomb.class), rarity, 10, 0); + addReward(Type.CARL_SPINNER, new GemReward(_donationManager, getAmmoMin(rarity), getAmmoMax(rarity), 25, 0, rarity)); + addReward(Type.CARL_SPINNER, new ExperienceReward(_statsManager, getAmmoMin(rarity)*5, getAmmoMax(rarity)*5, 25, 0, rarity)); + //Normal Gadgets + addInventoryReward(Type.NORMAL, getGadget(ItemBatGun.class), rarity, 10, getShards(rarity), 4, 10); + addInventoryReward(Type.NORMAL, getGadget(ItemEtherealPearl.class), rarity, 10, getShards(rarity), 6, 15); + addInventoryReward(Type.NORMAL, getGadget(ItemFirework.class), rarity, 10, getShards(rarity), 10, 25); + addInventoryReward(Type.NORMAL, getGadget(ItemFleshHook.class), rarity, 10, getShards(rarity), 8, 20); + addInventoryReward(Type.NORMAL, getGadget(ItemMelonLauncher.class), rarity, 10, getShards(rarity), 10, 25); + addInventoryReward(Type.NORMAL, getGadget(ItemPaintballGun.class), rarity, 10, getShards(rarity), 20, 50); + addInventoryReward(Type.NORMAL, getGadget(ItemTNT.class), rarity, 10, getShards(rarity), 4, 10); + + //Winter Gadgets + addInventoryReward(Type.WINTER_HOLIDAY, getGadget(ItemCoal.class), rarity, 10, 0, 50, 100); + addInventoryReward(Type.WINTER_HOLIDAY, getGadget(ItemSnowball.class), rarity, 10, 0, 5, 20); + addInventoryReward(Type.WINTER_HOLIDAY, getGadget(ItemPartyPopper.class), rarity, 10, 0, 5, 10); + addInventoryReward(Type.WINTER_HOLIDAY, getGadget(ItemFreezeCannon.class), rarity, 10, 0, 5, 10); + addInventoryReward(Type.WINTER_HOLIDAY, getGadget(ItemTNT.class), rarity, 10, 0, 5, 10); - addInventoryReward(Type.WINTER_HOLIDAY, getGadget(ItemCoal.class), rarity, 10); - addInventoryReward(Type.WINTER_HOLIDAY, getGadget(ItemPartyPopper.class), rarity, 10); - addInventoryReward(Type.WINTER_HOLIDAY, getGadget(ItemFreezeCannon.class), rarity, 10); - addInventoryReward(Type.WINTER_HOLIDAY, getGadget(ItemTNT.class), rarity, 10); + //Valentines + addInventoryReward(Type.VALENTINES_GIFT, getGadget(ItemBow.class), rarity, 300, 0, 1, 5); } public void addUncommon() { RewardRarity rarity = RewardRarity.UNCOMMON; - addInventoryReward(Type.NORMAL, getGadget(ItemEtherealPearl.class), rarity, 250, 0); - addInventoryReward(Type.NORMAL, getGadget(ItemFirework.class), rarity, 250, 0); - addInventoryReward(Type.NORMAL, getGadget(ItemTNT.class), rarity, 250, 0); - addInventoryReward(Type.NORMAL, getGadget(ItemMelonLauncher.class), rarity, 250, 0); - addInventoryReward(Type.NORMAL, getGadget(ItemFleshHook.class), rarity, 250, 0); - addInventoryReward(Type.NORMAL, getGadget(ItemPaintballGun.class), rarity, 250, 0); - addInventoryReward(Type.NORMAL, getGadget(ItemBatGun.class), rarity, 250, 0); + addReward(Type.CARL_SPINNER, new GemReward(_donationManager, getAmmoMin(rarity), getAmmoMax(rarity), 1200, 0, rarity)); + addReward(Type.CARL_SPINNER, new ExperienceReward(_statsManager, getAmmoMin(rarity)*5, getAmmoMax(rarity)*5, 1200, 0, rarity)); - addPetReward(Type.NORMAL, EntityType.PIG, rarity, 200); - addPetReward(Type.NORMAL, EntityType.SHEEP, rarity, 333); - addPetReward(Type.NORMAL, EntityType.COW, rarity, 500); + //Gadgets + addInventoryReward(Type.NORMAL, getGadget(ItemBatGun.class), rarity, 250, 0, 20, 40); + addInventoryReward(Type.NORMAL, getGadget(ItemEtherealPearl.class), rarity, 250, 0, 30, 60); + addInventoryReward(Type.NORMAL, getGadget(ItemFirework.class), rarity, 250, 0, 25, 50); + addInventoryReward(Type.NORMAL, getGadget(ItemFleshHook.class), rarity, 250, 0, 40, 80); + addInventoryReward(Type.NORMAL, getGadget(ItemMelonLauncher.class), rarity, 250, 0, 25, 50); + addInventoryReward(Type.NORMAL, getGadget(ItemPaintballGun.class), rarity, 250, 0, 100, 200); + addInventoryReward(Type.NORMAL, getGadget(ItemTNT.class), rarity, 250, 0, 20, 40); + + //Pets addPetReward(Type.NORMAL, EntityType.CHICKEN, rarity, 143); - addPetReward(Type.NORMAL, EntityType.WOLF, rarity, 125); + addPetReward(Type.NORMAL, EntityType.COW, rarity, 500); addPetReward(Type.NORMAL, EntityType.MUSHROOM_COW, rarity, 200); addPetReward(Type.NORMAL, EntityType.OCELOT, rarity, 167); + addPetReward(Type.NORMAL, EntityType.PIG, rarity, 200); + addPetReward(Type.NORMAL, EntityType.SHEEP, rarity, 333); + addPetReward(Type.NORMAL, EntityType.WOLF, rarity, 125); - addMusicReward(Type.NORMAL, "Cat Disk", rarity, 25); - addMusicReward(Type.NORMAL, "Blocks Disk", rarity, 25); - addMusicReward(Type.NORMAL, "Chirp Disk", rarity, 25); - addMusicReward(Type.NORMAL, "Far Disk", rarity, 25); - addMusicReward(Type.NORMAL, "Mall Disk", rarity, 25); + + //Music Discs + addMusicReward(Type.NORMAL, "Blocks Disk", rarity, 25); + addMusicReward(Type.NORMAL, "Cat Disk", rarity, 25); + addMusicReward(Type.NORMAL, "Chirp Disk", rarity, 25); + addMusicReward(Type.NORMAL, "Far Disk", rarity, 25); + addMusicReward(Type.NORMAL, "Mall Disk", rarity, 25); addMusicReward(Type.NORMAL, "Mellohi Disk", rarity, 25); - addMusicReward(Type.NORMAL, "Stal Disk", rarity, 25); - addMusicReward(Type.NORMAL, "Strad Disk", rarity, 25); - addMusicReward(Type.NORMAL, "Ward Disk", rarity, 25); - addMusicReward(Type.NORMAL, "Wait Disk", rarity, 25); + addMusicReward(Type.NORMAL, "Stal Disk", rarity, 25); + addMusicReward(Type.NORMAL, "Strad Disk", rarity, 25); + addMusicReward(Type.NORMAL, "Wait Disk", rarity, 25); + addMusicReward(Type.NORMAL, "Ward Disk", rarity, 25); + + + // VALENTINES Gadgets + addInventoryReward(Type.VALENTINES_GIFT, getGadget(ItemLovePotion.class), rarity, 100, 0, 1, 1); + + //Only enable on Valentince's Day? +// addInventoryReward(Type.VALENTINES_GIFT, getGadget(ItemFlowerGift.class), rarity, 100, 0, 1, 1); + + // WINTER Gadgets + addGadget(Type.WINTER_HOLIDAY, getGadget(HatPresent.class), rarity, 5); + addGadget(Type.WINTER_HOLIDAY, getGadget(HatSnowman.class), rarity, 5); + } public void addRare() { RewardRarity rarity = RewardRarity.RARE; + addReward(Type.CARL_SPINNER, new GemReward(_donationManager, getAmmoMin(rarity), getAmmoMax(rarity), 150, 0, rarity)); + addReward(Type.CARL_SPINNER, new ExperienceReward(_statsManager, getAmmoMin(rarity)*5, getAmmoMax(rarity)*5, 150, 0, rarity)); + + //Morphs addGadget(Type.NORMAL, getGadget(MorphVillager.class), rarity, 83); addGadget(Type.NORMAL, getGadget(MorphCow.class), rarity, 167); addGadget(Type.NORMAL, getGadget(MorphChicken.class), rarity, 50); addGadget(Type.NORMAL, getGadget(MorphEnderman.class), rarity, 33); - + //Mounts addMount(Type.NORMAL, getMount(MountFrost.class), rarity, 50); addMount(Type.NORMAL, getMount(MountSlime.class), rarity, 67); addMount(Type.NORMAL, getMount(MountCart.class), rarity, 100); addMount(Type.NORMAL, getMount(MountMule.class), rarity, 200); - + //Outfit Rave addGadget(Type.NORMAL, getGadget(OutfitRaveSuitHelmet.class), rarity, 30); addGadget(Type.NORMAL, getGadget(OutfitRaveSuitChestplate.class), rarity, 30); addGadget(Type.NORMAL, getGadget(OutfitRaveSuitLeggings.class), rarity, 30); addGadget(Type.NORMAL, getGadget(OutfitRaveSuitBoots.class), rarity, 30); - + //Outfit Space addGadget(Type.NORMAL, getGadget(OutfitSpaceSuitHelmet.class), rarity, 50); addGadget(Type.NORMAL, getGadget(OutfitSpaceSuitChestplate.class), rarity, 50); addGadget(Type.NORMAL, getGadget(OutfitSpaceSuitLeggings.class), rarity, 50); addGadget(Type.NORMAL, getGadget(OutfitSpaceSuitBoots.class), rarity, 50); - + //Arrow Trails addGadget(Type.NORMAL, getGadget(ArrowTrailConfetti.class), rarity, 27); addGadget(Type.NORMAL, getGadget(ArrowTrailBlood.class), rarity, 50); addGadget(Type.NORMAL, getGadget(ArrowTrailEmerald.class), rarity, 25); - addGadget(Type.NORMAL, getGadget(ArrowTrailShadow.class), rarity, 15); addGadget(Type.NORMAL, getGadget(ArrowTrailMusic.class), rarity, 27); addGadget(Type.NORMAL, getGadget(ArrowTrailStorm.class), rarity, 30); addGadget(Type.NORMAL, getGadget(ArrowTrailShadow.class), rarity, 15); + //Double Jumps addGadget(Type.NORMAL, getGadget(DoubleJumpFirecracker.class), rarity, 33); addGadget(Type.NORMAL, getGadget(DoubleJumpEmerald.class), rarity, 25); addGadget(Type.NORMAL, getGadget(DoubleJumpShadow.class), rarity, 15); @@ -654,6 +699,7 @@ public class RewardManager addGadget(Type.NORMAL, getGadget(DoubleJumpBlood.class), rarity, 50); addGadget(Type.NORMAL, getGadget(DoubleJumpMusic.class), rarity, 20); + //Death Effects addGadget(Type.NORMAL, getGadget(DeathPinataBurst.class), rarity, 27); addGadget(Type.NORMAL, getGadget(DeathEmerald.class), rarity, 25); addGadget(Type.NORMAL, getGadget(DeathShadow.class), rarity, 15); @@ -661,25 +707,66 @@ public class RewardManager addGadget(Type.NORMAL, getGadget(DeathBlood.class), rarity, 50); addGadget(Type.NORMAL, getGadget(DeathMusic.class), rarity, 20); - addGadget(Type.NORMAL, getGadget(WinEffectFireworks.class), rarity, 100); + //Win Effects + addGadget(Type.NORMAL, getGadget(WinEffectFireworks.class), rarity, 200); addGadget(Type.NORMAL, getGadget(WinEffectFlames.class), rarity, 100); addGadget(Type.NORMAL, getGadget(WinEffectSnowTrails.class), rarity, 100); + + //Game Modifiers MineStrike + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AWP_Asiimov, rarity, 200); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.P90_Asiimov, rarity, 200); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.SSG_08_Blood_in_the_Water, rarity, 50); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Galil_AR_Eco, rarity, 20); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.P2000_Fire_Elemental, rarity, 200); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Nova_Koi, rarity, 25); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.FAMAS_Pulse, rarity, 20); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.SG553_Pulse, rarity, 20); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.PP_Bizon_Streak, rarity, 40); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.CZ75_Auto_Tigris, rarity, 100); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Steyr_AUG_Torque, rarity, 30); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.XM1014_Tranquility, rarity, 30); + + + + // VALENTINES + //Hats + addGadget(Type.VALENTINES_GIFT, getGadget(HatCompanionBlock.class), rarity, 100, 0); + addGadget(Type.VALENTINES_GIFT, getGadget(HatLovestruck.class), rarity, 100, 0); + addGadget(Type.VALENTINES_GIFT, getGadget(HatSecretPackage.class), rarity, 100, 0); + addGadget(Type.VALENTINES_GIFT, getGadget(HatTeddyBear.class), rarity, 100, 0); + + + // WINTER + //Candy Set + addGadget(Type.WINTER_HOLIDAY, getGadget(ArrowTrailConfetti.class), rarity, 5); + addGadget(Type.WINTER_HOLIDAY, getGadget(DeathCandyCane.class), rarity, 5); + addGadget(Type.WINTER_HOLIDAY, getGadget(DoubleJumpFirecracker.class), rarity, 5); + addGadget(Type.WINTER_HOLIDAY, getGadget(ParticleCandyCane.class), rarity, 5); } public void addLegendary() { RewardRarity rarity = RewardRarity.LEGENDARY; + addReward(Type.CARL_SPINNER, new GemReward(_donationManager, getAmmoMin(rarity), getAmmoMax(rarity), 10, 0, rarity)); + addReward(Type.CARL_SPINNER, new ExperienceReward(_statsManager, getAmmoMin(rarity)*5, getAmmoMax(rarity)*5, 10, 0, rarity)); + + //REGULAR + + //Enchant set addGadget(Type.NORMAL, getGadget(ArrowTrailEnchant.class), rarity, 10); addGadget(Type.NORMAL, getGadget(DeathEnchant.class), rarity, 10); addGadget(Type.NORMAL, getGadget(DoubleJumpEnchant.class), rarity, 10); + //Morphs addGadget(Type.NORMAL, getGadget(MorphSlime.class), rarity, 10); addGadget(Type.NORMAL, getGadget(MorphBat.class), rarity, 25); addGadget(Type.NORMAL, getGadget(MorphBlock.class), rarity, 20); + //Mounts addMount(Type.NORMAL, getMount(MountUndead.class), rarity, 33); + //Particle Trails addGadget(Type.NORMAL, getGadget(ParticleWingsAngel.class), rarity, 15); addGadget(Type.NORMAL, getGadget(ParticleBlood.class), rarity, 10); addGadget(Type.NORMAL, getGadget(ParticleWingsDemons.class), rarity, 15); @@ -695,19 +782,60 @@ public class RewardManager addGadget(Type.NORMAL, getGadget(ParticleFoot.class), rarity, 33); addGadget(Type.NORMAL, getGadget(ParticleYinYang.class), rarity, 20); + //Win Effects addGadget(Type.NORMAL, getGadget(WinEffectBabyChicken.class), rarity, 10); addGadget(Type.NORMAL, getGadget(WinEffectLavaTrap.class), rarity, 20); addGadget(Type.NORMAL, getGadget(WinEffectLightningStrike.class), rarity, 20); addGadget(Type.NORMAL, getGadget(WinEffectMrPunchMan.class), rarity, 33); - addGadget(Type.NORMAL, getGadget(WinEffectRiseOfTheElderGuardian.class), rarity, 4); + addGadget(Type.NORMAL, getGadget(WinEffectRiseOfTheElderGuardian.class), rarity, 4); + + //GameModifier MineStrike + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AWP_Asiimov, rarity, 8); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.P90_Asiimov, rarity, 8); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Desert_Eagle_Blaze, rarity, 10); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Glock_18_Fade, rarity, 20); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.M4A4_Howl, rarity, 5); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.Knife_M9_Bayonette_Fade, rarity, 1); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.P250_Muertos, rarity, 20); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.FAMAS_Pulse, rarity, 33); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.SG553_Pulse, rarity, 33); + addMineStrikeSkin(Type.NORMAL, MineStrikeSkin.AK_47_Vulcan, rarity, 5); + + + + //WINTER + + //Arrow Trails + addGadget(Type.NORMAL, getGadget(ArrowTrailFrostLord.class), rarity, 5); + addGadget(Type.NORMAL, getGadget(DeathFrostLord.class), rarity, 5); + addGadget(Type.NORMAL, getGadget(DoubleJumpFrostLord.class), rarity, 5); + addGadget(Type.NORMAL, getGadget(ParticleFrostLord.class), rarity, 5); + addGadget(Type.NORMAL, getGadget(HatGrinch.class), rarity, 5); + addGadget(Type.NORMAL, getGadget(MorphSnowman.class), rarity, 5); + addMount( Type.NORMAL, getMount(MountBabyReindeer.class), rarity, 5); + + + + + //VALENTINES + + //Cupid Set + addGadget(Type.NORMAL, getGadget(ArrowTrailCupid.class), rarity, 100); + addGadget(Type.NORMAL, getGadget(DeathCupidsBrokenHeart.class), rarity, 100); + addGadget(Type.NORMAL, getGadget(DoubleJumpCupidsWings.class), rarity, 100); + addGadget(Type.NORMAL, getGadget(ParticleHeart.class), rarity, 100, 0); + + + + } - public UnknownPackageReward addMount(Type type, Mount mount, RewardRarity rarity, int weight) + public UnknownPackageReward addMount(Type type, Mount mount, RewardRarity rarity, int weight) { return addMount(type, mount, rarity, weight, getShards(rarity)); } - public UnknownPackageReward addMount(Type type, Mount mount, RewardRarity rarity, int weight, int shards) + public UnknownPackageReward addMount(Type type, Mount mount, RewardRarity rarity, int weight, int shards) { UnknownPackageReward reward = new UnknownPackageReward(_donationManager, "Mount", mount.GetDisplayName(), mount.GetName(), new ItemStack(mount.GetDisplayMaterial(), 1, (short) 0, (byte) mount.GetDisplayData()), rarity, weight, shards); @@ -756,6 +884,17 @@ public class RewardManager return reward; } + public UnknownPackageReward addMineStrikeSkin(Type type, MineStrikeSkin skin, RewardRarity rarity, int weight) + { + return addMineStrikeSkin(type, skin, rarity, weight, getShards(rarity)); + } + + public UnknownPackageReward addMineStrikeSkin(Type type, MineStrikeSkin skin, RewardRarity rarity, int weight, int shards) + { + Gadget gadget = _gadgetManager.getGameModifier(skin); + return addGadget(type, gadget, rarity, weight, shards); + } + public InventoryReward addInventoryReward(RewardPool.Type type, ItemGadget gadget, RewardRarity rarity, int weight) { return addInventoryReward(type, gadget, rarity, weight, getShards(rarity), getAmmoMin(rarity), getAmmoMax(rarity)); @@ -769,7 +908,7 @@ public class RewardManager public InventoryReward addInventoryReward(RewardPool.Type type, ItemGadget gadget, RewardRarity rarity, int weight, int shards, int minAmmo, int maxAmmo) { - InventoryReward reward = new InventoryReward(_iInventoryManager, gadget.GetDisplayName(), + InventoryReward reward = new InventoryReward(_inventoryManager, gadget.GetDisplayName(), gadget.GetName(), minAmmo, maxAmmo, new ItemStack(gadget.GetDisplayMaterial(), 1, (short) 0, gadget.GetDisplayData()), rarity, weight, shards); addReward(type, reward); @@ -784,7 +923,7 @@ public class RewardManager public PetReward addPetReward(Type type, EntityType entityType, RewardRarity rarity, int weight, int shards) { Pet pet = _petManager.GetFactory().getPet(entityType); - PetReward reward = new PetReward(_petManager, _iInventoryManager, _donationManager, + PetReward reward = new PetReward(_petManager, _inventoryManager, _donationManager, pet.GetName() + " Pet", pet.GetName(), entityType, rarity, weight, shards); addReward(type, reward); return reward; @@ -854,13 +993,17 @@ public class RewardManager public void addReward(Reward reward) { addReward(RewardPool.Type.NORMAL, reward); - - if(!(reward instanceof InventoryReward)) - addReward(RewardPool.Type.ILLUMINATED, reward); } public void addReward(RewardPool.Type pool, Reward reward) { + if(pool == Type.NORMAL) + { + _rewardPools.get(Type.CARL_SPINNER).add(reward); + + if(!(reward instanceof InventoryReward)) + _rewardPools.get(Type.ILLUMINATED).add(reward); + } _rewardPools.get(pool).add(reward); } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardPool.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardPool.java index 13f35912a..cd783ad51 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardPool.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardPool.java @@ -50,7 +50,8 @@ public class RewardPool NORMAL(true), WINTER_HOLIDAY(true), VALENTINES_GIFT(false), - ILLUMINATED(false); + ILLUMINATED(false), + CARL_SPINNER(true); private boolean _useDuplicates; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/Treasure.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/Treasure.java index 2cdc4739f..8300381a9 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/Treasure.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/Treasure.java @@ -108,7 +108,7 @@ public class Treasure _chestData[i] = new ChestData(chestBlocks[i]); } - _animations.add(new BlockChangeAnimation(this, _otherBlockInfo)); + _animations.add(new BlockChangeAnimation(this, _otherBlockInfo, chestBlocks)); for (int i = 0; i < _rewards.length; i++) { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java index a2a8a14c8..4a236dea3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java @@ -120,7 +120,7 @@ public class TreasureLocation implements Listener { player.sendMessage(F.main("Treasure", "You don't have any chests to open!")); - player.sendMessage(F.main("Treasure", "But like, lets just ignore that for now though ;)")); + player.sendMessage("But like, lets just ignore that for now though ;)"); // return; } @@ -159,6 +159,8 @@ public class TreasureLocation implements Listener if(r == null) { reset(); + player.sendMessage(F.main("Treasure", "There are no available items in this")); + player.sendMessage(F.main("Treasure", "chest for you to open")); return; } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureManager.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureManager.java index b277cc8fe..65cc5f9db 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureManager.java @@ -38,7 +38,7 @@ public class TreasureManager extends MiniPlugin private StatsManager _statsManager; private List _treasureLocations; - public TreasureManager(JavaPlugin plugin, CoreClientManager clientManager, ServerStatusManager statusManager, DonationManager donationManager, InventoryManager inventoryManager, PetManager petManager, BlockRestore blockRestore, HologramManager hologramManager, StatsManager statsManager) + public TreasureManager(JavaPlugin plugin, CoreClientManager clientManager, ServerStatusManager statusManager, DonationManager donationManager, InventoryManager inventoryManager, PetManager petManager, BlockRestore blockRestore, HologramManager hologramManager, StatsManager statsManager, RewardManager rewardManager) { super("Treasure", plugin); @@ -47,12 +47,7 @@ public class TreasureManager extends MiniPlugin _blockRestore = blockRestore; _hologramManager = hologramManager; _statsManager = statsManager; - _rewardManager = new RewardManager(clientManager, statusManager, donationManager, _inventoryManager, petManager, statsManager, - 100, 250, - 500, 1000, - 4000, 6000, - 12000, 22000, - true, false); + _rewardManager = rewardManager; World world = Bukkit.getWorlds().get(0); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/animation/BlockChangeAnimation.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/animation/BlockChangeAnimation.java index 9173724ba..432807504 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/animation/BlockChangeAnimation.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/animation/BlockChangeAnimation.java @@ -2,9 +2,12 @@ package mineplex.core.treasure.animation; import java.util.List; +import org.bukkit.Bukkit; +import org.bukkit.Effect; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; +import org.bukkit.entity.Player; import mineplex.core.treasure.BlockInfo; import mineplex.core.treasure.Treasure; @@ -16,13 +19,15 @@ public class BlockChangeAnimation extends Animation private int _currentRadius; private List _blockInfoList; + private Block[] _chests; - public BlockChangeAnimation(Treasure treasure, List blockInfoList) + public BlockChangeAnimation(Treasure treasure, List blockInfoList, Block[] chests) { super(treasure); _currentRadius = 0; _blockInfoList = blockInfoList; + _chests = chests; } @Override @@ -94,6 +99,19 @@ public class BlockChangeAnimation extends Animation b.setType(mat); b.setData(data); } + + if(getTreasure().getTreasureType() == TreasureType.ILLUMINATED) + { + for(Block c : _chests) + { + if(c.equals(b)) + { + _blockInfoList.add(new BlockInfo(b)); + b.setType(Material.SEA_LANTERN); + } + } + } + } } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/animation/ChestSpawnAnimation.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/animation/ChestSpawnAnimation.java index 481740fcd..199f7954f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/animation/ChestSpawnAnimation.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/animation/ChestSpawnAnimation.java @@ -2,6 +2,7 @@ package mineplex.core.treasure.animation; import java.util.List; +import org.bukkit.Bukkit; import org.bukkit.Effect; import org.bukkit.Location; import org.bukkit.Material; @@ -14,6 +15,7 @@ import org.bukkit.util.Vector; import net.minecraft.server.v1_8_R3.BlockPosition; import net.minecraft.server.v1_8_R3.MathHelper; import mineplex.core.common.util.UtilAlg; +import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilParticle.ParticleType; @@ -135,16 +137,29 @@ public class ChestSpawnAnimation extends Animation { loc = _centerLocation.clone().subtract(0, 0.5, 0); - UtilParticle.PlayParticleToAll(ParticleType.PORTAL, loc, null, 0.45f, 10, ViewDist.NORMAL); + UtilParticle.PlayParticleToAll(ParticleType.PORTAL, loc, null, 0.55f, 20, ViewDist.NORMAL); } } //Spawn Chest if (getTicks() >= ANIMATION_DURATION) { + if(getTreasure().getTreasureType() == TreasureType.ILLUMINATED) + { + UtilBlock.setQuick(_block.getWorld(), _block.getX(), _block.getY(), _block.getZ(), 0, (byte) 0); + } _chestBlockInfo.add(new BlockInfo(_block)); getTreasure().setBlock(_block, getTreasure().getTreasureType().getMaterial(), _direction); _block.getLocation().getWorld().playSound(_centerLocation, getTreasure().getTreasureType().getStyle().getChestSpawnSound(), 0.5f, 1f); + + + if(getTreasure().getTreasureType() == TreasureType.ILLUMINATED) + { + Location loc = _block.getLocation().add(0.5, 0.2, 0.5); + UtilParticle.PlayParticle(getTreasure().getTreasureType().getStyle().getSecondaryParticle(), loc, 0.7f, 0.7f, 0.7f, 1, 50, + ViewDist.NORMAL, UtilServer.getPlayers()); + } + UtilParticle.ParticleType particleType = getTreasure().getTreasureType().getStyle().getChestSpawnParticle(); @@ -152,6 +167,7 @@ public class ChestSpawnAnimation extends Animation { UtilParticle.PlayParticle(particleType, _centerLocation, 0.2f, 0.2f, 0.2f, 0, 50, ViewDist.NORMAL, UtilServer.getPlayers()); + } else { diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java index 07f3e2bb7..cb2b6847d 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java @@ -157,7 +157,7 @@ public class Hub extends JavaPlugin implements IRelation new CustomTagFix(this, packetHandler); new PacketsInteractionFix(this, packetHandler); new ResourcePackManager(this, portal); - new GlobalPacketManager(this, clientManager, serverStatusManager, inventoryManager, donationManager, petManager, statsManager); + new GlobalPacketManager(this, clientManager, serverStatusManager, inventoryManager, donationManager, petManager, statsManager, hubManager.getBonusManager().getRewardManager()); //new Replay(this, packetHandler); AprilFoolsManager.Initialize(this, clientManager, disguiseManager); diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java index 4266c3e7e..b5e4bd799 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java @@ -95,7 +95,6 @@ import mineplex.core.portal.Portal; import mineplex.core.preferences.PreferencesManager; import mineplex.core.projectile.ProjectileManager; import mineplex.core.punish.Punish; -import mineplex.core.reward.RewardManager; import mineplex.core.stats.StatsManager; import mineplex.core.status.ServerStatusManager; import mineplex.core.task.TaskManager; @@ -165,6 +164,7 @@ public class HubManager extends MiniClientPlugin private CustomDataManager _customDataManager; private Punish _punishManager; private ValentinesManager _valentinesManager; + private BonusManager _bonusManager; // private HalloweenSpookinessManager _halloweenManager; // private TrickOrTreatManager _trickOrTreatManager; @@ -220,7 +220,10 @@ public class HubManager extends MiniClientPlugin new BenefitManager(plugin, clientManager, _inventoryManager); _gadgetManager = new GadgetManager(_plugin, clientManager, donationManager, _inventoryManager, _mountManager, petManager, preferences, disguiseManager, blockRestore, new ProjectileManager(plugin), achievementManager, packetHandler, hologramManager); - _treasureManager = new TreasureManager(_plugin, clientManager, serverStatusManager, donationManager, _inventoryManager, petManager, _blockRestore, hologramManager, statsManager); + FacebookManager facebookManager = new FacebookManager(plugin, clientManager, donationManager, inventoryManager); + _bonusManager = new BonusManager(plugin, clientManager, serverStatusManager, donationManager, pollManager , npcManager, hologramManager, statsManager, _inventoryManager, petManager, facebookManager, _gadgetManager); + + _treasureManager = new TreasureManager(_plugin, clientManager, serverStatusManager, donationManager, _inventoryManager, petManager, _blockRestore, hologramManager, statsManager, _bonusManager.getRewardManager()); new CosmeticManager(_plugin, clientManager, donationManager, _inventoryManager, _gadgetManager, _mountManager, petManager, _treasureManager); new SoccerManager(this, _gadgetManager); @@ -247,21 +250,13 @@ public class HubManager extends MiniClientPlugin ((CraftWorld)Bukkit.getWorlds().get(0)).getHandle().pvpMode = true; - FacebookManager facebookManager = new FacebookManager(plugin, clientManager, donationManager, inventoryManager); - new BonusManager(plugin, clientManager, serverStatusManager, donationManager, pollManager , npcManager, hologramManager, statsManager, _inventoryManager, petManager, facebookManager); - // _halloweenManager = new HalloweenSpookinessManager(this); // new HolidayGiftManager(plugin, clientManager, donationManager, inventoryManager, taskManager); new PlayerDisguiseManager(plugin, _clientManager); // NotificationManager notificationManager = new NotificationManager(plugin, clientManager, donationManager); // new MailManager(_plugin, notificationManager); - new ValentinesGiftManager(plugin, clientManager, new RewardManager(clientManager, serverStatusManager, donationManager, _inventoryManager, petManager, statsManager, - 100, 250, - 500, 1000, - 4000, 6000, - 12000, 22000, - true, false), inventoryManager, _gadgetManager, statsManager); + new ValentinesGiftManager(plugin, clientManager, _bonusManager.getRewardManager(), inventoryManager, _gadgetManager, statsManager); _playerCountManager = new PlayerCountManager(plugin); @@ -891,6 +886,11 @@ public class HubManager extends MiniClientPlugin { return _petManager; } + + public BonusManager getBonusManager() + { + return _bonusManager; + } public TutorialManager GetTutorial() { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java index 29fac5b6f..68a805eab 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java @@ -157,13 +157,13 @@ public class Arcade extends JavaPlugin cosmeticManager.disableTeamArmor(); CustomDataManager customDataManager = new CustomDataManager(this, _clientManager); - - new GlobalPacketManager(this, _clientManager, serverStatusManager, inventoryManager, _donationManager, petManager, statsManager); //Arcade Manager PollManager pollManager = new PollManager(this, _clientManager, _donationManager); _gameManager = new ArcadeManager(this, serverStatusManager, ReadServerConfig(), _clientManager, _donationManager, _damageManager, statsManager, incognito, achievementManager, disguiseManager, creature, teleport, new Blood(this), chat, portal, preferenceManager, inventoryManager, packetHandler, cosmeticManager, projectileManager, petManager, hologramManager, webServerAddress, pollManager, npcmanager, customDataManager, punish, eloManager); + new GlobalPacketManager(this, _clientManager, serverStatusManager, inventoryManager, _donationManager, petManager, statsManager, _gameManager.getBonusManager().getRewardManager()); + //new BroadcastManager(this, _gameManager); new MemoryFix(this); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index 29b45bbf8..e7ce1871b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -4,6 +4,34 @@ import java.io.File; import java.util.ArrayList; import java.util.HashSet; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.GameMode; +import org.bukkit.Material; +import org.bukkit.OfflinePlayer; +import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer; +import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.HandlerList; +import org.bukkit.event.block.BlockBurnEvent; +import org.bukkit.event.block.BlockFadeEvent; +import org.bukkit.event.block.BlockSpreadEvent; +import org.bukkit.event.block.LeavesDecayEvent; +import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.event.entity.EntityExplodeEvent; +import org.bukkit.event.inventory.InventoryType; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; +import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.event.player.PlayerLoginEvent; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.event.server.ServerListPingEvent; +import org.bukkit.potion.PotionEffect; +import org.bukkit.util.Vector; + import mineplex.core.MiniPlugin; import mineplex.core.account.CoreClientManager; import mineplex.core.achievement.AchievementManager; @@ -50,7 +78,6 @@ import mineplex.core.projectile.ProjectileManager; import mineplex.core.punish.Punish; import mineplex.core.resourcepack.ResourcePackManager; import mineplex.core.reward.RewardData; -import mineplex.core.reward.RewardManager; import mineplex.core.reward.RewardRarity; import mineplex.core.reward.rewards.PetReward; import mineplex.core.sponsorbranding.BrandingManager; @@ -110,34 +137,6 @@ import nautilus.game.arcade.player.ArcadePlayer; import nautilus.game.arcade.shop.ArcadeShop; import net.minecraft.server.v1_8_R3.EntityLiving; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.GameMode; -import org.bukkit.Material; -import org.bukkit.OfflinePlayer; -import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity; -import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer; -import org.bukkit.entity.Entity; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.HandlerList; -import org.bukkit.event.block.BlockBurnEvent; -import org.bukkit.event.block.BlockFadeEvent; -import org.bukkit.event.block.BlockSpreadEvent; -import org.bukkit.event.block.LeavesDecayEvent; -import org.bukkit.event.entity.CreatureSpawnEvent; -import org.bukkit.event.entity.EntityExplodeEvent; -import org.bukkit.event.inventory.InventoryType; -import org.bukkit.event.player.PlayerCommandPreprocessEvent; -import org.bukkit.event.player.PlayerJoinEvent; -import org.bukkit.event.player.PlayerLoginEvent; -import org.bukkit.event.player.PlayerQuitEvent; -import org.bukkit.event.server.ServerListPingEvent; -import org.bukkit.potion.PotionEffect; -import org.bukkit.util.Vector; - public class ArcadeManager extends MiniPlugin implements IRelation { // Modules @@ -193,6 +192,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation private CustomDataManager _customDataManager; private Punish _punishmentManager; private BrandingManager _brandingManager; + private BonusManager _bonusManager; private IncognitoManager _incognitoManager; @@ -305,7 +305,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation new GameAchievementManager(this); _gameTournamentManager = new GameTournamentManager(this); new GameStatManager(this); - new GameLootManager(this, petManager); + FacebookManager facebookManager = new FacebookManager(plugin, clientManager, donationManager, inventoryManager); + _bonusManager = new BonusManager(plugin, clientManager, serverStatusManager, donationManager, pollManager , npcManager, hologramManager, statsManager, _inventoryManager, petManager, facebookManager, _cosmeticManager.getGadgetManager()); + new GameLootManager(this, petManager, _bonusManager.getRewardManager()); new GameSpectatorManager(this); _gameWorldManager = new GameWorldManager(this); new MiscManager(this); @@ -313,12 +315,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation _idleManager = new IdleManager(this); TitanGiveawayManager titanGiveaway = new TitanGiveawayManager(getPlugin(), clientManager, serverStatusManager); // new HolidayManager(this, titanGiveaway); - new ValentinesGiftManager(plugin, clientManager, new RewardManager(clientManager, serverStatusManager, donationManager, _inventoryManager, petManager, statsManager, - 100, 250, - 500, 1000, - 4000, 6000, - 12000, 22000, - true, false), inventoryManager, _cosmeticManager.getGadgetManager(), statsManager); + new ValentinesGiftManager(plugin, clientManager, _bonusManager.getRewardManager(), inventoryManager, _cosmeticManager.getGadgetManager(), statsManager); new GameTestingManager(this); new PlayerDisguiseManager(plugin, _clientManager); @@ -327,9 +324,6 @@ public class ArcadeManager extends MiniPlugin implements IRelation new SoupAddon(plugin, this); new TeamArmorAddon(plugin, this); - FacebookManager facebookManager = new FacebookManager(plugin, clientManager, donationManager, inventoryManager); - new BonusManager(plugin, clientManager, serverStatusManager, donationManager, pollManager , npcManager, hologramManager, statsManager, _inventoryManager, petManager, facebookManager); - //Champions Modules _energy = new Energy(plugin); @@ -382,6 +376,11 @@ public class ArcadeManager extends MiniPlugin implements IRelation { return _gameChatManager; } + + public BonusManager getBonusManager() + { + return _bonusManager; + } public GameServerConfig GetServerConfig() { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/MineStrike.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/MineStrike.java index 7e97b21be..0460e6e96 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/MineStrike.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/MineStrike.java @@ -77,6 +77,9 @@ import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.common.util.UtilParticle.ViewDist; import mineplex.core.common.util.UtilTime; import mineplex.core.disguise.disguises.DisguisePlayer; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.minestrike.GameModifierMineStrikeSkin; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.recharge.Recharge; import mineplex.core.recharge.RechargedEvent; @@ -311,6 +314,7 @@ public class MineStrike extends TeamGame }); _shopManager = new ShopManager(this); + Manager.getCosmeticManager().setHideParticles(true); this.StrictAntiHack = true; @@ -414,6 +418,18 @@ public class MineStrike extends TeamGame GameTeam team = GetTeam(event.getPlayer()); if (team == null) return; + + GadgetManager gadgetManager = Manager.getCosmeticManager().getGadgetManager(); + GameModifierMineStrikeSkin knifeSkin = (GameModifierMineStrikeSkin) gadgetManager.getActiveGameModifier(event.getPlayer(), + GameModifierType.MineStrike, GameModifierMineStrikeSkin.getWeaponFilter("Knife")); + + ItemStack knife = ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1, "Knife"); + + if(knifeSkin != null) + { + knife.setType(knifeSkin.getSkinMaterial()); + knife.getData().setData(knifeSkin.getSkinData()); + } if (team.GetColor() == ChatColor.RED) { @@ -427,7 +443,9 @@ public class MineStrike extends TeamGame gun.updateWeaponName(event.getPlayer(), this); //Knife - event.getPlayer().getInventory().setItem(2, ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1, "Knife")); + if(knifeSkin == null) knife.setType(Material.IRON_AXE); + + event.getPlayer().getInventory().setItem(2, knife); //Armor giveTeamArmor(event.getPlayer(), Color.fromRGB(255, 75, 75)); @@ -445,7 +463,9 @@ public class MineStrike extends TeamGame gun.updateSkin(event.getPlayer(), getArcadeManager().getCosmeticManager().getGadgetManager()); //Knife - event.getPlayer().getInventory().setItem(2, ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1, "Knife")); + if(knifeSkin == null) knife.setType(Material.IRON_SWORD); + + event.getPlayer().getInventory().setItem(2, knife); //Armor giveTeamArmor(event.getPlayer(), Color.fromRGB(125, 200, 255)); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/ShopManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/ShopManager.java index c5dd43d78..3be74a24a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/ShopManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/ShopManager.java @@ -111,13 +111,13 @@ public class ShopManager for (int i=0 ; i<9 ; i++) { - if (UtilGear.isMat(player.getInventory().getItem(i), item.getSkin())) + if (UtilGear.isMatAndData(player.getInventory().getItem(i), item.getSkinMaterial(), item.getSkinData())) count++; - if (UtilGear.isMat(player.getInventory().getHelmet(), item.getSkin())) + if (UtilGear.isMatAndData(player.getInventory().getHelmet(), item.getSkinMaterial(), item.getSkinData())) count++; - if (UtilGear.isMat(player.getInventory().getChestplate(), item.getSkin())) + if (UtilGear.isMatAndData(player.getInventory().getChestplate(), item.getSkinMaterial(), item.getSkinData())) count++; } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/StrikeItem.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/StrikeItem.java index 628533f6b..92fd7f0c9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/StrikeItem.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/StrikeItem.java @@ -2,6 +2,14 @@ package nautilus.game.arcade.game.games.minestrike.items; import java.util.ArrayList; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilAction; @@ -13,15 +21,6 @@ import nautilus.game.arcade.game.games.minestrike.MineStrike; import nautilus.game.arcade.game.games.minestrike.items.grenades.Grenade; import nautilus.game.arcade.game.games.minestrike.items.guns.Gun; -import org.bukkit.ChatColor; -import org.bukkit.Material; -import org.bukkit.Sound; -import org.bukkit.enchantments.Enchantment; -import org.bukkit.entity.Entity; -import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.ItemMeta; - public abstract class StrikeItem { private StrikeItemType _type; @@ -29,7 +28,8 @@ public abstract class StrikeItem private String[] _desc; private int _cost; private int _gemCost; - private Material _skin; + private Material _skinMaterial; + private byte _skinData; private String _ownerName; @@ -42,7 +42,7 @@ public abstract class StrikeItem _desc = desc; _cost = cost; _gemCost = gemCost; - _skin = skin; + _skinMaterial = skin; //Make Stack _stack = new ItemStack(skin); @@ -74,15 +74,23 @@ public abstract class StrikeItem return _gemCost; } - public Material getSkin() + public Material getSkinMaterial() { - return _skin; + return _skinMaterial; } - public void setSkin(Material skin) + public byte getSkinData() { - _skin = skin; - _stack.setType(skin); + return _skinData; + } + + public void setSkin(Material skinMaterial, byte skinData) + { + _skinMaterial = skinMaterial; + _stack.setType(skinMaterial); + + _skinData = skinData; + _stack.getData().setData(skinData); } public String getOwnerName() @@ -138,7 +146,7 @@ public abstract class StrikeItem { return _stack; } - + public void setStack(ItemStack stack) { _stack = stack; @@ -146,12 +154,12 @@ public abstract class StrikeItem public boolean isHolding(Player player) { - return UtilGear.isMat(player.getItemInHand(), _skin); + return UtilGear.isMat(player.getItemInHand(), _skinMaterial); } public boolean isStack(ItemStack stack) { - return UtilGear.isMat(stack, _skin); + return UtilGear.isMat(stack, _skinMaterial); } public void giveToPlayer(Player player, int slot, boolean setOwnerName) @@ -213,7 +221,7 @@ public abstract class StrikeItem String name = getShopItemType() + " " + C.cGreen + getName(); - ItemStack item = ItemStackFactory.Instance.CreateStack(_skin, (byte)0, 1, name, loreArray); + ItemStack item = ItemStackFactory.Instance.CreateStack(_skinMaterial, (byte)0, 1, name, loreArray); if (alreadyHas) UtilInv.addDullEnchantment(item); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/equipment/armor/Armor.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/equipment/armor/Armor.java index 02a40771a..69f0de11a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/equipment/armor/Armor.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/equipment/armor/Armor.java @@ -30,13 +30,13 @@ public class Armor extends StrikeItem public void giveToPlayer(Player player, Color color) { - ItemStack armor = new ItemStack(getSkin()); + ItemStack armor = new ItemStack(getSkinMaterial(), 1, (short) 0, getSkinData()); LeatherArmorMeta meta = (LeatherArmorMeta)armor.getItemMeta(); meta.setColor(color); meta.setDisplayName(getName()); armor.setItemMeta(meta); - if (getSkin() == Material.LEATHER_CHESTPLATE) + if (getSkinMaterial() == Material.LEATHER_CHESTPLATE) player.getInventory().setChestplate(armor); else player.getInventory().setHelmet(armor); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/grenades/Grenade.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/grenades/Grenade.java index f8110807b..02c8bcb4d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/grenades/Grenade.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/grenades/Grenade.java @@ -92,7 +92,7 @@ public abstract class Grenade extends StrikeItem for (int i = 6 ; i >= 3 ; i--) { - if (UtilInv.IsItem(player.getInventory().getItem(i), getSkin(), (byte) -1)) + if (UtilInv.IsItem(player.getInventory().getItem(i), getSkinMaterial(), getSkinData())) alreadyHas++; if (alreadyHas >= _limit) @@ -116,7 +116,7 @@ public abstract class Grenade extends StrikeItem for (int i = 3 ; i < 7 ; i++) { - if (UtilInv.IsItem(player.getInventory().getItem(i), getSkin(), (byte) -1)) + if (UtilInv.IsItem(player.getInventory().getItem(i), getSkinMaterial(), getSkinData())) alreadyHas++; if (alreadyHas >= _limit) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/guns/Gun.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/guns/Gun.java index 403523e43..c5955fb3a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/guns/Gun.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/items/guns/Gun.java @@ -30,8 +30,8 @@ import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTextBottom; import mineplex.core.common.util.UtilTime; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.types.gamemodifiers.GameModifierType; -import mineplex.core.gadget.types.gamemodifiers.minestrike.GameModifierMineStrikeSkin; +import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; +import mineplex.core.gadget.gadgets.gamemodifiers.minestrike.GameModifierMineStrikeSkin; import mineplex.core.recharge.Recharge; import mineplex.core.recharge.RechargedEvent; import mineplex.core.stats.PlayerStats; @@ -357,6 +357,10 @@ public class Gun extends StrikeItem String owner = C.Reset + (getOwnerName() == null ? "" : getOwnerName() + "'s "); String reload = C.Bold + getChatName() + (_reloadTick ? ChatColor.RED : ChatColor.WHITE); String kills = C.cYellow + " " + kls + " kills"; + if(!hasCustomSkin()) + { + kills = ""; + } ItemMeta meta = getStack().getItemMeta(); meta.setDisplayName(owner + reload + kills); @@ -448,7 +452,7 @@ public class Gun extends StrikeItem if(skin == null) return; - setSkin(skin.getSkin()); + setSkin(skin.getSkinMaterial(), skin.getSkinData()); _activeSkinName = skin.GetName(); owner.getInventory().setItem(_slot, getStack()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLootManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLootManager.java index c78bd3771..9a782a159 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLootManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLootManager.java @@ -24,7 +24,6 @@ import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilFirework; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTextMiddle; -import mineplex.core.giveaway.GiveawayManager; import mineplex.core.pet.PetManager; import mineplex.core.reward.Reward; import mineplex.core.reward.RewardData; @@ -46,18 +45,13 @@ public class GameLootManager implements Listener private long _startTime = 0; - public GameLootManager(ArcadeManager manager, PetManager petManager) + public GameLootManager(ArcadeManager manager, PetManager petManager, RewardManager rewardManager) { Manager = manager; Manager.getPluginManager().registerEvents(this, Manager.getPlugin()); - _rewardManager = new RewardManager(Manager.GetClients(), Manager.GetServerStatusManager(), Manager.GetDonation(), Manager.getInventoryManager(), petManager, Manager.GetStatsManager(), - 100, 250, - 500, 1000, - 1500, 2500, - 6000, 12000, - false, false); + _rewardManager = rewardManager; //Chest _rewardManager.addReward(new InventoryReward(Manager.getInventoryManager(), "Old Chest", "Old Chest", 1, 1,