13
0
geforkt von Mirrors/Velocity

Merge pull request #181 from hugmanrique/master

Fix implementation of #176
Dieser Commit ist enthalten in:
Andrew Steinborn 2019-03-09 17:29:13 -05:00 committet von GitHub
Commit ddb4623758
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -450,11 +450,6 @@ public class VelocityServer implements ProxyServer {
public Collection<Player> matchPlayer(String partialName) {
Objects.requireNonNull(partialName);
Optional<Player> exactMatch = getPlayer(partialName);
if (exactMatch.isPresent()) {
return Collections.singleton(exactMatch.get());
}
return getAllPlayers().stream().filter(p -> p.getUsername()
.regionMatches(true, 0, partialName, 0, partialName.length()))
.collect(Collectors.toList());
@ -464,11 +459,6 @@ public class VelocityServer implements ProxyServer {
public Collection<RegisteredServer> matchServer(String partialName) {
Objects.requireNonNull(partialName);
Optional<RegisteredServer> exactMatch = getServer(partialName);
if (exactMatch.isPresent()) {
return Collections.singleton(exactMatch.get());
}
return getAllServers().stream().filter(s -> s.getServerInfo().getName()
.regionMatches(true, 0, partialName, 0, partialName.length()))
.collect(Collectors.toList());