Add more jail stick JavaDoc and fix the OBE from previous version of
jail sticks being used.
This commit is contained in:
parent
bfd786f650
commit
8b547ed748
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user