<li><ahref="../../../../com/comphenix/protocol/metrics/Statistics.html"title="class in com.comphenix.protocol.metrics"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html"title="enum in com.comphenix.protocol.metrics"><spanclass="strong">Next Class</span></a></li>
<pre>public class <spanclass="strong">Updater</span>
extends java.lang.Object</pre>
<divclass="block">Check dev.bukkit.org to find updates for a given plugin, and download the updates if needed.
<p>
<b>VERY, VERY IMPORTANT</b>: 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.
<br>
It is a <b>BUKKIT POLICY</b> that you include a boolean value in your config that prevents the auto-updater from running <b>AT ALL</b>.
<br>
If you fail to include this option in your config, your plugin will be <b>REJECTED</b> when you attempt to submit it to dev.bukkit.org.
<p>
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.
<br>
If you are unsure about these rules, please read the plugin submission guidelines: http://goo.gl/8iU5l</div>
<tdclass="colLast"><code><strong><ahref="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html"title="enum in com.comphenix.protocol.metrics">Updater.UpdateResult</a></strong></code>
<divclass="block">Gives the dev the result of the update process.</div>
<tdclass="colLast"><code><strong><ahref="../../../../com/comphenix/protocol/metrics/Updater.UpdateType.html"title="enum in com.comphenix.protocol.metrics">Updater.UpdateType</a></strong></code>
<divclass="block">Allows the dev to specify the type of update that will be run.</div>
<divclass="block">Get the version string latest file avaliable online.</div>
</td>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code><ahref="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html"title="enum in com.comphenix.protocol.metrics">Updater.UpdateResult</a></code></td>
<divclass="block">Check if the name of a jar is one of the plugins currently installed, used for extracting the correct files out of a zip.</div>
</td>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code><ahref="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html"title="enum in com.comphenix.protocol.metrics">Updater.UpdateResult</a></code></td>
<tdclass="colLast"><code><strong><ahref="../../../../com/comphenix/protocol/metrics/Updater.html#update(com.comphenix.protocol.metrics.Updater.UpdateType, boolean)">update</a></strong>(<ahref="../../../../com/comphenix/protocol/metrics/Updater.UpdateType.html"title="enum in com.comphenix.protocol.metrics">Updater.UpdateType</a> type,
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>plugin</code> - The plugin that is checking for an update.</dd><dd><code>slug</code> - The dev.bukkit.org slug of the project (http://dev.bukkit.org/server-mods/SLUG_IS_HERE)</dd><dd><code>file</code> - The file that the plugin is running from, get this by doing this.getFile() from within your main class.</dd><dd><code>permission</code> - Permission needed to read the output of the update process.</dd></dl>
<pre>public <ahref="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html"title="enum in com.comphenix.protocol.metrics">Updater.UpdateResult</a> update(<ahref="../../../../com/comphenix/protocol/metrics/Updater.UpdateType.html"title="enum in com.comphenix.protocol.metrics">Updater.UpdateType</a> type,
boolean announce)</pre>
<divclass="block">Update the plugin.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>type</code> - Specify the type of update this will be. See <ahref="../../../../com/comphenix/protocol/metrics/Updater.UpdateType.html"title="enum in com.comphenix.protocol.metrics"><code>Updater.UpdateType</code></a></dd><dd><code>announce</code> - True if the program should announce the progress of new updates in console</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The result of the update process.</dd></dl>
</li>
</ul>
<aname="getResult()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>getResult</h4>
<pre>public <ahref="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html"title="enum in com.comphenix.protocol.metrics">Updater.UpdateResult</a> getResult()</pre>
<divclass="block">Get the result of the update process.</div>
</li>
</ul>
<aname="getFileSize()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>getFileSize</h4>
<pre>public long getFileSize()</pre>
<divclass="block">Get the total bytes of the file (can only be used after running a version check or a normal run).</div>
<li><ahref="../../../../com/comphenix/protocol/metrics/Statistics.html"title="class in com.comphenix.protocol.metrics"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html"title="enum in com.comphenix.protocol.metrics"><spanclass="strong">Next Class</span></a></li>