Class Platform

java.lang.Object
me.neznamy.tab.shared.Platform
Direct Known Subclasses:
ProxyPlatform

public abstract class Platform extends Object
An interface with methods that are called in universal code, but require platform-specific API calls
  • Constructor Details

    • Platform

      protected Platform(me.neznamy.tab.api.protocol.PacketBuilder packetBuilder)
      Constructs new instance with given parameter
      Parameters:
      packetBuilder - Platform's packet builder
  • Method Details

    • callLoadEvent

      public void callLoadEvent()
      Calls platform-specific load event. This method is called when plugin is fully enabled.
    • callLoadEvent

      public void callLoadEvent(me.neznamy.tab.api.TabPlayer player)
      Calls platform-specific player load event. This method is called when player is fully loaded.
    • getPacketBuilder

      public me.neznamy.tab.api.protocol.PacketBuilder getPacketBuilder()
      Returns platform-specific packet builder implementation
      Returns:
      platform-specific packet builder
    • sendConsoleMessage

      public void sendConsoleMessage(String message, boolean translateColors)
    • detectPermissionPlugin

      public abstract PermissionPlugin detectPermissionPlugin()
      Detects permission plugin and returns it's representing object
      Returns:
      the interface representing the permission hook
    • loadFeatures

      public abstract void loadFeatures()
      Loads platform-specific features
    • registerUnknownPlaceholder

      public abstract void registerUnknownPlaceholder(String identifier)
      Creates an instance of Placeholder to handle this unknown placeholder (typically a PAPI placeholder)
      Parameters:
      identifier - placeholder's identifier
    • getPluginVersion

      public abstract String getPluginVersion(String plugin)
      Performs platform-specific plugin manager call and returns the result. If plugin is not installed, returns null.
      Parameters:
      plugin - Plugin to check version of
      Returns:
      Version string if plugin is installed, null if not
    • getConfigName

      public abstract String getConfigName()
      Returns name of default config file for this platform as it appears in the final jar in root directory.
      Returns:
      name of default config file for this platform