Package me.neznamy.tab.shared
Class Platform
java.lang.Object
me.neznamy.tab.shared.Platform
- Direct Known Subclasses:
ProxyPlatform
An interface with methods that are called in universal code,
but require platform-specific API calls
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPlatform(me.neznamy.tab.api.protocol.PacketBuilder packetBuilder) Constructs new instance with given parameter -
Method Summary
Modifier and TypeMethodDescriptionvoidCalls platform-specific load event.voidcallLoadEvent(me.neznamy.tab.api.TabPlayer player) Calls platform-specific player load event.abstract PermissionPluginDetects permission plugin and returns it's representing objectabstract StringReturns name of default config file for this platform as it appears in the final jar in root directory.me.neznamy.tab.api.protocol.PacketBuilderReturns platform-specific packet builder implementationabstract StringgetPluginVersion(String plugin) Performs platform-specific plugin manager call and returns the result.abstract voidLoads platform-specific featuresabstract voidregisterUnknownPlaceholder(String identifier) Creates an instance ofPlaceholderto handle this unknown placeholder (typically a PAPI placeholder)voidsendConsoleMessage(String message, boolean translateColors)
-
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
-
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
Creates an instance ofPlaceholderto handle this unknown placeholder (typically a PAPI placeholder)- Parameters:
identifier- placeholder's identifier
-
getPluginVersion
Performs platform-specific plugin manager call and returns the result. If plugin is not installed, returnsnull.- Parameters:
plugin- Plugin to check version of- Returns:
- Version string if plugin is installed,
nullif not
-
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
-