Package fr.Alphart.BAT.Modules.Core
Class Core
java.lang.Object
fr.Alphart.BAT.Modules.Core.Core
- All Implemented Interfaces:
IModule
,net.md_5.bungee.api.plugin.Listener
-
Field Summary
Fields inherited from interface fr.Alphart.BAT.Modules.IModule
ANY_SERVER, GLOBAL_SERVER, NO_REASON, OFF_STATE, ON_STATE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommand
(BATCommand cmd) Get commands used by this moduleGet the configuration section of this moduleGet main command namegetName()
static String
getPlayerIP
(String pName) static String
getPlayerName
(String UUID) Get the player name from a UUID using the BAT databasestatic String
Get the UUID of the specified playerstatic UUID
getUUIDfromString
(String strUUID) Convert an string uuid into an UUID objectstatic boolean
boolean
load()
Load the modulevoid
onPlayerJoin
(net.md_5.bungee.api.event.PostLoginEvent ev) void
onPlayerLeft
(net.md_5.bungee.api.event.PlayerDisconnectEvent ev) boolean
unload()
Unload the modulevoid
updatePlayerIPandUUID
(net.md_5.bungee.api.connection.ProxiedPlayer player) Updates the IP and UUID of the givenProxiedPlayer
in the database.
-
Field Details
-
defaultDF
-
-
Constructor Details
-
Core
public Core()
-
-
Method Details
-
getName
-
getConfig
Description copied from interface:IModule
Get the configuration section of this module -
load
public boolean load()Description copied from interface:IModule
Load the module -
unload
public boolean unload()Description copied from interface:IModule
Unload the module -
getCommands
Description copied from interface:IModule
Get commands used by this module- Specified by:
getCommands
in interfaceIModule
- Returns:
- list of commands
-
getMainCommand
Description copied from interface:IModule
Get main command name- Specified by:
getMainCommand
in interfaceIModule
- Returns:
- name of the main command without a slash
-
addCommand
-
getUUID
Get the UUID of the specified player- Parameters:
pName
-- Returns:
- String which is the UUID
- Throws:
UUIDNotFoundException
-
getUUIDfromString
Convert an string uuid into an UUID object- Parameters:
strUUID
-- Returns:
- UUID
-
getPlayerName
Get the player name from a UUID using the BAT database- Parameters:
UUID
-- Returns:
- player name with this UUID or "unknowName"
-
updatePlayerIPandUUID
public void updatePlayerIPandUUID(net.md_5.bungee.api.connection.ProxiedPlayer player) Updates the IP and UUID of the givenProxiedPlayer
in the database.- Parameters:
player
- ProxiedPlayer to update
-
getPlayerIP
-
isOnlineMode
public static boolean isOnlineMode() -
onPlayerJoin
public void onPlayerJoin(net.md_5.bungee.api.event.PostLoginEvent ev) -
onPlayerLeft
public void onPlayerLeft(net.md_5.bungee.api.event.PlayerDisconnectEvent ev)
-