diff --git a/src/main/java/com/arckenver/nations/cmdexecutor/NationCmds.java b/src/main/java/com/arckenver/nations/cmdexecutor/NationCmds.java index 5e73fe7..7a57074 100644 --- a/src/main/java/com/arckenver/nations/cmdexecutor/NationCmds.java +++ b/src/main/java/com/arckenver/nations/cmdexecutor/NationCmds.java @@ -56,7 +56,7 @@ private static void createCmds(CommandSpec.Builder cmd, String path) { path = path.concat("."); try { - JarFile jarFile = new JarFile(NationsPlugin.class.getProtectionDomain().getCodeSource().getLocation().toString().split("!")[0].split(":")[2]); + JarFile jarFile = new JarFile(NationsPlugin.class.getProtectionDomain().getCodeSource().getLocation().toString().split("!")[0].replaceFirst("jar:file:", "")); Enumeration entries = jarFile.entries(); while (entries.hasMoreElements()) {