3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

Don't process packets from offline players

Dieser Commit ist enthalten in:
Zach Brown 2016-11-28 15:57:17 -06:00
Ursprung 9410004c44
Commit 946bffb68d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: CC9DA35FC5450B76

Datei anzeigen

@ -0,0 +1,30 @@
From 87366b9912d670dc827854b9f83456f5f61cbef0 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 301313b..865c1a2 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.10.2