Skip to content

Commit

Permalink
Simplified code
Browse files Browse the repository at this point in the history
  • Loading branch information
Faboslav committed Aug 28, 2022
1 parent 6120a24 commit 5cd3760
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static void checkForNewUpdates() {

String modVersion = ModVersion.getModVersion();

if(modVersion == null) {
if (modVersion == null) {
return;
}

Expand Down Expand Up @@ -71,9 +71,7 @@ public static String getLatestVersion() {
return null;
}

String latestModVersion = json.get(gameVersion).getAsString();

return latestModVersion;
return json.get(gameVersion).getAsString();
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

import javax.annotation.Nullable;

public final class ModVersionImpl {
public final class ModVersionImpl
{
@Nullable
public static String getModVersion() {
return FabricLoader.getInstance().getModContainer(FriendsAndFoes.MOD_ID).map(modContainer -> modContainer.getMetadata().getVersion().toString()).orElse(null);
Expand Down

0 comments on commit 5cd3760

Please sign in to comment.