PaperMC/CraftBukkit-Patches/0087-Unfinalize-the-isDisconnected-method-by-bukkit.patch

24 lines
1 KiB
Diff
Raw Normal View History

2015-05-25 14:05:40 +02:00
From 10f8d30f1edd380dbd27ee2ba67cd21d2f9e0203 Mon Sep 17 00:00:00 2001
From: hcherndon <hcherndon@gmail.com>
Date: Sat, 15 Feb 2014 01:51:20 -0600
Subject: [PATCH] Unfinalize the isDisconnected() method by bukkit.
This would literally mean the world to me. You have no idea how much this method being final is fucking me over right now. (Working with NPC's and what not.)
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
2015-05-25 14:05:40 +02:00
index f40c7c9..a357d57 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
2015-05-25 14:05:40 +02:00
@@ -2059,7 +2059,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
}
// CraftBukkit start - Add "isDisconnected" method
- public final boolean isDisconnected() {
2015-02-28 12:36:22 +01:00
+ public boolean isDisconnected() { // Spigot
2015-05-09 22:23:26 +02:00
return !this.player.joining && !this.networkManager.channel.config().isAutoRead();
}
2015-02-28 12:36:22 +01:00
--
2015-05-09 22:23:26 +02:00
2.1.4