From 04cf8b2a995fb2c352bcf7a289eaee6435efcacc Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Sat, 8 Aug 2020 17:56:15 -0500 Subject: [PATCH] Fix javadoc errors --- .../main/java/org/geysermc/connector/GeyserLogger.java | 6 ++++++ .../connector/network/session/GeyserSession.java | 5 ++++- .../java/org/geysermc/connector/utils/FileUtils.java | 1 + .../java/org/geysermc/connector/utils/GameRule.java | 2 +- .../org/geysermc/connector/utils/InventoryUtils.java | 3 +++ .../org/geysermc/connector/utils/MessageUtils.java | 10 +++++----- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/GeyserLogger.java b/connector/src/main/java/org/geysermc/connector/GeyserLogger.java index 2ea45a495..0ba2a689f 100644 --- a/connector/src/main/java/org/geysermc/connector/GeyserLogger.java +++ b/connector/src/main/java/org/geysermc/connector/GeyserLogger.java @@ -36,6 +36,9 @@ public interface GeyserLogger { /** * Logs a severe message and an exception to console + * + * @param message the message to log + * @param error the error to throw */ void severe(String message, Throwable error); @@ -48,6 +51,9 @@ public interface GeyserLogger { /** * Logs an error message and an exception to console + * + * @param message the message to log + * @param error the error to throw */ void error(String message, Throwable error); diff --git a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java index ac186a799..05465c46b 100644 --- a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java +++ b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java @@ -665,7 +665,10 @@ public class GeyserSession implements CommandSender { } /** - * @see org.geysermc.connector.network.translators.world.WorldManager#hasPermission(GeyserSession, String) + * Checks if the given session's player has a permission + * + * @param permission The permission node to check + * @return true if the player has the requested permission, false if not */ public Boolean hasPermission(String permission) { return connector.getWorldManager().hasPermission(this, permission); diff --git a/connector/src/main/java/org/geysermc/connector/utils/FileUtils.java b/connector/src/main/java/org/geysermc/connector/utils/FileUtils.java index 0b7b5c5cf..38369d6c8 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/FileUtils.java +++ b/connector/src/main/java/org/geysermc/connector/utils/FileUtils.java @@ -42,6 +42,7 @@ public class FileUtils { * * @param src File to load * @param valueType Class to load file into + * @param the type * @return The data as the given class * @throws IOException if the config could not be loaded */ diff --git a/connector/src/main/java/org/geysermc/connector/utils/GameRule.java b/connector/src/main/java/org/geysermc/connector/utils/GameRule.java index 350337f3d..48feb1c18 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/GameRule.java +++ b/connector/src/main/java/org/geysermc/connector/utils/GameRule.java @@ -109,7 +109,7 @@ public enum GameRule { * Fetch a game rule by the given Java ID * * @param id The ID of the gamerule - * @return A {@link GameRule} object representing the requested ID or {@link GameRule.UNKNOWN} + * @return A {@link GameRule} object representing the requested ID or {@link GameRule#UNKNOWN} */ public static GameRule fromJavaID(String id) { for (GameRule gamerule : VALUES) { diff --git a/connector/src/main/java/org/geysermc/connector/utils/InventoryUtils.java b/connector/src/main/java/org/geysermc/connector/utils/InventoryUtils.java index 6d83da0ad..cb51e2f3b 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/InventoryUtils.java +++ b/connector/src/main/java/org/geysermc/connector/utils/InventoryUtils.java @@ -136,6 +136,9 @@ public class InventoryUtils { /** * Returns a barrier block with custom name and lore to explain why * part of the inventory is unusable. + * + * @param description the description + * @return the unusable space block */ public static ItemData createUnusableSpaceBlock(String description) { NbtMapBuilder root = NbtMap.builder(); diff --git a/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java b/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java index 0b4958950..36cdbc422 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java +++ b/connector/src/main/java/org/geysermc/connector/utils/MessageUtils.java @@ -95,7 +95,7 @@ public class MessageUtils { * @param messages A {@link List} of {@link Message} to parse * @param locale A locale loaded to get the message for * @param parent A {@link Message} to use as the parent (can be null) - * @return + * @return the translation parameters */ public static List getTranslationParams(List messages, String locale, Message parent) { List strings = new ArrayList<>(); @@ -160,10 +160,10 @@ public class MessageUtils { * Translate a given {@link TranslationMessage} to the given locale * * @param message The {@link Message} to send - * @param locale - * @param shouldTranslate - * @param parent - * @return + * @param locale the locale + * @param shouldTranslate if the message should be translated + * @param parent the parent message + * @return the given translation message translated from the given locale */ public static String getTranslatedBedrockMessage(Message message, String locale, boolean shouldTranslate, Message parent) { JsonParser parser = new JsonParser();