Skip to content

Commit

Permalink
Typo / grammar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FlowArg committed Jul 22, 2023
1 parent 97b8aff commit 9268ea5
Show file tree
Hide file tree
Showing 24 changed files with 39 additions and 36 deletions.
12 changes: 6 additions & 6 deletions src/main/java/fr/flowarg/flowupdater/FlowUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public class FlowUpdater
/** Represent some settings for FlowUpdater */
private final UpdaterOptions updaterOptions;

/** Represent a list of ExternalFile. External files are download before post executions.*/
/** Represent a list of ExternalFile. External files are downloaded before post-executions.*/
private final List<ExternalFile> externalFiles;

/** Represent a list of Runnable. Post Executions are called after update. */
/** Represent a list of Runnable. Post-Executions are called after update. */
private final List<Runnable> postExecutions;

/** The integration manager object */
Expand Down Expand Up @@ -87,7 +87,7 @@ public void init(@NotNull ILogger logger)
* automatically assigned to {@link FlowUpdater#NULL_CALLBACK}.
* @param externalFiles {@link List<ExternalFile>} are downloaded before postExecutions.
* @param postExecutions {@link List<Runnable>} are called after update.
* @param modLoaderVersion {@link IModLoaderVersion} to install, can be null.
* @param modLoaderVersion {@link IModLoaderVersion} to install can be null.
*/
private FlowUpdater(VanillaVersion vanillaVersion, ILogger logger,
UpdaterOptions updaterOptions, IProgressCallback callback,
Expand Down Expand Up @@ -382,7 +382,7 @@ public FlowUpdaterBuilder withPostExecutions(Runnable... postExecutions)
}

/**
* Necessary if you want to install a mod loader like Forge or Fabric for instance.
* Necessary if you want to install a mod loader like Forge or Fabric, for instance.
* Append a {@link IModLoaderVersion} object in the final FlowUpdater instance.
* @param modLoaderVersion the {@link IModLoaderVersion} to append and install.
* @return the builder.
Expand Down Expand Up @@ -461,8 +461,8 @@ public List<ExternalFile> getExternalFiles()
}

/**
* Get the list of post executions.
* @return all post executions
* Get the list of post-executions.
* @return all post-executions
*/
public List<Runnable> getPostExecutions()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class DownloadList
private boolean init = false;

/**
* This method initialize fields.
* This method initializes fields.
*/
public void init()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private void silentDebug(String message)
}

/**
* This method calls others methods to parse each part of the given Minecraft Version.
* This method calls other methods to parse each part of the given Minecraft Version.
* @throws IOException if an I/O error occurred.
*/
public void read() throws IOException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package fr.flowarg.flowupdater.download.json;

/**
* This class represent an asset.
* This class represents an asset.
*/
public class AssetDownloadable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.Map;

/**
* This class represent an asset index of a Minecraft version.
* This class represents an asset index of a Minecraft version.
*/
public class AssetIndex
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.Objects;

/**
* This class represent a file in the CurseForge API.
* This class represents a file in the CurseForge API.
*/
public class CurseFileInfo
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package fr.flowarg.flowupdater.download.json;

/**
* This class represent a mod pack file in the CurseForge API.
* This class represents a mod pack file in the CurseForge API.
*/
public class CurseModPackInfo extends CurseFileInfo
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.Objects;

/**
* This class represent a classic downloadable file such as a library, the client/server or natives.
* This class represents a classic downloadable file such as a library, the client/server or natives.
*/
public class Downloadable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.List;

/**
* This class represent an external file object.
* This class represents an external file object.
*/
public class ExternalFile
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.net.URL;

/**
* This class represent an MCP object.
* This class represents an MCP object.
*/
public class MCP
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.List;

/**
* This class represent a Mod object.
* This class represents a Mod object.
*/
public class Mod
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class ModrinthVersionInfo

/**
* Construct a new ModrinthVersionInfo object.
* @param projectReference the project reference, can be slug or id.
* @param projectReference the project reference can be slug or id.
* @param versionNumber the version number (and NOT the version name unless they are the same).
*/
public ModrinthVersionInfo(String projectReference, String versionNumber)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package fr.flowarg.flowupdater.download.json;

/**
* This class represent an OptiFineInfo object.
* This class represents an OptiFineInfo object.
*/
public class OptiFineInfo
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
import java.nio.file.Path;

/**
* The new Integration system replaces old plugin system which had some problems such as unavailability to communicate directly with FlowUpdater.
* This new system is more easy to use: no more annoying updater's options, no more extra-dependencies.
* The new Integration system replaces an old plugin system
* which had some problems such as unavailability to communicate directly with FlowUpdater.
* This new system is easier to use: no more annoying updater's options, no more extra-dependencies.
* Polymorphism and inheritance can now be used to avoid code duplication.
*/
public abstract class Integration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.List;

/**
* The integration manager loads integrations stuff at the startup of FlowUpdater.
* The integration manager loads integration's stuff at the startup of FlowUpdater.
*/
public class IntegrationManager
{
Expand All @@ -46,7 +46,7 @@ public IntegrationManager(@NotNull FlowUpdater updater)
/**
* This method loads the CurseForge integration and fetches some data.
* @param dir the installation directory.
* @param curseFeaturesUser a version that accepts CurseForge's features stuff.
* @param curseFeaturesUser a version that accepts CurseForge's feature stuff.
*/
public void loadCurseForgeIntegration(Path dir, ICurseFeaturesUser curseFeaturesUser)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.List;

/**
* This class represent an object that using CurseForge features.
* This class represents an object that using CurseForge features.
*/
public interface ICurseFeaturesUser
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ public Mod parseModFile(@NotNull JsonObject version)
public ModrinthModPack getCurseModPack(ModrinthModPackInfo info) throws Exception
{
final Path modPackFile = this.checkForUpdate(info);
if(modPackFile == null)
throw new FlowUpdaterException("Can't find the mod pack file with the provided Modrinth mod pack info.");
this.extractModPack(modPackFile, info.isInstallExtFiles());
return this.parseMods();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public UpdaterOptionsBuilder withVersionChecker(boolean versionChecker)
/**
* Set the path to the java executable to use with Forge and Fabric installers.
* (Directly the java executable, not the java home)
* If you wish to set up the java home, use the {@link System#setProperty(String, String)} method
* If you wish to set up the java home, you should use the {@link System#setProperty(String, String)} method
* with the "java.home" key.
* By default, it's taken from {@code System.getProperty("java.home")}.
* @param javaPath the path to the java executable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.function.Supplier;

/**
* Builder API ; Represent an argument for a Builder implementation.
* Builder API; Represent an argument for a Builder implementation.
* @version 1.6
* @author flow
*
Expand Down Expand Up @@ -91,7 +91,7 @@ public void set(T object)
}

/**
* Indicate that provided arguments are required if this argument is builded.
* Indicate that provided arguments are required if this argument is built.
* @param required required arguments.
* @return this.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package fr.flowarg.flowupdater.utils.builderapi;

/**
* Builder API ; This exception is thrown when an error occurred with Builder API.
* Builder API; This exception is thrown when an error occurred with Builder API.
* @version 1.6
* @author flow
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public interface IBuilder<T>
/**
* Build a {@link T} object.
* @return a {@link T} object.
* @throws BuilderException if an error occurred when building object.
* @throws BuilderException if an error occurred when building an object.
*/
T build() throws BuilderException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ protected void parseAndMoveJson(@NotNull Path dirToInstall, @NotNull Path versio
StringUtils.toString(Files.readAllLines(jsonFilePath, StandardCharsets.UTF_8)))
.getAsJsonObject();

final JsonArray librariesArray = obj.getAsJsonArray("libraries");
final JsonArray libraryArray = obj.getAsJsonArray("libraries");
final Path libraries = dirToInstall.resolve("libraries");

librariesArray.forEach(el -> {
libraryArray.forEach(el -> {
final JsonObject artifact = el.getAsJsonObject();
final String[] parts = artifact.get("name").getAsString().split(":");
IOUtils.downloadArtifacts(this.logger, libraries, artifact.get("url").getAsString(), parts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public abstract class ModLoaderVersionBuilder<T extends IModLoaderVersion, B ext
protected final BuilderArgument<ModrinthModPackInfo> modrinthPackArgument = new BuilderArgument<ModrinthModPackInfo>("ModrinthModPack").optional();

/**
* Append a mods list to the version.
* Append a mod list to the version.
* @param mods mods to append.
* @return the builder.
*/
Expand Down Expand Up @@ -64,7 +64,7 @@ public B withMods(String jsonUrl)
}

/**
* Append a mods list to the version.
* Append a mod list to the version.
* @param curseMods CurseForge's mods to append.
* @return the builder.
*/
Expand Down Expand Up @@ -105,7 +105,7 @@ public B withCurseMods(String jsonUrl)
}

/**
* Append a mods list to the version.
* Append a mod list to the version.
* @param modrinthMods Modrinth's mods to append.
* @return the builder.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public MCP getMCP()
}

/**
* Is the current version a snapshot ?
* Is the current version a snapshot?
* @return if the current version is a snapshot.
*/
public boolean isSnapshot()
Expand Down Expand Up @@ -223,7 +223,7 @@ public static class VanillaVersionBuilder implements IBuilder<VanillaVersion>

/**
* Define the name of the wanted Minecraft version.
* @param name wanted Minecraft version.
* @param name wanted Minecraft's version.
* @return the builder.
*/
public VanillaVersionBuilder withName(String name)
Expand Down Expand Up @@ -264,7 +264,7 @@ public VanillaVersionBuilder withMCP(String mcpJsonUrl)
}

/**
* Is the version a snapshot ?
* Is the version a snapshot?
* @param snapshot if the version is a snapshot.
* @return the builder.
*/
Expand Down

0 comments on commit 9268ea5

Please sign in to comment.