From e8bf8ff2a0e1900f9ad0b52341f8eb4b80428ee8 Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Wed, 22 Apr 2020 01:03:46 -0500 Subject: [PATCH] Fix javadoc related errors --- .../java/org/geysermc/connector/entity/Entity.java | 4 ++++ .../network/translators/block/BlockStateValues.java | 2 +- .../network/translators/block/entity/BlockEntity.java | 6 ++++++ .../org/geysermc/connector/scoreboard/Objective.java | 2 ++ .../java/org/geysermc/connector/utils/FileUtils.java | 10 +++++----- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/entity/Entity.java b/connector/src/main/java/org/geysermc/connector/entity/Entity.java index 177d0d7a..dcd2475a 100644 --- a/connector/src/main/java/org/geysermc/connector/entity/Entity.java +++ b/connector/src/main/java/org/geysermc/connector/entity/Entity.java @@ -120,6 +120,9 @@ public class Entity { } /** + * Despawns the entity + * + * @param session The GeyserSession * @return can be deleted */ public boolean despawnEntity(GeyserSession session) { @@ -234,6 +237,7 @@ public class Entity { /** * x = Pitch, y = HeadYaw, z = Yaw + * @return the bedrock rotation */ public Vector3f getBedrockRotation() { return Vector3f.from(rotation.getY(), rotation.getZ(), rotation.getX()); diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/block/BlockStateValues.java b/connector/src/main/java/org/geysermc/connector/network/translators/block/BlockStateValues.java index 19581c7e..25d6070f 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/block/BlockStateValues.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/block/BlockStateValues.java @@ -46,7 +46,7 @@ public class BlockStateValues { /** * Determines if the block state contains Bedrock block information - * @param entry The String -> JsonNode map used in BlockTranslator + * @param entry The String to JsonNode map used in BlockTranslator * @param javaBlockState the Java Block State of the block */ public static void storeBlockStateValues(Map.Entry entry, BlockState javaBlockState) { diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/block/entity/BlockEntity.java b/connector/src/main/java/org/geysermc/connector/network/translators/block/entity/BlockEntity.java index 0321f2c1..47cbbaf3 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/block/entity/BlockEntity.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/block/entity/BlockEntity.java @@ -30,16 +30,22 @@ import java.lang.annotation.RetentionPolicy; @Retention(value = RetentionPolicy.RUNTIME) public @interface BlockEntity { + /** * Whether to delay the sending of the block entity + * @return the delay for when sending the block entity */ boolean delay(); + /** * The block entity name + * @return the name of the block entity */ String name(); + /** * The search term used in BlockTranslator + * @return the search term used in BlockTranslator */ String regex(); } diff --git a/connector/src/main/java/org/geysermc/connector/scoreboard/Objective.java b/connector/src/main/java/org/geysermc/connector/scoreboard/Objective.java index d9d78dfd..c3e6c863 100644 --- a/connector/src/main/java/org/geysermc/connector/scoreboard/Objective.java +++ b/connector/src/main/java/org/geysermc/connector/scoreboard/Objective.java @@ -54,6 +54,8 @@ public class Objective { /** * /!\ This method is made for temporary objectives until the real objective is received + * @param scoreboard the scoreboard + * @param objectiveName the name of the objective */ public Objective(Scoreboard scoreboard, String objectiveName) { this(scoreboard); 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 23da3746..dea42728 100644 --- a/connector/src/main/java/org/geysermc/connector/utils/FileUtils.java +++ b/connector/src/main/java/org/geysermc/connector/utils/FileUtils.java @@ -43,7 +43,7 @@ public class FileUtils { * @param src File to load * @param valueType Class to load file into * @return The data as the given class - * @throws IOException + * @throws IOException if the config could not be loaded */ public static T loadConfig(File src, Class valueType) throws IOException { ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory()); @@ -56,7 +56,7 @@ public class FileUtils { * @param name File and resource name * @param fallback Formatting callback * @return File handle of the specified file - * @throws IOException + * @throws IOException if the file failed to copy from resource */ public static File fileOrCopiedFromResource(String name, Function fallback) throws IOException { return fileOrCopiedFromResource(new File(name), name, fallback); @@ -69,7 +69,7 @@ public class FileUtils { * @param name Name of the resource get if needed * @param format Formatting callback * @return File handle of the specified file - * @throws IOException + * @throws IOException if the file failed to copy from resource */ public static File fileOrCopiedFromResource(File file, String name, Function format) throws IOException { if (!file.exists()) { @@ -98,7 +98,7 @@ public class FileUtils { * * @param file File to write to * @param data Data to write to the file - * @throws IOException + * @throws IOException if the file failed to write */ public static void writeFile(File file, char[] data) throws IOException { if (!file.exists()) { @@ -120,7 +120,7 @@ public class FileUtils { * * @param name File path to write to * @param data Data to write to the file - * @throws IOException + * @throws IOException if the file failed to write */ public static void writeFile(String name, char[] data) throws IOException { writeFile(new File(name), data);