Class BetterTeamsExtension
java.lang.Object
com.booksaw.betterTeams.extension.BetterTeamsExtension
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull ConfigManagerGets the extension's configuration from config.yml.final @NotNull FileGets the data folder for this extension, located at /plugins/BetterTeams/extensions/{extension-name}/final @NotNull ExtensionInfogetInfo()Gets the information about this extension, loaded from the extension.yml file.final @NotNull ExtensionLoggerGets the logger for this extension.final @NotNull MainGets the main BetterTeams plugin instance.@Nullable InputStreamgetResource(@NotNull String filename) Gets a raw resource from the extension jar.protected final voidinit(ExtensionInfo info, File dataFolder, Main plugin) voidCalled when the extension is disabled.voidonEnable()Called when the extension is enabled.voidonLoad()Called when the extension is loaded, before it is enabled.voidReloads the config.yml from disk.voidSaves the current configuration to the config.yml file.voidsaveResource(@NotNull String resourcePath, boolean replace) Saves any embedded resource to the extension’s data folder.final voidjust let me disable from this server
-
Constructor Details
-
BetterTeamsExtension
public BetterTeamsExtension()
-
-
Method Details
-
onEnable
public void onEnable()Called when the extension is enabled. -
onDisable
public void onDisable()Called when the extension is disabled. -
onLoad
public void onLoad()Called when the extension is loaded, before it is enabled. -
selfDisable
public final void selfDisable()just let me disable from this server -
getPlugin
Gets the main BetterTeams plugin instance.- Returns:
- The main plugin.
-
getInfo
Gets the information about this extension, loaded from the extension.yml file.- Returns:
- The extension's info.
-
getLogger
Gets the logger for this extension.- Returns:
- The extension's logger.
-
getDataFolder
Gets the data folder for this extension, located at /plugins/BetterTeams/extensions/{extension-name}/- Returns:
- The extension's dedicated data folder.
-
getConfig
Gets the extension's configuration from config.yml.- Returns:
- The YamlConfiguration for this extension.
-
reloadConfig
public void reloadConfig()Reloads the config.yml from disk. -
saveConfig
public void saveConfig()Saves the current configuration to the config.yml file. -
saveResource
Saves any embedded resource to the extension’s data folder.- Parameters:
resourcePath- path inside the jar (use '/' separators)replace- overwrite existing file- Throws:
IllegalArgumentException- if resource not found
-
getResource
Gets a raw resource from the extension jar.- Parameters:
filename- path inside the jar- Returns:
- stream or null if not found
-
init
-