mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 14:38:53 +00:00
Fix /tp command with players, remove unhelpful TAB completion
This commit is contained in:
1 parent
9bdf67c250
commit
5faab57d8e
7 files changed
+143
-133
No files matched your search
@@ -75,12 +75,12 @@ public abstract class NetworkMessenger {
|
||||
*/
|
||||
public final CompletableFuture<Optional<String>> findPlayer(@NotNull OnlineUser requester, @NotNull String playerName) {
|
||||
return getOnlinePlayerNames(requester).thenApply(networkedPlayers ->
|
||||
Optional.ofNullable(Arrays.stream(networkedPlayers)
|
||||
Arrays.stream(networkedPlayers)
|
||||
.filter(user -> user.equalsIgnoreCase(playerName))
|
||||
.findFirst()
|
||||
.orElse(Arrays.stream(networkedPlayers)
|
||||
.or(() -> Arrays.stream(networkedPlayers)
|
||||
.filter(user -> user.toLowerCase().startsWith(playerName))
|
||||
.findFirst().orElse(null))));
|
||||
.findFirst()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user