blob: 01203e8a785f0b066c68e0f685e6df307a9ae519 [file] [log] [blame] [raw]
package protocolsupport;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
import protocolsupport.injector.NettyInjector;
import protocolsupport.injector.ServerInjector;
import protocolsupport.listeners.PlayerListener;
import protocolsupport.listeners.WorldListener;
public class ProtocolSupport extends JavaPlugin {
@Override
public void onLoad() {
try {
NettyInjector.inject();
ServerInjector.inject();
} catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) {
Bukkit.shutdown();
}
}
@Override
public void onEnable() {
getServer().getPluginManager().registerEvents(new PlayerListener(this), this);
getServer().getPluginManager().registerEvents(new WorldListener(), this);
}
@Override
public void onDisable() {
Bukkit.shutdown();
}
}