diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/CostumePage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/CostumePage.java index 8e32e2707..bed2836d0 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/CostumePage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/CostumePage.java @@ -1,6 +1,7 @@ package mineplex.core.cosmetic.ui.page; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import org.bukkit.Bukkit; @@ -10,10 +11,13 @@ import org.bukkit.entity.Player; import org.bukkit.event.inventory.ClickType; import mineplex.core.account.CoreClientManager; +import mineplex.core.common.CurrencyType; 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.outfit.OutfitRaveSuit; +import mineplex.core.gadget.gadgets.outfit.OutfitSpaceSuit; import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.GadgetType; import mineplex.core.gadget.types.ItemGadget; @@ -37,19 +41,19 @@ public class CostumePage extends GadgetPage { int slot; - List costumeClasses = new ArrayList(); - for (Gadget gadget : getPlugin().getGadgetManager().getGadgets(GadgetType.Costume)) { + if (gadget.GetCost(CurrencyType.Coins) == -1) + continue; + OutfitGadget outfitGadget = ((OutfitGadget) gadget); - Class clazz = gadget.getClass(); - if (!costumeClasses.contains(clazz)) - { - costumeClasses.add(clazz); - } + int offset = 0; + + if (gadget instanceof OutfitRaveSuit) offset = 0; + else if (gadget instanceof OutfitSpaceSuit) offset = 1; - slot = (costumeClasses.indexOf(clazz) * 2) + 3 + 18; + slot = offset + 1 + 18; //1 buffer to left, 18 = 2 lines down if (outfitGadget.GetSlot() == OutfitGadget.ArmorSlot.Chest) slot += 9; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java index c817ad7c5..8439e08cb 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java @@ -32,66 +32,18 @@ import mineplex.core.disguise.DisguiseManager; import mineplex.core.donation.DonationManager; import mineplex.core.gadget.event.GadgetCollideEntityEvent; import mineplex.core.gadget.event.GadgetEnableEvent; -import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCandyCane; -import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFrostLord; -import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailTitan; -import mineplex.core.gadget.gadgets.death.DeathCandyCane; -import mineplex.core.gadget.gadgets.death.DeathFrostLord; -import mineplex.core.gadget.gadgets.death.DeathTitan; -import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCandyCane; -import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFrostLord; -import mineplex.core.gadget.gadgets.doublejump.DoubleJumpTitan; -import mineplex.core.gadget.gadgets.hat.HatCoal; -import mineplex.core.gadget.gadgets.hat.HatPresent; -import mineplex.core.gadget.gadgets.hat.HatSanta; -import mineplex.core.gadget.gadgets.hat.HatSnowman; -import mineplex.core.gadget.gadgets.item.ItemBatGun; -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.ItemFreezeCannon; -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; -import mineplex.core.gadget.gadgets.morph.MorphBunny; -import mineplex.core.gadget.gadgets.morph.MorphChicken; -import mineplex.core.gadget.gadgets.morph.MorphCow; -import mineplex.core.gadget.gadgets.morph.MorphCreeper; -import mineplex.core.gadget.gadgets.morph.MorphEnderman; -import mineplex.core.gadget.gadgets.morph.MorphPig; -import mineplex.core.gadget.gadgets.morph.MorphPumpkinKing; -import mineplex.core.gadget.gadgets.morph.MorphSlime; -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.OutfitRaveSuit; -import mineplex.core.gadget.gadgets.outfit.OutfitSpaceSuit; -import mineplex.core.gadget.gadgets.outfit.OutfitTeam; -import mineplex.core.gadget.gadgets.particle.ParticleCandyCane; -import mineplex.core.gadget.gadgets.particle.ParticleCoalFumes; -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.ParticleGreen; -import mineplex.core.gadget.gadgets.particle.ParticleHeart; -import mineplex.core.gadget.gadgets.particle.ParticleHelix; -import mineplex.core.gadget.gadgets.particle.ParticleLegend; -import mineplex.core.gadget.gadgets.particle.ParticleRain; -import mineplex.core.gadget.gadgets.particle.ParticleTitan; +import mineplex.core.gadget.gadgets.arrowtrail.*; +import mineplex.core.gadget.gadgets.death.*; +import mineplex.core.gadget.gadgets.doublejump.*; +import mineplex.core.gadget.gadgets.hat.*; +import mineplex.core.gadget.gadgets.item.*; +import mineplex.core.gadget.gadgets.morph.*; +import mineplex.core.gadget.gadgets.outfit.*; +import mineplex.core.gadget.gadgets.particle.*; import mineplex.core.gadget.set.SetCandyCane; import mineplex.core.gadget.set.SetFrostLord; +import mineplex.core.gadget.set.SetRaveSuit; +import mineplex.core.gadget.set.SetSpaceSuit; import mineplex.core.gadget.set.SetTitan; import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.GadgetSet; @@ -155,9 +107,14 @@ public class GadgetManager extends MiniPlugin private void createSets() { + //Particles addSet(new SetFrostLord(this)); addSet(new SetCandyCane(this)); addSet(new SetTitan(this)); + + //Costumes + addSet(new SetRaveSuit(this)); + addSet(new SetSpaceSuit(this)); } private void CreateGadgets() @@ -181,15 +138,15 @@ public class GadgetManager extends MiniPlugin addGadget(new ItemSnowball(this)); // Costume - addGadget(new OutfitRaveSuit(this, "Rave Hat", -2, ArmorSlot.Helmet, Material.LEATHER_HELMET, (byte)0)); - addGadget(new OutfitRaveSuit(this, "Rave Shirt", -2, ArmorSlot.Chest, Material.LEATHER_CHESTPLATE, (byte)0)); - addGadget(new OutfitRaveSuit(this, "Rave Pants", -2, ArmorSlot.Legs, Material.LEATHER_LEGGINGS, (byte)0)); - addGadget(new OutfitRaveSuit(this, "Rave Boots", -2, ArmorSlot.Boots, Material.LEATHER_BOOTS, (byte)0)); + addGadget(new OutfitRaveSuitHelmet(this)); + addGadget(new OutfitRaveSuitChestplate(this)); + addGadget(new OutfitRaveSuitLeggings(this)); + addGadget(new OutfitRaveSuitBoots(this)); - addGadget(new OutfitSpaceSuit(this, "Space Helmet", -2, ArmorSlot.Helmet, Material.GLASS, (byte)0)); - addGadget(new OutfitSpaceSuit(this, "Space Jacket", -2, ArmorSlot.Chest, Material.GOLD_CHESTPLATE, (byte)0)); - addGadget(new OutfitSpaceSuit(this, "Space Pants", -2, ArmorSlot.Legs, Material.GOLD_LEGGINGS, (byte)0)); - addGadget(new OutfitSpaceSuit(this, "Space Boots", -2, ArmorSlot.Boots, Material.GOLD_BOOTS, (byte)0)); + addGadget(new OutfitSpaceSuitHelmet(this)); + addGadget(new OutfitSpaceSuitChestplate(this)); + addGadget(new OutfitSpaceSuitLeggings(this)); + addGadget(new OutfitSpaceSuitBoots(this)); addGadget(new OutfitTeam(this, "Team Helmet", -1, ArmorSlot.Helmet, Material.LEATHER_HELMET, (byte)0)); addGadget(new OutfitTeam(this, "Team Shirt", -1, ArmorSlot.Chest, Material.LEATHER_CHESTPLATE, (byte)0)); @@ -351,7 +308,7 @@ public class GadgetManager extends MiniPlugin } } - public void removeGadetType(Player player, GadgetType type) + public void removeGadgetType(Player player, GadgetType type) { List gadgets = _gadgets.get(type); if(gadgets == null) return; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemDuelingSword.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemDuelingSword.java index 99a7d217f..c8ced1f05 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemDuelingSword.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemDuelingSword.java @@ -28,7 +28,7 @@ public class ItemDuelingSword extends ItemGadget @Override public void ApplyItem(Player player, boolean inform) { - Manager.removeGadetType(player, GadgetType.Item); + Manager.removeGadgetType(player, GadgetType.Item); _active.add(player); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintbrush.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintbrush.java index 9fa4d783b..2815a9b5e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintbrush.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintbrush.java @@ -55,7 +55,7 @@ public class ItemPaintbrush extends ItemGadget @Override public void ApplyItem(Player player, boolean inform) { - Manager.removeGadetType(player, GadgetType.Item); + Manager.removeGadgetType(player, GadgetType.Item); _active.add(player); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuitBoots.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuitBoots.java new file mode 100644 index 000000000..b74eda769 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuitBoots.java @@ -0,0 +1,15 @@ +package mineplex.core.gadget.gadgets.outfit; + +import mineplex.core.gadget.GadgetManager; + +import org.bukkit.Material; + +public class OutfitRaveSuitBoots extends OutfitRaveSuit +{ + + public OutfitRaveSuitBoots(GadgetManager manager) + { + super(manager, "Rave Boots", -2, ArmorSlot.Boots, Material.LEATHER_BOOTS, (byte)0); + } + +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuitChestplate.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuitChestplate.java new file mode 100644 index 000000000..df3b5577e --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuitChestplate.java @@ -0,0 +1,15 @@ +package mineplex.core.gadget.gadgets.outfit; + +import mineplex.core.gadget.GadgetManager; + +import org.bukkit.Material; + +public class OutfitRaveSuitChestplate extends OutfitRaveSuit +{ + + public OutfitRaveSuitChestplate(GadgetManager manager) + { + super(manager, "Rave Shirt", -2, ArmorSlot.Chest, Material.LEATHER_CHESTPLATE, (byte)0); + } + +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuitHelmet.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuitHelmet.java new file mode 100644 index 000000000..122ea157d --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuitHelmet.java @@ -0,0 +1,15 @@ +package mineplex.core.gadget.gadgets.outfit; + +import mineplex.core.gadget.GadgetManager; + +import org.bukkit.Material; + +public class OutfitRaveSuitHelmet extends OutfitRaveSuit +{ + + public OutfitRaveSuitHelmet(GadgetManager manager) + { + super(manager, "Rave Hat", -2, ArmorSlot.Helmet, Material.LEATHER_HELMET, (byte)0); + } + +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuitLeggings.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuitLeggings.java new file mode 100644 index 000000000..b4b14df9d --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuitLeggings.java @@ -0,0 +1,15 @@ +package mineplex.core.gadget.gadgets.outfit; + +import mineplex.core.gadget.GadgetManager; + +import org.bukkit.Material; + +public class OutfitRaveSuitLeggings extends OutfitRaveSuit +{ + + public OutfitRaveSuitLeggings(GadgetManager manager) + { + super(manager, "Rave Pants", -2, ArmorSlot.Legs, Material.LEATHER_LEGGINGS, (byte)0); + } + +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuitBoots.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuitBoots.java new file mode 100644 index 000000000..58a02b36b --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuitBoots.java @@ -0,0 +1,15 @@ +package mineplex.core.gadget.gadgets.outfit; + +import mineplex.core.gadget.GadgetManager; + +import org.bukkit.Material; + +public class OutfitSpaceSuitBoots extends OutfitRaveSuit +{ + + public OutfitSpaceSuitBoots(GadgetManager manager) + { + super(manager, "Space Boots", -2, ArmorSlot.Boots, Material.GOLD_BOOTS, (byte)0); + } + +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuitChestplate.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuitChestplate.java new file mode 100644 index 000000000..5a6d3f807 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuitChestplate.java @@ -0,0 +1,15 @@ +package mineplex.core.gadget.gadgets.outfit; + +import mineplex.core.gadget.GadgetManager; + +import org.bukkit.Material; + +public class OutfitSpaceSuitChestplate extends OutfitRaveSuit +{ + + public OutfitSpaceSuitChestplate(GadgetManager manager) + { + super(manager, "Space Jacket", -2, ArmorSlot.Chest, Material.GOLD_CHESTPLATE, (byte)0); + } + +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuitHelmet.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuitHelmet.java new file mode 100644 index 000000000..09fb5ddbb --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuitHelmet.java @@ -0,0 +1,15 @@ +package mineplex.core.gadget.gadgets.outfit; + +import mineplex.core.gadget.GadgetManager; + +import org.bukkit.Material; + +public class OutfitSpaceSuitHelmet extends OutfitRaveSuit +{ + + public OutfitSpaceSuitHelmet(GadgetManager manager) + { + super(manager, "Space Helmet", -2, ArmorSlot.Helmet, Material.GLASS, (byte)0); + } + +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuitLeggings.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuitLeggings.java new file mode 100644 index 000000000..650aea844 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuitLeggings.java @@ -0,0 +1,15 @@ +package mineplex.core.gadget.gadgets.outfit; + +import mineplex.core.gadget.GadgetManager; + +import org.bukkit.Material; + +public class OutfitSpaceSuitLeggings extends OutfitRaveSuit +{ + + public OutfitSpaceSuitLeggings(GadgetManager manager) + { + super(manager, "Space Pants", -2, ArmorSlot.Legs, Material.GOLD_LEGGINGS, (byte)0); + } + +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitTeam.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitTeam.java index 6b598c419..8abec4a35 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitTeam.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitTeam.java @@ -56,7 +56,7 @@ public class OutfitTeam extends OutfitGadget @Override public void ApplyArmor(Player player) { - Manager.removeGadetType(player, GadgetType.Morph); + Manager.removeGadgetType(player, GadgetType.Morph); Manager.RemoveOutfit(player, _slot); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetRaveSuit.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetRaveSuit.java new file mode 100644 index 000000000..8dd0f874c --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetRaveSuit.java @@ -0,0 +1,17 @@ +package mineplex.core.gadget.set; + +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.outfit.*; +import mineplex.core.gadget.types.GadgetSet; + +public class SetRaveSuit extends GadgetSet +{ + public SetRaveSuit(GadgetManager manager) + { + super(manager, "Rave Suit", "Coming Soon...", + manager.getGadget(OutfitRaveSuitHelmet.class), + manager.getGadget(OutfitRaveSuitChestplate.class), + manager.getGadget(OutfitRaveSuitLeggings.class), + manager.getGadget(OutfitRaveSuitBoots.class)); + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetSpaceSuit.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetSpaceSuit.java new file mode 100644 index 000000000..27f7390e7 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetSpaceSuit.java @@ -0,0 +1,17 @@ +package mineplex.core.gadget.set; + +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.outfit.*; +import mineplex.core.gadget.types.GadgetSet; + +public class SetSpaceSuit extends GadgetSet +{ + public SetSpaceSuit(GadgetManager manager) + { + super(manager, "Space Suit", "Coming Soon...", + manager.getGadget(OutfitSpaceSuitHelmet.class), + manager.getGadget(OutfitSpaceSuitChestplate.class), + manager.getGadget(OutfitSpaceSuitLeggings.class), + manager.getGadget(OutfitSpaceSuitBoots.class)); + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ArrowEffectGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ArrowEffectGadget.java index 3513506a9..a32e05163 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ArrowEffectGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ArrowEffectGadget.java @@ -28,7 +28,7 @@ public abstract class ArrowEffectGadget extends Gadget @Override public void EnableCustom(Player player) { - Manager.removeGadetType(player, GadgetType.ArrowTrail); + Manager.removeGadgetType(player, GadgetType.ArrowTrail); _active.add(player); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DeathEffectGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DeathEffectGadget.java index 4e04cb807..5e337586c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DeathEffectGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DeathEffectGadget.java @@ -17,7 +17,7 @@ public abstract class DeathEffectGadget extends Gadget @Override public void EnableCustom(Player player) { - Manager.removeGadetType(player, GadgetType.Death); + Manager.removeGadgetType(player, GadgetType.Death); _active.add(player); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DoubleJumpEffectGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DoubleJumpEffectGadget.java index 59575b97f..f59c0ed50 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DoubleJumpEffectGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DoubleJumpEffectGadget.java @@ -19,7 +19,7 @@ public abstract class DoubleJumpEffectGadget extends Gadget @Override public void EnableCustom(Player player) { - Manager.removeGadetType(player, GadgetType.DoubleJump); + Manager.removeGadgetType(player, GadgetType.DoubleJump); _active.add(player); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetSet.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetSet.java index a2f6df54e..234bbc2dd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetSet.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetSet.java @@ -5,6 +5,7 @@ import java.util.HashSet; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import mineplex.core.common.util.C; @@ -63,13 +64,13 @@ public abstract class GadgetSet implements Listener } } - @EventHandler + @EventHandler(priority = EventPriority.MONITOR) public void onActivate(GadgetEnableEvent event) { checkPlayer(event.getPlayer(), event.getGadget(), true); } - @EventHandler + @EventHandler(priority = EventPriority.MONITOR) public void onDeativate(GadgetDisableEvent event) { checkPlayer(event.getPlayer(), event.getGadget(), false); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/HatGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/HatGadget.java index e7ad0ea37..91d5c2da7 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/HatGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/HatGadget.java @@ -33,7 +33,7 @@ public abstract class HatGadget extends OutfitGadget public void ApplyArmor(Player player) { - Manager.removeGadetType(player, GadgetType.Morph); + Manager.removeGadgetType(player, GadgetType.Morph); Manager.RemoveOutfit(player, _slot); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ItemGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ItemGadget.java index 212964745..639ccea9f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ItemGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ItemGadget.java @@ -64,7 +64,7 @@ public abstract class ItemGadget extends Gadget public void ApplyItem(Player player, boolean inform) { - Manager.removeGadetType(player, GadgetType.Item); + Manager.removeGadgetType(player, GadgetType.Item); _active.add(player); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/MorphGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/MorphGadget.java index c90606af7..96c19d0ad 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/MorphGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/MorphGadget.java @@ -19,7 +19,7 @@ public abstract class MorphGadget extends Gadget public void ApplyArmor(Player player) { - Manager.removeGadetType(player, GadgetType.Morph); + Manager.removeGadgetType(player, GadgetType.Morph); _active.add(player); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/OutfitGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/OutfitGadget.java index 83c54ac96..1d778742a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/OutfitGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/OutfitGadget.java @@ -34,7 +34,7 @@ public abstract class OutfitGadget extends Gadget public void ApplyArmor(Player player) { - Manager.removeGadetType(player, GadgetType.Morph); + Manager.removeGadgetType(player, GadgetType.Morph); Manager.RemoveOutfit(player, _slot); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ParticleGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ParticleGadget.java index 24444a965..bc807eb48 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ParticleGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ParticleGadget.java @@ -17,7 +17,7 @@ public abstract class ParticleGadget extends Gadget @Override public void EnableCustom(Player player) { - Manager.removeGadetType(player, GadgetType.Particle); + Manager.removeGadgetType(player, GadgetType.Particle); _active.add(player); diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/commands/DisguiseCommand.java b/Plugins/Mineplex.Hub/src/mineplex/hub/commands/DisguiseCommand.java index 16b832c76..bb078b3bb 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/commands/DisguiseCommand.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/commands/DisguiseCommand.java @@ -178,7 +178,7 @@ public class DisguiseCommand extends CommandBase implements Listener changeName(caller, args[0]); - Plugin.GetGadget().removeGadetType(caller, GadgetType.Item); + Plugin.GetGadget().removeGadgetType(caller, GadgetType.Item); UtilPlayer.message(caller, C.cGreen + C.Bold + "Disguise Active: " + ChatColor.RESET + args[0]); } catch(Exception e) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/DisguiseCommand.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/DisguiseCommand.java index f10a8db0d..7111ae370 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/DisguiseCommand.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/DisguiseCommand.java @@ -169,7 +169,7 @@ public class DisguiseCommand extends CommandBase implements Liste changeName(caller, args[0], true); - Plugin.getCosmeticManager().getGadgetManager().removeGadetType(caller, GadgetType.Item); + Plugin.getCosmeticManager().getGadgetManager().removeGadgetType(caller, GadgetType.Item); Bukkit.broadcastMessage(ChatColor.DARK_GRAY + "Quit> " + ChatColor.GRAY + _disguisedPlayersNames.get(caller)); UtilPlayer.message(caller, C.cGreen + C.Bold + "Disguise Active: " + ChatColor.RESET + args[0]);