1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Apply suggestions from code review

Co-authored-by: svr333 <vanrompaey.senne@protonmail.com>
This commit is contained in:
TheBusyBiscuit 2021-12-10 18:21:04 +01:00 committed by GitHub
parent 796193207e
commit 50310fd2ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 6 deletions

View File

@ -7,7 +7,7 @@ import org.bukkit.NamespacedKey;
import io.github.thebusybiscuit.slimefun4.utils.biomes.BiomeMap;
/**
* An {@link BiomeMapException} is thrown whenever a {@link BiomeMap}
* A {@link BiomeMapException} is thrown whenever a {@link BiomeMap}
* contains illegal, invalid or unknown values.
*
* @author TheBusyBiscuit
@ -44,5 +44,4 @@ public class BiomeMapException extends Exception {
public BiomeMapException(NamespacedKey key, Throwable cause) {
super("Biome Map '" + key + "' has been misconfigured (" + cause.getMessage() + ')', cause);
}
}

View File

@ -89,8 +89,8 @@ abstract class AbstractResource implements GEOResource {
*/
@ParametersAreNonnullByDefault
static final @Nonnull BiomeMap<Integer> getBiomeMap(AbstractResource resource, String path) {
Validate.notNull(resource, "Resource cannot be null");
Validate.notNull(path, "Path cannot be null");
Validate.notNull(resource, "Resource cannot be null.");
Validate.notNull(path, "Path cannot be null.");
try {
return BiomeMap.fromResource(resource.getKey(), path, JsonElement::getAsInt);
@ -105,5 +105,4 @@ abstract class AbstractResource implements GEOResource {
}
}
}
}

View File

@ -28,7 +28,7 @@ import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
* <p>
* We heavily utilise this method of data mapping for {@link GEOResource}s, especially
* when supporting multiple versions of Minecraft. This way, we can have different {@link BiomeMap}s
* for different versions of Minecraft, incase {@link Biome} names change inbetween versions.
* for different versions of Minecraft, in case {@link Biome} names change in-between versions.
* <p>
* The data type can be any type of {@link Object}.
* The most common type is {@link Integer}, if you are using complex objects and try to read