mirror of
https://github.com/tomasff/BeesPlus.git
synced 2024-11-22 01:56:28 +01:00
Refactoring event registration
This commit is contained in:
parent
1e0c51f607
commit
e7ae6ae440
@ -17,6 +17,7 @@ import org.bstats.bukkit.Metrics;
|
||||
import org.bstats.charts.SimplePie;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -40,9 +41,11 @@ public class BeesPlus extends JavaPlugin {
|
||||
guiViewTracker = new GuiViewTracker();
|
||||
customItemManager = new CustomItemManager(this);
|
||||
|
||||
getServer().getPluginManager().registerEvents(new GuiHandler(this), this);
|
||||
getServer().getPluginManager().registerEvents(new BeehiveHandler(), this);
|
||||
getServer().getPluginManager().registerEvents(new RightClickHandler(this), this);
|
||||
PluginManager pluginManager = getServer().getPluginManager();
|
||||
|
||||
pluginManager.registerEvents(new GuiHandler(this), this);
|
||||
pluginManager.registerEvents(new BeehiveHandler(), this);
|
||||
pluginManager.registerEvents(new RightClickHandler(this), this);
|
||||
|
||||
if (!loadLocale()) {
|
||||
getServer().getPluginManager().disablePlugin(this);
|
||||
|
Loading…
Reference in New Issue
Block a user