2019-02-23 17:17:41 +00:00
From 7c8eed2edc8e4783ed66f36cb206b95a1f3039de Mon Sep 17 00:00:00 2001
2017-06-10 22:11:10 +00:00
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 10 Jun 2017 16:59:40 -0500
Subject: [PATCH] Fix upstream javadoc warnings and errors
Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
2018-12-21 16:09:17 +00:00
index 43239f84..fe8d3468 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/NamespacedKey.java
+++ b/src/main/java/org/bukkit/NamespacedKey.java
2018-07-15 01:53:17 +00:00
@@ -38,8 +38,8 @@ public final class NamespacedKey {
2017-06-10 22:11:10 +00:00
/**
* Create a key in a specific namespace.
*
- * @param namespace
- * @param key
+ * @param namespace String representing a grouping of keys
+ * @param key Name for this specific key
* @deprecated should never be used by plugins, for internal use only!!
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
2019-01-15 21:12:19 +00:00
index 8a0f992f..d499e41b 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
2019-01-15 21:12:19 +00:00
@@ -1606,6 +1606,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
2017-06-10 22:11:10 +00:00
* @param count the number of particles
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, T data);
2019-01-15 21:12:19 +00:00
@@ -1621,6 +1622,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
2017-06-10 22:11:10 +00:00
* @param count the number of particles
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, T data);
2019-01-15 21:12:19 +00:00
@@ -1670,6 +1672,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
2017-06-10 22:11:10 +00:00
* @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data);
2019-01-15 21:12:19 +00:00
@@ -1689,6 +1692,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
2017-06-10 22:11:10 +00:00
* @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data);
2019-01-15 21:12:19 +00:00
@@ -1744,6 +1748,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
2017-06-10 22:11:10 +00:00
* particle used (normally speed)
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
2019-01-15 21:12:19 +00:00
@@ -1765,6 +1770,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
2017-06-10 22:11:10 +00:00
* particle used (normally speed)
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
2019-01-15 21:12:19 +00:00
@@ -1787,6 +1793,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
2018-10-25 13:38:19 +00:00
* @param force whether to send the particle to players within an extended
* range and encourage their client to render it regardless of
* settings
+ * @param <T> Particle data type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force);
2019-01-15 21:12:19 +00:00
@@ -1811,6 +1818,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
2018-10-25 13:38:19 +00:00
* @param force whether to send the particle to players within an extended
* range and encourage their client to render it regardless of
* settings
+ * @param <T> Particle data type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force);
2017-06-10 22:11:10 +00:00
diff --git a/src/main/java/org/bukkit/entity/AbstractHorse.java b/src/main/java/org/bukkit/entity/AbstractHorse.java
2018-12-21 16:09:17 +00:00
index 10757454..6d5410ea 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/entity/AbstractHorse.java
+++ b/src/main/java/org/bukkit/entity/AbstractHorse.java
2018-02-08 10:07:27 +00:00
@@ -22,7 +22,7 @@ public interface AbstractHorse extends Animals, Vehicle, InventoryHolder, Tameab
2017-06-10 22:11:10 +00:00
public Horse.Variant getVariant();
/**
- * @param variant
+ * @param variant Variant to set
* @deprecated you are required to spawn a different entity
*/
@Deprecated
2018-08-17 04:29:16 +00:00
diff --git a/src/main/java/org/bukkit/entity/AreaEffectCloud.java b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
2018-12-21 16:09:17 +00:00
index 9a569d3a..8c5efd17 100644
2018-08-17 04:29:16 +00:00
--- a/src/main/java/org/bukkit/entity/AreaEffectCloud.java
+++ b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
@@ -138,6 +138,7 @@ public interface AreaEffectCloud extends Entity {
* @param particle the new particle type
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> the particle data type // Paper
*/
<T> void setParticle(Particle particle, T data);
2017-06-10 22:11:10 +00:00
diff --git a/src/main/java/org/bukkit/entity/Guardian.java b/src/main/java/org/bukkit/entity/Guardian.java
2018-12-21 16:09:17 +00:00
index 98af0563..ec6890ae 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/entity/Guardian.java
+++ b/src/main/java/org/bukkit/entity/Guardian.java
@@ -12,7 +12,7 @@ public interface Guardian extends Monster {
public boolean isElder();
/**
- * @param shouldBeElder
+ * @param shouldBeElder Sets whether the Guardian is an Elder
* @deprecated Must spawn a new {@link ElderGuardian}.
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Horse.java b/src/main/java/org/bukkit/entity/Horse.java
2018-12-21 16:09:17 +00:00
index cfce8fa5..8660070b 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/entity/Horse.java
+++ b/src/main/java/org/bukkit/entity/Horse.java
@@ -151,7 +151,7 @@ public interface Horse extends AbstractHorse {
public boolean isCarryingChest();
/**
- * @param chest
+ * @param chest Sets whether the Horse is carrying a chest
* @deprecated see {@link ChestedHorse}
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
2019-01-02 18:10:14 +00:00
index d9965ddc..bf284f2c 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
2018-11-24 05:28:04 +00:00
@@ -431,7 +431,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
2017-06-10 22:11:10 +00:00
*
* Use supplied alternative character to the section symbol to represent legacy color codes.
*
- * @param alternateChar Alternate symbol such as '&'
+ * @param alternateChar Alternate symbol such as '&'
* @param message The message to send
*/
public void sendActionBar(char alternateChar, String message);
2018-11-24 05:28:04 +00:00
@@ -498,6 +498,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
2017-06-10 22:11:10 +00:00
/**
* Update the subtitle of titles displayed to the player
*
+ * @param subtitle Subtitle to set
* @deprecated Use {@link #updateTitle(Title)}
*/
@Deprecated
2018-11-24 05:28:04 +00:00
@@ -506,6 +507,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
2017-06-10 22:11:10 +00:00
/**
* Update the subtitle of titles displayed to the player
*
+ * @param subtitle Subtitle to set
* @deprecated Use {@link #updateTitle(Title)}
*/
@Deprecated
2018-11-24 05:28:04 +00:00
@@ -514,6 +516,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
2017-06-10 22:11:10 +00:00
/**
* Show the given title to the player, along with the last subtitle set, using the last set times
*
+ * @param title Title to set
* @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)}
*/
@Deprecated
2018-11-24 05:28:04 +00:00
@@ -522,6 +525,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
2017-06-10 22:11:10 +00:00
/**
* Show the given title to the player, along with the last subtitle set, using the last set times
*
+ * @param title Title to set
* @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)}
*/
@Deprecated
2019-01-02 18:10:14 +00:00
@@ -1418,6 +1422,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
2017-06-10 22:11:10 +00:00
* @param count the number of particles
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, T data);
2019-01-02 18:10:14 +00:00
@@ -1433,6 +1438,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
2017-06-10 22:11:10 +00:00
* @param count the number of particles
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, T data);
2019-01-02 18:10:14 +00:00
@@ -1482,6 +1488,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
2017-06-10 22:11:10 +00:00
* @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data);
2019-01-02 18:10:14 +00:00
@@ -1501,6 +1508,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
2017-06-10 22:11:10 +00:00
* @param offsetZ the maximum random offset on the Z axis
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data);
2019-01-02 18:10:14 +00:00
@@ -1556,6 +1564,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
2017-06-10 22:11:10 +00:00
* particle used (normally speed)
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
2019-01-02 18:10:14 +00:00
@@ -1577,6 +1586,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
2017-06-10 22:11:10 +00:00
* particle used (normally speed)
* @param data the data to use for the particle or null,
* the type of this depends on {@link Particle#getDataType()}
+ * @param <T> Type
*/
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data);
diff --git a/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java
2018-12-21 16:09:17 +00:00
index 2a02ab85..e33d00b3 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/entity/Skeleton.java
+++ b/src/main/java/org/bukkit/entity/Skeleton.java
@@ -15,6 +15,7 @@ public interface Skeleton extends Monster {
public SkeletonType getSkeletonType();
/**
+ * @param type Type to set
* @deprecated Must spawn a new subtype variant
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/entity/Zombie.java b/src/main/java/org/bukkit/entity/Zombie.java
2018-12-21 16:09:17 +00:00
index bdc6206a..48034198 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/entity/Zombie.java
+++ b/src/main/java/org/bukkit/entity/Zombie.java
@@ -29,14 +29,14 @@ public interface Zombie extends Monster {
public boolean isVillager();
/**
- * @param flag
+ * @param flag Sets whether the Zombie is a villager
* @deprecated must spawn {@link ZombieVillager}.
*/
@Deprecated
public void setVillager(boolean flag);
/**
- * @param profession
+ * @param profession Sets the ZombieVillager's profession
* @see ZombieVillager#getVillagerProfession()
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
2018-12-21 16:09:17 +00:00
index 6532c24f..ee0b1273 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
2018-11-11 05:37:15 +00:00
@@ -28,6 +28,7 @@ public class PlayerLoginEvent extends PlayerEvent {
2017-06-10 22:11:10 +00:00
* @param hostname The hostname that was used to connect to the server
* @param address The address the player used to connect, provided for
* timing issues
+ * @param realAddress The unspoofed, actual address, that the player used to connect
*/
public PlayerLoginEvent(final Player player, final String hostname, final InetAddress address, final InetAddress realAddress) { // Spigot
super(player);
2018-11-11 05:37:15 +00:00
@@ -51,6 +52,7 @@ public class PlayerLoginEvent extends PlayerEvent {
2017-06-10 22:11:10 +00:00
* timing issues
* @param result The result status for this event
* @param message The message to be displayed if result denies login
+ * @param realAddress The unspoofed, actual address, that the player used to connect
*/
public PlayerLoginEvent(final Player player, String hostname, final InetAddress address, final Result result, final String message, final InetAddress realAddress) { // Spigot
this(player, hostname, address, realAddress); // Spigot
2018-08-17 04:29:16 +00:00
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
2018-12-21 16:09:17 +00:00
index 762c43d6..ec2b8b8e 100644
2018-08-17 04:29:16 +00:00
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -126,10 +126,10 @@ public interface ItemFactory {
* Apply a material change for an item meta. Do not use under any
* circumstances.
*
- * @param meta
- * @param material
+ * @param meta meta
+ * @param material material
* @return updated material
- * @throws IllegalArgumentException
+ * @throws IllegalArgumentException exception
* @deprecated for internal use only
*/
@Deprecated
2017-06-10 22:11:10 +00:00
diff --git a/src/main/java/org/bukkit/inventory/Merchant.java b/src/main/java/org/bukkit/inventory/Merchant.java
2018-12-21 16:09:17 +00:00
index c8e68570..45431b36 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/inventory/Merchant.java
+++ b/src/main/java/org/bukkit/inventory/Merchant.java
@@ -32,7 +32,7 @@ public interface Merchant {
*
* @param i the index
* @return the recipe
- * @throws IndexOutOfBoundsException
+ * @throws IndexOutOfBoundsException Throws when specified index is larger than Merchant's inventory
*/
MerchantRecipe getRecipe(int i) throws IndexOutOfBoundsException;
@@ -41,7 +41,7 @@ public interface Merchant {
*
* @param i the index
* @param recipe the recipe
- * @throws IndexOutOfBoundsException
+ * @throws IndexOutOfBoundsException Throws when specified index is larger than Merchant's inventory
*/
void setRecipe(int i, MerchantRecipe recipe) throws IndexOutOfBoundsException;
diff --git a/src/main/java/org/bukkit/potion/Potion.java b/src/main/java/org/bukkit/potion/Potion.java
2018-12-21 16:09:17 +00:00
index 1413b361..b4a8051c 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/potion/Potion.java
+++ b/src/main/java/org/bukkit/potion/Potion.java
@@ -78,6 +78,7 @@ public class Potion {
}
/**
+ * @param name Unused, always uses {@link PotionType#WATER}
* @deprecated
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/potion/PotionBrewer.java b/src/main/java/org/bukkit/potion/PotionBrewer.java
2018-12-21 16:09:17 +00:00
index 40f8d12b..33d19228 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/potion/PotionBrewer.java
+++ b/src/main/java/org/bukkit/potion/PotionBrewer.java
@@ -34,6 +34,8 @@ public interface PotionBrewer {
* a potion with the given type.
*
* @param type The type of the potion
+ * @param upgraded Whether the potion is upgraded
+ * @param extended Whether the potion is extended
* @return The list of effects
*/
public Collection<PotionEffect> getEffects(PotionType type, boolean upgraded, boolean extended);
diff --git a/src/main/java/org/bukkit/potion/PotionType.java b/src/main/java/org/bukkit/potion/PotionType.java
2018-12-21 16:09:17 +00:00
index 034421a7..f1a54c23 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/potion/PotionType.java
+++ b/src/main/java/org/bukkit/potion/PotionType.java
2018-07-14 01:44:35 +00:00
@@ -68,6 +68,7 @@ public enum PotionType {
2017-06-10 22:11:10 +00:00
}
/**
+ * @return Damage value associated with this PotionType, broken
* @deprecated Non-functional
*/
@Deprecated
2018-07-14 01:44:35 +00:00
@@ -80,6 +81,8 @@ public enum PotionType {
2017-06-10 22:11:10 +00:00
}
/**
+ * @param damage Damage value associated with a PotionType
+ * @return PotionType for given damage value, broken
* @deprecated Non-functional
*/
@Deprecated
2018-07-14 01:44:35 +00:00
@@ -88,6 +91,8 @@ public enum PotionType {
2017-06-10 22:11:10 +00:00
}
/**
+ * @param effectType EffectType
+ * @return Associated PotionType
* @deprecated Misleading
*/
@Deprecated
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
2018-12-21 16:09:17 +00:00
index ab71f3c3..358ea386 100644
2017-06-10 22:11:10 +00:00
--- a/src/main/java/org/bukkit/scoreboard/Team.java
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
@@ -84,7 +84,7 @@ public interface Team {
* names are handled by prefixes / suffixes.
*
* @return team color, defaults to {@link ChatColor#RESET}
- * @throws IllegalStateException
+ * @throws IllegalStateException if this team has been unregistered
*/
ChatColor getColor() throws IllegalStateException;
--
2018-12-21 16:09:17 +00:00
2.20.1
2017-06-10 22:11:10 +00:00