Fix not being able to remove a prison, fixes #86

The expired message was never being sent also double the time they have
to confirm anything before it expires. If you're still having problems,
toggle debug to on and then go from there.
This commit is contained in:
graywolf336 2015-07-29 11:05:05 -05:00
parent 0704ed5ce7
commit 052e124386
3 changed files with 3 additions and 11 deletions

View File

@ -678,16 +678,7 @@ public class JailManager {
/** Checks if the given name is confirming something. */
public boolean isConfirming(String name) {
if(this.confirms.containsKey(name)) {
if(this.confirmingHasExpired(name)) {
getPlugin().debug("Removing " + name + "'s confirmation as it expired.");
this.removeConfirming(name);
}
return this.confirms.containsKey(name);
}else {
return false;
}
return this.confirms.containsKey(name);
}
/** Returns true if the confirmation has expired, false if it is still valid. */

View File

@ -19,7 +19,7 @@ public class ConfirmPlayer {
this.name = name;
this.args = args;
this.confirm = confirm;
this.expires = System.currentTimeMillis() + 5000L;
this.expires = System.currentTimeMillis() + 10000L;
}
/** Returns the name of the thing needing to confirm. */

View File

@ -26,6 +26,7 @@ public class JailConfirmCommand implements Command{
if(jm.confirmingHasExpired(sender.getName())) {
//Their confirmation time frame has closed
sender.sendMessage(Lang.EXPIRED.get());
jm.removeConfirming(sender.getName());
}else {
switch(jm.getWhatIsConfirming(sender.getName())) {
case CLEAR: