diff --git a/pom.xml b/pom.xml
index eab8bd0..26135b2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
4.0.0
org.inventivetalent
bossbarapi
- 2.4.1
+ 2.4.2
BossBarAPI
BossBarAPI_v${project.version}
diff --git a/src/org/inventivetalent/bossbar/reflection/Reflection.java b/src/org/inventivetalent/bossbar/reflection/Reflection.java
index c01e52c..19f4978 100644
--- a/src/org/inventivetalent/bossbar/reflection/Reflection.java
+++ b/src/org/inventivetalent/bossbar/reflection/Reflection.java
@@ -9,12 +9,12 @@ public abstract class Reflection {
public static String getVersion() {
String name = Bukkit.getServer().getClass().getPackage().getName();
- String version = name.substring(name.lastIndexOf('.') + 1) + ".";
+ String version = name.substring(name.lastIndexOf('.') + 1);
return version;
}
public static Class> getNMSClass(String className) {
- String fullName = "net.minecraft.server." + getVersion() + className;
+ String fullName = "net.minecraft.server." + getVersion() + "." + className;
Class> clazz = null;
try {
clazz = Class.forName(fullName);
@@ -25,13 +25,13 @@ public static Class> getNMSClass(String className) {
}
public static Class> getNMSClassWithException(String className) throws Exception {
- String fullName = "net.minecraft.server." + getVersion() + className;
+ String fullName = "net.minecraft.server." + getVersion() + "." + className;
Class> clazz = Class.forName(fullName);
return clazz;
}
public static Class> getOBCClass(String className) {
- String fullName = "org.bukkit.craftbukkit." + getVersion() + className;
+ String fullName = "org.bukkit.craftbukkit." + getVersion() + "." + className;
Class> clazz = null;
try {
clazz = Class.forName(fullName);