Package me.neznamy.tab.platforms.bukkit
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 Summary
ConstructorsConstructorDescriptionBukkitPlatform(org.bukkit.plugin.java.JavaPlugin plugin) Constructs new instance with given plugin parameter -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcallLoadEvent(me.neznamy.tab.api.TabPlayer player) me.neznamy.tab.shared.permission.PermissionPlugincom.earth2me.essentials.EssentialsReturns Essentials' main class if the plugin is installed,nullif notgetPluginVersion(String plugin) intgetProtocolVersion(org.bukkit.entity.Player player) Gets protocol version of requested player and returns it.booleanReturns status of LibsDisguises plugin presencevoidvoidregisterUnknownPlaceholder(String identifier) voidsendConsoleMessage(String message, boolean translateColors) Sends console message using ConsoleCommandSender, due to Paper not translating colors correctly in Logger messagesvoidsetLibsDisguisesEnabled(boolean enabled) Sets LibsDisguises presence status to provided value.Methods inherited from class me.neznamy.tab.shared.Platform
getPacketBuilder
-
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:
detectPermissionPluginin classme.neznamy.tab.shared.Platform
-
loadFeatures
public void loadFeatures()- Specified by:
loadFeaturesin classme.neznamy.tab.shared.Platform
-
getPluginVersion
- Specified by:
getPluginVersionin classme.neznamy.tab.shared.Platform
-
registerUnknownPlaceholder
- Specified by:
registerUnknownPlaceholderin classme.neznamy.tab.shared.Platform
-
callLoadEvent
public void callLoadEvent()- Overrides:
callLoadEventin classme.neznamy.tab.shared.Platform
-
callLoadEvent
public void callLoadEvent(me.neznamy.tab.api.TabPlayer player) - Overrides:
callLoadEventin classme.neznamy.tab.shared.Platform
-
isLibsDisguisesEnabled
public boolean isLibsDisguisesEnabled()Returns status of LibsDisguises plugin presence- Returns:
trueif plugin is enabled,falseif 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,nullif not- Returns:
- Essentials instance or
nullif plugin is not installed
-
getConfigName
- Specified by:
getConfigNamein classme.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
Sends console message using ConsoleCommandSender, due to Paper not translating colors correctly in Logger messages- Overrides:
sendConsoleMessagein classme.neznamy.tab.shared.Platform- Parameters:
message- Message to sendtranslateColors- Whether color codes should be translated or not
-