diff --git a/BankEconomyMod/bin/me/kaZep/Base/Main$1.class b/BankEconomyMod/bin/me/kaZep/Base/Main$1.class index d04fc51..46339d8 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/Main$1.class and b/BankEconomyMod/bin/me/kaZep/Base/Main$1.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/Main$2.class b/BankEconomyMod/bin/me/kaZep/Base/Main$2.class index 9c6a37e..77c9649 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/Main$2.class and b/BankEconomyMod/bin/me/kaZep/Base/Main$2.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/Main$3.class b/BankEconomyMod/bin/me/kaZep/Base/Main$3.class index 9da27d4..625b599 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/Main$3.class and b/BankEconomyMod/bin/me/kaZep/Base/Main$3.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/Main$4.class b/BankEconomyMod/bin/me/kaZep/Base/Main$4.class index ac3cf31..1b3755f 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/Main$4.class and b/BankEconomyMod/bin/me/kaZep/Base/Main$4.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/Main.class b/BankEconomyMod/bin/me/kaZep/Base/Main.class index a304598..9673e5b 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/Main.class and b/BankEconomyMod/bin/me/kaZep/Base/Main.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$1.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$1.class index 24f1d79..f47ae04 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$1.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$1.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$2.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$2.class index ec00abe..9f37ebb 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$2.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$2.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$3.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$3.class index 0213967..de7b3f8 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$3.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$3.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$4.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$4.class index b0a54d2..91ad4ed 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$4.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$4.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$5.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$5.class index 4e40636..b27a434 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$5.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$5.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class index 48588e9..3ffde4b 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class index 3fcdfaa..e1dc200 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy.class b/BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy.class index 9e2fdaa..c37a92e 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy.class and b/BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy.class differ diff --git a/BankEconomyMod/plugin.yml b/BankEconomyMod/plugin.yml index 7a925b8..8d60cc0 100644 --- a/BankEconomyMod/plugin.yml +++ b/BankEconomyMod/plugin.yml @@ -1,6 +1,6 @@ name: BankEconomy main: me.kaZep.Base.Main -version: 259 +version: 261 description: Bank plugin which stores money. commands: bankeconomy: diff --git a/BankEconomyMod/src/me/kaZep/Base/Main.java b/BankEconomyMod/src/me/kaZep/Base/Main.java index 384370d..f95e8a7 100644 --- a/BankEconomyMod/src/me/kaZep/Base/Main.java +++ b/BankEconomyMod/src/me/kaZep/Base/Main.java @@ -179,6 +179,15 @@ public class Main extends JavaPlugin String pluginPrefix = "ยง2[BankEconomy]"; + public double Warning(LivingEntity l,int id) { + double hp = l.getHealth(); + if (hp>65) { + //Bukkit.broadcastMessage("HP too high for ID "+id+". Removing entity "+l.getType().getName()+" with "+hp+" health."); + l.remove(); + } + return hp; + } + public double Warning(double hp,int id) { if (hp>65) { Bukkit.broadcastMessage("Main: HP too high for ID "+id+". HP was "+hp); @@ -1511,9 +1520,15 @@ public void runTick() { l.setCustomName(ChatColor.GOLD+"Charge Zombie II"); l.setCustomNameVisible(false); //l.setCustomNameVisible(true); - l.setMaxHealth(Warning(l.getMaxHealth()+20,13)); + Warning(l,13); + if (l!=null && l.isValid()) { + l.setMaxHealth(l.getMaxHealth()+20); + } + } + Warning(l,23); + if (l!=null && l.isValid()) { + l.setMaxHealth(l.getMaxHealth()); } - l.setHealth(Warning(l.getMaxHealth(),23)); } else { if (Math.random()<=0.10+((heightmodifier-l.getLocation().getY())*0.01d)) { if (Math.random()<=0.25) { @@ -1529,8 +1544,14 @@ public void runTick() { l.getEquipment().setHelmet(new ItemStack(Material.AIR)); Zombie g = (Zombie)l; g.setBaby(true); - l.setMaxHealth(Warning(l.getMaxHealth()*0.65d,14)); - l.setHealth(Warning(l.getMaxHealth(),15)); + Warning(l,14); + if (l!=null && l.isValid()) { + l.setMaxHealth(l.getMaxHealth()*0.65d); + Warning(l,15); + if (l!=null && l.isValid()) { + l.setHealth(l.getMaxHealth()); + } + } } } } diff --git a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java index 6befc08..7c01e6e 100644 --- a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java +++ b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java @@ -268,7 +268,7 @@ public class PlayerListener @EventHandler public void onServerListPing(ServerListPingEvent e) { - e.setMaxPlayers(15); + e.setMaxPlayers(16); if (this.plugin.getConfig().getBoolean("maintenance-mode")) { e.setMotd(ChatColor.RED+"Currently in Maintenance Mode."); } else { @@ -1866,10 +1866,14 @@ public class PlayerListener } } } + + public double Warning(LivingEntity l,int id) { + return this.plugin.Warning(l, id); + } public double Warning(double hp,int id) { if (hp>65) { - Bukkit.broadcastMessage("HP too high for ID "+id+". HP was "+hp); + Bukkit.broadcastMessage("PlayerListener: HP too high for ID "+id+". HP was "+hp); } return hp; } @@ -1919,8 +1923,11 @@ public class PlayerListener boolean despawn=true; if (entity instanceof Monster) { LivingEntity test = (LivingEntity)entity; - test.setMaxHealth(10); - test.setHealth(Warning(test.getMaxHealth(),1)); + /*test.setMaxHealth(10); + Warning(test,1); + if (test!=null && test.isValid()) { + test.setHealth(test.getMaxHealth()); + }*/ boolean block=false; if (test.getCustomName()!=null && (test.getCustomName().contains(ChatColor.DARK_PURPLE+"") || test.getCustomName().contains(ChatColor.DARK_AQUA+"Polymorphed Creature"))) { for (int i=-2;i<3;i++) { @@ -1935,13 +1942,6 @@ public class PlayerListener } } } - if (test.getCustomName()!=null && !test.getCustomName().contains(ChatColor.DARK_PURPLE+"") && !test.getCustomName().contains(ChatColor.DARK_AQUA+"Polymorphed Creature")) { - if (test.getMaxHealth()>50) { - Bukkit.getPlayer("sigonasr2").sendMessage("Mob had "+test.getMaxHealth()+" health. Lowering to max cap of 50."); - test.setMaxHealth(50); - test.setHealth(Warning(test.getMaxHealth(),2)); - } - } List entities = Bukkit.getWorld("world").getEntities(); for (int i=0;i=0.5) { p.sendMessage(ChatColor.DARK_PURPLE+""+ChatColor.ITALIC+"Took "+df.format(player_starthp-p.getHealth())+" damage from "+ChatColor.WHITE+f.getCause().toString()+ChatColor.DARK_PURPLE+""+ChatColor.ITALIC+" (-"+df2.format(((player_starthp-p.getHealth())/p.getMaxHealth())*100)+"%)"); } + if (p.getHealth()<=0) { + FatalSurvivor(p); + } } },1); } @@ -6283,8 +6288,21 @@ public ItemStack getGoodie() { } } } - if (e.getRemaining()==0) { - p.sendMessage(ChatColor.GRAY+""+ChatColor.ITALIC+"Picked up "+e.getItem().getItemStack().getAmount()+" "+String.valueOf(mod)+"."); + boolean same=false; + for (int i=0;i65) { - Bukkit.broadcastMessage("This mob had too much HP. HP: "+m.getMaxHealth()); - m.setMaxHealth(65); //65 HP cap. - m.setHealth(65); - m.setCustomName("Super Mob"); - m.setCustomNameVisible(true); - Bukkit.broadcastMessage("This mob had too much HP. Lowered to "+m.getHealth()+"/"+m.getMaxHealth()); - } - } else { - if (!m.getCustomName().contains(ChatColor.DARK_PURPLE+"")) { //Make sure it's not a boss. - if (m.getMaxHealth()>65) { - Bukkit.broadcastMessage("This mob had too much HP. HP: "+m.getMaxHealth()); - m.setMaxHealth(65); //65 HP cap. - m.setHealth(65); - m.setCustomName("Super Mob"); - m.setCustomNameVisible(true); - Bukkit.broadcastMessage("This mob had too much HP. Lowered to "+m.getHealth()+"/"+m.getMaxHealth()); - } - } - } - } - } if (e.getEntity() instanceof LivingEntity) { - if (e.getDamager() instanceof Monster) { - //e.setDamage(e.getDamage()*1.45d); //Damage of ALL mobs multiplied by x1.65. - Monster m = (Monster)e.getDamager(); - if (m.getType()!=EntityType.ENDER_DRAGON && m.getType()!=EntityType.WITHER) { - if (m.getCustomName()==null) { - if (m.getMaxHealth()>65) { - Bukkit.broadcastMessage("This mob had too much HP. HP: "+m.getMaxHealth()); - m.setMaxHealth(65); //65 HP cap. - //m.setHealth(65); - m.setCustomName("Super Mob"); - m.setCustomNameVisible(true); - Bukkit.broadcastMessage("This mob had too much HP. Lowered to "+m.getHealth()+"/"+m.getMaxHealth()); - } - } else { - if (!m.getCustomName().contains(ChatColor.DARK_PURPLE+"")) { //Make sure it's not a boss. - if (m.getMaxHealth()>65) { - Bukkit.broadcastMessage("This mob had too much HP. HP: "+m.getMaxHealth()); - m.setMaxHealth(65); //65 HP cap. - m.setHealth(65); - m.setCustomName("Super Mob"); - m.setCustomNameVisible(true); - Bukkit.broadcastMessage("This mob had too much HP. Lowered to "+m.getHealth()+"/"+m.getMaxHealth()); - } - } - } - } - } final LivingEntity l = (LivingEntity)e.getEntity(); if (l.getCustomName()!=null && l.getCustomName().contains(ChatColor.DARK_PURPLE+"")) { - Bukkit.getPlayer("sigonasr2").sendMessage("Entered Boss Entity hit loop."); + //Bukkit.getPlayer("sigonasr2").sendMessage("Entered Boss Entity hit loop."); Bukkit.getScheduler().scheduleSyncDelayedTask(this.plugin, new Runnable() { @Override public void run() { @@ -6543,6 +6507,15 @@ public ItemStack getGoodie() { } if (e.getEntity().getType()==EntityType.PLAYER) { final Player p = (Player)e.getEntity(); + List nearby = p.getNearbyEntities(10, 10, 10); + for (int i=0;i=20) { + //A support with the Lv20 buff is detected. If health is less than 8, take half damage. + if (p.getHealth()<=8) { + e.setDamage(e.getDamage()/2.0d); + } + } + } if (e.getDamager() instanceof LivingEntity) { final double player_starthp = p.getHealth(); final LivingEntity l = (LivingEntity)e.getDamager(); @@ -6558,6 +6531,9 @@ public ItemStack getGoodie() { } else { p.sendMessage(ChatColor.DARK_PURPLE+""+ChatColor.ITALIC+"Took "+df.format(player_starthp-p.getHealth())+" damage from "+ChatColor.WHITE+l.getType()+ChatColor.DARK_PURPLE+""+ChatColor.ITALIC+" (-"+df2.format(((player_starthp-p.getHealth())/p.getMaxHealth())*100)+"%)"); } + if (p.getHealth()<=0) { + FatalSurvivor(p); + } } },1); diff --git a/BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java b/BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java index 68a60f8..1c10484 100644 --- a/BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java +++ b/BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java @@ -7,7 +7,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import me.kaZep.Base.Dungeon; import me.kaZep.Base.Main; import net.milkbowl.vault.economy.Economy; @@ -1143,7 +1142,7 @@ public String convertToItemName(String val) { } } else if (cmd.getName().equalsIgnoreCase("dungeon") && p.hasPermission("maintenance-mode-admin") && args.length==1) { - Dungeon x = new Dungeon(new Location(Bukkit.getWorld("world"),-8990,0,-4),new Location(Bukkit.getWorld("world"),50,255,50),Integer.valueOf(args[0])); + //Dungeon x = new Dungeon(new Location(Bukkit.getWorld("world"),-8990,0,-4),new Location(Bukkit.getWorld("world"),50,255,50),Integer.valueOf(args[0])); } else if (cmd.getName().equalsIgnoreCase("transfer") && args.length==1) { p.sendMessage("Usage: "+ChatColor.RED+"/transfer name money"+ChatColor.WHITE+" - Transfer money to a player.");