Skip to content

Commit

Permalink
Fixed grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
fulminazzo committed Apr 12, 2024
1 parent d2760ad commit f95e471
Show file tree
Hide file tree
Showing 17 changed files with 31 additions and 28 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

Its core functions relate to the [Bukkit project](https://dev.bukkit.org/), but one can use the **base** modules across any preferred platform.

Since every module provides a **serializer** one, to load and save the objects, it is possible to store or create **GUIs** and **custom Items** in unrelated platforms;
Since every module provides a **serializer** one to load and save the objects,
it is possible to store or create **GUIs** and **custom Items** in unrelated platforms;
then, send the actual data to a [Bukkit](https://dev.bukkit.org/) backend and display it.

For example, a `/hub` plugin that works with [BungeeCord](https://www.spigotmc.org/wiki/bungeecord/) or [Velocity](https://papermc.io/software/velocity).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.jetbrains.annotations.Nullable;

/**
* This parser allows to parse an object using the {@link CallableYAMLParser} methods.
* This parser allows parsing an object using the {@link CallableYAMLParser} methods.
* However, it forces the saved object to store a <i>type</i> field, that contains the name of the class of the original object.
* Upon loading, this class is retrieved (and will throw errors for invalid values) to recreate the object.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public final class YAGLParser {

/**
* Adds all the parsers from the {@link it.angrybear.yagl.parsers} package to {@link FileConfiguration}.
* @deprecated This will NOT add module specific parsers. It is recommended to look for the <b>&lt;module&gt;YAGLParser</b> class instead.
* @deprecated This will NOT add module-specific parsers. It is recommended to look for the <b>&lt;module&gt;YAGLParser</b> class instead.
*/
@Deprecated
public static void addAllParsers() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public interface GUIContent extends Metadatable {
@NotNull Item render();

/**
* Sets priority.
* Sets the priority.
* If two {@link GUIContent} share the same slot,
* only the one with higher priority will be shown.
*
Expand Down Expand Up @@ -60,7 +60,7 @@ public interface GUIContent extends Metadatable {
@Nullable Sound getClickSound();

/**
* Allows to set a {@link PermissionRequirement} with the given permission as the view requirement.
* Allows setting a {@link PermissionRequirement} with the given permission as the view requirement.
*
* @param permission the permission
* @return this content
Expand Down
6 changes: 3 additions & 3 deletions gui/base/src/main/java/it/angrybear/yagl/guis/GUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public interface GUI extends Metadatable {

/**
* Tries to add all the contents in the GUI.
* If it fails (because of empty GUI) it throws an {@link IllegalArgumentException}.
* If it fails (because of empty GUI), it throws an {@link IllegalArgumentException}.
*
* @param contents the contents
* @return the gui
Expand All @@ -133,7 +133,7 @@ public interface GUI extends Metadatable {

/**
* Tries to add all the contents in the GUI.
* If it fails (because of empty GUI) it throws an {@link IllegalArgumentException}.
* If it fails (because of empty GUI), it throws an {@link IllegalArgumentException}.
*
* @param contents the contents
* @return this gui
Expand All @@ -144,7 +144,7 @@ public interface GUI extends Metadatable {

/**
* Tries to add all the contents in the GUI.
* If it fails (because of empty GUI) it throws an {@link IllegalArgumentException}.
* If it fails (because of empty GUI), it throws an {@link IllegalArgumentException}.
*
* @param contents the contents
* @return this gui
Expand Down
2 changes: 1 addition & 1 deletion item/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ for items resulted in smelting in the furnace.
</dependency>
```

This module depends on the main core and adds some implementation specific features.
This module depends on the main core and adds some implementation-specific features.

First of all, it adds the [BukkitItem](bukkit/src/main/java/it/angrybear/yagl/items/BukkitItem.java) class,
an implementation of [Item](src/main/java/it/angrybear/yagl/items/Item.java)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public interface Recipe extends Iterable<Item> {
@NotNull Item getOutput();

/**
* Gets the amount of ingredients of this recipe.
* Gets the number of ingredients in this recipe.
*
* @return the size
*/
Expand All @@ -50,7 +50,7 @@ default int size() {
}

/**
* Check if the current recipe has no ingredients set.
* Check if the current recipe has no ingredient set.
*
* @return true if {@link #size()} is 0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public Shape(final int rows, final int columns) {
}

/**
* Sets columns.
* Sets the columns.
* Should be between {@link #MIN_COLUMNS} and {@link #MAX_COLUMNS}.
*
* @param columns the columns
Expand All @@ -138,7 +138,7 @@ public void setColumns(final int columns) {
}

/**
* Sets rows.
* Sets the rows.
* Should be between {@link #MIN_ROWS} and {@link #MAX_ROWS}.
*
* @param rows the rows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public final class ItemYAGLParser {

/**
* Adds all the module specific parsers.
* Adds all the module-specific parsers.
*/
@SuppressWarnings("deprecation")
public static void addAllParsers() {
Expand Down
10 changes: 6 additions & 4 deletions testing/src/main/java/it/angrybear/yagl/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
public final class TestUtils {

/**
* Allows to test all the given <i>executor</i> methods that match the <i>methodFinder</i> predicate.
* Allows testing all the given <i>executor</i> methods that match the <i>methodFinder</i> predicate.
* Each one of them is first invoked using {@link #testSingleMethod(Object, Method, Object[], Object, String, Class[])}.
* Then, it uses <i>captorsValidator</i> to validate the passed parameters.
*
Expand Down Expand Up @@ -120,7 +120,7 @@ private static ArgumentCaptor<?>[] initializeCaptors(final Class<?> @NotNull []
/**
* Many objects have setter, adder or remover methods which return the object itself,
* to allow method chaining.
* This function allows to check each one to verify that the return type is consistent with the original object.
* This function allows checking each one to verify that the return type is consistent with the original object.
*
* @param <T> the type parameter
* @param object the object
Expand All @@ -135,12 +135,14 @@ public static <T> void testReturnType(final @NotNull T object, final @NotNull Cl
/**
* Many objects have setter, adder or remover methods which return the object itself,
* to allow method chaining.
* This function allows to check each one to verify that the return type is consistent with the original object.
* This function allows checking each one to verify that the return type is consistent with the original object.
*
* @param <T> the type parameter
* @param object the object
* @param clazz the class of interest. If there are more implementations of the object, here there should be the most abstract one.
* @param expectedReturnType the expected return type of the methods. In case the testing object is an hidden implementation of the actual interface.
* @param expectedReturnType the expected return type of the methods.
* For example, if the object is a hidden implementation,
* the corresponding abstract class (or interface) should be passed.
* @param filter if there are some methods that return a copy or a clone of the object, they should be filtered here.
*/
public static <T> void testReturnType(final @NotNull T object, final @NotNull Class<? super T> clazz,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ abstract class AParticleType<P extends ParticleOption<?>> extends ClassEnum {
/**
* Creates a {@link Particle} using the {@link ParticleOption} in {@link #optionType}.
* The parameters passed will be forwarded to the {@link ParticleOption} constructor.
* <b>NOTE:</b> they are NOT checked, therefore it is up to the user to provide the correct ones.
* <b>NOTE:</b> they are NOT checked; it is up to the user to provide the correct ones.
*
* @param parameters the parameters
* @return the particle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ private DustTransitionParticleOption() {
/**
* Instantiates a new Dust transition particle option.
*
* @param from the from
* @param color the color
* @param from the color to start from
* @param to the color to end with
* @param size the size
*/
public DustTransitionParticleOption(final @NotNull Color from, final @NotNull Color color, final float size) {
public DustTransitionParticleOption(final @NotNull Color from, final @NotNull Color to, final float size) {
this.from = from;
to = color;
this.to = to;
this.size = size;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.jetbrains.annotations.NotNull;

/**
* A {@link Wrapper} class used to represent potions in older version of Minecraft.
* A {@link Wrapper} class used to represent potions in older versions of Minecraft.
* Currently used only for {@link it.angrybear.yagl.particles.LegacyParticleType#POTION_BREAK}.
*/
@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public Sound setVolume(final float volume) {
}

/**
* Sets pitch.
* Sets the pitch.
* It is limited from 0 and 2.0, where 2.0 is the fastest and 0.0 is the lowest.
* The default value is 1.0.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void minOnly(int minOnly) {
this.minOnly = check(minOnly);
}

// For testing purposes. A real bad practice in the real world.
// For testing purposes. A very bad practice in the real world.
public void getMaxOnly(int maxOnly) {
this.maxOnly = check(maxOnly);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ private static <T> void playInternalSound(final @NotNull Player player, final @N

/**
* Gets the corresponding namespaced key if the current version of Minecraft supports it.
* Uses <i>minecraft</i> as key for {@link #getNamespacedKey(String, String)}.
* Uses <i>minecraft</i> as the key for {@link #getNamespacedKey(String, String)}.
*
* @param value the value
* @return the namespaced key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public final class WrappersYAGLParser {

/**
* Adds all the module specific parsers.
* Adds all the module-specific parsers.
*/
public static void addAllParsers() {
YAGLParser.addAllParsers();
Expand Down

0 comments on commit f95e471

Please sign in to comment.