Skip to content

Commit

Permalink
Fixed death.kick.allow-reconnect not working.
Browse files Browse the repository at this point in the history
 - Players cannot login before the game;
 - Disconnected dead players resurrected cannot login.
  • Loading branch information
AmauryCarrade committed Jan 1, 2015
1 parent f9faa38 commit 34888d1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,11 @@ public void onServerListPing(ServerListPingEvent ev) {
*/
@EventHandler
public void onPlayerLogin(PlayerLoginEvent ev) {
if (this.p.getGameManager().isPlayerDead(ev.getPlayer()) && !this.p.getConfig().getBoolean("death.kick.allow-reconnect", true)) {
if (p.getGameManager().isGameStarted()
&& p.getGameManager().isPlayerDead(ev.getPlayer())
&& !p.getGameManager().isDeadPlayersToBeResurrected(ev.getPlayer())
&& !p.getConfig().getBoolean("death.kick.allow-reconnect", true)) {

ev.setResult(Result.KICK_OTHER);
ev.setKickMessage(i.t("death.banMessage"));
}
Expand Down

0 comments on commit 34888d1

Please sign in to comment.