3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00
Paper/Spigot-Server-Patches/0184-Don-t-process-packets-from-offline-players.patch
sulu5890 303f32a3fe
Update Log4J (1.10.2) (#7152)
* Update Upstream (Craftbukkit)

* update log4j
2021-12-19 16:10:16 -08:00

31 Zeilen
1.3 KiB
Diff

From 440a5d1b8f3e5356c9ead921f7a6059fdf028790 Mon Sep 17 00:00:00 2001
From: "From: Alfie Cleveland" <alfeh@me.com>
Date: Mon, 28 Nov 2016 15:56:28 -0600
Subject: [PATCH] Don't process packets from offline players
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 301313b1f..865c1a295 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -14,6 +14,7 @@ import javax.annotation.Nullable;
// CraftBukkit start
import org.bukkit.craftbukkit.entity.CraftHumanEntity;
import org.bukkit.craftbukkit.entity.CraftItem;
+import org.bukkit.craftbukkit.entity.CraftPlayer; // Paper
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityCombustByEntityEvent;
@@ -301,7 +302,7 @@ public abstract class EntityHuman extends EntityLiving {
}
protected boolean cj() {
- return this.getHealth() <= 0.0F || this.isSleeping();
+ return this.getHealth() <= 0.0F || this.isSleeping() || (this.bukkitEntity != null && this.bukkitEntity instanceof CraftPlayer && !((CraftPlayer) this.bukkitEntity).isOnline()); // Paper - Pull #517
}
public void closeInventory() {
--
2.34.0