com.matejdro.bukkit.jail
public class JailAPI extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.util.Collection<JailPrisoner> |
getAllPrisoners()
Get prisoner data of all jailed prisoners on the server
|
java.util.Collection<JailZone> |
getAllZones()
Get jail zone data for all jail zones on the server.
|
JailZone |
getJailZone(java.lang.String name)
Get jail zone data for the specified jail zone
|
JailZone |
getNearestJailZone(org.bukkit.Location loc)
Get nearest jail zone to specific location
|
JailPrisoner |
getPrisoner(java.lang.String name)
Get prisoner data for the specific player
|
void |
InsertJailZone(JailZone zone)
Insert new jail zone into jail system.
|
java.lang.Boolean |
isPlayerJailed(java.lang.String playerName)
Check if is specified player jailed
|
void |
jailPlayer(java.lang.String playerName,
int time,
java.lang.String jailName,
java.lang.String reason)
Jail specified player
|
public JailAPI(Jail instance)
public java.util.Collection<JailPrisoner> getAllPrisoners()
public java.util.Collection<JailZone> getAllZones()
public JailZone getJailZone(java.lang.String name)
name
- name of the jail zone you want to get data for.public JailZone getNearestJailZone(org.bukkit.Location loc)
loc
- Location you want to check against zonespublic JailPrisoner getPrisoner(java.lang.String name)
name
- name of the player that you want to get data for.public void InsertJailZone(JailZone zone)
zone
- new zone you want to insert into jail system.public java.lang.Boolean isPlayerJailed(java.lang.String playerName)
playerName
- name of the player you want to checkpublic void jailPlayer(java.lang.String playerName, int time, java.lang.String jailName, java.lang.String reason)
playerName
- Name of the player you want to jailtime
- Jail time in minutesjailName
- Name of the jail, where prisoner will be jailed. Use null to let plugin select nearest jail.reason
- Reason for jailing. Use null if you don't want to specify reason.