From 38438e2eb8aecb11fc5db079ff10077a87a9ac17 Mon Sep 17 00:00:00 2001 From: graywolf336 Date: Tue, 21 Jan 2014 14:37:48 -0600 Subject: [PATCH] Change it so that offline pending is used always, then inside that we check the remaining time --- .../graywolf336/jail/listeners/PlayerListener.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/graywolf336/jail/listeners/PlayerListener.java b/src/main/java/com/graywolf336/jail/listeners/PlayerListener.java index ae525ac..0178c38 100644 --- a/src/main/java/com/graywolf336/jail/listeners/PlayerListener.java +++ b/src/main/java/com/graywolf336/jail/listeners/PlayerListener.java @@ -84,11 +84,13 @@ public class PlayerListener implements Listener { Prisoner p = pl.getJailManager().getJailPlayerIsIn(event.getPlayer().getName()).getPrisoner(event.getPlayer().getName()); //Check if they're offline pending, as if this is true then they were jailed offline if(p.isOfflinePending()) { - //Proceed with jailing the prisoner - pl.getPrisonerManager().jailPrisoner(event.getPlayer().getName()); - }else if(p.getRemainingTime() == 0L) { - //If their remaining time is 0, let's unjail them - pl.getPrisonerManager().releasePrisoner(event.getPlayer(), p); + if(p.getRemainingTime() == 0L) { + //If their remaining time is 0, let's unjail them + pl.getPrisonerManager().releasePrisoner(event.getPlayer(), p); + }else { + //Their remaining time isn't 0 so let's proceed with jailing of the prisoner + pl.getPrisonerManager().jailPrisoner(event.getPlayer().getName()); + } } //if we are ignoring a prisoner's sleeping state, then let's set that