Better way of doing aaf5472, thanks @datatags

This commit is contained in:
PikaMug 2021-10-26 17:26:01 -04:00
parent aaf54722a2
commit d80b09c64f

View File

@ -696,8 +696,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
*/ */
private void setupLang() throws IOException, URISyntaxException { private void setupLang() throws IOException, URISyntaxException {
final String path = "lang"; final String path = "lang";
final File jarFile = new File(getClass().getProtectionDomain().getCodeSource().getLocation().getPath() final File jarFile = new File(getClass().getProtectionDomain().getCodeSource().getLocation().toURI());
.replace("%20", " "));
if (jarFile.isFile()) { if (jarFile.isFile()) {
final JarFile jar = new JarFile(jarFile); final JarFile jar = new JarFile(jarFile);
final Enumeration<JarEntry> entries = jar.entries(); final Enumeration<JarEntry> entries = jar.entries();