mirror of
https://github.com/PaperMC/Velocity.git
synced 2026-06-21 09:47:44 +02:00
Require non-null reason (#1823)
This commit is contained in:
@@ -197,7 +197,7 @@ public interface Player extends
|
||||
*
|
||||
* @param reason component with the reason
|
||||
*/
|
||||
void disconnect(Component reason);
|
||||
void disconnect(@NotNull Component reason);
|
||||
|
||||
/**
|
||||
* Sends chat input onto the players current server as if they typed it into the client chat box.
|
||||
|
||||
@@ -111,6 +111,7 @@ import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
@@ -645,7 +646,8 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnect(Component reason) {
|
||||
public void disconnect(@NotNull Component reason) {
|
||||
Objects.requireNonNull(reason, "reason");
|
||||
if (connection.eventLoop().inEventLoop()) {
|
||||
disconnect0(reason, false);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user