com.matejdro.bukkit.jail
public class JailPrisoner extends java.lang.Object
Constructor and Description |
---|
JailPrisoner() |
JailPrisoner(java.lang.String Name,
int Remaintime,
java.lang.String Jail,
java.lang.Boolean Offline,
java.lang.String TransferDest,
java.lang.String Reason,
java.lang.Boolean Muted,
java.lang.String Inventory,
java.lang.String Jailer) |
Modifier and Type | Method and Description |
---|---|
JailCell |
getCell() |
java.lang.String |
getInventory() |
JailZone |
getJail() |
java.lang.String |
getJailer() |
java.lang.String |
getName() |
java.lang.String |
getReason() |
int |
getRemainingTime() |
double |
getRemainingTimeMinutes() |
org.bukkit.Location |
getTeleportLocation() |
java.lang.String |
getTransferDestination() |
java.lang.Boolean |
isBeingReleased() |
java.lang.Boolean |
isMuted() |
java.lang.Boolean |
offlinePending() |
void |
release()
Initiate release procedure.
|
void |
restoreInventory(org.bukkit.entity.Player player)
Restores items from inventory string to specified player.
|
void |
SetBeingReleased(java.lang.Boolean input)
This option turns off movement protections when active.
|
void |
setCell(JailCell input)
Sets cell that belongs to this prisoner.
|
void |
setInventory(java.lang.String input)
Sets the inventory string of this prisoner.
|
void |
setJail(JailZone input)
Change jail zone, where this prisoner is jailed.
|
void |
setJail(java.lang.String jailname)
Change jail zone, where this prisoner is jailed.
|
void |
setJailer(java.lang.String input)
Sets name of the person who jailed this prisoner
|
void |
setMuted(java.lang.Boolean input)
This will mute prisoner, preventing him to speak inside jail.
|
void |
setOfflinePending(java.lang.Boolean input)
When this is enabled, events will trigger when prisoner logs in, thus making things such as offline (un)jailing or transfering possible.
|
void |
setReason(java.lang.String input)
Sets reason for jailing this prisoner
|
void |
setRemainingTime(int input)
Sets the remaining jail time of this prisoner
|
void |
setRemainingTimeMinutes(double input)
Sets the remaining jail time of this prisoner
|
void |
setTransferDestination(java.lang.String input)
Change destination jail zone, when this prisoner is waiting for transfer.
|
void |
storeInventory(org.bukkit.inventory.Inventory playerinv)
Converts specified inventory into inventory string and stores it.
|
void |
transfer()
Transfer prisoner to next nearest jail.
|
void |
transfer(java.lang.String targetjail)
Transfer prisoner to specified jail.
|
void |
update()
Update data of this prisoner into database.
|
void |
updateSign()
Update text of the sign that belongs to prisoner's cell if he have one.
|
public JailPrisoner()
public JailPrisoner(java.lang.String Name, int Remaintime, java.lang.String Jail, java.lang.Boolean Offline, java.lang.String TransferDest, java.lang.String Reason, java.lang.Boolean Muted, java.lang.String Inventory, java.lang.String Jailer)
Name
- Name of this prisoner (player name)Remaintime
- Jail time of this prisoner in tens of seconds (1 means 10 seconds)Jail
- Name of the jail zone, where this prisoner will be jailedOffline
- Is this prisoner scheduled for any actions such as jailing or transfering when he logs in.TransferDest
- If this prisoner is waiting for transfer, this contains name of the destination jail zoneReason
- Reason for jailing this prisonerMuted
- Should this prisoner be muted (not allowed to chat) in jail?Inventory
- Inventory string for this prisonerJailer
- Who jailed this prisonerpublic JailCell getCell()
public java.lang.String getInventory()
public JailZone getJail()
public java.lang.String getJailer()
public java.lang.String getName()
public java.lang.String getReason()
public int getRemainingTime()
public double getRemainingTimeMinutes()
public org.bukkit.Location getTeleportLocation()
public java.lang.String getTransferDestination()
public java.lang.Boolean isBeingReleased()
public java.lang.Boolean isMuted()
public java.lang.Boolean offlinePending()
public void release()
public void restoreInventory(org.bukkit.entity.Player player)
player
- player that will receive itemspublic void SetBeingReleased(java.lang.Boolean input)
input
- protection statepublic void setCell(JailCell input)
input
- new cell that will belong to this prisoner.public void setInventory(java.lang.String input)
input
- New inventory string. Format is: id,amount,durability,data;public void setJail(JailZone input)
input
- new jail zonepublic void setJail(java.lang.String jailname)
jailname
- name of the new jail zonepublic void setJailer(java.lang.String input)
input
- namepublic void setMuted(java.lang.Boolean input)
input
- new mute state. True = muted, False = can speak.public void setOfflinePending(java.lang.Boolean input)
input
- should events be triggered on next log in?public void setReason(java.lang.String input)
input
- new reasonpublic void setRemainingTime(int input)
input
- new remaining time in tens of seconds (1 means 10 seconds)public void setRemainingTimeMinutes(double input)
input
- remaining jail time in minutespublic void setTransferDestination(java.lang.String input)
input
- public void storeInventory(org.bukkit.inventory.Inventory playerinv)
playerinv
- inventory that will be storedpublic void transfer()
public void transfer(java.lang.String targetjail)
targetjail
- Name of the destination jail zonepublic void update()
public void updateSign()