use of net.ME1312.SubServers.Velocity.Event.SubStartEvent in project SubServers-2 by ME1312.
the class ExternalSubServer method start.
@Override
public boolean start(UUID player) {
if (!lock && isAvailable() && isEnabled() && !running && getCurrentIncompatibilities().size() == 0) {
lock = true;
SubStartEvent event = new SubStartEvent(player, this);
host.plugin.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
Logger.get("SubServers").info("Now starting " + getName());
started(null);
host.queue(new PacketExControlServer(this, Action.START, logger.getExternalAddress().toString()));
return true;
} else {
lock = false;
return false;
}
} else
return false;
}
Aggregations