From 9688c1b34f84ee6f2f03862ad03771977fcd1b02 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Wed, 11 Dec 2013 08:58:14 -0700 Subject: [PATCH] Add in Powered Mobs. --- BankEconomyMod/src/me/kaZep/Base/Main.java | 44 +++++++++++++++++- .../src/me/kaZep/Base/PlayerListener.java | 46 ++++++++++++++----- .../src/me/kaZep/Base/PoweredMob.java | 12 +++++ .../me/kaZep/Commands/commandBankEconomy.java | 9 +++- 4 files changed, 95 insertions(+), 16 deletions(-) create mode 100644 BankEconomyMod/src/me/kaZep/Base/PoweredMob.java diff --git a/BankEconomyMod/src/me/kaZep/Base/Main.java b/BankEconomyMod/src/me/kaZep/Base/Main.java index 5662d41..9f3a847 100644 --- a/BankEconomyMod/src/me/kaZep/Base/Main.java +++ b/BankEconomyMod/src/me/kaZep/Base/Main.java @@ -192,6 +192,7 @@ public class Main extends JavaPlugin public List playerdata_list = null; public List ninjavisible_list = null; public List revive_inventory_list = null; + public List powered_mob_list = null; public List chunk_queue_list = null; public static List recycling_center_list = null; public static List bonus_enchantment_list = null; @@ -320,6 +321,7 @@ public class Main extends JavaPlugin revive_inventory_list = new ArrayList(); chunk_queue_list = new ArrayList(); bonus_enchantment_list = new ArrayList(); + powered_mob_list = new ArrayList(); recycling_center_list = new ArrayList(); @@ -1481,7 +1483,7 @@ public void runTick() { } if (BOSS_DEFEAT>0) { if (BOSS_DEFEAT%4==0) { - Bukkit.getWorld("world").playEffect(BOSS_DEFEAT_LOC.add(Math.random()*5-Math.random()*5, BOSS_DEFEAT/20, Math.random()*5-Math.random()*5), Effect.SMOKE, 0); + Bukkit.getWorld("world").playEffect(new Location(BOSS_DEFEAT_LOC.getWorld(),BOSS_DEFEAT_LOC.getX()+Math.random()*5-Math.random()*5, BOSS_DEFEAT_LOC.getY()+BOSS_DEFEAT/20, BOSS_DEFEAT_LOC.getZ()+Math.random()*5-Math.random()*5), Effect.SMOKE, 0); } if (BOSS_DEFEAT==1) { Bukkit.getWorld("world").playEffect(BOSS_DEFEAT_LOC, Effect.ZOMBIE_DESTROY_DOOR, 0); @@ -1782,6 +1784,12 @@ public void runTick() { } } if (Main.SERVER_TICK_TIME%20==0) { + for (int j=0;j nearby2 = p.getNearbyEntities(10, 6, 10); for (int i=0;i=1) { if (p.getItemInHand().getType()==Material.NAME_TAG) { ItemMeta meta = p.getItemInHand().getItemMeta(); - meta.setDisplayName(ChatColor.RESET+""+args[0]); + if (meta.getDisplayName()==null) { + meta.setDisplayName(ChatColor.RESET+""); + } + for (int i=0;i