Class TAB

java.lang.Object
me.neznamy.tab.api.TabAPI
me.neznamy.tab.shared.TAB

public class TAB extends me.neznamy.tab.api.TabAPI
Main class of the plugin storing data and implementing API
  • Constructor Details

    • TAB

      public TAB(Platform platform, me.neznamy.tab.api.ProtocolVersion serverVersion, String serverVersionString, File dataFolder, Object logger)
      Constructs new instance with given parameters and sets this new instance as TabAPI instance.
      Parameters:
      platform - Platform interface
      serverVersion - Version the server is running on
  • Method Details

    • getPlayerByTabListUUID

      public me.neznamy.tab.api.TabPlayer getPlayerByTabListUUID(UUID tabListId)
      Returns player by TabList UUID. This is required due to Velocity as player uuid and TabList uuid do not match there at some circumstances
      Parameters:
      tabListId - TabList id of player
      Returns:
      player with provided id or null if player was not found
    • load

      public String load()
      Loads all classes, configuration files, features, players and then calls events on success. If it fails for any reason, plugin will be marked as disabled and error message will be printed into the console.
    • unload

      public void unload()
      Unloads all features by sending clear packets, resets variables and cancels all tasks.
    • loadUniversalFeatures

      public void loadUniversalFeatures()
      Loads universal features present on all platforms with the same configuration
    • addPlayer

      public void addPlayer(me.neznamy.tab.api.TabPlayer player)
      Adds specified player to online players
      Parameters:
      player - Player to add
    • removePlayer

      public void removePlayer(me.neznamy.tab.api.TabPlayer player)
      Removes specified player from online players
      Parameters:
      player - Player to remove
    • getInstance

      public static TAB getInstance()
      Returns instance of this class
      Returns:
      instance of this class
    • setInstance

      public static void setInstance(TAB instance)
      Changes instance of this class to new value
      Parameters:
      instance - Instance to set variable to
    • isFloodgateInstalled

      public boolean isFloodgateInstalled()
      Returns true if floodgate plugin is installed, false if not
      Returns:
      true if floodgate plugin is installed, false if not
    • getGroupManager

      public GroupManager getGroupManager()
      Returns TAB's group manager used to refresh player groups from other plugins
      Returns:
      group manager instance
    • getPlatform

      public Platform getPlatform()
      Returns platform
      Returns:
      platform
    • getCPUManager

      public CpuManager getCPUManager()
      Returns cpu
      Returns:
      cpu
    • getErrorManager

      public ErrorManager getErrorManager()
      Returns errorManager
      Returns:
      errorManager
    • getConfiguration

      public Configs getConfiguration()
      Returns configuration
      Returns:
      configuration
    • isDisabled

      public boolean isDisabled()
      Returns disabled
      Returns:
      disabled
    • getCommand

      public TabCommand getCommand()
      Returns command
      Returns:
      command
    • getDisabledCommand

      public DisabledCommand getDisabledCommand()
      Returns disabledCommand
      Returns:
      disabledCommand
    • getServerVersionString

      public String getServerVersionString()
      Returns serverVersionString
      Returns:
      serverVersionString
    • getDataFolder

      public File getDataFolder()
      Returns dataFolder
      Returns:
      dataFolder
    • getLogger

      public Object getLogger()
      Returns logger
      Returns:
      logger
    • getEventBus

      public EventBusImpl getEventBus()
      Specified by:
      getEventBus in class me.neznamy.tab.api.TabAPI
    • getServerVersion

      public me.neznamy.tab.api.ProtocolVersion getServerVersion()
      Specified by:
      getServerVersion in class me.neznamy.tab.api.TabAPI
    • getBossBarManager

      public me.neznamy.tab.api.bossbar.BossBarManager getBossBarManager()
      Specified by:
      getBossBarManager in class me.neznamy.tab.api.TabAPI
    • getScoreboardManager

      public me.neznamy.tab.api.scoreboard.ScoreboardManager getScoreboardManager()
      Specified by:
      getScoreboardManager in class me.neznamy.tab.api.TabAPI
    • getTeamManager

      public me.neznamy.tab.api.team.TeamManager getTeamManager()
      Specified by:
      getTeamManager in class me.neznamy.tab.api.TabAPI
    • getPlaceholderManager

      public PlaceholderManagerImpl getPlaceholderManager()
      Specified by:
      getPlaceholderManager in class me.neznamy.tab.api.TabAPI
    • getPlayer

      public me.neznamy.tab.api.TabPlayer getPlayer(String name)
      Specified by:
      getPlayer in class me.neznamy.tab.api.TabAPI
    • getPlayer

      public me.neznamy.tab.api.TabPlayer getPlayer(UUID uniqueId)
      Specified by:
      getPlayer in class me.neznamy.tab.api.TabAPI
    • sendConsoleMessage

      public void sendConsoleMessage(String message, boolean translateColors)
      Specified by:
      sendConsoleMessage in class me.neznamy.tab.api.TabAPI
    • getHeaderFooterManager

      public me.neznamy.tab.api.HeaderFooterManager getHeaderFooterManager()
      Specified by:
      getHeaderFooterManager in class me.neznamy.tab.api.TabAPI
    • getPlayerCache

      public me.neznamy.tab.api.config.ConfigurationFile getPlayerCache()
      Specified by:
      getPlayerCache in class me.neznamy.tab.api.TabAPI
    • getConfig

      public me.neznamy.tab.api.config.ConfigurationFile getConfig()
      Specified by:
      getConfig in class me.neznamy.tab.api.TabAPI
    • getThreadManager

      public CpuManager getThreadManager()
      Specified by:
      getThreadManager in class me.neznamy.tab.api.TabAPI
    • getGroups

      public me.neznamy.tab.api.PropertyConfiguration getGroups()
      Specified by:
      getGroups in class me.neznamy.tab.api.TabAPI
    • getUsers

      public me.neznamy.tab.api.PropertyConfiguration getUsers()
      Specified by:
      getUsers in class me.neznamy.tab.api.TabAPI
    • logError

      public void logError(String message, Throwable t)
      Specified by:
      logError in class me.neznamy.tab.api.TabAPI
    • setBrokenFile

      public void setBrokenFile(String file)
      Specified by:
      setBrokenFile in class me.neznamy.tab.api.TabAPI
    • getTablistFormatManager

      public me.neznamy.tab.api.TablistFormatManager getTablistFormatManager()
      Specified by:
      getTablistFormatManager in class me.neznamy.tab.api.TabAPI
    • getOnlinePlayers

      public me.neznamy.tab.api.TabPlayer[] getOnlinePlayers()
      Specified by:
      getOnlinePlayers in class me.neznamy.tab.api.TabAPI
    • getFeatureManager

      public FeatureManagerImpl getFeatureManager()
      Specified by:
      getFeatureManager in class me.neznamy.tab.api.TabAPI
    • debug

      public void debug(String message)
      Specified by:
      debug in class me.neznamy.tab.api.TabAPI