JavaDoc fixes

Remove duplicate JavaDocs - At some point upstream decided to fix some of their JD errors/warnings, so now we have duplicate tags, bringing new warnings.
Also add missing `@param` for ItemStack.deserializeBytes
This commit is contained in:
jmp 2020-12-19 01:39:37 -08:00 committed by Mariell
parent f13b4727eb
commit 4b37929208
9 changed files with 19 additions and 146 deletions

View file

@ -5,88 +5,8 @@ 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/World.java b/src/main/java/org/bukkit/World.java
index 999948a5d65b48abd4ae8bdef06ed8460dee8093..3bb540be62bdb4457b65d2599eaba91828e5135a 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2124,6 +2124,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @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(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data);
@@ -2140,6 +2141,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @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(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data);
@@ -2190,6 +2192,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @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(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -2210,6 +2213,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @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(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -2266,6 +2270,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* 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(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
@@ -2288,6 +2293,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* 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(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
@@ -2311,6 +2317,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @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(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
@@ -2336,6 +2343,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @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(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data, boolean force);
diff --git a/src/main/java/org/bukkit/entity/AreaEffectCloud.java b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
index c2096b5344d48d855d031538ec32e0154bd9054d..bca9d3659f6fceeca4b7fecbc7034d6fdbc4581e 100644
--- a/src/main/java/org/bukkit/entity/AreaEffectCloud.java
+++ b/src/main/java/org/bukkit/entity/AreaEffectCloud.java
@@ -142,6 +142,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(@NotNull Particle particle, @Nullable T data);
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 742c7b5a1919e2c3a70891d6c34756076c386368..7e90c11066a7882a8ea4dfa757323616fb88e612 100644
index 742c7b5a1919e2c3a70891d6c34756076c386368..41ee7e4796265f5999cc5f0dde7faea78bbc04c1 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -499,7 +499,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@ -130,54 +50,6 @@ index 742c7b5a1919e2c3a70891d6c34756076c386368..7e90c11066a7882a8ea4dfa757323616
* @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)}
*/
@Deprecated
@@ -1246,6 +1250,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @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(@NotNull Particle particle, @NotNull Location location, int count, @Nullable T data);
@@ -1262,6 +1267,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @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(@NotNull Particle particle, double x, double y, double z, int count, @Nullable T data);
@@ -1312,6 +1318,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @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(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -1332,6 +1339,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @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(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, @Nullable T data);
@@ -1388,6 +1396,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* 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(@NotNull Particle particle, @NotNull Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
@@ -1410,6 +1419,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* 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(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
diff --git a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
index 1b2267f4e8ebded198773ec80e2bff2c861c7084..1a58734d919fae247eeb85dd785fd59990856505 100644
--- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index f20179c8c93691143f67a91320bcf923028168ef..8c8efb5ee88a51c831859ce26fc0953b1e9396d2 100644
index 86a7ba58ef26ef0053c516408b47f7ba4cb0b80b..7d3bf348e4a4b0b68042df4d72a98285c0e0da94 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3,6 +3,7 @@ package org.bukkit.entity;
@ -17,7 +17,7 @@ index f20179c8c93691143f67a91320bcf923028168ef..8c8efb5ee88a51c831859ce26fc0953b
import org.bukkit.DyeColor;
import org.bukkit.Effect;
import org.bukkit.GameMode;
@@ -1584,6 +1585,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1578,6 +1579,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
*/
boolean hasResourcePack();

View file

@ -515,12 +515,12 @@ index b32de827cf8d1780861c271b4215276fdaab7165..1020002ff7127877db2d7e096f2c5217
* Options which can be applied to redstone dust particles - a particle
* color and size.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 4a8484e696dbe40401e53d4799e1e2720d47ee20..bd63ab47f7cf0a4e8ebed270933a60d7e602d15a 100644
index df2178aea2ac5420decc20a71f2337fd9a2ce33d..a8471e630769f8d9761ddf5a2ca2157822038fcc 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2548,7 +2548,57 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -2542,7 +2542,57 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @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(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data);
+ public default <T> void spawnParticle(@NotNull Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, @Nullable T data) { spawnParticle(particle, null, null, x, y, z, count, offsetX, offsetY, offsetZ, extra, data, true); }// Paper start - Expand Particle API

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 5879500e0ad19b5834a89aa065c8a59d4d6520c1..d84de4918bf54965494ac2e64f5832f3d62e5a96 100644
index 1ba7e5c66159d8ff208f3e796a3e6569e060967c..61989130ba8d72a39002ce81eec7f4aa1943fba0 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1759,6 +1759,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1753,6 +1753,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param profile The new profile to use
*/
void setPlayerProfile(@NotNull PlayerProfile profile);

View file

@ -176,7 +176,7 @@ index 0000000000000000000000000000000000000000..f7f171c4ee0b8339b2f8fbe82442d65f
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d84de4918bf54965494ac2e64f5832f3d62e5a96..20afeb742cbafbd03fb712f73d38e6b31cdd3a27 100644
index 61989130ba8d72a39002ce81eec7f4aa1943fba0..ccad99e3742d3be76b00427ea794ad133205aff9 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2,6 +2,7 @@ package org.bukkit.entity;
@ -187,7 +187,7 @@ index d84de4918bf54965494ac2e64f5832f3d62e5a96..20afeb742cbafbd03fb712f73d38e6b3
import com.destroystokyo.paper.Title; // Paper
import com.destroystokyo.paper.profile.PlayerProfile; // Paper
import java.util.Date; // Paper
@@ -1779,6 +1780,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1773,6 +1774,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Reset the cooldown counter to 0, effectively starting the cooldown period.
*/
void resetCooldown();

View file

@ -5,10 +5,10 @@ Subject: [PATCH] World view distance api
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index f53c05482c6b22c7410b3209e27d10858c126b79..ac149127ac7b1814bf0dfaa440cae558a860227d 100644
index 5905da5828752c8805faff3c96d2288260f4c4bc..bded64b3dea35a1b8945510bb3def5f436d92d62 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3405,6 +3405,34 @@ public interface World extends PluginMessageRecipient, Metadatable {
@@ -3397,6 +3397,34 @@ public interface World extends PluginMessageRecipient, Metadatable {
int getViewDistance();
// Spigot end

View file

@ -20,10 +20,10 @@ index 541e28a9bece0beb0c2cf02c39030840b758c6e6..d3ec5084e33dff038d54cdd2aeb703a3
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index d7d6a3e83dfd88359708749f5c12be02815c3580..ccd81fca25233c2a9c2a8c3f4dda3053d7b2e723 100644
index d7d6a3e83dfd88359708749f5c12be02815c3580..4f2520f7a4ca6d57a85924ada1068a055b9a01fb 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -613,6 +613,29 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
@@ -613,6 +613,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
}
@ -33,6 +33,7 @@ index d7d6a3e83dfd88359708749f5c12be02815c3580..ccd81fca25233c2a9c2a8c3f4dda3053
+ *
+ * This expects that the DataVersion was stored on the root of the Compound, as saved from
+ * the {@link #serializeAsBytes()} API returned.
+ * @param bytes bytes representing an item in NBT
+ * @return ItemStack migrated to this version of Minecraft if needed.
+ */
+ @NotNull

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Brand support
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 20afeb742cbafbd03fb712f73d38e6b31cdd3a27..d2dc27e02001b95c29857f251db4e343ed785ab8 100644
index ccad99e3742d3be76b00427ea794ad133205aff9..2324e85548bc0d50886e5e5cd0bc36022eb0cf88 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1906,6 +1906,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1900,6 +1900,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
// Paper end
}

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index d2dc27e02001b95c29857f251db4e343ed785ab8..f7fd13dc6056817819c1dbffcaf19c25b95fe2c0 100644
index 2324e85548bc0d50886e5e5cd0bc36022eb0cf88..ea5257cc94d084fe4e0b9d9685e51d8f70cb84cb 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -1786,6 +1786,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -1780,6 +1780,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
@NotNull
<T> T getClientOption(@NotNull ClientOption<T> option);