diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java index 48e7d35f2..9394628ae 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java @@ -19,7 +19,7 @@ import mineplex.core.common.util.UtilServer; import mineplex.core.cosmetic.ui.CosmeticShop; import mineplex.core.donation.DonationManager; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.OutfitTeam; +import mineplex.core.gadget.gadgets.outfit.OutfitTeam; import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.GadgetType; import mineplex.core.inventory.InventoryManager; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java index 6a75916e6..cebfad6bd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java @@ -19,8 +19,8 @@ import mineplex.core.cosmetic.ui.button.ActivateGadgetButton; import mineplex.core.cosmetic.ui.button.DeactivateGadgetButton; import mineplex.core.cosmetic.ui.button.GadgetButton; import mineplex.core.donation.DonationManager; -import mineplex.core.gadget.gadgets.MorphBlock; -import mineplex.core.gadget.gadgets.MorphNotch; +import mineplex.core.gadget.gadgets.morph.MorphBlock; +import mineplex.core.gadget.gadgets.morph.MorphNotch; import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.GadgetType; import mineplex.core.gadget.types.ItemGadget; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java index 7494e9fa6..e612c3350 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java @@ -15,44 +15,13 @@ import mineplex.core.common.util.UtilTime; import mineplex.core.disguise.DisguiseManager; import mineplex.core.donation.DonationManager; import mineplex.core.gadget.event.GadgetCollideEntityEvent; -import mineplex.core.gadget.gadgets.ItemBatGun; -import mineplex.core.gadget.gadgets.ItemCoinBomb; -import mineplex.core.gadget.gadgets.ItemDuelingSword; -import mineplex.core.gadget.gadgets.ItemEtherealPearl; -import mineplex.core.gadget.gadgets.ItemFirework; -import mineplex.core.gadget.gadgets.ItemFleshHook; -import mineplex.core.gadget.gadgets.ItemMelonLauncher; -import mineplex.core.gadget.gadgets.ItemPaintballGun; -import mineplex.core.gadget.gadgets.ItemPaintbrush; -import mineplex.core.gadget.gadgets.ItemTNT; -import mineplex.core.gadget.gadgets.MorphBat; -import mineplex.core.gadget.gadgets.MorphBlaze; -import mineplex.core.gadget.gadgets.MorphBlock; -import mineplex.core.gadget.gadgets.MorphBunny; -import mineplex.core.gadget.gadgets.MorphChicken; -import mineplex.core.gadget.gadgets.MorphCow; -import mineplex.core.gadget.gadgets.MorphCreeper; -import mineplex.core.gadget.gadgets.MorphEnderman; -import mineplex.core.gadget.gadgets.MorphPig; -import mineplex.core.gadget.gadgets.MorphPumpkinKing; -import mineplex.core.gadget.gadgets.MorphSlime; -import mineplex.core.gadget.gadgets.MorphTitan; -import mineplex.core.gadget.gadgets.MorphVillager; -import mineplex.core.gadget.gadgets.MorphWither; -import mineplex.core.gadget.gadgets.OutfitRaveSuit; -import mineplex.core.gadget.gadgets.OutfitSpaceSuit; -import mineplex.core.gadget.gadgets.OutfitTeam; -import mineplex.core.gadget.gadgets.ParticleBlizzard; -import mineplex.core.gadget.gadgets.ParticleEnchant; -import mineplex.core.gadget.gadgets.ParticleFairy; -import mineplex.core.gadget.gadgets.ParticleFireRings; -import mineplex.core.gadget.gadgets.ParticleFoot; -import mineplex.core.gadget.gadgets.ParticleGreen; -import mineplex.core.gadget.gadgets.ParticleHeart; -import mineplex.core.gadget.gadgets.ParticleHelix; -import mineplex.core.gadget.gadgets.ParticleLegend; -import mineplex.core.gadget.gadgets.ParticleRain; -import mineplex.core.gadget.gadgets.ParticleTitan; +import mineplex.core.gadget.gadgets.arrowtrail.*; +import mineplex.core.gadget.gadgets.death.*; +import mineplex.core.gadget.gadgets.doublejump.*; +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.types.Gadget; import mineplex.core.gadget.types.GadgetType; import mineplex.core.gadget.types.ItemGadget; @@ -177,9 +146,21 @@ public class GadgetManager extends MiniPlugin addGadget(new ParticleHeart(this)); addGadget(new ParticleFairy(this)); addGadget(new ParticleLegend(this)); - addGadget(new ParticleBlizzard(this)); + addGadget(new ParticleFrostLord(this)); addGadget(new ParticleTitan(this)); - //addGadget(new ParticleKronos(this)); + + // Arrow Trails + addGadget(new ArrowTrailFrostLord(this)); + addGadget(new ArrowTrailTitan(this)); + + // Death Effect + addGadget(new DeathFrostLord(this)); + addGadget(new DeathTitan(this)); + + // Double Jump + addGadget(new DoubleJumpFrostLord(this)); + addGadget(new DoubleJumpTitan(this)); + // Music addGadget(new MusicGadget(this, "13 Disc", new String[] {""}, -2, 2256, 178000)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemKothSword.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemKothSword.java deleted file mode 100644 index 6bb5d66a0..000000000 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemKothSword.java +++ /dev/null @@ -1,5 +0,0 @@ -package mineplex.core.gadget.gadgets; - -public class ItemKothSword { - -} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailFrostLord.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailFrostLord.java new file mode 100644 index 000000000..90659d76e --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailFrostLord.java @@ -0,0 +1,43 @@ +package mineplex.core.gadget.gadgets.arrowtrail; + +import org.bukkit.Material; +import org.bukkit.entity.Arrow; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.gadget.types.ArrowEffectGadget; +import mineplex.core.gadget.GadgetManager; + +public class ArrowTrailFrostLord extends ArrowEffectGadget +{ + public ArrowTrailFrostLord(GadgetManager manager) + { + super(manager, "Frost Lord", new String[] + { + C.cWhite + "You are a mighty frost lord.", + C.cWhite + "Your double jumps and arrows", + C.cWhite + "are enchanted with snow powers.", + " ", + C.cPurple + "No longer available", + }, + -1, + Material.SNOW_BALL, (byte)0); + } + + @Override + public void doTrail(Arrow arrow) + { + UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, arrow.getLocation(), 0f, 0f, 0f, 0f, 1, + ViewDist.LONGER, UtilServer.getPlayers()); + } + + @Override + public void doHitEffect(Arrow arrow) + { + UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, arrow.getLocation(), 0f, 0f, 0f, 0.4f, 12, + ViewDist.LONGER, UtilServer.getPlayers()); + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailTitan.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailTitan.java new file mode 100644 index 000000000..534d7f3b0 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailTitan.java @@ -0,0 +1,55 @@ +package mineplex.core.gadget.gadgets.arrowtrail; + +import org.bukkit.Material; +import org.bukkit.entity.Arrow; +import org.bukkit.event.EventHandler; +import org.bukkit.event.player.PlayerJoinEvent; + +import mineplex.core.common.Rank; +import mineplex.core.common.util.C; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.ArrowEffectGadget; + +public class ArrowTrailTitan extends ArrowEffectGadget +{ + public ArrowTrailTitan(GadgetManager manager) + { + super(manager, "Arrows of the Titans", new String[] + { + C.cWhite + "These flames are said to be the", + C.cWhite + "souls of a lost civilisation of", + C.cWhite + "Titans, forgotten by time.", + " ", + C.cRed + "Unlocked with Titan Rank", + }, + -3, + Material.FIREBALL, (byte)0); + } + + @Override + public void doTrail(Arrow arrow) + { + UtilParticle.PlayParticle(ParticleType.FLAME, arrow.getLocation(), 0f, 0f, 0f, 0f, 1, + ViewDist.LONGER, UtilServer.getPlayers()); + } + + @Override + public void doHitEffect(Arrow arrow) + { + UtilParticle.PlayParticle(ParticleType.LAVA, arrow.getLocation(), 0f, 0f, 0f, 0f, 24, + ViewDist.LONGER, UtilServer.getPlayers()); + } + + @EventHandler + public void titanOwner(PlayerJoinEvent event) + { + if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN)) + { + Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName()); + } + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathFrostLord.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathFrostLord.java new file mode 100644 index 000000000..a0ec45f09 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathFrostLord.java @@ -0,0 +1,41 @@ +package mineplex.core.gadget.gadgets.death; + +import org.bukkit.Material; +import org.bukkit.event.EventHandler; + +import mineplex.core.blood.BloodEvent; +import mineplex.core.common.util.C; +import mineplex.core.gadget.types.DeathEffectGadget; +import mineplex.core.gadget.GadgetManager; + +public class DeathFrostLord extends DeathEffectGadget +{ + public DeathFrostLord(GadgetManager manager) + { + super(manager, "Frost Lord", new String[] + { + C.cWhite + "You are a mighty frost lord.", + C.cWhite + "Your double jumps and arrows", + C.cWhite + "are enchanted with snow powers.", + " ", + C.cPurple + "No longer available", + }, + -1, + Material.SNOW_BALL, (byte)0); + } + + @EventHandler + public void death(BloodEvent event) + { + if (event.getPlayer() == null) + return; + + if (!IsActive(event.getPlayer())) + return; + + if (!shouldDisplay(event.getPlayer())) + return; + + event.setItem(Material.SNOW_BALL, (byte)0); + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathTitan.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathTitan.java new file mode 100644 index 000000000..e7f205cf6 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathTitan.java @@ -0,0 +1,52 @@ +package mineplex.core.gadget.gadgets.death; + +import org.bukkit.Material; +import org.bukkit.event.EventHandler; +import org.bukkit.event.player.PlayerJoinEvent; + +import mineplex.core.blood.BloodEvent; +import mineplex.core.common.Rank; +import mineplex.core.common.util.C; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.DeathEffectGadget; + +public class DeathTitan extends DeathEffectGadget +{ + public DeathTitan(GadgetManager manager) + { + super(manager, "Ashes of the Titans", new String[] + { + C.cWhite + "These flames are said to be the", + C.cWhite + "souls of a lost civilisation of", + C.cWhite + "Titans, forgotten by time.", + " ", + C.cRed + "Unlocked with Titan Rank", + }, + -3, + Material.FIREBALL, (byte)0); + } + + @EventHandler + public void death(BloodEvent event) + { + if (event.getPlayer() == null) + return; + + if (!IsActive(event.getPlayer())) + return; + + if (!shouldDisplay(event.getPlayer())) + return; + + event.setItem(Material.FIREBALL, (byte)0); + } + + @EventHandler + public void titanOwner(PlayerJoinEvent event) + { + if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN)) + { + Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName()); + } + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpFrostLord.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpFrostLord.java new file mode 100644 index 000000000..9c7cdc726 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpFrostLord.java @@ -0,0 +1,38 @@ +package mineplex.core.gadget.gadgets.doublejump; + +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.player.PlayerToggleFlightEvent; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.gadget.types.DoubleJumpEffectGadget; +import mineplex.core.gadget.GadgetManager; + +public class DoubleJumpFrostLord extends DoubleJumpEffectGadget +{ + public DoubleJumpFrostLord(GadgetManager manager) + { + super(manager, "Frost Lord", new String[] + { + C.cWhite + "You are a mighty frost lord.", + C.cWhite + "Your double jumps and arrows", + C.cWhite + "are enchanted with snow powers.", + " ", + C.cPurple + "No longer available", + }, + -1, + Material.SNOW_BALL, (byte)0); + } + + @Override + public void doEffect(Player player) + { + UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, player.getLocation(), 0f, 0f, 0f, 0.6f, 100, + ViewDist.LONGER, UtilServer.getPlayers()); + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpTitan.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpTitan.java new file mode 100644 index 000000000..f0ecce644 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpTitan.java @@ -0,0 +1,63 @@ +package mineplex.core.gadget.gadgets.doublejump; + +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.event.player.PlayerToggleFlightEvent; + +import mineplex.core.common.Rank; +import mineplex.core.common.util.C; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.DoubleJumpEffectGadget; + +public class DoubleJumpTitan extends DoubleJumpEffectGadget +{ + public DoubleJumpTitan(GadgetManager manager) + { + super(manager, "Leap of the Titans", new String[] + { + C.cWhite + "These flames are said to be the", + C.cWhite + "souls of a lost civilisation of", + C.cWhite + "Titans, forgotten by time.", + " ", + C.cRed + "Unlocked with Titan Rank", + }, + -3, + Material.FIREBALL, (byte)0); + } + + @Override + public void doEffect(Player player) + { + UtilParticle.PlayParticle(ParticleType.LAVA, player.getLocation(), 0f, 0f, 0f, 0.2f, 40, + ViewDist.NORMAL, UtilServer.getPlayers()); + } + + @EventHandler + public void jump(PlayerToggleFlightEvent event) + { + if (!shouldDisplay(event.getPlayer())) + return; + + if (!event.getPlayer().isFlying()) + if (IsActive(event.getPlayer())) + { + UtilParticle.PlayParticle(ParticleType.LAVA, event.getPlayer().getLocation(), 0f, 0f, 0f, 0.2f, 40, + ViewDist.NORMAL, UtilServer.getPlayers()); + } + } + + @EventHandler + public void titanOwner(PlayerJoinEvent event) + { + if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN)) + { + Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName()); + } + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemBatGun.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemBatGun.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemBatGun.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemBatGun.java index 990221e3c..8cfcae673 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemBatGun.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemBatGun.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.item; import java.util.ArrayList; import java.util.HashMap; @@ -23,6 +23,7 @@ import mineplex.core.common.util.UtilTime; import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.common.util.UtilParticle.ViewDist; import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.Ammo; import mineplex.core.gadget.types.ItemGadget; import mineplex.core.recharge.Recharge; import mineplex.core.updater.UpdateType; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemCoinBomb.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemCoinBomb.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemCoinBomb.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemCoinBomb.java index ce4f2e781..e68345215 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemCoinBomb.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemCoinBomb.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.item; import java.util.HashMap; import java.util.HashSet; @@ -23,6 +23,7 @@ import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTime; import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.Ammo; import mineplex.core.gadget.types.ItemGadget; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemDuelingSword.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemDuelingSword.java similarity index 93% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemDuelingSword.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemDuelingSword.java index 94d4bfea3..07456110c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemDuelingSword.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemDuelingSword.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.item; import org.bukkit.Material; import org.bukkit.entity.Player; @@ -7,6 +7,7 @@ import org.bukkit.event.player.PlayerInteractEvent; import mineplex.core.common.util.C; import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.Ammo; import mineplex.core.gadget.types.ItemGadget; import mineplex.core.itemstack.ItemStackFactory; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemEtherealPearl.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemEtherealPearl.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemEtherealPearl.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemEtherealPearl.java index bb7ef9c8f..2c07ba486 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemEtherealPearl.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemEtherealPearl.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.item; import java.util.ArrayList; import java.util.HashSet; @@ -24,6 +24,7 @@ import mineplex.core.common.util.UtilInv; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.Ammo; import mineplex.core.gadget.types.ItemGadget; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemFirework.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemFirework.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemFirework.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemFirework.java index 114fbeeff..0462dd311 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemFirework.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemFirework.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.item; import org.bukkit.Color; import org.bukkit.FireworkEffect; @@ -15,6 +15,7 @@ import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilFirework; import mineplex.core.common.util.UtilPlayer; import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.Ammo; import mineplex.core.gadget.types.ItemGadget; import mineplex.core.recharge.Recharge; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemFleshHook.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemFleshHook.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemFleshHook.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemFleshHook.java index a439aca63..e4bd3554a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemFleshHook.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemFleshHook.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.item; import org.bukkit.EntityEffect; import org.bukkit.Material; @@ -16,6 +16,7 @@ import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.Ammo; import mineplex.core.gadget.types.ItemGadget; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.projectile.IThrown; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemFootball.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemFootball.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemFootball.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemFootball.java index 12537a599..b44dfd504 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemFootball.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemFootball.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.item; import java.util.HashSet; @@ -23,6 +23,7 @@ import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.Ammo; import mineplex.core.gadget.types.ItemGadget; import mineplex.core.recharge.Recharge; import mineplex.core.updater.UpdateType; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemGemBomb.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemGemBomb.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemGemBomb.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemGemBomb.java index 0c2e75b77..0510dbf11 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemGemBomb.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemGemBomb.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.item; import java.util.ArrayList; import java.util.Arrays; @@ -36,6 +36,7 @@ import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTime; import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.event.ItemGadgetOutOfAmmoEvent; +import mineplex.core.gadget.gadgets.Ammo; import mineplex.core.gadget.types.ItemGadget; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.recharge.Recharge; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemKothSword.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemKothSword.java new file mode 100644 index 000000000..6c694ba4c --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemKothSword.java @@ -0,0 +1,5 @@ +package mineplex.core.gadget.gadgets.item; + +public class ItemKothSword { + +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemMelonLauncher.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemMelonLauncher.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemMelonLauncher.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemMelonLauncher.java index 0692aa661..ebe4d779e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemMelonLauncher.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemMelonLauncher.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.item; import java.util.ArrayList; import java.util.Iterator; @@ -25,6 +25,7 @@ import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilPlayer; import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.Ammo; import mineplex.core.gadget.types.ItemGadget; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.projectile.IThrown; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemPaintballGun.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintballGun.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemPaintballGun.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintballGun.java index 68fba27a0..ce6f5d28e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemPaintballGun.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintballGun.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.item; import java.util.ArrayList; import java.util.HashSet; @@ -29,6 +29,7 @@ import mineplex.core.common.util.UtilParticle.ViewDist; import mineplex.core.common.util.UtilServer; import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.event.GadgetBlockEvent; +import mineplex.core.gadget.gadgets.Ammo; import mineplex.core.gadget.types.ItemGadget; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemPaintbrush.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintbrush.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemPaintbrush.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintbrush.java index ba0fd0d76..93070d3ad 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemPaintbrush.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintbrush.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.item; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +27,7 @@ import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.Ammo; import mineplex.core.gadget.types.ItemGadget; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.updater.UpdateType; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemTNT.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemTNT.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemTNT.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemTNT.java index 0bf3531b7..0bf4a04d3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ItemTNT.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemTNT.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.item; import java.util.HashMap; import java.util.HashSet; @@ -20,6 +20,7 @@ import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.common.util.UtilParticle.ViewDist; import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.Ammo; import mineplex.core.gadget.types.ItemGadget; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/BlockForm.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/BlockForm.java similarity index 99% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/BlockForm.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/BlockForm.java index 7fb434ae2..4a4be4ccd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/BlockForm.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/BlockForm.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import java.util.ArrayList; import java.util.List; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBat.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphBat.java similarity index 99% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBat.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphBat.java index 22cf5855e..77e253f93 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBat.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphBat.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import org.bukkit.EntityEffect; import org.bukkit.GameMode; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBlaze.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphBlaze.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBlaze.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphBlaze.java index d7b73309d..67afa8bcb 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBlaze.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphBlaze.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import org.bukkit.ChatColor; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBlock.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphBlock.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBlock.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphBlock.java index dd5e22071..208618c10 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBlock.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphBlock.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import java.util.HashMap; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBunny.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphBunny.java similarity index 99% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBunny.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphBunny.java index 78e502bc5..056f1e33a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphBunny.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphBunny.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import java.util.HashMap; import java.util.HashSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphChicken.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphChicken.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphChicken.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphChicken.java index 6e3be5fce..dcf03e51c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphChicken.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphChicken.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import org.bukkit.ChatColor; import org.bukkit.EntityEffect; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphCow.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphCow.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphCow.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphCow.java index 96dcda738..f16a35bce 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphCow.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphCow.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import org.bukkit.Material; import org.bukkit.Sound; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphCreeper.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphCreeper.java similarity index 99% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphCreeper.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphCreeper.java index 8c9419476..d2d5b0954 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphCreeper.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphCreeper.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import java.util.HashMap; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphEnderman.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphEnderman.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphEnderman.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphEnderman.java index 72c6518d6..e6341e98b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphEnderman.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphEnderman.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import org.bukkit.Color; import org.bukkit.Effect; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphGeno.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphGeno.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphGeno.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphGeno.java index 628531f40..0eb48894d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphGeno.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphGeno.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import org.bukkit.ChatColor; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphNotch.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphNotch.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphNotch.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphNotch.java index a262c149e..7671cd11c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphNotch.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphNotch.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphPig.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphPig.java similarity index 99% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphPig.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphPig.java index d42b43023..5a44e8322 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphPig.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphPig.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import java.util.HashSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphPumpkinKing.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphPumpkinKing.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphPumpkinKing.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphPumpkinKing.java index 13c83e5d9..1e155f20c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphPumpkinKing.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphPumpkinKing.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import org.bukkit.Bukkit; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphSlime.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphSlime.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphSlime.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphSlime.java index 4737cf7ad..6813bbcb3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphSlime.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphSlime.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import org.bukkit.Material; import org.bukkit.Sound; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphTitan.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphTitan.java similarity index 99% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphTitan.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphTitan.java index ed61f6511..1e36b454e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphTitan.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphTitan.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import java.util.HashMap; import java.util.HashSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphVillager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphVillager.java similarity index 99% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphVillager.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphVillager.java index 985247b53..def1ee383 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphVillager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphVillager.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import java.util.HashSet; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphWither.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphWither.java similarity index 99% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphWither.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphWither.java index 506ffc717..1d2bde3bb 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/MorphWither.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphWither.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.morph; import java.util.ArrayList; import java.util.HashMap; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/OutfitRaveSuit.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuit.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/OutfitRaveSuit.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuit.java index 2834498a4..cd43be616 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/OutfitRaveSuit.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitRaveSuit.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.outfit; import java.util.HashMap; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/OutfitSpaceSuit.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuit.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/OutfitSpaceSuit.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuit.java index fe25b7843..c634500b2 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/OutfitSpaceSuit.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitSpaceSuit.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.outfit; import org.bukkit.ChatColor; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/OutfitTeam.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitTeam.java similarity index 99% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/OutfitTeam.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitTeam.java index 9090eb81e..c994f299c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/OutfitTeam.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/outfit/OutfitTeam.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.outfit; import java.util.HashMap; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleEnchant.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleEnchant.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleEnchant.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleEnchant.java index 1225728a4..38a505914 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleEnchant.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleEnchant.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.GameMode; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleFairy.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFairy.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleFairy.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFairy.java index 2c6c70091..742355fe0 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleFairy.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFairy.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.particle; import java.util.HashMap; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleFairyData.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFairyData.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleFairyData.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFairyData.java index 00d4cd895..424f61382 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleFairyData.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFairyData.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.particle; import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilMath; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleFireRings.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFireRings.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleFireRings.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFireRings.java index 3537558d2..ba639675a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleFireRings.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFireRings.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.GameMode; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleFoot.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFoot.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleFoot.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFoot.java index 1e68a3d93..e156de492 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleFoot.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFoot.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.particle; import java.util.HashMap; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleBlizzard.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFrostLord.java similarity index 57% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleBlizzard.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFrostLord.java index b6f57d15b..1b0c142f8 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleBlizzard.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFrostLord.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.particle; import java.util.HashSet; import java.util.Iterator; @@ -24,11 +24,11 @@ import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.core.gadget.GadgetManager; -public class ParticleBlizzard extends ParticleGadget +public class ParticleFrostLord extends ParticleGadget { private HashSet _arrows = new HashSet(); - public ParticleBlizzard(GadgetManager manager) + public ParticleFrostLord(GadgetManager manager) { super(manager, "Frost Lord", new String[] { @@ -84,81 +84,4 @@ public class ParticleBlizzard extends ParticleGadget } } } - - @EventHandler - public void jump(PlayerToggleFlightEvent event) - { - if (!shouldDisplay(event.getPlayer())) - return; - - if (!event.getPlayer().isFlying()) - if (IsActive(event.getPlayer())) - UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, event.getPlayer().getLocation(), 0f, 0f, 0f, 0.6f, 100, - ViewDist.LONGER, UtilServer.getPlayers()); - } - - @EventHandler - public void arrow(ProjectileLaunchEvent event) - { - if (Manager.hideParticles()) - return; - - if (event.getEntity() instanceof Arrow) - { - if (event.getEntity().getShooter() != null) - { - if (GetActive().contains(event.getEntity().getShooter())) - { - _arrows.add((Arrow)event.getEntity()); - } - } - } - } - - @EventHandler - public void arrow(ProjectileHitEvent event) - { - if (!_arrows.remove(event.getEntity())) - return; - - UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, event.getEntity().getLocation(), 0f, 0f, 0f, 0.4f, 12, - ViewDist.LONGER, UtilServer.getPlayers()); - } - - @EventHandler - public void arrowClean(UpdateEvent event) - { - if (event.getType() != UpdateType.TICK) - return; - - for (Iterator arrowIterator = _arrows.iterator(); arrowIterator.hasNext();) - { - Arrow arrow = arrowIterator.next(); - - if (arrow.isDead() || !arrow.isValid() || arrow.isOnGround()) - { - arrowIterator.remove(); - } - else - { - UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, arrow.getLocation(), 0f, 0f, 0f, 0f, 1, - ViewDist.LONGER, UtilServer.getPlayers()); - } - } - } - - @EventHandler - public void death(BloodEvent event) - { - if (event.getPlayer() == null) - return; - - if (!IsActive(event.getPlayer())) - return; - - if (!shouldDisplay(event.getPlayer())) - return; - - event.setItem(Material.SNOW_BALL, (byte)0); - } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleGreen.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleGreen.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleGreen.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleGreen.java index 9a370fad1..920de097b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleGreen.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleGreen.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.GameMode; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleHeart.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleHeart.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java index 61d602440..d4160c997 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleHeart.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.particle; import java.util.HashMap; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleHelix.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHelix.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleHelix.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHelix.java index f573629ee..cc4a4882e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleHelix.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHelix.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.GameMode; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleKronos.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleKronos.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleKronos.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleKronos.java index dd74addb9..02ed4ac3b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleKronos.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleKronos.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.particle; import java.util.HashMap; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleKronosData.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleKronosData.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleKronosData.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleKronosData.java index 5d78b2b3d..289a60099 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleKronosData.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleKronosData.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.particle; import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilParticle.ParticleType; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleLegend.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleLegend.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleLegend.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleLegend.java index 76e4d277f..6c510f664 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleLegend.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleLegend.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.Effect; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleRain.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleRain.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleRain.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleRain.java index 4300b5369..8d6755b3c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleRain.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleRain.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.GameMode; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleTitan.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleTitan.java similarity index 55% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleTitan.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleTitan.java index 9ed2bbb06..8431e6f7c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/ParticleTitan.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleTitan.java @@ -1,24 +1,15 @@ -package mineplex.core.gadget.gadgets; - -import java.util.HashSet; -import java.util.Iterator; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.Location; import org.bukkit.Material; -import org.bukkit.entity.Arrow; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; -import org.bukkit.event.entity.ProjectileHitEvent; -import org.bukkit.event.entity.ProjectileLaunchEvent; import org.bukkit.event.player.PlayerJoinEvent; -import org.bukkit.event.player.PlayerToggleFlightEvent; import org.bukkit.util.Vector; -import mineplex.core.blood.BloodEvent; import mineplex.core.common.Rank; import mineplex.core.common.util.C; import mineplex.core.common.util.UtilParticle; -import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.common.util.UtilParticle.ViewDist; import mineplex.core.gadget.GadgetManager; @@ -28,8 +19,7 @@ import mineplex.core.updater.event.UpdateEvent; public class ParticleTitan extends ParticleGadget { - private HashSet _arrows = new HashSet(); - + private int _tick; public ParticleTitan(GadgetManager manager) @@ -112,87 +102,7 @@ public class ParticleTitan extends ParticleGadget } @EventHandler - public void jump(PlayerToggleFlightEvent event) - { - if (!shouldDisplay(event.getPlayer())) - return; - - if (!event.getPlayer().isFlying()) - if (IsActive(event.getPlayer())) - { - UtilParticle.PlayParticle(ParticleType.LAVA, event.getPlayer().getLocation(), 0f, 0f, 0f, 0.2f, 40, - ViewDist.NORMAL, UtilServer.getPlayers()); - } - - } - - @EventHandler - public void arrow(ProjectileLaunchEvent event) - { - if (Manager.hideParticles()) - return; - - if (event.getEntity() instanceof Arrow) - { - if (event.getEntity().getShooter() != null) - { - if (GetActive().contains(event.getEntity().getShooter())) - { - _arrows.add((Arrow)event.getEntity()); - } - } - } - } - - @EventHandler - public void arrow(ProjectileHitEvent event) - { - if (!_arrows.remove(event.getEntity())) - return; - - UtilParticle.PlayParticle(ParticleType.LAVA, event.getEntity().getLocation(), 0f, 0f, 0f, 0f, 24, - ViewDist.LONGER, UtilServer.getPlayers()); - } - - @EventHandler - public void arrowClean(UpdateEvent event) - { - if (event.getType() != UpdateType.TICK) - return; - - for (Iterator arrowIterator = _arrows.iterator(); arrowIterator.hasNext();) - { - Arrow arrow = arrowIterator.next(); - - if (arrow.isDead() || !arrow.isValid() || arrow.isOnGround()) - { - arrowIterator.remove(); - } - else - { - UtilParticle.PlayParticle(ParticleType.FLAME, arrow.getLocation(), 0f, 0f, 0f, 0f, 1, - ViewDist.LONGER, UtilServer.getPlayers()); - } - } - } - - @EventHandler - public void death(BloodEvent event) - { - if (event.getPlayer() == null) - return; - - if (!IsActive(event.getPlayer())) - return; - - if (!shouldDisplay(event.getPlayer())) - return; - - event.setItem(Material.FIREBALL, (byte)0); - } - - @EventHandler - public void legendOwner(PlayerJoinEvent event) + public void titanOwner(PlayerJoinEvent event) { if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN)) { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ArrowEffectGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ArrowEffectGadget.java new file mode 100644 index 000000000..de0705c04 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/ArrowEffectGadget.java @@ -0,0 +1,110 @@ +package mineplex.core.gadget.types; + +import java.util.HashSet; +import java.util.Iterator; + +import org.bukkit.Material; +import org.bukkit.entity.Arrow; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.entity.ProjectileHitEvent; +import org.bukkit.event.entity.ProjectileLaunchEvent; + +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; + +public abstract class ArrowEffectGadget extends Gadget +{ + protected HashSet _arrows = new HashSet(); + + public ArrowEffectGadget(GadgetManager manager, String name, String[] desc, int cost, Material mat, byte data) + { + super(manager, GadgetType.ArrowTrail, name, desc, cost, mat, data); + } + + @Override + public void EnableCustom(Player player) + { + Manager.RemoveParticle(player); + + _active.add(player); + + UtilPlayer.message(player, F.main("Gadget", "You enabled " + F.elem(GetName()) + ".")); + } + + @Override + public void DisableCustom(Player player) + { + if (_active.remove(player)) + UtilPlayer.message(player, F.main("Gadget", "You disabled " + F.elem(GetName()) + ".")); + } + + public boolean shouldDisplay(Player player) + { + if (UtilPlayer.isSpectator(player)) + return false; + + if (Manager.hideParticles()) + return false; + + return true; + } + + @EventHandler + public void arrowLaunch(ProjectileLaunchEvent event) + { + if (Manager.hideParticles()) + return; + + if (event.getEntity() instanceof Arrow) + { + if (event.getEntity().getShooter() != null) + { + if (GetActive().contains(event.getEntity().getShooter())) + { + _arrows.add((Arrow)event.getEntity()); + } + } + } + } + + @EventHandler + public void clean(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Iterator arrowIterator = _arrows.iterator(); arrowIterator.hasNext();) + { + Arrow arrow = arrowIterator.next(); + + if (arrow.isDead() || !arrow.isValid() || arrow.isOnGround()) + { + arrowIterator.remove(); + } + else + { + doTrail(arrow); + } + } + } + + @EventHandler + public void arrowHit(ProjectileHitEvent event) + { + if (!_arrows.remove(event.getEntity())) + return; + + doHitEffect((Arrow)event.getEntity()); + } + + public abstract void doTrail(Arrow arrow); + public abstract void doHitEffect(Arrow arrow); +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DeathEffectGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DeathEffectGadget.java new file mode 100644 index 000000000..fe5b96f0f --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DeathEffectGadget.java @@ -0,0 +1,44 @@ +package mineplex.core.gadget.types; + +import org.bukkit.Material; +import org.bukkit.entity.Player; + +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.gadget.GadgetManager; + +public abstract class DeathEffectGadget extends Gadget +{ + public DeathEffectGadget(GadgetManager manager, String name, String[] desc, int cost, Material mat, byte data) + { + super(manager, GadgetType.Death, name, desc, cost, mat, data); + } + + @Override + public void EnableCustom(Player player) + { + Manager.RemoveParticle(player); + + _active.add(player); + + UtilPlayer.message(player, F.main("Gadget", "You enabled " + F.elem(GetName()) + ".")); + } + + @Override + public void DisableCustom(Player player) + { + if (_active.remove(player)) + UtilPlayer.message(player, F.main("Gadget", "You disabled " + F.elem(GetName()) + ".")); + } + + public boolean shouldDisplay(Player player) + { + if (UtilPlayer.isSpectator(player)) + return false; + + if (Manager.hideParticles()) + return false; + + return true; + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DoubleJumpEffectGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DoubleJumpEffectGadget.java new file mode 100644 index 000000000..a9e3ecfbf --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/DoubleJumpEffectGadget.java @@ -0,0 +1,65 @@ +package mineplex.core.gadget.types; + +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.player.PlayerToggleFlightEvent; + +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilParticle.ParticleType; +import mineplex.core.common.util.UtilParticle.ViewDist; +import mineplex.core.gadget.GadgetManager; + +public abstract class DoubleJumpEffectGadget extends Gadget +{ + public DoubleJumpEffectGadget(GadgetManager manager, String name, String[] desc, int cost, Material mat, byte data) + { + super(manager, GadgetType.DoubleJump, name, desc, cost, mat, data); + } + + @Override + public void EnableCustom(Player player) + { + Manager.RemoveParticle(player); + + _active.add(player); + + UtilPlayer.message(player, F.main("Gadget", "You enabled " + F.elem(GetName()) + ".")); + } + + @Override + public void DisableCustom(Player player) + { + if (_active.remove(player)) + UtilPlayer.message(player, F.main("Gadget", "You disabled " + F.elem(GetName()) + ".")); + } + + public boolean shouldDisplay(Player player) + { + if (UtilPlayer.isSpectator(player)) + return false; + + if (Manager.hideParticles()) + return false; + + return true; + } + + @EventHandler + public void jump(PlayerToggleFlightEvent event) + { + if (!shouldDisplay(event.getPlayer())) + return; + + if (!event.getPlayer().isFlying()) + if (IsActive(event.getPlayer())) + { + doEffect(event.getPlayer()); + } + } + + public abstract void doEffect(Player player); +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetType.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetType.java index 11b014b32..22de296e7 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetType.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetType.java @@ -7,4 +7,7 @@ public enum GadgetType Particle, MusicDisc, Costume, + DoubleJump, + ArrowTrail, + Death } diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/KothManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/KothManager.java index 373bb1e5d..6f69a5782 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/KothManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/KothManager.java @@ -23,8 +23,8 @@ import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.event.GadgetActivateEvent; -import mineplex.core.gadget.gadgets.ItemDuelingSword; -import mineplex.core.gadget.gadgets.OutfitTeam; +import mineplex.core.gadget.gadgets.item.ItemDuelingSword; +import mineplex.core.gadget.gadgets.outfit.OutfitTeam; import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.GadgetType; import mineplex.core.mount.event.MountActivateEvent; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/NewsManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/NewsManager.java index 943acdd63..977bada57 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/NewsManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/NewsManager.java @@ -15,7 +15,7 @@ import mineplex.core.common.util.UtilTextTop; import mineplex.core.common.util.UtilTime; import mineplex.core.disguise.disguises.DisguiseBase; import mineplex.core.disguise.disguises.DisguiseWither; -import mineplex.core.gadget.gadgets.MorphWither; +import mineplex.core.gadget.gadgets.morph.MorphWither; import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.GadgetType; import mineplex.core.mount.Mount; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/SoccerManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/SoccerManager.java index 1d55d9f03..687bf534c 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/SoccerManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/SoccerManager.java @@ -42,7 +42,7 @@ import mineplex.core.common.util.UtilTextMiddle; import mineplex.core.common.util.UtilTime; import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.event.GadgetActivateEvent; -import mineplex.core.gadget.gadgets.OutfitTeam; +import mineplex.core.gadget.gadgets.outfit.OutfitTeam; import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.GadgetType; import mineplex.core.mount.event.MountActivateEvent; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/StackerManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/StackerManager.java index bf5b654ea..0fa87552c 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/StackerManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/StackerManager.java @@ -28,7 +28,7 @@ import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.common.util.UtilGear; import mineplex.core.common.util.UtilPlayer; import mineplex.core.event.StackerEvent; -import mineplex.core.gadget.gadgets.MorphBlock; +import mineplex.core.gadget.gadgets.morph.MorphBlock; import mineplex.core.gadget.types.GadgetType; import mineplex.core.projectile.IThrown; import mineplex.core.projectile.ProjectileManager; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/event/EventModule.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/event/EventModule.java index dd31d4703..b38a8f6af 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/event/EventModule.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/event/EventModule.java @@ -20,7 +20,7 @@ import mineplex.core.common.util.UtilText; import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.creature.event.CreatureKillEntitiesEvent; import mineplex.core.event.StackerEvent; -import mineplex.core.gadget.gadgets.MorphBlock; +import mineplex.core.gadget.gadgets.morph.MorphBlock; import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.GadgetType; import mineplex.core.give.Give; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java index 7f65cc868..dd35974de 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java @@ -16,7 +16,7 @@ import mineplex.core.common.util.UtilTime; import mineplex.core.disguise.disguises.DisguiseBase; import mineplex.core.disguise.disguises.DisguiseLiving; import mineplex.core.disguise.disguises.DisguiseWither; -import mineplex.core.gadget.gadgets.MorphWither; +import mineplex.core.gadget.gadgets.morph.MorphWither; import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.GadgetType; import mineplex.minecraft.game.core.condition.Condition.ConditionType;