Dont show bedrock players and send an error for getting your own skull as a bedrock player
All checks were successful
SteamWarCI Build successful
All checks were successful
SteamWarCI Build successful
This commit is contained in:
@ -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<String> 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());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user