Fix issues with Boss causing disconnects.
This commit is contained in:
parent
575780c200
commit
d92a25ab33
@ -1261,10 +1261,6 @@ public void runTick() {
|
||||
//ev.setTicksLived(0);
|
||||
exists=true;
|
||||
}
|
||||
} else {
|
||||
if (Math.random()<=0.5) {
|
||||
ev.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1289,11 +1285,10 @@ public void runTick() {
|
||||
meta.setOwner("MHF_Enderman");
|
||||
skull.setItemMeta(meta);
|
||||
zombie.getEquipment().setHelmet(skull);
|
||||
|
||||
enderdragon.setCustomName(ChatColor.DARK_PURPLE+"Charge Zombie III");
|
||||
enderdragon.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE,127,999999));
|
||||
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.");
|
||||
@ -2863,28 +2858,6 @@ public void checkJukeboxes() {
|
||||
z4.setTarget(list[i]);
|
||||
}*/
|
||||
}
|
||||
if (list[i].getWorld().getName().compareTo("world_the_end")==0) {
|
||||
List<Entity> ents = Bukkit.getWorld("world_the_end").getEntities();
|
||||
int enderdragoncount=0;
|
||||
for (int j=0;j<ents.size();j++) {
|
||||
if (ents.get(j).getType()==EntityType.ENDER_DRAGON) {
|
||||
if (enderdragoncount==0) {
|
||||
enderdragoncount=1;
|
||||
} else {
|
||||
ents.get(j).remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (list[i].getWorld().getName().compareTo("world")==0) {
|
||||
List<Entity> ents = Bukkit.getWorld("world").getEntities();
|
||||
int enderdragoncount=0;
|
||||
for (int j=0;j<ents.size();j++) {
|
||||
if (ents.get(j).getType()==EntityType.ENDER_DRAGON) {
|
||||
ents.get(j).remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Kind of an out-of-date way to spawn things. Don't need anymore.
|
||||
//Find out how much a player is worth.
|
||||
if (list[i].getWorld().getName().compareTo("world")==0 && list[i].getLocation().getY()<=50) {
|
||||
|
||||
@ -2219,7 +2219,8 @@ implements Listener
|
||||
//Special reasons that should always happen.
|
||||
if (e.getSpawnReason()==SpawnReason.SPAWNER || e.getSpawnReason()==SpawnReason.BUILD_IRONGOLEM || e.getSpawnReason()==SpawnReason.BREEDING ||
|
||||
e.getSpawnReason()==SpawnReason.BUILD_SNOWMAN || e.getSpawnReason()==SpawnReason.BUILD_WITHER || e.getSpawnReason()==SpawnReason.LIGHTNING ||
|
||||
e.getSpawnReason()==SpawnReason.SPAWNER_EGG || e.getSpawnReason()==SpawnReason.VILLAGE_DEFENSE || e.getSpawnReason()==SpawnReason.VILLAGE_INVASION) {
|
||||
e.getSpawnReason()==SpawnReason.SPAWNER_EGG || e.getSpawnReason()==SpawnReason.VILLAGE_DEFENSE || e.getSpawnReason()==SpawnReason.VILLAGE_INVASION ||
|
||||
e.getSpawnReason()==SpawnReason.CUSTOM) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -6635,9 +6636,16 @@ implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
final public void FatalSurvivor(Player p) {
|
||||
final public void FatalSurvivor(final Player p) {
|
||||
p.setHealth(p.getMaxHealth());
|
||||
p.setMaximumNoDamageTicks(100);
|
||||
p.setNoDamageTicks(100);
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(this.plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() { //After 5 seconds, set the no Damage Ticks back to normal.
|
||||
p.setMaximumNoDamageTicks(20);
|
||||
}
|
||||
},100);
|
||||
p.sendMessage("You used your "+ChatColor.YELLOW+"Lv10 Fatal Survivor"+ChatColor.WHITE+" buff. Your health has been restored."+ChatColor.AQUA+" It will be recharged in one hour.");
|
||||
Bukkit.broadcastMessage(ChatColor.YELLOW+p.getName()+ChatColor.WHITE+" has died...and revived through sheer willpower!");
|
||||
p.setFireTicks(0);
|
||||
@ -6703,7 +6711,6 @@ implements Listener
|
||||
}
|
||||
}
|
||||
}
|
||||
//e.getCause()==DamageCause.
|
||||
final double player_starthp = p.getHealth();
|
||||
if (p.getNoDamageTicks()<p.getMaximumNoDamageTicks()/2.0f && this.plugin.getAccountsConfig().getBoolean(p.getName()+".settings.notify5") && e.getCause()!=DamageCause.ENTITY_ATTACK && e.getCause()!=DamageCause.ENTITY_EXPLOSION && e.getDamage()!=0) {
|
||||
final Main plugin = this.plugin;
|
||||
@ -6915,11 +6922,7 @@ implements Listener
|
||||
if (l.getHealth()>=1) {
|
||||
LivingEntity enderdragon = (LivingEntity)Bukkit.getWorld("world").spawnEntity(new Location(l.getWorld(),l.getLocation().getBlockX(),-250,l.getLocation().getBlockZ()),EntityType.ENDER_DRAGON);
|
||||
enderdragon.setCustomName(ChatColor.DARK_PURPLE+"Charge Zombie III");
|
||||
enderdragon.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE,127,999999));
|
||||
enderdragon.setMaxHealth(200);
|
||||
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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user