Reflection Constants
The class com.quartercode.quarterbukkit.api.ReflectionConstants
simply provides some constants which are useful if you try to interact with CraftBukkit internals via reflection because you don't want to rely on the version prefix in the CraftBukkit package (e.g. v1_7_R4
). This utility class provides you with the necessary constants to quickly find the right CraftBukkit classes when employing reflection.
The following descriptions are pretty much entirely copied from the JavaDoc of the respective constants.
Raw versions
public static final String PACKAGE_VERSION
The string that is appended to the net.minecraft.server
and org.bukkit.craftbukkit
packages. It basically represents the current version of the server implementation. For example, this value could be v1_7_R4
. In that case, the NMS package would be called net.minecraft.server.v1_7_R4
. Of course, this also applies to the CraftBukkit package.
public static final int MINOR_VERSION
The minor version number of the current Minecraft version the server implements. The minor component is the second part of the version string. For example, the minor version number of the Minecraft version 1.7.10
would be 7
. This constant can be quite useful if you need to access different things depending on the version of the game.
Package names
public static final String CB_PACKAGE
The real name of the org.bukkit.craftbukkit
package. For example, this could be org.bukkit.craftbukkit.v1_7_R4
.
public static final String CB_ENTITY_PACKAGE
The real name of the org.bukkit.craftbukkit.entity
package. For example, this could be </code>org.bukkit.craftbukkit.v1_7_R4.entity</code>.
public static final String NMS_PACKAGE
The real name of the net.minecraft.server
package. For example, this could be net.minecraft.server.v1_7_R4
.