Created
April 27, 2019 17:04
-
-
Save darbyjack/ba41339e197a4992c35b2d4cbaa8672f to your computer and use it in GitHub Desktop.
What even
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void accept() { | |
Bukkit.getServer().getScheduler().runTaskAsynchronously(guilds, () -> { | |
try { | |
LanguageUpdateUtils.updateLanguages(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
finally { | |
try { | |
FileUtils.forceDelete(new File(guilds.getDataFolder(), "languages")); | |
LanguageUpdateUtils.unzip(); | |
} catch (ZipException | IOException e) { | |
e.printStackTrace(); | |
} | |
finally { | |
try { | |
guilds.loadLanguages(guilds.getCommandManager()); | |
} catch (Exception ex) { | |
ex.printStackTrace(); | |
} finally { | |
getCurrentCommandIssuer().sendInfo(Messages.DELETE__SUCCESSFUL); | |
} | |
} | |
} | |
}); | |
actionHandler.removeAction(player); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment