From d9493c7474f48367f31d428351e3116f0523206b Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Tue, 8 Apr 2025 20:58:23 +0200 Subject: [PATCH] Dont show bedrock players and send an error for getting your own skull as a bedrock player --- .../de/steamwar/bausystem/features/util/SkullCommand.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SkullCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SkullCommand.java index 55ea2c05..e7da48d1 100644 --- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SkullCommand.java +++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/util/SkullCommand.java @@ -44,6 +44,10 @@ public class SkullCommand extends SWCommand { @Register public void giveCommand(@Validator Player p) { + if (p.getName().startsWith(".")) { + BauSystem.MESSAGE.send("SKULL_INVALID", p); + return; + } giveCommand(p, p.getName()); } @@ -68,7 +72,7 @@ public class SkullCommand extends SWCommand { @Override public List tabCompletes(CommandSender commandSender, PreviousArguments previousArguments, String s) { - return Bukkit.getOnlinePlayers().stream().map(Player::getName).filter(s1 -> !s1.endsWith("⍇")).collect(Collectors.toList()); + return Bukkit.getOnlinePlayers().stream().map(Player::getName).filter(s1 -> !s1.startsWith(".")).collect(Collectors.toList()); } }; }