Move ServerLoadEvent listener to its own class

This commit is contained in:
extendedclip 2019-05-05 10:37:01 -04:00
parent 6495a386a0
commit 3042e49ddb

View File

@ -0,0 +1,22 @@
package me.clip.placeholderapi;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.server.ServerLoadEvent;
public class ServerLoadEventListener implements Listener {
private PlaceholderAPIPlugin plugin;
public ServerLoadEventListener(PlaceholderAPIPlugin instance) {
plugin = instance;
Bukkit.getPluginManager().registerEvents(this, instance);
}
@EventHandler
public void onServerLoad(ServerLoadEvent e) {
plugin.getLogger().info("Placeholder expansion registration initializing...");
plugin.getExpansionManager().registerAllExpansions();
}
}