From 6180bea5cc909fb490afa0b6c1b7a837604fac3a Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Wed, 27 Jul 2016 15:07:11 -0400 Subject: [PATCH] Update clans drop aesthetics and spawn/shop locations --- .../game/clans/clans/loot/GearLoot.java | 2 +- .../game/clans/clans/loot/GoldTokenLoot.java | 6 ++- .../clans/clans/regions/ClansRegions.java | 33 ++++------------ .../game/clans/items/GearManager.java | 11 ++++++ .../src/mineplex/game/clans/spawn/Spawn.java | 39 +++++++++---------- 5 files changed, 43 insertions(+), 48 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/GearLoot.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/GearLoot.java index c65d2cd33..343871074 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/GearLoot.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/GearLoot.java @@ -17,7 +17,7 @@ public class GearLoot implements ILoot @Override public void dropLoot(Location location) { - _gearManager.spawnItem(location); + _gearManager.spawnItem(location.clone().add(0, 3, 0)); } @Override diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/GoldTokenLoot.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/GoldTokenLoot.java index 03707ad93..82875cea8 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/GoldTokenLoot.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/loot/GoldTokenLoot.java @@ -1,8 +1,11 @@ package mineplex.game.clans.clans.loot; +import org.bukkit.Color; import org.bukkit.Location; +import org.bukkit.FireworkEffect.Type; import org.bukkit.inventory.ItemStack; +import mineplex.core.common.util.UtilFirework; import mineplex.core.common.util.UtilMath; import mineplex.game.clans.items.economy.GoldToken; @@ -23,7 +26,8 @@ public class GoldTokenLoot implements ILoot int gold = _minGold + UtilMath.r(_maxGold - _minGold); GoldToken token = new GoldToken(gold); - location.getWorld().dropItemNaturally(location, token.toItemStack()); + UtilFirework.playFirework(location.clone().add(0, 3, 0), Type.BALL, Color.YELLOW, true, false); + location.getWorld().dropItemNaturally(location.clone().add(0, 3, 0), token.toItemStack()); } @Override diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java index 6c9424634..b60c27ae8 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/regions/ClansRegions.java @@ -1,41 +1,22 @@ package mineplex.game.clans.clans.regions; -import java.util.ArrayList; import java.util.HashSet; -import java.util.Iterator; -import java.util.List; import java.util.Set; -import org.bukkit.Bukkit; -import org.bukkit.Chunk; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.World; -import org.bukkit.WorldBorder; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.player.PlayerJoinEvent; -import org.bukkit.event.player.PlayerMoveEvent; -import org.bukkit.event.player.PlayerTeleportEvent; -import org.bukkit.plugin.java.JavaPlugin; - -import net.minecraft.server.v1_8_R3.PacketPlayOutWorldBorder; - import mineplex.core.MiniPlugin; import mineplex.core.common.util.Callback; -import mineplex.core.common.util.F; -import mineplex.core.common.util.UtilAction; -import mineplex.core.common.util.UtilAlg; -import mineplex.core.common.util.UtilEnt; -import mineplex.core.common.util.UtilPlayer; -import mineplex.core.common.util.UtilServer; -import mineplex.core.common.util.UtilWorld; import mineplex.game.clans.clans.ClanInfo; -import mineplex.game.clans.clans.ClansDataAccessLayer; import mineplex.game.clans.clans.ClansManager; import mineplex.game.clans.spawn.Spawn; import mineplex.minecraft.game.classcombat.Skill.event.SkillTeleportEvent; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.WorldBorder; +import org.bukkit.event.EventHandler; +import org.bukkit.plugin.java.JavaPlugin; + public class ClansRegions extends MiniPlugin { public final static String DEFAULT_WORLD_NAME = "world"; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/GearManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/GearManager.java index 27b8900b0..b25959a72 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/GearManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/GearManager.java @@ -13,6 +13,7 @@ import java.util.UUID; import mineplex.core.MiniPlugin; import mineplex.core.account.CoreClientManager; import mineplex.core.common.util.C; +import mineplex.core.common.util.UtilFirework; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilServer; import mineplex.core.common.weight.Weight; @@ -67,6 +68,8 @@ import net.minecraft.server.v1_8_R3.PacketPlayOutSetSlot; import net.minecraft.server.v1_8_R3.PacketPlayOutWindowItems; import org.bukkit.Bukkit; +import org.bukkit.Color; +import org.bukkit.FireworkEffect.Type; import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Material; @@ -385,6 +388,14 @@ public class GearManager extends MiniPlugin implements IPacketHandler, Runnable public void spawnItem(Location location) { CustomItem item = generateItem(); + if (item.getMaterial() == Material.RECORD_4 || item.getMaterial() == Material.GOLD_RECORD || item.getMaterial() == Material.RECORD_3 || item.getMaterial() == Material.RECORD_5 || item.getMaterial() == Material.RECORD_6 || item.getMaterial() == Material.GREEN_RECORD) + { + UtilFirework.playFirework(location, Type.BALL, Color.RED, true, false); + } + else + { + UtilFirework.playFirework(location, Type.BALL, Color.AQUA, true, false); + } location.getWorld().dropItem(location, item.toItemStack()); } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/Spawn.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/Spawn.java index 92f29b3bf..5c57ef602 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/Spawn.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/spawn/Spawn.java @@ -2,6 +2,23 @@ package mineplex.game.clans.spawn; import java.util.Set; +import mineplex.core.MiniPlugin; +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.UtilTextMiddle; +import mineplex.core.common.util.UtilTime; +import mineplex.core.common.util.UtilTime.TimeUnit; +import mineplex.core.common.weight.WeightSet; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import mineplex.game.clans.clans.ClansManager; +import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent; +import mineplex.minecraft.game.classcombat.item.event.WebTossEvent; +import mineplex.minecraft.game.core.condition.Condition.ConditionType; +import mineplex.minecraft.game.core.damage.CustomDamageEvent; + import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Effect; @@ -26,28 +43,10 @@ import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.entity.EntityTargetEvent; import org.bukkit.event.hanging.HangingBreakByEntityEvent; -import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerRespawnEvent; import org.bukkit.event.player.PlayerVelocityEvent; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.MiniPlugin; -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.UtilTextMiddle; -import mineplex.core.common.util.UtilTime; -import mineplex.core.common.util.UtilTime.TimeUnit; -import mineplex.core.common.weight.WeightSet; -import mineplex.core.updater.UpdateType; -import mineplex.core.updater.event.UpdateEvent; -import mineplex.game.clans.clans.ClansManager; -import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent; -import mineplex.minecraft.game.classcombat.item.event.WebTossEvent; -import mineplex.minecraft.game.core.condition.Condition.ConditionType; -import mineplex.minecraft.game.core.damage.CustomDamageEvent; - public class Spawn extends MiniPlugin { public static final int SPAWN_RADIUS = 32; @@ -457,7 +456,7 @@ public class Spawn extends MiniPlugin public static Location getWestTown() { - return new Location(getSpawnWorld(), -440.91, 63, 23.08); + return new Location(getSpawnWorld(), -440.91, 65, 23.08); } public static Location getWestTownCenter() @@ -467,7 +466,7 @@ public class Spawn extends MiniPlugin public static Location getEastTown() { - return new Location(getSpawnWorld(), 440.91, 63, -23.08); + return new Location(getSpawnWorld(), 440.91, 65, -23.08); } public static Location getEastTownCenter()