Fix the spacing and clean it up.
This commit is contained in:
@ -22,104 +22,104 @@ import com.graywolf336.jail.beans.Stick;
|
||||
* @version 1.0.0
|
||||
*/
|
||||
public class PrePrisonerJailedByJailStickEvent extends Event implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancelled = false;
|
||||
private Jail jail;
|
||||
private Cell cell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
private String jailer, cancelMsg;
|
||||
private Stick stick;
|
||||
|
||||
/**
|
||||
* Creates a new {@link PrePrisonerJailedByJailStickEvent prisoner jailed by a jail stick event} for the given player before they get sent to jail.
|
||||
*
|
||||
* @param jail The jail the prisoner will be jailed at.
|
||||
* @param cell The cell we're going to be sending the prisoner to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
* @param jailer The name of what jailed this prisoner.
|
||||
* @param stick The {@link Stick jail stick} used.
|
||||
*/
|
||||
public PrePrisonerJailedByJailStickEvent(Jail jail, Cell cell, Prisoner prisoner, Player player, String jailer, Stick stick) {
|
||||
this.jail = jail;
|
||||
this.cell = cell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
this.jailer = jailer;
|
||||
this.stick = stick;
|
||||
this.cancelMsg = "";
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is being sent to. */
|
||||
public Jail getJail() {
|
||||
return this.jail;
|
||||
}
|
||||
|
||||
/** Gets the cell we're going to be sending the prisoner to. */
|
||||
public Cell getCell() {
|
||||
return this.cell;
|
||||
}
|
||||
|
||||
/** Sets the cell we're going to be sending the prisoner to. */
|
||||
public void setCell(Cell cell) {
|
||||
this.cell = cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being jailed. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
/** Gets the jailer who jailed this prisoner. */
|
||||
public String getJailer() {
|
||||
return this.jailer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets who jailed this prisoner.
|
||||
*
|
||||
* @param jailer The name to put who is the jailer for this prisoner.
|
||||
*/
|
||||
public void setJailer(String jailer) {
|
||||
this.jailer = jailer;
|
||||
}
|
||||
|
||||
/** Gets the jail stick used. */
|
||||
public Stick getJailStick() {
|
||||
return this.stick;
|
||||
}
|
||||
|
||||
/** Checks whether this event is cancelled or not. */
|
||||
public boolean isCancelled() {
|
||||
return this.cancelled;
|
||||
}
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancelled = false;
|
||||
private Jail jail;
|
||||
private Cell cell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
private String jailer, cancelMsg;
|
||||
private Stick stick;
|
||||
|
||||
/** Sets whether this event should be cancelled. */
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
/** Returns the cancelled message. */
|
||||
public String getCancelledMessage() {
|
||||
return this.cancelMsg;
|
||||
}
|
||||
|
||||
/** Sets the cancelled message. */
|
||||
public void setCancelledMessage(String msg) {
|
||||
this.cancelMsg = msg;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
/**
|
||||
* Creates a new {@link PrePrisonerJailedByJailStickEvent prisoner jailed by a jail stick event} for the given player before they get sent to jail.
|
||||
*
|
||||
* @param jail The jail the prisoner will be jailed at.
|
||||
* @param cell The cell we're going to be sending the prisoner to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
* @param jailer The name of what jailed this prisoner.
|
||||
* @param stick The {@link Stick jail stick} used.
|
||||
*/
|
||||
public PrePrisonerJailedByJailStickEvent(Jail jail, Cell cell, Prisoner prisoner, Player player, String jailer, Stick stick) {
|
||||
this.jail = jail;
|
||||
this.cell = cell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
this.jailer = jailer;
|
||||
this.stick = stick;
|
||||
this.cancelMsg = "";
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
/** Gets the {@link Jail} this prisoner is being sent to. */
|
||||
public Jail getJail() {
|
||||
return this.jail;
|
||||
}
|
||||
|
||||
/** Gets the cell we're going to be sending the prisoner to. */
|
||||
public Cell getCell() {
|
||||
return this.cell;
|
||||
}
|
||||
|
||||
/** Sets the cell we're going to be sending the prisoner to. */
|
||||
public void setCell(Cell cell) {
|
||||
this.cell = cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being jailed. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
/** Gets the jailer who jailed this prisoner. */
|
||||
public String getJailer() {
|
||||
return this.jailer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets who jailed this prisoner.
|
||||
*
|
||||
* @param jailer The name to put who is the jailer for this prisoner.
|
||||
*/
|
||||
public void setJailer(String jailer) {
|
||||
this.jailer = jailer;
|
||||
}
|
||||
|
||||
/** Gets the jail stick used. */
|
||||
public Stick getJailStick() {
|
||||
return this.stick;
|
||||
}
|
||||
|
||||
/** Checks whether this event is cancelled or not. */
|
||||
public boolean isCancelled() {
|
||||
return this.cancelled;
|
||||
}
|
||||
|
||||
/** Sets whether this event should be cancelled. */
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
/** Returns the cancelled message. */
|
||||
public String getCancelledMessage() {
|
||||
return this.cancelMsg;
|
||||
}
|
||||
|
||||
/** Sets the cancelled message. */
|
||||
public void setCancelledMessage(String msg) {
|
||||
this.cancelMsg = msg;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
|
@ -21,104 +21,104 @@ import com.graywolf336.jail.beans.Prisoner;
|
||||
* @version 1.0.0
|
||||
*/
|
||||
public class PrePrisonerJailedEvent extends Event implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancelled = false;
|
||||
private boolean online;
|
||||
private Jail jail;
|
||||
private Cell cell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
private String jailer, cancelMsg;
|
||||
|
||||
/**
|
||||
* Creates a new {@link PrePrisonerJailedEvent prisoner jailed event} for the given player before they get sent to jail.
|
||||
*
|
||||
* @param jail The jail the prisoner will be jailed at.
|
||||
* @param cell The cell we're going to be sending the prisoner to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
* @param online Whether the player is online or not.
|
||||
* @param jailer The name of what jailed this prisoner.
|
||||
*/
|
||||
public PrePrisonerJailedEvent(Jail jail, Cell cell, Prisoner prisoner, Player player, boolean online, String jailer) {
|
||||
this.jail = jail;
|
||||
this.cell = cell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
this.online = online;
|
||||
this.jailer = jailer;
|
||||
this.cancelMsg = "";
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is being sent to. */
|
||||
public Jail getJail() {
|
||||
return this.jail;
|
||||
}
|
||||
|
||||
/** Gets the cell we're going to be sending the prisoner to. */
|
||||
public Cell getCell() {
|
||||
return this.cell;
|
||||
}
|
||||
|
||||
/** Sets the cell we're going to be sending the prisoner to. */
|
||||
public void setCell(Cell cell) {
|
||||
this.cell = cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being jailed <strong>but will return null if {@link #isOnline()} returns false</strong>. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
/** Gets whether the prisoner being jailed is online or not. */
|
||||
public boolean isOnline() {
|
||||
return this.online;
|
||||
}
|
||||
|
||||
/** Gets the jailer who jailed this prisoner. */
|
||||
public String getJailer() {
|
||||
return this.jailer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets who jailed this prisoner.
|
||||
*
|
||||
* @param jailer The name to put who is the jailer for this prisoner.
|
||||
*/
|
||||
public void setJailer(String jailer) {
|
||||
this.jailer = jailer;
|
||||
}
|
||||
|
||||
/** Checks whether this event is cancelled or not. */
|
||||
public boolean isCancelled() {
|
||||
return this.cancelled;
|
||||
}
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancelled = false;
|
||||
private boolean online;
|
||||
private Jail jail;
|
||||
private Cell cell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
private String jailer, cancelMsg;
|
||||
|
||||
/** Sets whether this event should be cancelled. */
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
/** Returns the cancelled message. */
|
||||
public String getCancelledMessage() {
|
||||
return this.cancelMsg;
|
||||
}
|
||||
|
||||
/** Sets the cancelled message. */
|
||||
public void setCancelledMessage(String msg) {
|
||||
this.cancelMsg = msg;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
/**
|
||||
* Creates a new {@link PrePrisonerJailedEvent prisoner jailed event} for the given player before they get sent to jail.
|
||||
*
|
||||
* @param jail The jail the prisoner will be jailed at.
|
||||
* @param cell The cell we're going to be sending the prisoner to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
* @param online Whether the player is online or not.
|
||||
* @param jailer The name of what jailed this prisoner.
|
||||
*/
|
||||
public PrePrisonerJailedEvent(Jail jail, Cell cell, Prisoner prisoner, Player player, boolean online, String jailer) {
|
||||
this.jail = jail;
|
||||
this.cell = cell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
this.online = online;
|
||||
this.jailer = jailer;
|
||||
this.cancelMsg = "";
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
/** Gets the {@link Jail} this prisoner is being sent to. */
|
||||
public Jail getJail() {
|
||||
return this.jail;
|
||||
}
|
||||
|
||||
/** Gets the cell we're going to be sending the prisoner to. */
|
||||
public Cell getCell() {
|
||||
return this.cell;
|
||||
}
|
||||
|
||||
/** Sets the cell we're going to be sending the prisoner to. */
|
||||
public void setCell(Cell cell) {
|
||||
this.cell = cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being jailed <strong>but will return null if {@link #isOnline()} returns false</strong>. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
/** Gets whether the prisoner being jailed is online or not. */
|
||||
public boolean isOnline() {
|
||||
return this.online;
|
||||
}
|
||||
|
||||
/** Gets the jailer who jailed this prisoner. */
|
||||
public String getJailer() {
|
||||
return this.jailer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets who jailed this prisoner.
|
||||
*
|
||||
* @param jailer The name to put who is the jailer for this prisoner.
|
||||
*/
|
||||
public void setJailer(String jailer) {
|
||||
this.jailer = jailer;
|
||||
}
|
||||
|
||||
/** Checks whether this event is cancelled or not. */
|
||||
public boolean isCancelled() {
|
||||
return this.cancelled;
|
||||
}
|
||||
|
||||
/** Sets whether this event should be cancelled. */
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
/** Returns the cancelled message. */
|
||||
public String getCancelledMessage() {
|
||||
return this.cancelMsg;
|
||||
}
|
||||
|
||||
/** Sets the cancelled message. */
|
||||
public void setCancelledMessage(String msg) {
|
||||
this.cancelMsg = msg;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
|
@ -22,52 +22,52 @@ import com.graywolf336.jail.beans.Prisoner;
|
||||
* @version 1.0.0
|
||||
*/
|
||||
public class PrePrisonerReleasedEvent extends Event {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Jail jail;
|
||||
private Cell cell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
|
||||
/**
|
||||
* Creates a new {@link PrePrisonerReleasedEvent pre-prisoner released event} for the given player.
|
||||
*
|
||||
* @param jail The jail the prisoner will be jailed at.
|
||||
* @param cell The cell we're going to be sending the prisoner to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
*/
|
||||
public PrePrisonerReleasedEvent(Jail jail, Cell cell, Prisoner prisoner, Player player) {
|
||||
this.jail = jail;
|
||||
this.cell = cell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is coming from. */
|
||||
public Jail getJail() {
|
||||
return this.jail;
|
||||
}
|
||||
|
||||
/** Gets the cell where the prisoner was jailed in, null if they weren't in one. */
|
||||
public Cell getCell() {
|
||||
return this.cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being released. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Jail jail;
|
||||
private Cell cell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
/**
|
||||
* Creates a new {@link PrePrisonerReleasedEvent pre-prisoner released event} for the given player.
|
||||
*
|
||||
* @param jail The jail the prisoner will be jailed at.
|
||||
* @param cell The cell we're going to be sending the prisoner to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
*/
|
||||
public PrePrisonerReleasedEvent(Jail jail, Cell cell, Prisoner prisoner, Player player) {
|
||||
this.jail = jail;
|
||||
this.cell = cell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is coming from. */
|
||||
public Jail getJail() {
|
||||
return this.jail;
|
||||
}
|
||||
|
||||
/** Gets the cell where the prisoner was jailed in, null if they weren't in one. */
|
||||
public Cell getCell() {
|
||||
return this.cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being released. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
|
@ -21,132 +21,132 @@ import com.graywolf336.jail.beans.Prisoner;
|
||||
* @version 1.0.0
|
||||
*/
|
||||
public class PrePrisonerTransferredEvent extends Event implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancelled = false;
|
||||
private Jail originalJail, targetJail;
|
||||
private Cell originalCell, targetCell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
private String transferor, cancelMsg;
|
||||
|
||||
/**
|
||||
* Creates a new {@link PrePrisonerTransferredEvent prisoner transferred event} for the given player before they get transferred to their jail and cell.
|
||||
*
|
||||
* @param originalJail The jail the prisoner is coming from.
|
||||
* @param originalCell The cell the prisoner is coming from, can be null.
|
||||
* @param targetJail The jail the prisoner is going to.
|
||||
* @param targetCell The cell the prisoner is going to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
* @param transferor The name of what is transferring this prisoner.
|
||||
*/
|
||||
public PrePrisonerTransferredEvent(Jail originalJail, Cell originalCell, Jail targetJail, Cell targetCell, Prisoner prisoner, Player player, String transferor) {
|
||||
this.originalJail = originalJail;
|
||||
this.originalCell = originalCell;
|
||||
this.targetJail = targetJail;
|
||||
this.targetCell = targetCell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
this.transferor = transferor;
|
||||
this.cancelMsg = "";
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is coming from. */
|
||||
public Jail getOriginalJail() {
|
||||
return this.originalJail;
|
||||
}
|
||||
|
||||
/** Gets the {@link Cell} this prisoner is coming from, can be null. */
|
||||
public Cell getOriginalCell() {
|
||||
return this.originalCell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is being transferred to. */
|
||||
public Jail getTargetJail() {
|
||||
return this.targetJail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the target jail where this prisoner is being sent to.
|
||||
*
|
||||
* @param jail The {@link Jail} this prisoner should be sent to instead of what it was.
|
||||
*/
|
||||
public void setTargetJail(Jail jail) {
|
||||
this.targetJail = jail;
|
||||
}
|
||||
|
||||
/** Gets the {@link Cell} this prisoner is being sent to, can be null.
|
||||
*
|
||||
* Will return null if the cell is not in the targetJail.
|
||||
*/
|
||||
public Cell getTargetCell() {
|
||||
if(this.targetJail.isValidCell(this.targetCell.getName())) return this.targetCell;
|
||||
else return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the target {@link Cell} this prisoner is being sent to.
|
||||
*
|
||||
* @param cell The {@link Cell} this prisoner should be sent to instead of what it was.
|
||||
*/
|
||||
public void setTargetCell(Cell cell) {
|
||||
this.targetCell = cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being transferred <strong>but will return null if {@link #isOnline()} returns false</strong>. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
/** Gets whether the prisoner being transferred is online or not. */
|
||||
public boolean isOnline() {
|
||||
return player == null;
|
||||
}
|
||||
|
||||
/** Gets the name of what is transferring this prisoner. */
|
||||
public String getTransferor() {
|
||||
return this.transferor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the prisoner whom the data should say jailed this prisoner.
|
||||
*
|
||||
* @param transferor The name to put who is the jailer for this prisoner.
|
||||
*/
|
||||
public void setTransferor(String transferor) {
|
||||
this.transferor = transferor;
|
||||
}
|
||||
|
||||
/** Checks whether this event is cancelled or not. */
|
||||
public boolean isCancelled() {
|
||||
return this.cancelled;
|
||||
}
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancelled = false;
|
||||
private Jail originalJail, targetJail;
|
||||
private Cell originalCell, targetCell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
private String transferor, cancelMsg;
|
||||
|
||||
/** Sets whether this event should be cancelled. */
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
/** Returns the cancelled message. */
|
||||
public String getCancelledMessage() {
|
||||
return this.cancelMsg;
|
||||
}
|
||||
|
||||
/** Sets the cancelled message. */
|
||||
public void setCancelledMessage(String msg) {
|
||||
this.cancelMsg = msg;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
/**
|
||||
* Creates a new {@link PrePrisonerTransferredEvent prisoner transferred event} for the given player before they get transferred to their jail and cell.
|
||||
*
|
||||
* @param originalJail The jail the prisoner is coming from.
|
||||
* @param originalCell The cell the prisoner is coming from, can be null.
|
||||
* @param targetJail The jail the prisoner is going to.
|
||||
* @param targetCell The cell the prisoner is going to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
* @param transferor The name of what is transferring this prisoner.
|
||||
*/
|
||||
public PrePrisonerTransferredEvent(Jail originalJail, Cell originalCell, Jail targetJail, Cell targetCell, Prisoner prisoner, Player player, String transferor) {
|
||||
this.originalJail = originalJail;
|
||||
this.originalCell = originalCell;
|
||||
this.targetJail = targetJail;
|
||||
this.targetCell = targetCell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
this.transferor = transferor;
|
||||
this.cancelMsg = "";
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
/** Gets the {@link Jail} this prisoner is coming from. */
|
||||
public Jail getOriginalJail() {
|
||||
return this.originalJail;
|
||||
}
|
||||
|
||||
/** Gets the {@link Cell} this prisoner is coming from, can be null. */
|
||||
public Cell getOriginalCell() {
|
||||
return this.originalCell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is being transferred to. */
|
||||
public Jail getTargetJail() {
|
||||
return this.targetJail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the target jail where this prisoner is being sent to.
|
||||
*
|
||||
* @param jail The {@link Jail} this prisoner should be sent to instead of what it was.
|
||||
*/
|
||||
public void setTargetJail(Jail jail) {
|
||||
this.targetJail = jail;
|
||||
}
|
||||
|
||||
/** Gets the {@link Cell} this prisoner is being sent to, can be null.
|
||||
*
|
||||
* Will return null if the cell is not in the targetJail.
|
||||
*/
|
||||
public Cell getTargetCell() {
|
||||
if(this.targetJail.isValidCell(this.targetCell.getName())) return this.targetCell;
|
||||
else return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the target {@link Cell} this prisoner is being sent to.
|
||||
*
|
||||
* @param cell The {@link Cell} this prisoner should be sent to instead of what it was.
|
||||
*/
|
||||
public void setTargetCell(Cell cell) {
|
||||
this.targetCell = cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being transferred <strong>but will return null if {@link #isOnline()} returns false</strong>. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
/** Gets whether the prisoner being transferred is online or not. */
|
||||
public boolean isOnline() {
|
||||
return player == null;
|
||||
}
|
||||
|
||||
/** Gets the name of what is transferring this prisoner. */
|
||||
public String getTransferor() {
|
||||
return this.transferor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the prisoner whom the data should say jailed this prisoner.
|
||||
*
|
||||
* @param transferor The name to put who is the jailer for this prisoner.
|
||||
*/
|
||||
public void setTransferor(String transferor) {
|
||||
this.transferor = transferor;
|
||||
}
|
||||
|
||||
/** Checks whether this event is cancelled or not. */
|
||||
public boolean isCancelled() {
|
||||
return this.cancelled;
|
||||
}
|
||||
|
||||
/** Sets whether this event should be cancelled. */
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
/** Returns the cancelled message. */
|
||||
public String getCancelledMessage() {
|
||||
return this.cancelMsg;
|
||||
}
|
||||
|
||||
/** Sets the cancelled message. */
|
||||
public void setCancelledMessage(String msg) {
|
||||
this.cancelMsg = msg;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
|
@ -17,60 +17,60 @@ import com.graywolf336.jail.beans.Prisoner;
|
||||
* @version 1.0.0
|
||||
*/
|
||||
public class PrisonerDeathEvent extends Event {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private PlayerDeathEvent event;
|
||||
private Jail jail;
|
||||
private Cell cell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
|
||||
/**
|
||||
* Creates a new {@link PrisonerDeathEvent prisoner death event} for the given player.
|
||||
*
|
||||
* @param event The {@link PlayerDeathEvent} which triggered this event.
|
||||
* @param jail The jail the prisoner is in.
|
||||
* @param cell The cell the prisoner is in, can be null.
|
||||
* @param prisoner The prisoner's data.
|
||||
* @param player The player being jailed.
|
||||
*/
|
||||
public PrisonerDeathEvent(PlayerDeathEvent event, Jail jail, Cell cell, Prisoner prisoner, Player player) {
|
||||
this.event = event;
|
||||
this.jail = jail;
|
||||
this.cell = cell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/** Gets the {@link PlayerDeathEvent} which triggered this PrisonerDeathEvent. */
|
||||
public PlayerDeathEvent getPlayerDeathEvent() {
|
||||
return this.event;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is in. */
|
||||
public Jail getJail() {
|
||||
return this.jail;
|
||||
}
|
||||
|
||||
/** Gets the cell the prisoner is in, can be null. */
|
||||
public Cell getCell() {
|
||||
return this.cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner}'s data. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player who died. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private PlayerDeathEvent event;
|
||||
private Jail jail;
|
||||
private Cell cell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
/**
|
||||
* Creates a new {@link PrisonerDeathEvent prisoner death event} for the given player.
|
||||
*
|
||||
* @param event The {@link PlayerDeathEvent} which triggered this event.
|
||||
* @param jail The jail the prisoner is in.
|
||||
* @param cell The cell the prisoner is in, can be null.
|
||||
* @param prisoner The prisoner's data.
|
||||
* @param player The player being jailed.
|
||||
*/
|
||||
public PrisonerDeathEvent(PlayerDeathEvent event, Jail jail, Cell cell, Prisoner prisoner, Player player) {
|
||||
this.event = event;
|
||||
this.jail = jail;
|
||||
this.cell = cell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/** Gets the {@link PlayerDeathEvent} which triggered this PrisonerDeathEvent. */
|
||||
public PlayerDeathEvent getPlayerDeathEvent() {
|
||||
return this.event;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is in. */
|
||||
public Jail getJail() {
|
||||
return this.jail;
|
||||
}
|
||||
|
||||
/** Gets the cell the prisoner is in, can be null. */
|
||||
public Cell getCell() {
|
||||
return this.cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner}'s data. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player who died. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
|
@ -22,57 +22,57 @@ import com.graywolf336.jail.beans.Prisoner;
|
||||
* @version 1.0.0
|
||||
*/
|
||||
public class PrisonerJailedEvent extends Event {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Jail jail;
|
||||
private Cell cell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
|
||||
/**
|
||||
* Creates a new {@link PrisonerJailedEvent prisoner jailed event} for the given player.
|
||||
*
|
||||
* @param jail The jail the prisoner will be jailed at.
|
||||
* @param cell The cell we're going to be sending the prisoner to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
*/
|
||||
public PrisonerJailedEvent(Jail jail, Cell cell, Prisoner prisoner, Player player) {
|
||||
this.jail = jail;
|
||||
this.cell = cell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is being sent to. */
|
||||
public Jail getJail() {
|
||||
return this.jail;
|
||||
}
|
||||
|
||||
/** Gets the cell we're going to be sending the prisoner to, can be null. */
|
||||
public Cell getCell() {
|
||||
return this.cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being jailed. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
/** Gets the jailer who jailed this prisoner. */
|
||||
public String getJailer() {
|
||||
return this.prisoner.getJailer();
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Jail jail;
|
||||
private Cell cell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
/**
|
||||
* Creates a new {@link PrisonerJailedEvent prisoner jailed event} for the given player.
|
||||
*
|
||||
* @param jail The jail the prisoner will be jailed at.
|
||||
* @param cell The cell we're going to be sending the prisoner to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
*/
|
||||
public PrisonerJailedEvent(Jail jail, Cell cell, Prisoner prisoner, Player player) {
|
||||
this.jail = jail;
|
||||
this.cell = cell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is being sent to. */
|
||||
public Jail getJail() {
|
||||
return this.jail;
|
||||
}
|
||||
|
||||
/** Gets the cell we're going to be sending the prisoner to, can be null. */
|
||||
public Cell getCell() {
|
||||
return this.cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being jailed. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
/** Gets the jailer who jailed this prisoner. */
|
||||
public String getJailer() {
|
||||
return this.prisoner.getJailer();
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
|
@ -22,52 +22,52 @@ import com.graywolf336.jail.beans.Prisoner;
|
||||
* @version 1.0.0
|
||||
*/
|
||||
public class PrisonerReleasedEvent extends Event {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Jail jail;
|
||||
private Cell cell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
|
||||
/**
|
||||
* Creates a new {@link PrisonerReleasedEvent prisoner released event} for the given player.
|
||||
*
|
||||
* @param jail The jail the prisoner will be jailed at.
|
||||
* @param cell The cell we're going to be sending the prisoner to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
*/
|
||||
public PrisonerReleasedEvent(Jail jail, Cell cell, Prisoner prisoner, Player player) {
|
||||
this.jail = jail;
|
||||
this.cell = cell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is coming from. */
|
||||
public Jail getJail() {
|
||||
return this.jail;
|
||||
}
|
||||
|
||||
/** Gets the cell where the prisoner was jailed in, null if they weren't in one. */
|
||||
public Cell getCell() {
|
||||
return this.cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being released. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Jail jail;
|
||||
private Cell cell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
/**
|
||||
* Creates a new {@link PrisonerReleasedEvent prisoner released event} for the given player.
|
||||
*
|
||||
* @param jail The jail the prisoner will be jailed at.
|
||||
* @param cell The cell we're going to be sending the prisoner to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
*/
|
||||
public PrisonerReleasedEvent(Jail jail, Cell cell, Prisoner prisoner, Player player) {
|
||||
this.jail = jail;
|
||||
this.cell = cell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is coming from. */
|
||||
public Jail getJail() {
|
||||
return this.jail;
|
||||
}
|
||||
|
||||
/** Gets the cell where the prisoner was jailed in, null if they weren't in one. */
|
||||
public Cell getCell() {
|
||||
return this.cell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being released. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
|
@ -20,75 +20,75 @@ import com.graywolf336.jail.beans.Prisoner;
|
||||
* @version 1.0.0
|
||||
*/
|
||||
public class PrisonerTransferredEvent extends Event {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Jail originalJail, targetJail;
|
||||
private Cell originalCell, targetCell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
|
||||
/**
|
||||
* Creates a new {@link PrisonerTransferredEvent prisoner transferred event} for the given player after they get transferred to their new jail and cell.
|
||||
*
|
||||
* @param originalJail The jail the prisoner is coming from.
|
||||
* @param originalCell The cell the prisoner is coming from, can be null.
|
||||
* @param targetJail The jail the prisoner went to.
|
||||
* @param targetCell The cell the prisoner went to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
*/
|
||||
public PrisonerTransferredEvent(Jail originalJail, Cell originalCell, Jail targetJail, Cell targetCell, Prisoner prisoner, Player player) {
|
||||
this.originalJail = originalJail;
|
||||
this.originalCell = originalCell;
|
||||
this.targetJail = targetJail;
|
||||
this.targetCell = targetCell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is coming from. */
|
||||
public Jail getOriginalJail() {
|
||||
return this.originalJail;
|
||||
}
|
||||
|
||||
/** Gets the {@link Cell} this prisoner is coming from, can be null. */
|
||||
public Cell getOriginalCell() {
|
||||
return this.originalCell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is being transferred to. */
|
||||
public Jail getTargetJail() {
|
||||
return this.targetJail;
|
||||
}
|
||||
|
||||
/** Gets the {@link Cell} this prisoner is being sent to, can be null.
|
||||
*
|
||||
* Will return null if the cell is not in the targetJail.
|
||||
*/
|
||||
public Cell getTargetCell() {
|
||||
if(this.targetJail.isValidCell(this.targetCell.getName())) return this.targetCell;
|
||||
else return null;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being transferred <strong>but will return null if {@link #isOnline()} returns false</strong>. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
/** Gets whether the prisoner being transferred is online or not. */
|
||||
public boolean isOnline() {
|
||||
return player == null;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Jail originalJail, targetJail;
|
||||
private Cell originalCell, targetCell;
|
||||
private Prisoner prisoner;
|
||||
private Player player;
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
/**
|
||||
* Creates a new {@link PrisonerTransferredEvent prisoner transferred event} for the given player after they get transferred to their new jail and cell.
|
||||
*
|
||||
* @param originalJail The jail the prisoner is coming from.
|
||||
* @param originalCell The cell the prisoner is coming from, can be null.
|
||||
* @param targetJail The jail the prisoner went to.
|
||||
* @param targetCell The cell the prisoner went to, can be null.
|
||||
* @param prisoner The prisoner data.
|
||||
* @param player The player being jailed.
|
||||
*/
|
||||
public PrisonerTransferredEvent(Jail originalJail, Cell originalCell, Jail targetJail, Cell targetCell, Prisoner prisoner, Player player) {
|
||||
this.originalJail = originalJail;
|
||||
this.originalCell = originalCell;
|
||||
this.targetJail = targetJail;
|
||||
this.targetCell = targetCell;
|
||||
this.prisoner = prisoner;
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is coming from. */
|
||||
public Jail getOriginalJail() {
|
||||
return this.originalJail;
|
||||
}
|
||||
|
||||
/** Gets the {@link Cell} this prisoner is coming from, can be null. */
|
||||
public Cell getOriginalCell() {
|
||||
return this.originalCell;
|
||||
}
|
||||
|
||||
/** Gets the {@link Jail} this prisoner is being transferred to. */
|
||||
public Jail getTargetJail() {
|
||||
return this.targetJail;
|
||||
}
|
||||
|
||||
/** Gets the {@link Cell} this prisoner is being sent to, can be null.
|
||||
*
|
||||
* Will return null if the cell is not in the targetJail.
|
||||
*/
|
||||
public Cell getTargetCell() {
|
||||
if(this.targetJail.isValidCell(this.targetCell.getName())) return this.targetCell;
|
||||
else return null;
|
||||
}
|
||||
|
||||
/** Gets the {@link Prisoner} data for this prisoner. */
|
||||
public Prisoner getPrisoner() {
|
||||
return this.prisoner;
|
||||
}
|
||||
|
||||
/** Gets the instance of the player being transferred <strong>but will return null if {@link #isOnline()} returns false</strong>. */
|
||||
public Player getPlayer() {
|
||||
return this.player;
|
||||
}
|
||||
|
||||
/** Gets whether the prisoner being transferred is online or not. */
|
||||
public boolean isOnline() {
|
||||
return player == null;
|
||||
}
|
||||
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user