Add more jail stick JavaDoc and fix the OBE from previous version of

jail sticks being used.
This commit is contained in:
graywolf336 2014-07-21 18:27:40 -05:00
parent bfd786f650
commit 8b547ed748
2 changed files with 11 additions and 1 deletions

View File

@ -65,8 +65,11 @@ public class JailStickManager {
continue;
}
double health = -1;
if(a.length > 5) health = Double.valueOf(a[4]);
try {
this.sticks.put(m, new Stick(jail, a[3], time, Double.valueOf(a[4])));
this.sticks.put(m, new Stick(jail, a[3], time, health));
}catch (Exception e) {
e.printStackTrace();
pl.getLogger().severe(s);

View File

@ -13,6 +13,13 @@ public class Stick {
private long time;
private double health;
/**
*
* @param jail the player will be jailed in.
* @param reason the player will be jailed for.
* @param time the player will be jailed for.
* @param health a player must have, at the least, before being able to be jailed with this stick, -1 disables this feature
*/
public Stick(String jail, String reason, long time, double health) {
this.jail = jail;
this.reason = reason;