geforkt von Mirrors/Paper
4104545b11
"It was from a different time before books were as jank as they are now. As time has gone on they've only proven to be worse and worse."
33 Zeilen
1.2 KiB
Diff
33 Zeilen
1.2 KiB
Diff
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
|
|
index 85187e7b0d965b7930e6b2ab8d321d6d27211a35..4f61acf44b40bf15ae6465d7999e2bc2da837c82 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -2339,6 +2339,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
}
|
|
// 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()
|
|
{
|