public interface MethodInterface
Modifier and Type | Method and Description |
---|---|
boolean |
callChat(Object player)
(see implementation)
|
boolean |
callCMD(Object player,
String cmd)
(see implementation)
|
void |
callPunishmentEvent(Punishment punishment)
Call punishment event.
|
void |
callRevokePunishmentEvent(Punishment punishment,
boolean massClear)
Call revoke punishment event.
|
boolean |
contains(Object file,
String path)
Check whether file contains given path.
|
void |
createMySQLFile(File f)
Create default MySQL file.
|
void |
executeCommand(String cmd)
(see implementation)
|
Boolean |
getBoolean(Object file,
String path)
Get boolean at the given path from the given file.
|
boolean |
getBoolean(Object file,
String path,
boolean def)
Get boolean at the given path from the given file or default if not present.
|
Object |
getConfig()
Get the config.yml file
|
File |
getDataFolder()
Get the data folder for string punishments.
|
String |
getFileName(Object file)
Get file name.
|
String |
getFromUrlJson(String url,
String key)
Request JSON from the
url and extract the key |
Integer |
getInteger(Object file,
String path)
Get integer at the given path from the given file.
|
int |
getInteger(Object file,
String path,
int def)
Get integer at the given path from the given file or default if not present.
|
String |
getInternUUID(Object player)
Get a players uuid based on the intern uuid fetcher.
|
String |
getInternUUID(String player)
Get a players uuid based on the intern uuid fetcher.
|
String |
getIP(Object player)
Get a players ip.
|
String[] |
getKeys(Object file,
String path)
Get key from a config file at a
path . |
Object |
getLayouts()
Get the layouts.yml file
|
Long |
getLong(Object file,
String path)
Get long at the given path from the given file.
|
long |
getLong(Object file,
String path,
long def)
Get long at the given path from the given file or default if not present.
|
Object |
getMessages()
Get the messages.yml file
|
Object |
getMySQLFile()
Get MySQL.yml file.
|
String |
getName(Object player)
Get a players name.
|
String |
getName(String uuid)
Get a players name based on the intern uuid fetcher.
|
Object[] |
getOnlinePlayers()
Get online players.
|
Object |
getPlayer(String name)
Get online player by name.
|
Object |
getPlugin()
Get the plugin instance.
|
String |
getString(Object file,
String path)
Get string at the given path from the given file.
|
String |
getString(Object file,
String path,
String def)
Get string at the given path from the given file or default if not present.
|
List<String> |
getStringList(Object file,
String path)
Get string list at the given path from the given file.
|
String |
getVersion()
Get the advanced ban version.
|
boolean |
hasPerms(Object player,
String perms)
Check if player has the given permission.
|
boolean |
isOnline(String name)
Check whether player is online.
|
boolean |
isOnlineMode()
Check whether server is in online mode.
|
boolean |
isUnitTesting()
Whether this instance is used for unit testing.
|
void |
kickPlayer(String player,
String reason)
Kick a player.
|
void |
loadFiles()
Creates and load the different configuration files.
|
void |
loadMySQLFile(File f)
Load MySQL data from file.
|
void |
log(String msg)
Log a message.
|
void |
notify(String perm,
List<String> notification)
Broadcast a message to every user with the given permission.
|
String |
parseJSON(InputStreamReader json,
String key)
Parse json string and retrieve value at given key.
|
String |
parseJSON(String json,
String key)
Parse json string and retrieve value at given key.
|
void |
runAsync(Runnable rn)
Run async task.
|
void |
runSync(Runnable rn)
Run sync task.
|
void |
scheduleAsync(Runnable rn,
long l1)
Schedule async task.
|
void |
scheduleAsyncRep(Runnable rn,
long l1,
long l2)
Schedule async repeating task.
|
void |
sendMessage(Object player,
String msg)
Send a message to a specific player.
|
void |
setCommandExecutor(String cmd)
Register a command name to be handled by advancedban.
|
void |
setupMetrics()
Set up metrics.
|
void loadFiles()
String getFromUrlJson(String url, String key)
url
and extract the key
url
- the urlkey
- the keyString getVersion()
String[] getKeys(Object file, String path)
path
.file
- the filepath
- the pathObject getConfig()
Object getMessages()
Object getLayouts()
void setupMetrics()
Object getPlugin()
File getDataFolder()
void setCommandExecutor(String cmd)
cmd
- the cmdvoid sendMessage(Object player, String msg)
player
- the playermsg
- the msgString getName(Object player)
player
- the playerString getName(String uuid)
uuid
- the uuidString getInternUUID(Object player)
player
- the playerString getInternUUID(String player)
player
- the playerboolean hasPerms(Object player, String perms)
player
- the playerperms
- the permsboolean isOnline(String name)
name
- the nameObject getPlayer(String name)
name
- the namevoid kickPlayer(String player, String reason)
player
- the playerreason
- the reasonObject[] getOnlinePlayers()
void scheduleAsyncRep(Runnable rn, long l1, long l2)
rn
- the rnl1
- the l 1l2
- the l 2void scheduleAsync(Runnable rn, long l1)
rn
- the rnl1
- the l 1void runAsync(Runnable rn)
rn
- the rnvoid runSync(Runnable rn)
rn
- the rnvoid executeCommand(String cmd)
cmd
- the cmdboolean callChat(Object player)
player
- the playerboolean callCMD(Object player, String cmd)
player
- the playercmd
- the cmdvoid loadMySQLFile(File f)
f
- the fvoid createMySQLFile(File f)
f
- the fObject getMySQLFile()
String parseJSON(InputStreamReader json, String key)
json
- the jsonkey
- the keyString parseJSON(String json, String key)
json
- the jsonkey
- the keyBoolean getBoolean(Object file, String path)
file
- the filepath
- the pathString getString(Object file, String path)
file
- the filepath
- the pathLong getLong(Object file, String path)
file
- the filepath
- the pathInteger getInteger(Object file, String path)
file
- the filepath
- the pathList<String> getStringList(Object file, String path)
file
- the filepath
- the pathboolean getBoolean(Object file, String path, boolean def)
file
- the filepath
- the pathdef
- the defString getString(Object file, String path, String def)
file
- the filepath
- the pathdef
- the deflong getLong(Object file, String path, long def)
file
- the filepath
- the pathdef
- the defint getInteger(Object file, String path, int def)
file
- the filepath
- the pathdef
- the defboolean contains(Object file, String path)
file
- the filepath
- the pathString getFileName(Object file)
file
- the filevoid callPunishmentEvent(Punishment punishment)
punishment
- the punishmentvoid callRevokePunishmentEvent(Punishment punishment, boolean massClear)
punishment
- the punishmentmassClear
- the mass clearboolean isOnlineMode()
void notify(String perm, List<String> notification)
perm
- the permnotification
- the notificationvoid log(String msg)
msg
- the msgboolean isUnitTesting()
Copyright © 2020. All rights reserved.