Expose loadLang as public and reload from disk on /f reload.

This commit is contained in:
drtshock 2014-12-11 09:16:12 -06:00
parent fa4154a0ce
commit 8788778d05
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ public class CmdReload extends FCommand {
long timeInitStart = System.currentTimeMillis(); long timeInitStart = System.currentTimeMillis();
Conf.load(); Conf.load();
P.p.reloadConfig(); P.p.reloadConfig();
P.p.loadLang();
long timeReload = (System.currentTimeMillis() - timeInitStart); long timeReload = (System.currentTimeMillis() - timeInitStart);
msg(TL.COMMAND_RELOAD_TIME, timeReload); msg(TL.COMMAND_RELOAD_TIME, timeReload);

View File

@ -114,7 +114,7 @@ public abstract class MPlugin extends JavaPlugin {
log("=== ENABLE DONE (Took " + (System.currentTimeMillis() - timeEnableStart) + "ms) ==="); log("=== ENABLE DONE (Took " + (System.currentTimeMillis() - timeEnableStart) + "ms) ===");
} }
private void loadLang() { public void loadLang() {
File lang = new File(getDataFolder(), "lang.yml"); File lang = new File(getDataFolder(), "lang.yml");
OutputStream out = null; OutputStream out = null;
InputStream defLangStream = this.getResource("lang.yml"); InputStream defLangStream = this.getResource("lang.yml");