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
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
plugin = this;
|
plugin = this;
|
||||||
mojangAPI = new MojangAPI();
|
|
||||||
|
|
||||||
getLogger().info("Loading internals...");
|
getLogger().info("Loading internals...");
|
||||||
if (getInternals() == null) {
|
if (getInternals() == null) {
|
||||||
|
@ -37,6 +36,8 @@ public class NickoBukkit extends JavaPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getServer().getPluginManager().isPluginEnabled(this)) {
|
if (getServer().getPluginManager().isPluginEnabled(this)) {
|
||||||
|
mojangAPI = new MojangAPI();
|
||||||
|
|
||||||
final PluginCommand command = getCommand("nicko");
|
final PluginCommand command = getCommand("nicko");
|
||||||
if (command != null) {
|
if (command != null) {
|
||||||
command.setExecutor(new NickoCommand());
|
command.setExecutor(new NickoCommand());
|
||||||
|
|
|
@ -12,7 +12,7 @@ public class NickoBungee extends Plugin {
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
plugin = this;
|
plugin = this;
|
||||||
|
|
||||||
getLogger().info("Registering channels...");
|
getLogger().info("Registering channels...");
|
||||||
getProxy().registerChannel(NICKO_PLUGIN_CHANNEL_FETCH);
|
getProxy().registerChannel(NICKO_PLUGIN_CHANNEL_FETCH);
|
||||||
getProxy().registerChannel(NICKO_PLUGIN_CHANNEL_UPDATE);
|
getProxy().registerChannel(NICKO_PLUGIN_CHANNEL_UPDATE);
|
||||||
|
|
Loading…
Reference in a new issue