fix(i18n): fix npe on local load
This commit is contained in:
parent
1e23c64144
commit
023cabd4a3
1 changed files with 5 additions and 4 deletions
|
@ -41,10 +41,6 @@ public class NickoBukkit extends JavaPlugin {
|
||||||
if (getServer().getPluginManager().isPluginEnabled(this)) {
|
if (getServer().getPluginManager().isPluginEnabled(this)) {
|
||||||
mojangAPI = new MojangAPI();
|
mojangAPI = new MojangAPI();
|
||||||
|
|
||||||
getLogger().info("Loading locale...");
|
|
||||||
Locale.setDefault(Locale.ENGLISH);
|
|
||||||
i18N = new I18N(this);
|
|
||||||
|
|
||||||
final PluginCommand command = getCommand("nicko");
|
final PluginCommand command = getCommand("nicko");
|
||||||
if (command != null) {
|
if (command != null) {
|
||||||
command.setExecutor(new NickoCommand());
|
command.setExecutor(new NickoCommand());
|
||||||
|
@ -58,8 +54,13 @@ public class NickoBukkit extends JavaPlugin {
|
||||||
saveDefaultConfig();
|
saveDefaultConfig();
|
||||||
nickoConfiguration = new NickoConfiguration(this);
|
nickoConfiguration = new NickoConfiguration(this);
|
||||||
|
|
||||||
|
getLogger().info("Loading locale...");
|
||||||
|
Locale.setDefault(Locale.ENGLISH);
|
||||||
|
i18N = new I18N(this);
|
||||||
|
|
||||||
getLogger().info("Loading persistence...");
|
getLogger().info("Loading persistence...");
|
||||||
dataStore = new PlayerDataStore(this);
|
dataStore = new PlayerDataStore(this);
|
||||||
|
System.out.println(dataStore.getStorage().isError());
|
||||||
|
|
||||||
if (!dataStore.getStorage().getProvider().init()) {
|
if (!dataStore.getStorage().getProvider().init()) {
|
||||||
dataStore.getStorage().setError(true);
|
dataStore.getStorage().setError(true);
|
||||||
|
|
Loading…
Reference in a new issue