380 Zeilen
16 KiB
HTML
380 Zeilen
16 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (version 1.7.0_07) on Sun Nov 04 03:47:22 CET 2012 -->
|
|
<title>Updater</title>
|
|
<meta name="date" content="2012-11-04">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="Updater";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar_top">
|
|
<!-- -->
|
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/Updater.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../com/comphenix/protocol/metrics/Statistics.html" title="class in com.comphenix.protocol.metrics"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html" title="enum in com.comphenix.protocol.metrics"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/comphenix/protocol/metrics/Updater.html" target="_top">Frames</a></li>
|
|
<li><a href="Updater.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li><a href="#nested_class_summary">Nested</a> | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
|
<li><a href="#method_detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip-navbar_top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.comphenix.protocol.metrics</div>
|
|
<h2 title="Class Updater" class="title">Class Updater</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.comphenix.protocol.metrics.Updater</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="strong">Updater</span>
|
|
extends java.lang.Object</pre>
|
|
<div class="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>
|
|
<dl><dt><span class="strong">Author:</span></dt>
|
|
<dd>H31IX</dd></dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="nested_class_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Nested Class Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
|
|
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Class and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html" title="enum in com.comphenix.protocol.metrics">Updater.UpdateResult</a></strong></code>
|
|
<div class="block">Gives the dev the result of the update process.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/metrics/Updater.UpdateType.html" title="enum in com.comphenix.protocol.metrics">Updater.UpdateType</a></strong></code>
|
|
<div class="block">Allows the dev to specify the type of update that will be run.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><strong><a href="../../../../com/comphenix/protocol/metrics/Updater.html#Updater(org.bukkit.plugin.Plugin, java.util.logging.Logger, java.lang.String, java.io.File, java.lang.String)">Updater</a></strong>(org.bukkit.plugin.Plugin plugin,
|
|
java.util.logging.Logger logger,
|
|
java.lang.String slug,
|
|
java.io.File file,
|
|
java.lang.String permission)</code>
|
|
<div class="block">Initialize the updater</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/metrics/Updater.html#getFileSize()">getFileSize</a></strong>()</code>
|
|
<div class="block">Get the total bytes of the file (can only be used after running a version check or a normal run).</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>java.lang.String</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/metrics/Updater.html#getLatestVersionString()">getLatestVersionString</a></strong>()</code>
|
|
<div class="block">Get the version string latest file avaliable online.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html" title="enum in com.comphenix.protocol.metrics">Updater.UpdateResult</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/metrics/Updater.html#getResult()">getResult</a></strong>()</code>
|
|
<div class="block">Get the result of the update process.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/metrics/Updater.html#pluginFile(java.lang.String)">pluginFile</a></strong>(java.lang.String name)</code>
|
|
<div class="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>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html" title="enum in com.comphenix.protocol.metrics">Updater.UpdateResult</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/metrics/Updater.html#update(com.comphenix.protocol.metrics.Updater.UpdateType, boolean)">update</a></strong>(<a href="../../../../com/comphenix/protocol/metrics/Updater.UpdateType.html" title="enum in com.comphenix.protocol.metrics">Updater.UpdateType</a> type,
|
|
boolean announce)</code>
|
|
<div class="block">Update the plugin.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="Updater(org.bukkit.plugin.Plugin, java.util.logging.Logger, java.lang.String, java.io.File, java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>Updater</h4>
|
|
<pre>public Updater(org.bukkit.plugin.Plugin plugin,
|
|
java.util.logging.Logger logger,
|
|
java.lang.String slug,
|
|
java.io.File file,
|
|
java.lang.String permission)</pre>
|
|
<div class="block">Initialize the updater</div>
|
|
<dl><dt><span class="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>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="update(com.comphenix.protocol.metrics.Updater.UpdateType, boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>update</h4>
|
|
<pre>public <a href="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html" title="enum in com.comphenix.protocol.metrics">Updater.UpdateResult</a> update(<a href="../../../../com/comphenix/protocol/metrics/Updater.UpdateType.html" title="enum in com.comphenix.protocol.metrics">Updater.UpdateType</a> type,
|
|
boolean announce)</pre>
|
|
<div class="block">Update the plugin.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - Specify the type of update this will be. See <a href="../../../../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><span class="strong">Returns:</span></dt><dd>The result of the update process.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getResult()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getResult</h4>
|
|
<pre>public <a href="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html" title="enum in com.comphenix.protocol.metrics">Updater.UpdateResult</a> getResult()</pre>
|
|
<div class="block">Get the result of the update process.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getFileSize()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getFileSize</h4>
|
|
<pre>public long getFileSize()</pre>
|
|
<div class="block">Get the total bytes of the file (can only be used after running a version check or a normal run).</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getLatestVersionString()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getLatestVersionString</h4>
|
|
<pre>public java.lang.String getLatestVersionString()</pre>
|
|
<div class="block">Get the version string latest file avaliable online.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="pluginFile(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>pluginFile</h4>
|
|
<pre>public boolean pluginFile(java.lang.String name)</pre>
|
|
<div class="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>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar_bottom">
|
|
<!-- -->
|
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/Updater.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../com/comphenix/protocol/metrics/Statistics.html" title="class in com.comphenix.protocol.metrics"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/comphenix/protocol/metrics/Updater.UpdateResult.html" title="enum in com.comphenix.protocol.metrics"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/comphenix/protocol/metrics/Updater.html" target="_top">Frames</a></li>
|
|
<li><a href="Updater.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li><a href="#nested_class_summary">Nested</a> | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
|
<li><a href="#method_detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip-navbar_bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</body>
|
|
</html>
|