Remove redundant getRemoteAddress that can cause an NPE (#7331)

This commit is contained in:
PureGero 2022-01-14 13:56:45 +10:00 committed by GitHub
parent 6663747b89
commit 78999b5778
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 73 additions and 65 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 201f36b0f8ae391b2efbad5cc38f115537a761a2..0052a9c5d19db44331bb7ee93544d783b471e70a 100644
index f4e74b0bc3d192d7f7c2bc1dbfef92a28863a57c..b7f3be857d9ffb166e99f20753dbc671bb3b5451 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1119,6 +1119,11 @@ public abstract class PlayerList {
@@ -1123,6 +1123,11 @@ public abstract class PlayerList {
}
private void sendPlayerPermissionLevel(ServerPlayer player, int permissionLevel) {
@ -20,7 +20,7 @@ index 201f36b0f8ae391b2efbad5cc38f115537a761a2..0052a9c5d19db44331bb7ee93544d783
if (player.connection != null) {
byte b0;
@@ -1133,8 +1138,10 @@ public abstract class PlayerList {
@@ -1137,8 +1142,10 @@ public abstract class PlayerList {
player.connection.send(new ClientboundEntityEventPacket(player, b0));
}