From c241489552be91f08db15bfefe3d9f85a3df3ad6 Mon Sep 17 00:00:00 2001 From: Tamion <70228790+notTamion@users.noreply.github.com> Date: Sun, 10 Nov 2024 22:40:23 +0100 Subject: [PATCH] exclude operatores --- .../0988-Fix-entity-type-tags-suggestions-in-selectors.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0988-Fix-entity-type-tags-suggestions-in-selectors.patch b/patches/server/0988-Fix-entity-type-tags-suggestions-in-selectors.patch index 367029eda5..7581c95f97 100644 --- a/patches/server/0988-Fix-entity-type-tags-suggestions-in-selectors.patch +++ b/patches/server/0988-Fix-entity-type-tags-suggestions-in-selectors.patch @@ -12,7 +12,7 @@ Mojira Issue: https://bugs.mojang.com/browse/MC-235045 Feature patch diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java -index 3549ffea451b932602efb113844ba21a7bc72371..31ba3e942e39a6f1fe848f937bf97ffa2b4102da 100644 +index 3549ffea451b932602efb113844ba21a7bc72371..373482cfdb449a0bd6aa078eb40b87522bf9ca4c 100644 --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java @@ -370,7 +370,7 @@ public class CommandSourceStack implements ExecutionCommandSource getOnlinePlayerNames() { - return Lists.newArrayList(this.server.getPlayerNames()); -+ return this.entity instanceof ServerPlayer sourcePlayer ? this.getServer().getPlayerList().getPlayers().stream().filter(serverPlayer -> sourcePlayer.getBukkitEntity().canSee(serverPlayer.getBukkitEntity())).map(serverPlayer -> serverPlayer.getGameProfile().getName()).toList() : Lists.newArrayList(this.server.getPlayerNames()); // Paper - Make CommandSourceStack respect hidden players ++ return this.entity instanceof ServerPlayer sourcePlayer && !this.server.getPlayerList().isOp(sourcePlayer.getGameProfile()) ? this.getServer().getPlayerList().getPlayers().stream().filter(serverPlayer -> sourcePlayer.getBukkitEntity().canSee(serverPlayer.getBukkitEntity())).map(serverPlayer -> serverPlayer.getGameProfile().getName()).toList() : Lists.newArrayList(this.server.getPlayerNames()); // Paper - Make CommandSourceStack respect hidden players } @Override