Warnings added.
This commit is contained in:
parent
84e20c4f3f
commit
255c3c3ef4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -179,6 +179,13 @@ public class Main extends JavaPlugin
|
|||||||
|
|
||||||
String pluginPrefix = "§2[BankEconomy]";
|
String pluginPrefix = "§2[BankEconomy]";
|
||||||
|
|
||||||
|
public double Warning(double hp,int id) {
|
||||||
|
if (hp>65) {
|
||||||
|
Bukkit.broadcastMessage("Main: HP too high for ID "+id+". HP was "+hp);
|
||||||
|
}
|
||||||
|
return hp;
|
||||||
|
}
|
||||||
|
|
||||||
public void onEnable()
|
public void onEnable()
|
||||||
{
|
{
|
||||||
getServer().getPluginManager().registerEvents(this.pl, this);
|
getServer().getPluginManager().registerEvents(this.pl, this);
|
||||||
@ -1415,26 +1422,26 @@ public void runTick() {
|
|||||||
l.setCustomName(ChatColor.YELLOW+"Explosive Creeper");
|
l.setCustomName(ChatColor.YELLOW+"Explosive Creeper");
|
||||||
l.setCustomNameVisible(false);
|
l.setCustomNameVisible(false);
|
||||||
//l.setCustomNameVisible(true);
|
//l.setCustomNameVisible(true);
|
||||||
l.setMaxHealth(l.getMaxHealth()*1.25d);
|
l.setMaxHealth(Warning(l.getMaxHealth()*1.25d,1));
|
||||||
} else
|
} else
|
||||||
if (Math.random()<=0.15) {
|
if (Math.random()<=0.15) {
|
||||||
l.setCustomName(ChatColor.GOLD+"Explosive Creeper II");
|
l.setCustomName(ChatColor.GOLD+"Explosive Creeper II");
|
||||||
l.setCustomNameVisible(false);
|
l.setCustomNameVisible(false);
|
||||||
//l.setCustomNameVisible(true);
|
//l.setCustomNameVisible(true);
|
||||||
l.setMaxHealth(l.getMaxHealth()*1.75d);
|
l.setMaxHealth(Warning(l.getMaxHealth()*1.75d,2));
|
||||||
} else
|
} else
|
||||||
if (Math.random()<=0.35) {
|
if (Math.random()<=0.35) {
|
||||||
l.setCustomName(ChatColor.YELLOW+"Destructive Creeper");
|
l.setCustomName(ChatColor.YELLOW+"Destructive Creeper");
|
||||||
l.setCustomNameVisible(false);
|
l.setCustomNameVisible(false);
|
||||||
//l.setCustomNameVisible(true);
|
//l.setCustomNameVisible(true);
|
||||||
l.setMaxHealth(l.getMaxHealth()*1.25d);
|
l.setMaxHealth(Warning(l.getMaxHealth()*1.25d,3));
|
||||||
} else {
|
} else {
|
||||||
l.setCustomName(ChatColor.GOLD+"Destructive Creeper II");
|
l.setCustomName(ChatColor.GOLD+"Destructive Creeper II");
|
||||||
l.setCustomNameVisible(false);
|
l.setCustomNameVisible(false);
|
||||||
//l.setCustomNameVisible(true);
|
//l.setCustomNameVisible(true);
|
||||||
l.setMaxHealth(l.getMaxHealth()*1.75d);
|
l.setMaxHealth(Warning(l.getMaxHealth()*1.75d,4));
|
||||||
}
|
}
|
||||||
l.setHealth(l.getMaxHealth());
|
l.setHealth(Warning(l.getMaxHealth(),20));
|
||||||
}
|
}
|
||||||
l.setTicksLived(6400);
|
l.setTicksLived(6400);
|
||||||
}
|
}
|
||||||
@ -1447,26 +1454,26 @@ public void runTick() {
|
|||||||
l.setCustomName(ChatColor.YELLOW+"Venomous Spider");
|
l.setCustomName(ChatColor.YELLOW+"Venomous Spider");
|
||||||
l.setCustomNameVisible(false);
|
l.setCustomNameVisible(false);
|
||||||
//l.setCustomNameVisible(true);
|
//l.setCustomNameVisible(true);
|
||||||
l.setMaxHealth(l.getMaxHealth());
|
l.setMaxHealth(Warning(l.getMaxHealth(),5));
|
||||||
} else
|
} else
|
||||||
if (Math.random()<=0.15) {
|
if (Math.random()<=0.15) {
|
||||||
l.setCustomName(ChatColor.GOLD+"Venomous Spider II");
|
l.setCustomName(ChatColor.GOLD+"Venomous Spider II");
|
||||||
l.setCustomNameVisible(false);
|
l.setCustomNameVisible(false);
|
||||||
//l.setCustomNameVisible(true);
|
//l.setCustomNameVisible(true);
|
||||||
l.setMaxHealth(l.getMaxHealth()*1.5);
|
l.setMaxHealth(Warning(l.getMaxHealth()*1.5,6));
|
||||||
} else
|
} else
|
||||||
if (Math.random()<=0.35) {
|
if (Math.random()<=0.35) {
|
||||||
l.setCustomName(ChatColor.YELLOW+"Snaring Spider");
|
l.setCustomName(ChatColor.YELLOW+"Snaring Spider");
|
||||||
l.setCustomNameVisible(false);
|
l.setCustomNameVisible(false);
|
||||||
//l.setCustomNameVisible(true);
|
//l.setCustomNameVisible(true);
|
||||||
l.setMaxHealth(l.getMaxHealth()*1.5);
|
l.setMaxHealth(Warning(l.getMaxHealth()*1.5,7));
|
||||||
} else {
|
} else {
|
||||||
l.setCustomName(ChatColor.GOLD+"Snaring Spider II");
|
l.setCustomName(ChatColor.GOLD+"Snaring Spider II");
|
||||||
l.setCustomNameVisible(false);
|
l.setCustomNameVisible(false);
|
||||||
//l.setCustomNameVisible(true);
|
//l.setCustomNameVisible(true);
|
||||||
l.setMaxHealth(l.getMaxHealth()*2);
|
l.setMaxHealth(Warning(l.getMaxHealth()*2,8));
|
||||||
}
|
}
|
||||||
l.setHealth(l.getMaxHealth());
|
l.setHealth(Warning(l.getMaxHealth(),21));
|
||||||
}
|
}
|
||||||
l.setTicksLived(6400);
|
l.setTicksLived(6400);
|
||||||
}
|
}
|
||||||
@ -1479,14 +1486,14 @@ public void runTick() {
|
|||||||
l.setCustomName(ChatColor.YELLOW+"Sniper");
|
l.setCustomName(ChatColor.YELLOW+"Sniper");
|
||||||
l.setCustomNameVisible(false);
|
l.setCustomNameVisible(false);
|
||||||
//l.setCustomNameVisible(true);
|
//l.setCustomNameVisible(true);
|
||||||
l.setMaxHealth(l.getMaxHealth()/2);
|
l.setMaxHealth(Warning(l.getMaxHealth()/2,9));
|
||||||
} else {
|
} else {
|
||||||
l.setCustomName(ChatColor.GOLD+"Sniper II");
|
l.setCustomName(ChatColor.GOLD+"Sniper II");
|
||||||
l.setCustomNameVisible(false);
|
l.setCustomNameVisible(false);
|
||||||
//l.setCustomNameVisible(true);
|
//l.setCustomNameVisible(true);
|
||||||
l.setMaxHealth(l.getMaxHealth()/4);
|
l.setMaxHealth(Warning(l.getMaxHealth()/4,10));
|
||||||
}
|
}
|
||||||
l.setHealth(l.getMaxHealth());
|
l.setHealth(Warning(l.getMaxHealth(),11));
|
||||||
}
|
}
|
||||||
l.setTicksLived(6400);
|
l.setTicksLived(6400);
|
||||||
}
|
}
|
||||||
@ -1499,14 +1506,14 @@ public void runTick() {
|
|||||||
l.setCustomName(ChatColor.YELLOW+"Charge Zombie");
|
l.setCustomName(ChatColor.YELLOW+"Charge Zombie");
|
||||||
l.setCustomNameVisible(false);
|
l.setCustomNameVisible(false);
|
||||||
//l.setCustomNameVisible(true);
|
//l.setCustomNameVisible(true);
|
||||||
l.setMaxHealth(l.getMaxHealth()+5);
|
l.setMaxHealth(Warning(l.getMaxHealth()+5,12));
|
||||||
} else {
|
} else {
|
||||||
l.setCustomName(ChatColor.GOLD+"Charge Zombie II");
|
l.setCustomName(ChatColor.GOLD+"Charge Zombie II");
|
||||||
l.setCustomNameVisible(false);
|
l.setCustomNameVisible(false);
|
||||||
//l.setCustomNameVisible(true);
|
//l.setCustomNameVisible(true);
|
||||||
l.setMaxHealth(l.getMaxHealth()+20);
|
l.setMaxHealth(Warning(l.getMaxHealth()+20,13));
|
||||||
}
|
}
|
||||||
l.setHealth(l.getMaxHealth());
|
l.setHealth(Warning(l.getMaxHealth(),23));
|
||||||
} else {
|
} else {
|
||||||
if (Math.random()<=0.10+((heightmodifier-l.getLocation().getY())*0.01d)) {
|
if (Math.random()<=0.10+((heightmodifier-l.getLocation().getY())*0.01d)) {
|
||||||
if (Math.random()<=0.25) {
|
if (Math.random()<=0.25) {
|
||||||
@ -1522,8 +1529,8 @@ public void runTick() {
|
|||||||
l.getEquipment().setHelmet(new ItemStack(Material.AIR));
|
l.getEquipment().setHelmet(new ItemStack(Material.AIR));
|
||||||
Zombie g = (Zombie)l;
|
Zombie g = (Zombie)l;
|
||||||
g.setBaby(true);
|
g.setBaby(true);
|
||||||
l.setMaxHealth(l.getMaxHealth()*0.65d);
|
l.setMaxHealth(Warning(l.getMaxHealth()*0.65d,14));
|
||||||
l.setHealth(l.getMaxHealth());
|
l.setHealth(Warning(l.getMaxHealth(),15));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1859,7 +1859,7 @@ public class PlayerListener
|
|||||||
Entity newAnimal = world.spawnEntity(wolfloc, EntityType.WOLF);
|
Entity newAnimal = world.spawnEntity(wolfloc, EntityType.WOLF);
|
||||||
Wolf newdog = (Wolf)newAnimal;
|
Wolf newdog = (Wolf)newAnimal;
|
||||||
newdog.setOwner(p);
|
newdog.setOwner(p);
|
||||||
newdog.setHealth(oldhealth);
|
newdog.setHealth(Warning(oldhealth,21));
|
||||||
newdog.setSitting(true);
|
newdog.setSitting(true);
|
||||||
newdog.setCollarColor(dogcolor);
|
newdog.setCollarColor(dogcolor);
|
||||||
p.sendMessage(ChatColor.GREEN + "This dog is now happy!");
|
p.sendMessage(ChatColor.GREEN + "This dog is now happy!");
|
||||||
@ -1867,6 +1867,13 @@ public class PlayerListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double Warning(double hp,int id) {
|
||||||
|
if (hp>65) {
|
||||||
|
Bukkit.broadcastMessage("HP too high for ID "+id+". HP was "+hp);
|
||||||
|
}
|
||||||
|
return hp;
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBlockGrow(BlockGrowEvent e) {
|
public void onBlockGrow(BlockGrowEvent e) {
|
||||||
int x1,y1,z1,x2=0,y2=0,z2=0;
|
int x1,y1,z1,x2=0,y2=0,z2=0;
|
||||||
@ -1913,7 +1920,7 @@ public class PlayerListener
|
|||||||
if (entity instanceof Monster) {
|
if (entity instanceof Monster) {
|
||||||
LivingEntity test = (LivingEntity)entity;
|
LivingEntity test = (LivingEntity)entity;
|
||||||
test.setMaxHealth(10);
|
test.setMaxHealth(10);
|
||||||
test.setHealth(test.getMaxHealth());
|
test.setHealth(Warning(test.getMaxHealth(),1));
|
||||||
boolean block=false;
|
boolean block=false;
|
||||||
if (test.getCustomName()!=null && (test.getCustomName().contains(ChatColor.DARK_PURPLE+"") || test.getCustomName().contains(ChatColor.DARK_AQUA+"Polymorphed Creature"))) {
|
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++) {
|
for (int i=-2;i<3;i++) {
|
||||||
@ -1932,7 +1939,7 @@ public class PlayerListener
|
|||||||
if (test.getMaxHealth()>50) {
|
if (test.getMaxHealth()>50) {
|
||||||
Bukkit.getPlayer("sigonasr2").sendMessage("Mob had "+test.getMaxHealth()+" health. Lowering to max cap of 50.");
|
Bukkit.getPlayer("sigonasr2").sendMessage("Mob had "+test.getMaxHealth()+" health. Lowering to max cap of 50.");
|
||||||
test.setMaxHealth(50);
|
test.setMaxHealth(50);
|
||||||
test.setHealth(test.getMaxHealth());
|
test.setHealth(Warning(test.getMaxHealth(),2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<Entity> entities = Bukkit.getWorld("world").getEntities();
|
List<Entity> entities = Bukkit.getWorld("world").getEntities();
|
||||||
@ -1962,8 +1969,8 @@ public class PlayerListener
|
|||||||
boolean contains=entity instanceof Monster;
|
boolean contains=entity instanceof Monster;
|
||||||
if (contains) {
|
if (contains) {
|
||||||
Monster m = (Monster)entity;
|
Monster m = (Monster)entity;
|
||||||
m.setMaxHealth(m.getMaxHealth()*1.15d); //Increase all mobs' HP by 15%.
|
m.setMaxHealth(Warning(m.getMaxHealth()*1.15d,3)); //Increase all mobs' HP by 15%.
|
||||||
m.setHealth(m.getMaxHealth());
|
m.setHealth(Warning(m.getMaxHealth(),4));
|
||||||
}
|
}
|
||||||
//Mobs have more health when they are farther away, to make the mobs harder in general.
|
//Mobs have more health when they are farther away, to make the mobs harder in general.
|
||||||
float groupmult=0.25f; //Change this to modify the global grouping multiplier.
|
float groupmult=0.25f; //Change this to modify the global grouping multiplier.
|
||||||
@ -3053,8 +3060,8 @@ public class PlayerListener
|
|||||||
if (entity.getWorld().getName().compareTo("world_the_end")==0) {
|
if (entity.getWorld().getName().compareTo("world_the_end")==0) {
|
||||||
if (entity.getType()==EntityType.ENDER_DRAGON) {
|
if (entity.getType()==EntityType.ENDER_DRAGON) {
|
||||||
LivingEntity l = (LivingEntity)entity;
|
LivingEntity l = (LivingEntity)entity;
|
||||||
l.setMaxHealth(l.getMaxHealth()*4);
|
l.setMaxHealth(Warning(l.getMaxHealth()*4,5));
|
||||||
l.setHealth(l.getMaxHealth());
|
l.setHealth(Warning(l.getMaxHealth(),6));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (entity.getType()==EntityType.EXPERIENCE_ORB) {
|
if (entity.getType()==EntityType.EXPERIENCE_ORB) {
|
||||||
@ -6411,7 +6418,7 @@ public ItemStack getGoodie() {
|
|||||||
enderdragon.setCustomName(ChatColor.DARK_PURPLE+"Charge Zombie III");
|
enderdragon.setCustomName(ChatColor.DARK_PURPLE+"Charge Zombie III");
|
||||||
enderdragon.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE,127,999999));
|
enderdragon.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE,127,999999));
|
||||||
enderdragon.setMaxHealth(200);
|
enderdragon.setMaxHealth(200);
|
||||||
enderdragon.setHealth(l.getHealth()/l.getMaxHealth()*200);
|
enderdragon.setHealth(Warning(l.getHealth()/l.getMaxHealth()*200,7));
|
||||||
enderdragon.setNoDamageTicks(999999);
|
enderdragon.setNoDamageTicks(999999);
|
||||||
enderdragon.setRemoveWhenFarAway(false);
|
enderdragon.setRemoveWhenFarAway(false);
|
||||||
}
|
}
|
||||||
@ -6448,8 +6455,8 @@ public ItemStack getGoodie() {
|
|||||||
//This is a player.
|
//This is a player.
|
||||||
Player g = (Player)nearbylist.get(k);
|
Player g = (Player)nearbylist.get(k);
|
||||||
extramobs+=this.plugin.getJobTotalLvs(g)/20;
|
extramobs+=this.plugin.getJobTotalLvs(g)/20;
|
||||||
l.setMaxHealth(l.getMaxHealth()+this.plugin.getJobTotalLvs(g)+50);
|
l.setMaxHealth(Warning(l.getMaxHealth()+this.plugin.getJobTotalLvs(g)+50,8));
|
||||||
l.setHealth(l.getMaxHealth());
|
l.setHealth(Warning(l.getMaxHealth(),9));
|
||||||
////Bukkit.getLogger().info("Mob maxgroup increased to "+maxgroup+" down here.");
|
////Bukkit.getLogger().info("Mob maxgroup increased to "+maxgroup+" down here.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7258,7 +7265,7 @@ public ItemStack getGoodie() {
|
|||||||
//This means some piercing can be done.
|
//This means some piercing can be done.
|
||||||
//e.setDamage(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4));
|
//e.setDamage(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4));
|
||||||
if (f.getHealth()-(normaldmg+armor_pen)>0) {
|
if (f.getHealth()-(normaldmg+armor_pen)>0) {
|
||||||
f.setHealth(f.getHealth()-(normaldmg+armor_pen));
|
f.setHealth(Warning(f.getHealth()-(normaldmg+armor_pen),13));
|
||||||
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
||||||
if (f.getCustomName()!=null) {
|
if (f.getCustomName()!=null) {
|
||||||
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(Math.round(normaldmg+armor_pen)*10)/10+" damage to "+convertToItemName(f.getCustomName())+".");
|
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(Math.round(normaldmg+armor_pen)*10)/10+" damage to "+convertToItemName(f.getCustomName())+".");
|
||||||
@ -7272,7 +7279,7 @@ public ItemStack getGoodie() {
|
|||||||
} else {
|
} else {
|
||||||
//This means piercing would do extra damage. Just subtract throughdmg.
|
//This means piercing would do extra damage. Just subtract throughdmg.
|
||||||
if (f.getHealth()-throughdmg>0) {
|
if (f.getHealth()-throughdmg>0) {
|
||||||
f.setHealth(f.getHealth()-throughdmg);
|
f.setHealth(Warning(f.getHealth()-throughdmg,14));
|
||||||
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
||||||
if (f.getCustomName()!=null) {
|
if (f.getCustomName()!=null) {
|
||||||
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(Math.round(throughdmg)*10)/10+" damage to "+convertToItemName(f.getCustomName())+".");
|
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(Math.round(throughdmg)*10)/10+" damage to "+convertToItemName(f.getCustomName())+".");
|
||||||
@ -7295,7 +7302,7 @@ public ItemStack getGoodie() {
|
|||||||
//This means some piercing can be done.
|
//This means some piercing can be done.
|
||||||
//e.setDamage(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4));
|
//e.setDamage(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4));
|
||||||
if (f.getHealth()-(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4))>0) {
|
if (f.getHealth()-(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4))>0) {
|
||||||
f.setHealth(f.getHealth()-(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4)));
|
f.setHealth(Warning(f.getHealth()-(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4)),15));
|
||||||
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
||||||
if (f.getCustomName()!=null) {
|
if (f.getCustomName()!=null) {
|
||||||
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4))+" damage to "+convertToItemName(f.getCustomName())+".");
|
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4))+" damage to "+convertToItemName(f.getCustomName())+".");
|
||||||
@ -7309,7 +7316,7 @@ public ItemStack getGoodie() {
|
|||||||
} else {
|
} else {
|
||||||
//This means piercing would do extra damage. Just subtract throughdmg.
|
//This means piercing would do extra damage. Just subtract throughdmg.
|
||||||
if (f.getHealth()-throughdmg>0) {
|
if (f.getHealth()-throughdmg>0) {
|
||||||
f.setHealth(f.getHealth()-throughdmg);
|
f.setHealth(Warning(f.getHealth()-throughdmg,16));
|
||||||
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
||||||
if (f.getCustomName()!=null) {
|
if (f.getCustomName()!=null) {
|
||||||
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(Math.round(throughdmg)*10)/10+" damage to "+convertToItemName(f.getCustomName())+".");
|
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(Math.round(throughdmg)*10)/10+" damage to "+convertToItemName(f.getCustomName())+".");
|
||||||
@ -7456,7 +7463,7 @@ public ItemStack getGoodie() {
|
|||||||
//This means some piercing can be done.
|
//This means some piercing can be done.
|
||||||
//e.setDamage(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4));
|
//e.setDamage(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4));
|
||||||
if (f.getHealth()-(normaldmg+armor_pen)>0) {
|
if (f.getHealth()-(normaldmg+armor_pen)>0) {
|
||||||
f.setHealth(f.getHealth()-(normaldmg+armor_pen));
|
f.setHealth(Warning(f.getHealth()-(normaldmg+armor_pen),17));
|
||||||
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
||||||
if (f.getCustomName()!=null) {
|
if (f.getCustomName()!=null) {
|
||||||
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(Math.round(normaldmg+armor_pen)*10)/10+" damage to "+convertToItemName(f.getCustomName())+".");
|
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(Math.round(normaldmg+armor_pen)*10)/10+" damage to "+convertToItemName(f.getCustomName())+".");
|
||||||
@ -7470,7 +7477,7 @@ public ItemStack getGoodie() {
|
|||||||
} else {
|
} else {
|
||||||
//This means piercing would do extra damage. Just subtract throughdmg.
|
//This means piercing would do extra damage. Just subtract throughdmg.
|
||||||
if (f.getHealth()-throughdmg>0) {
|
if (f.getHealth()-throughdmg>0) {
|
||||||
f.setHealth(f.getHealth()-throughdmg);
|
f.setHealth(Warning(f.getHealth()-throughdmg,18));
|
||||||
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
||||||
if (f.getCustomName()!=null) {
|
if (f.getCustomName()!=null) {
|
||||||
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(Math.round(throughdmg)*10)/10+" damage to "+convertToItemName(f.getCustomName())+".");
|
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(Math.round(throughdmg)*10)/10+" damage to "+convertToItemName(f.getCustomName())+".");
|
||||||
@ -7492,7 +7499,7 @@ public ItemStack getGoodie() {
|
|||||||
//This means some piercing can be done.
|
//This means some piercing can be done.
|
||||||
//e.setDamage(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4));
|
//e.setDamage(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4));
|
||||||
if (f.getHealth()-(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4))>0) {
|
if (f.getHealth()-(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4))>0) {
|
||||||
f.setHealth(f.getHealth()-(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4)));
|
f.setHealth(Warning(f.getHealth()-(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4)),19));
|
||||||
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
||||||
if (f.getCustomName()!=null) {
|
if (f.getCustomName()!=null) {
|
||||||
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4))+" damage to "+convertToItemName(f.getCustomName())+".");
|
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(normaldmg+this.plugin.getStatBonus(4, this.plugin.getAccountsConfig().getInt(p.getName()+".stats.stat5")/4))+" damage to "+convertToItemName(f.getCustomName())+".");
|
||||||
@ -7506,7 +7513,7 @@ public ItemStack getGoodie() {
|
|||||||
} else {
|
} else {
|
||||||
//This means piercing would do extra damage. Just subtract throughdmg.
|
//This means piercing would do extra damage. Just subtract throughdmg.
|
||||||
if (f.getHealth()-throughdmg>0) {
|
if (f.getHealth()-throughdmg>0) {
|
||||||
f.setHealth(f.getHealth()-throughdmg);
|
f.setHealth(Warning(f.getHealth()-throughdmg,20));
|
||||||
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
if (this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify4")) {
|
||||||
if (f.getCustomName()!=null) {
|
if (f.getCustomName()!=null) {
|
||||||
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(Math.round(throughdmg)*10)/10+" damage to "+convertToItemName(f.getCustomName())+".");
|
//p.sendMessage(ChatColor.RED+""+ChatColor.ITALIC+" Dealt "+(Math.round(throughdmg)*10)/10+" damage to "+convertToItemName(f.getCustomName())+".");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user