public class JailPrisoner
extends java.lang.Object
Constructor and Description |
---|
JailPrisoner() |
JailPrisoner(java.lang.String Name,
int Remaintime,
java.lang.String Jail,
java.lang.String Cell,
java.lang.Boolean Offline,
java.lang.String TransferDest,
java.lang.String Reason,
java.lang.Boolean Muted,
java.lang.String Inventory,
java.lang.String Jailer,
java.lang.String Permissions) |
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
canGuardsBeSpawned() |
void |
delete()
Delete prisoner from the database.
|
int |
getAFKTime() |
double |
getAFKTimeMinutes() |
JailCell |
getCell() |
java.util.HashSet<Wolf> |
getGuards() |
java.lang.String |
getInventory() |
JailZone |
getJail() |
java.lang.String |
getJailer() |
java.lang.String |
getName() |
java.util.List<java.lang.String> |
getOldPermissions() |
java.lang.String |
getOldPermissionsString() |
Location |
getPreviousPosition() |
java.lang.String |
getReason() |
Location |
getReleaseTeleportLocation() |
int |
getRemainingTime() |
double |
getRemainingTimeMinutes() |
java.lang.String |
getRequestedCell() |
Location |
getTeleportLocation() |
java.lang.String |
getTransferDestination() |
java.lang.Boolean |
isBeingReleased() |
java.lang.Boolean |
isMuted() |
java.lang.Boolean |
offlinePending() |
java.lang.String |
parseTags(java.lang.String str)
Parse
|
void |
release()
Initiate release procedure.
|
void |
restoreInventory(Player player)
Restores items from inventory string to specified player.
|
void |
setAFKTime(int input)
Sets the time, for how much was prisoner AFK.
|
void |
setAFKTimeMinutes(double input)
Sets the time, for how much was prisoner AFK.
|
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 |
setGuardCanBeSpawned(java.lang.Boolean input) |
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 |
setOldPermissions(java.util.List<java.lang.String> permissions)
Sets list of permission groups that will be given to the player after he is released
|
void |
setOldPermissions(java.lang.String permissions)
Sets list of permission groups that will be given to the player after he is released
|
void |
setPreviousPosition(Location pos)
Sets position, where player was before he got jailed.
|
void |
setPreviousPosition(java.lang.String input)
Sets position, where player was before he got jailed.
|
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 |
setRequestedCell(java.lang.String input)
Sets the name of the cell where prisoner will be jailed.
|
void |
setTransferDestination(java.lang.String input)
Change destination jail zone, when this prisoner is waiting for transfer.
|
void |
spawnGuards(int num,
Location location,
Player player)
Spawn guard wolves to this prisoner to kill him
|
void |
storeInventory(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.String Cell, java.lang.Boolean Offline, java.lang.String TransferDest, java.lang.String Reason, java.lang.Boolean Muted, java.lang.String Inventory, java.lang.String Jailer, java.lang.String Permissions)
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 jailedCell
- Name of the cell inside jail zone that prisoner will be jailed in. Can be empty or null if you don't want to specify cell.Offline
- 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 java.lang.Boolean canGuardsBeSpawned()
public void delete()
public int getAFKTime()
public double getAFKTimeMinutes()
public JailCell getCell()
public java.util.HashSet<Wolf> getGuards()
public java.lang.String getInventory()
public JailZone getJail()
public java.lang.String getJailer()
public java.lang.String getName()
public java.util.List<java.lang.String> getOldPermissions()
public java.lang.String getOldPermissionsString()
public Location getPreviousPosition()
public java.lang.String getReason()
public Location getReleaseTeleportLocation()
public int getRemainingTime()
public double getRemainingTimeMinutes()
public java.lang.String getRequestedCell()
public Location getTeleportLocation()
public java.lang.String getTransferDestination()
public java.lang.Boolean isBeingReleased()
public java.lang.Boolean isMuted()
public java.lang.Boolean offlinePending()
public java.lang.String parseTags(java.lang.String str)
str
- input stringpublic void release()
public void restoreInventory(Player player)
player
- player that will receive itemspublic void setAFKTime(int input)
input
- new time in tens of seconds (1 means 10 seconds)public void setAFKTimeMinutes(double input)
time
- in minutespublic void SetBeingReleased(java.lang.Boolean input)
input
- protection statepublic void setCell(JailCell input)
input
- new cell that will belong to this prisoner.public void setGuardCanBeSpawned(java.lang.Boolean input)
input
- Set this to false to skip guard spawning for this player and teleport him instead.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 setOldPermissions(java.util.List<java.lang.String> permissions)
permissions
- List of com.platymuus.bukkit.permissions.Grouppublic void setOldPermissions(java.lang.String permissions)
permissions
- String in format "group,group2,group3"public void setPreviousPosition(Location pos)
public void setPreviousPosition(java.lang.String input)
input
- string in format "world,x,y,z"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 setRequestedCell(java.lang.String input)
input
- name of the cell.public void setTransferDestination(java.lang.String input)
input
- public void spawnGuards(int num, Location location, Player player)
num
- Number of guards to spawnlocation
- Spawning locationplayer
- Player, associated with this JailPrisonerpublic void storeInventory(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()