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 {
final String path = "lang";
final File jarFile = new File(getClass().getProtectionDomain().getCodeSource().getLocation().getPath()
.replace("%20", " "));
final File jarFile = new File(getClass().getProtectionDomain().getCodeSource().getLocation().toURI());
if (jarFile.isFile()) {
final JarFile jar = new JarFile(jarFile);
final Enumeration<JarEntry> entries = jar.entries();