Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@40adc23 Fix incorrect javadoc in JarLibrary (#9513) PaperMC/Paper@c016e03 Fix unbreakable flint and steel consumed when igniting creepers (#9509) PaperMC/Paper@b1334b5 Mark Player.sendSignChange as deprecated (#9382) PaperMC/Paper@2f8d9db Pathfinder hasPath should check if path is done. (#9231) PaperMC/Paper@46a36d3 Make ExperienceOrb entities call EntitySpawnEvent (#9197) PaperMC/Paper@24d690f Fix hopper not marking source inv as changed (#9070) PaperMC/Paper@383f0ed Remove sign ticking (#9478) PaperMC/Paper@d8b8f61 Configurable Region Compression Format (#8505) PaperMC/Paper@2c54b39 Don't support hex in book title and author (#9493) PaperMC/Paper@e19177a Rewrote Amethyst logic to throw both BlockGrowEvent and BlockSpreadEvent (#9217) PaperMC/Paper@4283054 Add player whitelist events (#9209) PaperMC/Paper@aa93dcf feat: add minimessage tag resolvers overload to CommandSender#sendMessage (#9505) PaperMC/Paper@b14979e Remove isRemoved skip on .discard() (#9520) PaperMC/Paper@1837f6c Prevent entity removals if the entity slices is receiving status updates PaperMC/Paper@a40e48f Add cause to PlayerOpenSignEvent (#9441) PaperMC/Paper@7d1cc6d Add Translatable interface to MusicInstrument (#9538) PaperMC/Paper@6c7e3c5 Clarify viewers set mutability in chat events (#9525) PaperMC/Paper@f402f89 Bump net.kyori.ansi to 1.0.2 (#9546) PaperMC/Paper@81619a6 Fix treasure map config default (#9572) PaperMC/Paper@13c9d3c Bump net.kyori:ansi to 1.0.3 (#9575) PaperMC/Paper@2c55dd8 Expand use of strict advancement dim check (#9545) PaperMC/Paper@69a8013 Fix inventorycloseevent javadocs (#9533) PaperMC/Paper@2fa8efc Updated Upstream (Bukkit/CraftBukkit) (#9485) PaperMC/Paper@508a295 Only erase allay memory on non-item targets (#9570) PaperMC/Paper@31358d5 API for updating recipes on clients (#6463) PaperMC/Paper@8fe8ca6 Add clickable version on version command (#9347) PaperMC/Paper@d6d2b6f Only capture actual tree growth (#6464)
29 lines
1.3 KiB
Diff
29 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Lexi <lexi@qixils.dev>
|
|
Date: Thu, 23 Jun 2022 22:03:18 -0400
|
|
Subject: [PATCH] Add Player#getHiddenEntities API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
index 5bbded65095dccfadaf7576fc41b5f62974878b4..ece3637304863c8441c153e06ea9934cc91ff961 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -1972,6 +1972,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity)); // Paper
|
|
}
|
|
// Paper start
|
|
+
|
|
+ // Parchment start
|
|
+ @Override
|
|
+ public Set<UUID> getHiddenEntities(Plugin plugin) {
|
|
+ return invertedVisibilityEntities.entrySet().stream()
|
|
+ .filter(entry -> entry.getValue().contains(CraftPlayer.getPluginWeakReference(plugin)))
|
|
+ .map(Map.Entry::getKey)
|
|
+ .collect(java.util.stream.Collectors.toSet());
|
|
+ }
|
|
+ // Parchment end
|
|
+
|
|
@Override
|
|
public void setPlayerProfile(com.destroystokyo.paper.profile.PlayerProfile profile) {
|
|
ServerPlayer self = this.getHandle();
|