public class GlowBanList extends JsonListFile implements org.bukkit.BanList
JsonListFile.BaseEntry
entries
Constructor and Description |
---|
GlowBanList(GlowServer server,
org.bukkit.BanList.Type type)
Creates a new BanList of the given type.
|
Modifier and Type | Method and Description |
---|---|
org.bukkit.BanEntry |
addBan(String target,
String reason,
Date expires,
String source) |
Set<org.bukkit.BanEntry> |
getBanEntries() |
org.bukkit.BanEntry |
getBanEntry(String target) |
boolean |
isBanned(String target) |
void |
load()
Reloads from the file.
|
void |
pardon(String target) |
protected JsonListFile.BaseEntry |
readEntry(Map<String,String> object)
Deserialize an entry from JSON format.
|
protected void |
save()
Saves to the file.
|
public GlowBanList(GlowServer server, org.bukkit.BanList.Type type)
server
- The server this BanList belongs to.type
- The type of BanList.public void load()
JsonListFile
load
in class JsonListFile
protected JsonListFile.BaseEntry readEntry(Map<String,String> object)
JsonListFile
readEntry
in class JsonListFile
object
- The JSON object to read from.protected void save()
JsonListFile
save
in class JsonListFile
public org.bukkit.BanEntry getBanEntry(String target)
getBanEntry
in interface org.bukkit.BanList
public org.bukkit.BanEntry addBan(String target, String reason, Date expires, String source)
addBan
in interface org.bukkit.BanList
public Set<org.bukkit.BanEntry> getBanEntries()
getBanEntries
in interface org.bukkit.BanList
public boolean isBanned(String target)
isBanned
in interface org.bukkit.BanList
public void pardon(String target)
pardon
in interface org.bukkit.BanList
Copyright © 2021. All rights reserved.