Skip to content

Commit

Permalink
Fixed issue with wrong classname in org.bukkit.craftbukkit
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas15v committed Feb 21, 2016
1 parent 5548793 commit 852bc6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<groupId>com.fantasycraft</groupId>
<artifactId>Forge_Permittor</artifactId>

<version>0.3-BETA</version>
<version>0.4-BETA</version>
<name>Forge Permittor</name>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,9 @@ public NMSResolver() throws ClassNotFoundException, NoSuchMethodException, Illeg
}

private String findCraftBukkit(){
Package Craftbukkit = Package.getPackage(CraftbukkitLocation);
for (Package e : Craftbukkit.getPackages()){
if (e.getName().startsWith(CraftbukkitLocation + ".v")) {
return CraftbukkitLocation + "." + e.getName().split("\\.")[3];
for (StackTraceElement e : Thread.currentThread().getStackTrace()){
if (e.getClassName().startsWith(CraftbukkitLocation + ".v")) {
return CraftbukkitLocation + "." + e.getClassName().split("\\.")[3];
}
}
return CraftbukkitLocation;
Expand Down

0 comments on commit 852bc6b

Please sign in to comment.