3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-25 15:50:19 +01:00

Fix up some annotations

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-06-29 10:42:01 -04:00
Ursprung 22afd1cf41
Commit 5b9dbb74c9
2 geänderte Dateien mit 5 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -93,6 +93,7 @@ public interface ResultedEvent<R extends ResultedEvent.Result> {
return status; return status;
} }
@Deprecated
public Optional<net.kyori.text.Component> getReason() { public Optional<net.kyori.text.Component> getReason() {
return Optional.ofNullable(reason).map(AdventureCompat::asOriginalTextComponent); return Optional.ofNullable(reason).map(AdventureCompat::asOriginalTextComponent);
} }

Datei anzeigen

@ -21,7 +21,7 @@ public final class KickedFromServerEvent implements
private final Player player; private final Player player;
private final RegisteredServer server; private final RegisteredServer server;
private final net.kyori.adventure.text.Component originalReason; private final net.kyori.adventure.text.@Nullable Component originalReason;
private final boolean duringServerConnect; private final boolean duringServerConnect;
private ServerKickResult result; private ServerKickResult result;
@ -63,7 +63,7 @@ public final class KickedFromServerEvent implements
* @param result the initial result * @param result the initial result
*/ */
public KickedFromServerEvent(Player player, RegisteredServer server, public KickedFromServerEvent(Player player, RegisteredServer server,
net.kyori.adventure.text.Component originalReason, net.kyori.adventure.text.@Nullable Component originalReason,
boolean duringServerConnect, ServerKickResult result) { boolean duringServerConnect, ServerKickResult result) {
this.player = Preconditions.checkNotNull(player, "player"); this.player = Preconditions.checkNotNull(player, "player");
this.server = Preconditions.checkNotNull(server, "server"); this.server = Preconditions.checkNotNull(server, "server");
@ -189,7 +189,8 @@ public final class KickedFromServerEvent implements
private final net.kyori.adventure.text.Component message; private final net.kyori.adventure.text.Component message;
private final RegisteredServer server; private final RegisteredServer server;
private RedirectPlayer(RegisteredServer server, net.kyori.adventure.text.Component message) { private RedirectPlayer(RegisteredServer server,
net.kyori.adventure.text.@Nullable Component message) {
this.server = Preconditions.checkNotNull(server, "server"); this.server = Preconditions.checkNotNull(server, "server");
this.message = message; this.message = message;
} }
@ -252,7 +253,6 @@ public final class KickedFromServerEvent implements
private final net.kyori.adventure.text.Component message; private final net.kyori.adventure.text.Component message;
@Deprecated
private Notify(net.kyori.adventure.text.Component message) { private Notify(net.kyori.adventure.text.Component message) {
this.message = Preconditions.checkNotNull(message, "message"); this.message = Preconditions.checkNotNull(message, "message");
} }