aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server')
-rw-r--r--patches/server/0624-Expose-Tracked-Players.patch31
1 files changed, 14 insertions, 17 deletions
diff --git a/patches/server/0624-Expose-Tracked-Players.patch b/patches/server/0624-Expose-Tracked-Players.patch
index 864d065cca..a7b6532874 100644
--- a/patches/server/0624-Expose-Tracked-Players.patch
+++ b/patches/server/0624-Expose-Tracked-Players.patch
@@ -4,29 +4,26 @@ Date: Fri, 26 Feb 2021 16:24:25 -0600
Subject: [PATCH] Expose Tracked Players
-diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index ff9ef9741ccd561f8bf1c517f5c9671874e0a083..660fea802abee79414815f73e079a05b5be1b72a 100644
---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -2403,6 +2403,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+index 986f045a2e6a040c6e2aab7420c8cb2d4ac3a726..ee50ea695585639d0ff184b675f3fb3b205b9f86 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+@@ -1263,5 +1263,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+ public boolean isTicking() {
+ return getHandle().isTicking();
}
- // Paper end
-
-+ // Paper start
++
+ @Override
-+ public Set<Player> getTrackedPlayers() {
-+ if (entity.tracker == null) {
++ public Set<org.bukkit.entity.Player> getTrackedPlayers() {
++ if (this.entity.tracker == null) {
+ return java.util.Collections.emptySet();
+ }
+
-+ Set<Player> set = new HashSet<>(entity.tracker.seenBy.size());
-+ for (net.minecraft.server.network.ServerPlayerConnection connection : entity.tracker.seenBy) {
++ Set<org.bukkit.entity.Player> set = new java.util.HashSet<>(this.entity.tracker.seenBy.size());
++ for (net.minecraft.server.network.ServerPlayerConnection connection : this.entity.tracker.seenBy) {
+ set.add(connection.getPlayer().getBukkitEntity().getPlayer());
+ }
+ return set;
+ }
-+ // Paper end
-+
- // Spigot start
- private final Player.Spigot spigot = new Player.Spigot()
- {
+ // Paper end
+ }