mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Move ServerLoadEvent listener to its own class
This commit is contained in:
parent
6495a386a0
commit
3042e49ddb
@ -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();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user