Package net.ssterling.bukkitversion
Class BukkitVersionPlugin
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
net.ssterling.bukkitversion.BukkitVersionPlugin
- All Implemented Interfaces:
CommandExecutor,TabCompleter,TabExecutor,Plugin
The
BukkitVersionPlugin class initialises a
JavaPlugin to expose the BukkitVersion API
to other plugins running on a Bukkit server.
This is a common alternative to including an API directly in a project
in typical fashion.
Add/replace the following under the BukkitVersion dependency in your
pom.xml (or do the equivalent on Gradle):
<scope>system</scope>
Also, add the following to your plugin’s plugin.yml:
depend: [BukkitVersion]
You can now use the BukkitVersion API without including the entire package
within your plugin JAR; however, you must instruct users of your plugin
to download the BukkitVersion jar from SpigotMC.- Since:
- 0.2.0
- Author:
- Seth Price
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intbStats plugin ID (for metrics).private static org.bstats.bukkit.MetricsMetrics object for bStats.private static final StringSpigot project ID (for update checker). -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onDisable, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
-
Field Details
-
BSTATS_ID
private static final int BSTATS_IDbStats plugin ID (for metrics).- See Also:
-
PROJECT_ID
Spigot project ID (for update checker).- See Also:
-
metrics
private static org.bstats.bukkit.Metrics metricsMetrics object for bStats.
-
-
Constructor Details
-
BukkitVersionPlugin
public BukkitVersionPlugin()
-
-
Method Details
-
onEnable
public void onEnable()Loads bStats metrics. No, really, that’s it.- Specified by:
onEnablein interfacePlugin- Overrides:
onEnablein classJavaPlugin
-