2021-06-15 02:59:31 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Tom <cryptite@gmail.com>
|
|
|
|
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
|
2021-06-16 10:14:53 +00:00
|
|
|
index bb79f5aedf79f42e4ae6c45faa9373a0e8c94159..ee40e03704bb8c6b3aa990542fc852058d00f081 100644
|
2021-06-15 02:59:31 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
2021-06-16 10:14:53 +00:00
|
|
|
@@ -2319,6 +2319,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
2021-06-15 02:59:31 +00:00
|
|
|
}
|
|
|
|
// Paper end
|
|
|
|
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public Set<Player> getTrackedPlayers() {
|
|
|
|
+ if (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.add(connection.getPlayer().getBukkitEntity().getPlayer());
|
|
|
|
+ }
|
|
|
|
+ return set;
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
+
|
|
|
|
// Spigot start
|
|
|
|
private final Player.Spigot spigot = new Player.Spigot()
|
|
|
|
{
|