aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0184-Don-t-process-packets-from-offline-players.patch
blob: 6ff3eb7e1237026e6f8fb71b1f910171c0bf1256 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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