public class MinecraftVersion extends Object implements Comparable<MinecraftVersion>, Serializable
| Modifier and Type | Field and Description |
|---|---|
static MinecraftVersion |
BOUNTIFUL_UPDATE
Version 1.8 - the "bountiful" update.
|
static MinecraftVersion |
COLOR_UPDATE
Version 1.12 - the world of color update.
|
static MinecraftVersion |
COMBAT_UPDATE
Version 1.9 - the combat update.
|
static MinecraftVersion |
EXPLORATION_UPDATE
Version 1.11 - the exploration update.
|
static MinecraftVersion |
FROSTBURN_UPDATE
Version 1.10 - the frostburn update.
|
static MinecraftVersion |
HORSE_UPDATE
Version 1.6.1 - the horse update.
|
static MinecraftVersion |
REDSTONE_UPDATE
Version 1.5.0 - the redstone update.
|
static MinecraftVersion |
SCARY_UPDATE
Version 1.4.2 - the scary update (Wither Boss).
|
static MinecraftVersion |
SKIN_UPDATE
Version 1.7.8 - the update that changed the skin format (and distribution - R.I.P.
|
static MinecraftVersion |
WORLD_UPDATE
Version 1.7.2 - the update that changed the world.
|
| Constructor and Description |
|---|
MinecraftVersion(int major,
int minor,
int build)
Construct a version object directly.
|
MinecraftVersion(int major,
int minor,
int build,
String development)
Construct a version object directly.
|
MinecraftVersion(org.bukkit.Server server)
Determine the current Minecraft version.
|
MinecraftVersion(String versionOnly)
Construct a version object from the format major.minor.build, or the snapshot format.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MinecraftVersion o) |
boolean |
equals(Object obj) |
static String |
extractVersion(String text)
Extract the Minecraft version from CraftBukkit itself.
|
static MinecraftVersion |
fromServerVersion(String serverVersion)
Parse the given server version into a Minecraft version.
|
int |
getBuild()
Build version number
|
static MinecraftVersion |
getCurrentVersion() |
String |
getDevelopmentStage()
Retrieve the development stage.
|
int |
getMajor()
Major version number
|
int |
getMinor()
Minor version number
|
SnapshotVersion |
getSnapshot()
Retrieve the snapshot version, or NULL if this is a release.
|
String |
getVersion()
Retrieve the version String (major.minor.build) only.
|
int |
hashCode() |
boolean |
isAtLeast(MinecraftVersion other) |
boolean |
isSnapshot()
Determine if this version is a snapshot.
|
static void |
setCurrentVersion(MinecraftVersion version) |
String |
toString() |
public static final MinecraftVersion COLOR_UPDATE
public static final MinecraftVersion EXPLORATION_UPDATE
public static final MinecraftVersion FROSTBURN_UPDATE
public static final MinecraftVersion COMBAT_UPDATE
public static final MinecraftVersion BOUNTIFUL_UPDATE
public static final MinecraftVersion SKIN_UPDATE
public static final MinecraftVersion WORLD_UPDATE
public static final MinecraftVersion HORSE_UPDATE
public static final MinecraftVersion REDSTONE_UPDATE
public static final MinecraftVersion SCARY_UPDATE
public MinecraftVersion(org.bukkit.Server server)
server - - the Bukkit server that will be used to examine the MC version.public MinecraftVersion(String versionOnly)
versionOnly - - the version in text form.public MinecraftVersion(int major,
int minor,
int build)
major - - major version number.minor - - minor version number.build - - build version number.public MinecraftVersion(int major,
int minor,
int build,
String development)
major - - major version number.minor - - minor version number.build - - build version number.development - - development stage.public int getMajor()
public int getMinor()
public int getBuild()
public String getDevelopmentStage()
public SnapshotVersion getSnapshot()
public boolean isSnapshot()
public String getVersion()
public int compareTo(MinecraftVersion o)
compareTo in interface Comparable<MinecraftVersion>public boolean isAtLeast(MinecraftVersion other)
public static String extractVersion(String text)
text - - the server version in text form.IllegalStateException - If we could not parse the version string.public static MinecraftVersion fromServerVersion(String serverVersion)
serverVersion - - the server version.public static void setCurrentVersion(MinecraftVersion version)
public static MinecraftVersion getCurrentVersion()
Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.