Archiviert
13
0
Dieses Repository wurde am 2021-01-06 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
ProtocolLib/Javadoc/com/comphenix/protocol/utility/MinecraftVersion.html
2013-05-14 01:29:12 +02:00

487 Zeilen
18 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_21) on Tue May 14 01:28:32 CEST 2013 -->
<title>MinecraftVersion</title>
<meta name="date" content="2013-05-14">
<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="MinecraftVersion";
}
//-->
</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/MinecraftVersion.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/utility/MinecraftReflection.html" title="class in com.comphenix.protocol.utility"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/comphenix/protocol/utility/StreamSerializer.html" title="class in com.comphenix.protocol.utility"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/comphenix/protocol/utility/MinecraftVersion.html" target="_top">Frames</a></li>
<li><a href="MinecraftVersion.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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.utility</div>
<h2 title="Class MinecraftVersion" class="title">Class MinecraftVersion</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.comphenix.protocol.utility.MinecraftVersion</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.lang.Comparable&lt;<a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html" title="class in com.comphenix.protocol.utility">MinecraftVersion</a>&gt;</dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">MinecraftVersion</span>
extends java.lang.Object
implements java.lang.Comparable&lt;<a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html" title="class in com.comphenix.protocol.utility">MinecraftVersion</a>&gt;</pre>
<div class="block">Determine the current Minecraft version.</div>
<dl><dt><span class="strong">Author:</span></dt>
<dd>Kristian</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== 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">&nbsp;</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/utility/MinecraftVersion.html#MinecraftVersion(int, int, int)">MinecraftVersion</a></strong>(int&nbsp;major,
int&nbsp;minor,
int&nbsp;build)</code>
<div class="block">Construct a version object directly.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html#MinecraftVersion(int, int, int, java.lang.String)">MinecraftVersion</a></strong>(int&nbsp;major,
int&nbsp;minor,
int&nbsp;build,
java.lang.String&nbsp;development)</code>
<div class="block">Construct a version object directly.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html#MinecraftVersion(org.bukkit.Server)">MinecraftVersion</a></strong>(org.bukkit.Server&nbsp;server)</code>
<div class="block">Determine the current Minecraft version.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html#MinecraftVersion(java.lang.String)">MinecraftVersion</a></strong>(java.lang.String&nbsp;versionOnly)</code>
<div class="block">Construct a version object from the format major.minor.build.</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">&nbsp;</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>int</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html#compareTo(com.comphenix.protocol.utility.MinecraftVersion)">compareTo</a></strong>(<a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html" title="class in com.comphenix.protocol.utility">MinecraftVersion</a>&nbsp;o)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html#equals(java.lang.Object)">equals</a></strong>(java.lang.Object&nbsp;obj)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html#extractVersion(java.lang.String)">extractVersion</a></strong>(java.lang.String&nbsp;text)</code>
<div class="block">Extract the Minecraft version from CraftBukkit itself.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html#getBuild()">getBuild</a></strong>()</code>
<div class="block">Build version number</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html#getDevelopmentStage()">getDevelopmentStage</a></strong>()</code>
<div class="block">Retrieve the development stage.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html#getMajor()">getMajor</a></strong>()</code>
<div class="block">Major version number</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html#getMinor()">getMinor</a></strong>()</code>
<div class="block">Minor version number</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/utility/MinecraftVersion.html#getVersion()">getVersion</a></strong>()</code>
<div class="block">Retrieve the version String (major.minor.build) only.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html#hashCode()">hashCode</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html#toString()">toString</a></strong>()</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, finalize, getClass, notify, notifyAll, 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="MinecraftVersion(org.bukkit.Server)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MinecraftVersion</h4>
<pre>public&nbsp;MinecraftVersion(org.bukkit.Server&nbsp;server)</pre>
<div class="block">Determine the current Minecraft version.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>server</code> - - the Bukkit server that will be used to examine the MC version.</dd></dl>
</li>
</ul>
<a name="MinecraftVersion(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MinecraftVersion</h4>
<pre>public&nbsp;MinecraftVersion(java.lang.String&nbsp;versionOnly)</pre>
<div class="block">Construct a version object from the format major.minor.build.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>versionOnly</code> - - the version in text form.</dd></dl>
</li>
</ul>
<a name="MinecraftVersion(int, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MinecraftVersion</h4>
<pre>public&nbsp;MinecraftVersion(int&nbsp;major,
int&nbsp;minor,
int&nbsp;build)</pre>
<div class="block">Construct a version object directly.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>major</code> - - major version number.</dd><dd><code>minor</code> - - minor version number.</dd><dd><code>build</code> - - build version number.</dd></dl>
</li>
</ul>
<a name="MinecraftVersion(int, int, int, java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MinecraftVersion</h4>
<pre>public&nbsp;MinecraftVersion(int&nbsp;major,
int&nbsp;minor,
int&nbsp;build,
java.lang.String&nbsp;development)</pre>
<div class="block">Construct a version object directly.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>major</code> - - major version number.</dd><dd><code>minor</code> - - minor version number.</dd><dd><code>build</code> - - build version number.</dd><dd><code>development</code> - - development stage.</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="getMajor()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMajor</h4>
<pre>public&nbsp;int&nbsp;getMajor()</pre>
<div class="block">Major version number</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Current major version number.</dd></dl>
</li>
</ul>
<a name="getMinor()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMinor</h4>
<pre>public&nbsp;int&nbsp;getMinor()</pre>
<div class="block">Minor version number</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Current minor version number.</dd></dl>
</li>
</ul>
<a name="getBuild()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBuild</h4>
<pre>public&nbsp;int&nbsp;getBuild()</pre>
<div class="block">Build version number</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Current build version number.</dd></dl>
</li>
</ul>
<a name="getDevelopmentStage()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDevelopmentStage</h4>
<pre>public&nbsp;java.lang.String&nbsp;getDevelopmentStage()</pre>
<div class="block">Retrieve the development stage.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Development stage, or NULL if this is a release.</dd></dl>
</li>
</ul>
<a name="getVersion()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getVersion</h4>
<pre>public&nbsp;java.lang.String&nbsp;getVersion()</pre>
<div class="block">Retrieve the version String (major.minor.build) only.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>A normal version string.</dd></dl>
</li>
</ul>
<a name="compareTo(com.comphenix.protocol.utility.MinecraftVersion)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compareTo</h4>
<pre>public&nbsp;int&nbsp;compareTo(<a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html" title="class in com.comphenix.protocol.utility">MinecraftVersion</a>&nbsp;o)</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>compareTo</code>&nbsp;in interface&nbsp;<code>java.lang.Comparable&lt;<a href="../../../../com/comphenix/protocol/utility/MinecraftVersion.html" title="class in com.comphenix.protocol.utility">MinecraftVersion</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals(java.lang.Object&nbsp;obj)</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;java.lang.String&nbsp;toString()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="extractVersion(java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>extractVersion</h4>
<pre>public static&nbsp;java.lang.String&nbsp;extractVersion(java.lang.String&nbsp;text)</pre>
<div class="block">Extract the Minecraft version from CraftBukkit itself.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>server</code> - - the server object representing CraftBukkit.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The underlying MC version.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - If we could not parse the version string.</dd></dl>
</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/MinecraftVersion.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/utility/MinecraftReflection.html" title="class in com.comphenix.protocol.utility"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/comphenix/protocol/utility/StreamSerializer.html" title="class in com.comphenix.protocol.utility"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/comphenix/protocol/utility/MinecraftVersion.html" target="_top">Frames</a></li>
<li><a href="MinecraftVersion.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>