public class BungeeMethods extends Object implements MethodInterface
| Constructor and Description |
|---|
BungeeMethods() |
| 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 file)
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.
|
net.md_5.bungee.config.Configuration |
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. |
net.md_5.bungee.config.Configuration |
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.
|
net.md_5.bungee.config.Configuration |
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.
|
ProxiedPlayer[] |
getOnlinePlayers()
Get online players.
|
ProxiedPlayer |
getPlayer(String name)
Get online player by name.
|
Plugin |
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 file)
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.
|
public void loadFiles()
MethodInterfaceloadFiles in interface MethodInterfacepublic String getFromUrlJson(String url, String key)
MethodInterfaceurl and extract the keygetFromUrlJson in interface MethodInterfaceurl - the urlkey - the keypublic String getVersion()
MethodInterfacegetVersion in interface MethodInterfacepublic String[] getKeys(Object file, String path)
MethodInterfacepath.getKeys in interface MethodInterfacefile - the filepath - the pathpublic net.md_5.bungee.config.Configuration getConfig()
MethodInterfacegetConfig in interface MethodInterfacepublic net.md_5.bungee.config.Configuration getMessages()
MethodInterfacegetMessages in interface MethodInterfacepublic net.md_5.bungee.config.Configuration getLayouts()
MethodInterfacegetLayouts in interface MethodInterfacepublic void setupMetrics()
MethodInterfacesetupMetrics in interface MethodInterfacepublic Plugin getPlugin()
MethodInterfacegetPlugin in interface MethodInterfacepublic File getDataFolder()
MethodInterfacegetDataFolder in interface MethodInterfacepublic void setCommandExecutor(String cmd)
MethodInterfacesetCommandExecutor in interface MethodInterfacecmd - the cmdpublic void sendMessage(Object player, String msg)
MethodInterfacesendMessage in interface MethodInterfaceplayer - the playermsg - the msgpublic boolean hasPerms(Object player, String perms)
MethodInterfacehasPerms in interface MethodInterfaceplayer - the playerperms - the permspublic boolean isOnline(String name)
MethodInterfaceisOnline in interface MethodInterfacename - the namepublic ProxiedPlayer getPlayer(String name)
MethodInterfacegetPlayer in interface MethodInterfacename - the namepublic void kickPlayer(String player, String reason)
MethodInterfacekickPlayer in interface MethodInterfaceplayer - the playerreason - the reasonpublic ProxiedPlayer[] getOnlinePlayers()
MethodInterfacegetOnlinePlayers in interface MethodInterfacepublic void scheduleAsyncRep(Runnable rn, long l1, long l2)
MethodInterfacescheduleAsyncRep in interface MethodInterfacern - the rnl1 - the l 1l2 - the l 2public void scheduleAsync(Runnable rn, long l1)
MethodInterfacescheduleAsync in interface MethodInterfacern - the rnl1 - the l 1public void runAsync(Runnable rn)
MethodInterfacerunAsync in interface MethodInterfacern - the rnpublic void runSync(Runnable rn)
MethodInterfacerunSync in interface MethodInterfacern - the rnpublic void executeCommand(String cmd)
MethodInterfaceexecuteCommand in interface MethodInterfacecmd - the cmdpublic String getName(Object player)
MethodInterfacegetName in interface MethodInterfaceplayer - the playerpublic String getName(String uuid)
MethodInterfacegetName in interface MethodInterfaceuuid - the uuidpublic String getIP(Object player)
MethodInterfacegetIP in interface MethodInterfaceplayer - the playerpublic String getInternUUID(Object player)
MethodInterfacegetInternUUID in interface MethodInterfaceplayer - the playerpublic String getInternUUID(String player)
MethodInterfacegetInternUUID in interface MethodInterfaceplayer - the playerpublic boolean callChat(Object player)
MethodInterfacecallChat in interface MethodInterfaceplayer - the playerpublic boolean callCMD(Object player, String cmd)
MethodInterfacecallCMD in interface MethodInterfaceplayer - the playercmd - the cmdpublic void loadMySQLFile(File file)
MethodInterfaceloadMySQLFile in interface MethodInterfacefile - the fpublic void createMySQLFile(File file)
MethodInterfacecreateMySQLFile in interface MethodInterfacefile - the fpublic Object getMySQLFile()
MethodInterfacegetMySQLFile in interface MethodInterfacepublic String parseJSON(InputStreamReader json, String key)
MethodInterfaceparseJSON in interface MethodInterfacejson - the jsonkey - the keypublic String parseJSON(String json, String key)
MethodInterfaceparseJSON in interface MethodInterfacejson - the jsonkey - the keypublic Boolean getBoolean(Object file, String path)
MethodInterfacegetBoolean in interface MethodInterfacefile - the filepath - the pathpublic String getString(Object file, String path)
MethodInterfacegetString in interface MethodInterfacefile - the filepath - the pathpublic Long getLong(Object file, String path)
MethodInterfacegetLong in interface MethodInterfacefile - the filepath - the pathpublic Integer getInteger(Object file, String path)
MethodInterfacegetInteger in interface MethodInterfacefile - the filepath - the pathpublic List<String> getStringList(Object file, String path)
MethodInterfacegetStringList in interface MethodInterfacefile - the filepath - the pathpublic boolean getBoolean(Object file, String path, boolean def)
MethodInterfacegetBoolean in interface MethodInterfacefile - the filepath - the pathdef - the defpublic String getString(Object file, String path, String def)
MethodInterfacegetString in interface MethodInterfacefile - the filepath - the pathdef - the defpublic long getLong(Object file, String path, long def)
MethodInterfacegetLong in interface MethodInterfacefile - the filepath - the pathdef - the defpublic int getInteger(Object file, String path, int def)
MethodInterfacegetInteger in interface MethodInterfacefile - the filepath - the pathdef - the defpublic boolean contains(Object file, String path)
MethodInterfacecontains in interface MethodInterfacefile - the filepath - the pathpublic String getFileName(Object file)
MethodInterfacegetFileName in interface MethodInterfacefile - the filepublic void callPunishmentEvent(Punishment punishment)
MethodInterfacecallPunishmentEvent in interface MethodInterfacepunishment - the punishmentpublic void callRevokePunishmentEvent(Punishment punishment, boolean massClear)
MethodInterfacecallRevokePunishmentEvent in interface MethodInterfacepunishment - the punishmentmassClear - the mass clearpublic boolean isOnlineMode()
MethodInterfaceisOnlineMode in interface MethodInterfacepublic void notify(String perm, List<String> notification)
MethodInterfacenotify in interface MethodInterfaceperm - the permnotification - the notificationpublic void log(String msg)
MethodInterfacelog in interface MethodInterfacemsg - the msgpublic boolean isUnitTesting()
MethodInterfaceisUnitTesting in interface MethodInterfaceCopyright © 2020. All rights reserved.