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:
parent
0704ed5ce7
commit
052e124386
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns true if the confirmation has expired, false if it is still valid. */
|
||||
|
@ -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. */
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user