public static ComponentResult denied(Component reason) { Preconditions.checkNotNull(reason, "reason"); return new ComponentResult(false, reason); } }
public LoginEvent(Player player) { this.player = Preconditions.checkNotNull(player, "player"); this.result = ComponentResult.allowed(); }
Optional<Component> reason = event.getResult().getReason(); if (reason.isPresent()) { player.disconnect(reason.get());