Skip to content

Commit

Permalink
Simply if
Browse files Browse the repository at this point in the history
  • Loading branch information
IndianBartonka committed Oct 17, 2024
1 parent 37680a3 commit 7d46734
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/java/pl/indianbartonka/util/BedrockQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ public static BedrockQuery create(final String serverAddress, final int port) {

int portV4 = -1;
int portV6 = -1;
boolean nintendoLimited = true;

if (splittedData.length >= 10 && splittedData[9].contains("1")) {
nintendoLimited = false;
}
final boolean nintendoLimited = (splittedData.length < 10 || !splittedData[9].contains("1"));

if (splittedData.length >= 12) {
portV4 = Integer.parseInt(splittedData[10]);
Expand Down

0 comments on commit 7d46734

Please sign in to comment.