Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-04 23:30:24 +01:00
Improve performance in ProtocolVersionRange#contains (#3964)
Dieser Commit ist enthalten in:
Ursprung
b67ebecce8
Commit
9d3db4cf97
@ -104,7 +104,10 @@ public class ProtocolVersionRange {
|
|||||||
*/
|
*/
|
||||||
public boolean contains(final ProtocolVersion version) {
|
public boolean contains(final ProtocolVersion version) {
|
||||||
if (this.ranges == null) return true;
|
if (this.ranges == null) return true;
|
||||||
return this.ranges.stream().anyMatch(range -> range.contains(version));
|
for (Range<ProtocolVersion> range : this.ranges) {
|
||||||
|
if (range.contains(version)) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren