Class Core

java.lang.Object
fr.Alphart.BAT.Modules.Core.Core
All Implemented Interfaces:
IModule, net.md_5.bungee.api.plugin.Listener

public class Core extends Object implements IModule, net.md_5.bungee.api.plugin.Listener
  • Field Details

  • Constructor Details

    • Core

      public Core()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface IModule
    • getConfig

      public ModuleConfiguration getConfig()
      Description copied from interface: IModule
      Get the configuration section of this module
      Specified by:
      getConfig in interface IModule
      Returns:
      configuration section of this module
    • load

      public boolean load()
      Description copied from interface: IModule
      Load the module
      Specified by:
      load in interface IModule
      Returns:
      true if everything's ok otherwise false
    • unload

      public boolean unload()
      Description copied from interface: IModule
      Unload the module
      Specified by:
      unload in interface IModule
      Returns:
      true if everything's ok otherwise false
    • getCommands

      public List<BATCommand> getCommands()
      Description copied from interface: IModule
      Get commands used by this module
      Specified by:
      getCommands in interface IModule
      Returns:
      list of commands
    • getMainCommand

      public String getMainCommand()
      Description copied from interface: IModule
      Get main command name
      Specified by:
      getMainCommand in interface IModule
      Returns:
      name of the main command without a slash
    • addCommand

      public void addCommand(BATCommand cmd)
    • getUUID

      public static String getUUID(String pName)
      Get the UUID of the specified player
      Parameters:
      pName -
      Returns:
      String which is the UUID
      Throws:
      UUIDNotFoundException
    • getUUIDfromString

      public static UUID getUUIDfromString(String strUUID)
      Convert an string uuid into an UUID object
      Parameters:
      strUUID -
      Returns:
      UUID
    • getPlayerName

      public static String getPlayerName(String UUID)
      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 given ProxiedPlayer in the database.
      Parameters:
      player - ProxiedPlayer to update
    • getPlayerIP

      public static String getPlayerIP(String pName)
    • 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)