Class MinecraftVersion
java.lang.Object
com.fastasyncworldedit.bukkit.util.MinecraftVersion
- All Implemented Interfaces:
- Comparable<MinecraftVersion>
Utility class for retrieving and comparing minecraft server versions.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final MinecraftVersionstatic final MinecraftVersionstatic final MinecraftVersion
- 
Constructor SummaryConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.MinecraftVersion(int major, int minor) Construct a new version with major and minor version.MinecraftVersion(int major, int minor, int release) Construct a new version with major, minor and release version.
- 
Method SummaryModifier and TypeMethodDescriptionintcompareTo(MinecraftVersion other) booleanstatic MinecraftVersionGet the minecraft version that the server is currently runningintgetMajor()intgetMinor()intbooleanisEqual(MinecraftVersion other) booleanbooleanbooleanisHigherThan(MinecraftVersion other) booleanisLowerThan(MinecraftVersion other) toString()
- 
Field Details- 
NETHER
- 
CAVES_17
- 
CAVES_18
 
- 
- 
Constructor Details- 
MinecraftVersionpublic MinecraftVersion(int major, int minor, int release) Construct a new version with major, minor and release version.- Parameters:
- major- Major part of the version, only- 1would make sense.
- minor- Minor part, full updates, e.g. Nether & Caves & Cliffs
- release- Release, changes for the server software during a minor update.
 
- 
MinecraftVersionpublic MinecraftVersion(int major, int minor) Construct a new version with major and minor version. The release version is set to 0, therefore ignored.- See Also:
 
- 
MinecraftVersionDeprecated, for removal: This API element is subject to removal in a future version.usegetCurrent()instead.Construct a new version with major, minor and release based on the server version.
 
- 
- 
Method Details- 
getCurrentGet the minecraft version that the server is currently running- Since:
- 2.1.0
 
- 
isEqual- Parameters:
- other- The other version to compare against.
- Returns:
- trueif this version is equal to the other version.
 
- 
isEqualOrHigherThan- Parameters:
- other- The other version to compare against.
- Returns:
- trueif this version is higher or equal compared to the other version.
 
- 
isEqualOrLowerThan- Parameters:
- other- The other version to compare against.
- Returns:
- trueif this version is lower or equal compared to the other version.
 
- 
isHigherThan- Parameters:
- other- The other version to compare against.
- Returns:
- trueif this version is higher than the other version.
 
- 
isLowerThan- Parameters:
- other- The other version to compare against.
- Returns:
- trueif this version is lower than to the other version.
 
- 
getMajorpublic int getMajor()
- 
getMinorpublic int getMinor()
- 
getReleasepublic int getRelease()
- 
compareTo- Specified by:
- compareToin interface- Comparable<MinecraftVersion>
 
- 
equals
- 
toString
 
- 
getCurrent()instead.