Let's start work on saving of the cells.
This commit is contained in:
@ -1,32 +1,65 @@
|
||||
package com.graywolf336.jail.beans;
|
||||
|
||||
/**
|
||||
* Represents a Prisoner, player who is jailed, and contains all the information about him/her.
|
||||
*
|
||||
* @author graywolf336
|
||||
* @since 2.x.x
|
||||
* @version 2.0.0
|
||||
*/
|
||||
public class Prisoner {
|
||||
private String name;
|
||||
private boolean muted;
|
||||
|
||||
/**
|
||||
* Creates a new prisoner with a name and whether they are muted or not.
|
||||
*
|
||||
* @param name
|
||||
* @param muted
|
||||
*/
|
||||
public Prisoner(String name, boolean muted) {
|
||||
this.name = name;
|
||||
this.muted = muted;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public boolean isMuted() {
|
||||
return this.muted;
|
||||
}
|
||||
}
|
||||
package com.graywolf336.jail.beans;
|
||||
|
||||
/**
|
||||
* Represents a Prisoner, player who is jailed, and contains all the information about him/her.
|
||||
*
|
||||
* @author graywolf336
|
||||
* @since 2.x.x
|
||||
* @version 2.0.1
|
||||
*/
|
||||
public class Prisoner {
|
||||
private String name;
|
||||
private boolean muted;
|
||||
private long time;
|
||||
|
||||
/**
|
||||
* Creates a new prisoner with a name and whether they are muted or not.
|
||||
*
|
||||
* @param name The name of the prisoner
|
||||
* @param muted Whether the prisoner is muted or not
|
||||
* @param time The amount of remaining time the prisoner has
|
||||
*/
|
||||
public Prisoner(String name, boolean muted, long time) {
|
||||
this.name = name;
|
||||
this.muted = muted;
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
/** Gets the name of this player. */
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
/** Gets whether the prisoner is muted or not. */
|
||||
public boolean isMuted() {
|
||||
return this.muted;
|
||||
}
|
||||
|
||||
/** Sets whether the prisoner is muted or not. */
|
||||
public void setMuted(boolean muted) {
|
||||
this.muted = muted;
|
||||
}
|
||||
|
||||
/** Gets the remaining time the prisoner has.
|
||||
*
|
||||
* <p />
|
||||
*
|
||||
* <strong>WARNING:</strong> The time system hasn't been implemented so this is likely to change.
|
||||
*/
|
||||
public long getRemainingTime() {
|
||||
return this.time;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the remaining time the prisoner has left.
|
||||
*
|
||||
* <p />
|
||||
*
|
||||
* <strong>WARNING:</strong> The time system hasn't been implemented so this is likely to change.
|
||||
*
|
||||
* @param time The amount of time left, in milliseconds.
|
||||
*/
|
||||
public void setRemainingTime(long time) {
|
||||
this.time = time;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user