perf: delay initialisation of mojangapi
This commit is contained in:
parent
d1f9fba884
commit
421e1f74e6
2 changed files with 3 additions and 2 deletions
|
@ -27,7 +27,6 @@ public class NickoBukkit extends JavaPlugin {
|
|||
@Override
|
||||
public void onEnable() {
|
||||
plugin = this;
|
||||
mojangAPI = new MojangAPI();
|
||||
|
||||
getLogger().info("Loading internals...");
|
||||
if (getInternals() == null) {
|
||||
|
@ -37,6 +36,8 @@ public class NickoBukkit extends JavaPlugin {
|
|||
}
|
||||
|
||||
if (getServer().getPluginManager().isPluginEnabled(this)) {
|
||||
mojangAPI = new MojangAPI();
|
||||
|
||||
final PluginCommand command = getCommand("nicko");
|
||||
if (command != null) {
|
||||
command.setExecutor(new NickoCommand());
|
||||
|
|
|
@ -12,7 +12,7 @@ public class NickoBungee extends Plugin {
|
|||
@Override
|
||||
public void onEnable() {
|
||||
plugin = this;
|
||||
|
||||
|
||||
getLogger().info("Registering channels...");
|
||||
getProxy().registerChannel(NICKO_PLUGIN_CHANNEL_FETCH);
|
||||
getProxy().registerChannel(NICKO_PLUGIN_CHANNEL_UPDATE);
|
||||
|
|
Loading…
Reference in a new issue