[ci-skip] Fix javadoc warnings (missing @param and @return)

This commit is contained in:
BillyGalbreath
2020-12-18 21:22:14 -06:00
parent 1bfe6978b0
commit 3e083217c3

View File

@@ -0,0 +1,240 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Fri, 18 Dec 2020 21:21:48 -0600
Subject: [PATCH] Fix javadoc warnings (missing @param and @return)
diff --git a/src/main/java/com/destroystokyo/paper/MaterialSetTag.java b/src/main/java/com/destroystokyo/paper/MaterialSetTag.java
index c91ea2a0679a7f3a5627b5a008e0b39df3332889..abca273856680f25f69a3b5c34afeb9a406f8ec8 100644
--- a/src/main/java/com/destroystokyo/paper/MaterialSetTag.java
+++ b/src/main/java/com/destroystokyo/paper/MaterialSetTag.java
@@ -29,6 +29,7 @@ public class MaterialSetTag implements Tag<Material> {
/**
* @deprecated Use NamespacedKey version of constructor
+ * @param filter Filter predicate
*/
@Deprecated
public MaterialSetTag(@NotNull Predicate<Material> filter) {
@@ -37,6 +38,7 @@ public class MaterialSetTag implements Tag<Material> {
/**
* @deprecated Use NamespacedKey version of constructor
+ * @param materials Materials to include
*/
@Deprecated
public MaterialSetTag(@NotNull Collection<Material> materials) {
@@ -45,6 +47,7 @@ public class MaterialSetTag implements Tag<Material> {
/**
* @deprecated Use NamespacedKey version of constructor
+ * @param materials Materials to include
*/
@Deprecated
public MaterialSetTag(@NotNull Material... materials) {
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerConnectionCloseEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerConnectionCloseEvent.java
index 12c1c6fe9dc8dc5f5faf6dcf99f6857219ef22b8..1f623010d3eddc2bee8f4b8fb410a9509a57b5ae 100644
--- a/src/main/java/com/destroystokyo/paper/event/player/PlayerConnectionCloseEvent.java
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerConnectionCloseEvent.java
@@ -59,7 +59,9 @@ public class PlayerConnectionCloseEvent extends Event {
}
/**
- * Returns the {@code UUID} of the player disconnecting.
+ * Get the {@code UUID} of the player disconnecting.
+ *
+ * @return the {@code UUID} of the player disconnecting
*/
@NotNull
public UUID getPlayerUniqueId() {
@@ -67,7 +69,9 @@ public class PlayerConnectionCloseEvent extends Event {
}
/**
- * Returns the name of the player disconnecting.
+ * Get the name of the player disconnecting.
+ *
+ * @return the name of the player disconnecting
*/
@NotNull
public String getPlayerName() {
@@ -75,7 +79,9 @@ public class PlayerConnectionCloseEvent extends Event {
}
/**
- * Returns the player's IP address.
+ * Get the player's IP address.
+ *
+ * @return the player's IP address
*/
@NotNull
public InetAddress getIpAddress() {
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 931ffa38faab86445a5d63364a47cb653ca3d4ed..97b9ade0e771eae663fb42f91e15545034d58fc9 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -80,6 +80,8 @@ public interface UnsafeValues {
/**
* Called once by the version command on first use, then cached.
+ *
+ * @return Paper's VersionFetcher
*/
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
@@ -98,6 +100,8 @@ public interface UnsafeValues {
/**
* Return the translation key for the Material, so the client can translate it into the active
* locale when using a TranslatableComponent.
+ *
+ * @param mat Material to check
* @return the translation key
*/
String getTranslationKey(Material mat);
@@ -105,6 +109,8 @@ public interface UnsafeValues {
/**
* Return the translation key for the Block, so the client can translate it into the active
* locale when using a TranslatableComponent.
+ *
+ * @param block Block to check
* @return the translation key
*/
String getTranslationKey(org.bukkit.block.Block block);
@@ -113,6 +119,8 @@ public interface UnsafeValues {
* Return the translation key for the EntityType, so the client can translate it into the active
* locale when using a TranslatableComponent.<br>
* This is <code>null</code>, when the EntityType isn't known to NMS (custom entities)
+ *
+ * @param type EntityType to check
* @return the translation key
*/
String getTranslationKey(org.bukkit.entity.EntityType type);
@@ -121,6 +129,8 @@ public interface UnsafeValues {
* Creates and returns the next EntityId available.
* <p>
* Use this when sending custom packets, so that there are no collisions on the client or server.
+ *
+ * @return the next available entity id
*/
public int nextEntityId();
diff --git a/src/main/java/org/bukkit/WorldCreator.java b/src/main/java/org/bukkit/WorldCreator.java
index 6e6945dd4c770be04ec09da3958fae751717527a..7adfa2ecffde90dfae36a8a61a6ad7e63a626920 100644
--- a/src/main/java/org/bukkit/WorldCreator.java
+++ b/src/main/java/org/bukkit/WorldCreator.java
@@ -238,11 +238,8 @@ public class WorldCreator {
* is as follows:
* <code>{"structures": {"structures": {"village": {"salt": 8015723, "spacing": 32, "separation": 8}}}, "layers": [{"block": "stone", "height": 1}, {"block": "grass", "height": 1}], "biome":"plains"}</code>
*
- * @see <a href="https://minecraft.gamepedia.com/Custom_dimension">Custom
- * dimension</a> (scroll to "When the generator ID type is
- * <code>minecraft:flat</code>)"
- * @param generatorSettings The settings that should be used by the
- * generator
+ * @see <a href="https://minecraft.gamepedia.com/Custom_dimension">Custom dimension</a> (scroll to "When the generator ID type is <code>minecraft:flat</code>")
+ * @param generatorSettings The settings that should be used by the generator
* @return This object, for chaining
*/
@NotNull
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
index 6933fd6ad353a2d008c4a64c52a64bf36bd8035c..2966d876af3a77966fab927f8714ebf06bf6c926 100644
--- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java
@@ -183,6 +183,9 @@ public interface Block extends Metadatable {
* {@code int z = (int) ((packed << 10) >> 37);}
* </p>
*
+ * @param x X coordinate
+ * @param y Y coordinate
+ * @param z Z coordinate
* @return This block's x, y, and z coordinates packed into a long value
*/
public static long getBlockKey(int x, int y, int z) {
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index cd209dcfbb81010e916b40d61d0a038c75a6f788..0c0610f00637fba98350926bc4b8d9cf9611fa2e 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -658,41 +658,57 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
/**
* Check if entity is in water
+ *
+ * @return True if entity is in water
*/
public boolean isInWater();
/**
* Check if entity is in rain
+ *
+ * @return True if entity is in rain
*/
public boolean isInRain();
/**
* Check if entity is in bubble column
+ *
+ * @return True if entity is in bubble column
*/
public boolean isInBubbleColumn();
/**
* Check if entity is in water or rain
+ *
+ * @return True if entity is in water or rain
*/
public boolean isInWaterOrRain();
/**
* Check if entity is in water or bubble column
+ *
+ * @return True if entity is in water or bubble column
*/
public boolean isInWaterOrBubbleColumn();
/**
* Check if entity is in water or rain or bubble column
+ *
+ * @return True if entity is in water or rain or bubble column
*/
public boolean isInWaterOrRainOrBubbleColumn();
/**
* Check if entity is in lava
+ *
+ * @return True if entity is in lava
*/
public boolean isInLava();
/**
* Check if entity is inside a ticking chunk
+ *
+ * @return True if entity is ticking
*/
public boolean isTicking();
// Paper end
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 18b5f84a1d7567e17d8baa9abb889a1f7cc7f5b8..3f1510471d5f014e040b7ec443d17c3d362a0cb6 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1774,6 +1774,8 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
void resetCooldown();
/**
+ * @param <T> ClientOption type
+ * @param option ClientOption
* @return the client option value of the player
*/
@NotNull
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
index 23d55f756b2bb5a557bfae102d7039d8394fbe69..50e58cf9a494c2cf17b7f55918e3d21f63437b3c 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -169,7 +169,7 @@ public interface ItemFactory {
/**
* Creates a {@link net.md_5.bungee.api.chat.hover.content.Content} of that ItemStack for displaying.
*
- * @param itemStack
+ * @param itemStack ItemStack to check
* @return the {@link net.md_5.bungee.api.chat.hover.content.Content} of that ItemStack
*/
@NotNull