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:
@@ -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));
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user