Fix Revive bug. Make boss healthbar less glitchy, hopefully fixing

random disconnecting as well. Fix issues with boss not spawning
immediately.
master_event
sigonasr2 11 years ago
parent c935896d60
commit b315a5a3eb
  1. 8
      BankEconomyMod/src/me/kaZep/Base/Main.java
  2. 5
      BankEconomyMod/src/me/kaZep/Base/PlayerListener.java
  3. 2
      BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java

@ -65,6 +65,7 @@ import org.bukkit.inventory.meta.SkullMeta;
import org.bukkit.map.MapRenderer;
import org.bukkit.map.MapView;
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.RegisteredServiceProvider;
@ -1293,9 +1294,10 @@ public void runTick() {
enderdragon.setMaxHealth(200);
enderdragon.setHealth(200);
enderdragon.setRemoveWhenFarAway(false);
enderdragon.remove();
//enderdragon.teleport(new Location(p.getWorld(),p.getLocation().getBlockX()+i,-250,p.getLocation().getBlockZ()+j));
//p.sendMessage(ChatColor.DARK_PURPLE+"You feel a dark presence nearby.");
Bukkit.getPlayer("sigonasr2").sendMessage("Trigger this.");
//Bukkit.getPlayer("sigonasr2").sendMessage("Trigger this.");
zombie.setRemoveWhenFarAway(false);
zombie.setMaxHealth(300);
zombie.setHealth(300);
@ -1304,7 +1306,7 @@ public void runTick() {
zombie.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE,999999,0));
zombie.addPotionEffect(new PotionEffect(PotionEffectType.WATER_BREATHING,999999,0));
zombie.setTicksLived(1);
Iterator<EnderDragon> e_list = Bukkit.getWorld("world").getEntitiesByClass(EnderDragon.class).iterator();
/*Iterator<EnderDragon> e_list = Bukkit.getWorld("world").getEntitiesByClass(EnderDragon.class).iterator();
boolean first=false;
while (e_list.hasNext()) {
//p.sendMessage("Moving Enderdragon to "+new Location(p.getWorld(),p.getLocation().getBlockX()+i,-50,p.getLocation().getBlockZ()+j));
@ -1314,7 +1316,7 @@ public void runTick() {
} else {
next.remove();
}
}
}*/
}
}
}

@ -2196,7 +2196,9 @@ implements Listener
}
}
} else {
return false;
if (l.getCustomName()!=null && !l.getCustomName().contains(ChatColor.DARK_PURPLE+"")) { //Make sure it's not a boss.
return false;
}
}
//If it's a super zombie, we're going to despawn it now.
}break;
@ -6919,6 +6921,7 @@ implements Listener
enderdragon.setHealth(Warning(l.getHealth()/l.getMaxHealth()*200,7));
enderdragon.setNoDamageTicks(999999);
enderdragon.setRemoveWhenFarAway(false);
enderdragon.remove();
}
Iterator<EnderDragon> e_list = Bukkit.getWorld("world").getEntitiesByClass(EnderDragon.class).iterator();
boolean first=false;

@ -1457,7 +1457,7 @@ public String convertToItemName(String val) {
double deathZ = this.plugin.getAccountsConfig().getDouble(p.getName() + ".deathpointZ");
String deathWorld = this.plugin.getAccountsConfig().getString(p.getName() + ".deathworld");
//p.sendMessage("Got 1.");
if (this.plugin.getAccountsConfig().getBoolean(p.getName() + ".revived")==false && p.getPlayerTime()-this.plugin.getAccountsConfig().getLong(p.getName() + ".revivetime")<12000) {
if (this.plugin.getAccountsConfig().getBoolean(p.getName() + ".revived")==false && this.plugin.SERVER_TICK_TIME-this.plugin.getAccountsConfig().getLong(p.getName() + ".revivetime")<12000) {
double mincost = this.plugin.getConfig().getDouble("revive-cost-rate");
//p.sendMessage("Got 2.");
if (p.getBedSpawnLocation()!=null) {

Loading…
Cancel
Save