Class BukkitPlatform

java.lang.Object
me.neznamy.tab.shared.Platform
me.neznamy.tab.platforms.bukkit.BukkitPlatform

public class BukkitPlatform extends me.neznamy.tab.shared.Platform
Implementation of Platform interface for Bukkit platform
  • Constructor Details

    • BukkitPlatform

      public BukkitPlatform(org.bukkit.plugin.java.JavaPlugin plugin)
      Constructs new instance with given plugin parameter
      Parameters:
      plugin - plugin instance
  • Method Details

    • detectPermissionPlugin

      public me.neznamy.tab.shared.permission.PermissionPlugin detectPermissionPlugin()
      Specified by:
      detectPermissionPlugin in class me.neznamy.tab.shared.Platform
    • loadFeatures

      public void loadFeatures()
      Specified by:
      loadFeatures in class me.neznamy.tab.shared.Platform
    • getPluginVersion

      public String getPluginVersion(String plugin)
      Specified by:
      getPluginVersion in class me.neznamy.tab.shared.Platform
    • registerUnknownPlaceholder

      public void registerUnknownPlaceholder(String identifier)
      Specified by:
      registerUnknownPlaceholder in class me.neznamy.tab.shared.Platform
    • callLoadEvent

      public void callLoadEvent()
      Overrides:
      callLoadEvent in class me.neznamy.tab.shared.Platform
    • callLoadEvent

      public void callLoadEvent(me.neznamy.tab.api.TabPlayer player)
      Overrides:
      callLoadEvent in class me.neznamy.tab.shared.Platform
    • isLibsDisguisesEnabled

      public boolean isLibsDisguisesEnabled()
      Returns status of LibsDisguises plugin presence
      Returns:
      true if plugin is enabled, false if not
    • setLibsDisguisesEnabled

      public void setLibsDisguisesEnabled(boolean enabled)
      Sets LibsDisguises presence status to provided value. This is used to disable LibsDisguises hook in case the plugin is not correctly loaded for any reason to avoid error spam in the hook.
      Parameters:
      enabled - New status of LibsDisguises presence
    • getEssentials

      public com.earth2me.essentials.Essentials getEssentials()
      Returns Essentials' main class if the plugin is installed, null if not
      Returns:
      Essentials instance or null if plugin is not installed
    • getConfigName

      public String getConfigName()
      Specified by:
      getConfigName in class me.neznamy.tab.shared.Platform
    • getProtocolVersion

      public int getProtocolVersion(org.bukkit.entity.Player player)
      Gets protocol version of requested player and returns it.
      Parameters:
      player - Player to get protocol version of
      Returns:
      protocol version of the player
    • sendConsoleMessage

      public void sendConsoleMessage(String message, boolean translateColors)
      Sends console message using ConsoleCommandSender, due to Paper not translating colors correctly in Logger messages
      Overrides:
      sendConsoleMessage in class me.neznamy.tab.shared.Platform
      Parameters:
      message - Message to send
      translateColors - Whether color codes should be translated or not