Drop support for auto-respawn.

This commit removes the `auto-respawn` arena setting and the logic associated with it.

MobArena's hacky implementation of auto-respawning is buggy and discouraged. To get true auto-respawn functionality we'd have to move to the Spigot API instead of the Bukkit API.
This commit is contained in:
Andreas Troelsen
2019-08-05 16:00:01 +02:00
parent bbd70d0692
commit cb8983b162
3 changed files with 2 additions and 16 deletions
@@ -829,17 +829,7 @@ public class ArenaImpl implements Arena
clearInv(p);
}
if (!settings.getBoolean("auto-respawn", true)) {
deadPlayers.add(p);
endArena();
return;
}
double full = p.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue();
p.setHealth(full);
plugin.getServer().getScheduler()
.scheduleSyncDelayedTask(plugin, () -> revivePlayer(p));
deadPlayers.add(p);
endArena();
}
@@ -863,10 +853,6 @@ public class ArenaImpl implements Arena
@Override
public void playerRespawn(Player p) {
if (settings.getBoolean("auto-respawn", true)) {
return;
}
deadPlayers.remove(p);
plugin.getServer().getScheduler()
.scheduleSyncDelayedTask(plugin, () -> revivePlayer(p));
-1
View File
@@ -15,7 +15,6 @@ pvp-enabled: false
monster-infight: false
allow-teleporting: false
spectate-on-death: true
auto-respawn: true
share-items-in-arena: true
min-players: 0
max-players: 0