Skip to content

Commit

Permalink
Don't import CraftServer when you need to be version independent
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Dec 19, 2015
1 parent 5baf8f7 commit e767a3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/citizensnpcs/util/Util.java
Expand Up @@ -5,7 +5,7 @@
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_8_R3.CraftServer;
import org.bukkit.bukkit.Bukkit;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
Expand Down Expand Up @@ -75,7 +75,7 @@ public static Random getFastRandom() {
}

public static String getMinecraftRevision() {
String raw = CraftServer.class.getPackage().getName();
String raw = Bukkit.getServer().getClass().getPackage().getName();
return raw.substring(raw.lastIndexOf('.') + 2);
}

Expand Down

0 comments on commit e767a3f

Please sign in to comment.