Package com.comphenix.protocol.updater
Class BukkitUpdater
java.lang.Object
com.comphenix.protocol.updater.Updater
com.comphenix.protocol.updater.BukkitUpdater
Check dev.bukkit.org to find updates for a given plugin, and download the updates if needed.
VERY, VERY IMPORTANT: Because there are no standards for adding auto-update toggles in your plugin's config, this system provides NO CHECK WITH YOUR CONFIG to make sure the user has allowed auto-updating.
It is a BUKKIT POLICY that you include a boolean value in your config that prevents the auto-updater from running AT ALL.
If you fail to include this option in your config, your plugin will be REJECTED when you attempt to submit it to dev.bukkit.org. An example of a good configuration option would be something similar to 'auto-update: true' - if this value is set to false you may NOT run the auto-updater.
If you are unsure about these rules, please read the plugin submission guidelines: http://goo.gl/8iU5l
It is a BUKKIT POLICY that you include a boolean value in your config that prevents the auto-updater from running AT ALL.
If you fail to include this option in your config, your plugin will be REJECTED when you attempt to submit it to dev.bukkit.org. An example of a good configuration option would be something similar to 'auto-update: true' - if this value is set to false you may NOT run the auto-updater.
If you are unsure about these rules, please read the plugin submission guidelines: http://goo.gl/8iU5l
- Version:
- 2.0
- Author:
- Gravity
-
Nested Class Summary
Nested classes/interfaces inherited from class com.comphenix.protocol.updater.Updater
Updater.UpdateResult, Updater.UpdateType -
Field Summary
Fields inherited from class com.comphenix.protocol.updater.Updater
announce, listeners, plugin, REPORT_CANNOT_UPDATE_PLUGIN, result, type, versionFileName, versionGameVersion, versionLink, versionName, versionType -
Constructor Summary
ConstructorsConstructorDescriptionBukkitUpdater(org.bukkit.plugin.Plugin plugin, int id, File file, Updater.UpdateType type, boolean announce)Initialize the updater. -
Method Summary
Modifier and TypeMethodDescriptionbooleanread()voidstart(Updater.UpdateType type)Begin looking for updates.Methods inherited from class com.comphenix.protocol.updater.Updater
addListener, create, getLatestFileLink, getLatestGameVersion, getLatestName, getLatestType, getResult, isChecking, removeListener, shouldNotify, versionCheck, waitForThread
-
Constructor Details
-
BukkitUpdater
public BukkitUpdater(org.bukkit.plugin.Plugin plugin, int id, File file, Updater.UpdateType type, boolean announce)Initialize the updater.Call
start(UpdateType)to actually start looking (and downloading) updates.- Parameters:
plugin- The plugin that is checking for an update.id- The dev.bukkit.org id of the projectfile- The file that the plugin is running from, get this by doing this.getFile() from within your main class.type- Specify the type of update this will be. SeeUpdater.UpdateTypeannounce- True if the program should announce the progress of new updates in console
-
-
Method Details
-
start
Begin looking for updates. -
read
public boolean read() -
getRemoteVersion
- Specified by:
getRemoteVersionin classUpdater
-