use of com.github.games647.changeskin.bungee.listener.ServerSwitchListener in project ChangeSkin by games647.
the class ChangeSkinBungee method onEnable.
@Override
public void onEnable() {
logger = CommonUtil.createLoggerFromJDK(getLogger());
core = new ChangeSkinCore(this);
try {
core.load(true);
} catch (Exception ioExc) {
logger.error("Error initializing plugin. Disabling...", ioExc);
return;
}
PluginManager pluginManager = getProxy().getPluginManager();
pluginManager.registerListener(this, new ConnectListener(this));
pluginManager.registerListener(this, new ServerSwitchListener(this));
// this is required to listen to messages from the server
getProxy().registerChannel(getName());
pluginManager.registerListener(this, new MessageListener(this));
// register commands
pluginManager.registerCommand(this, new SetCommand(this));
pluginManager.registerCommand(this, new InvalidateCommand(this));
pluginManager.registerCommand(this, new UploadCommand(this));
pluginManager.registerCommand(this, new SelectCommand(this));
pluginManager.registerCommand(this, new InfoCommand(this));
}
Aggregations