Paper/Spigot-API-Patches/0051-Fix-upstream-javadoc-warnings-and-errors.patch
Aikar 2f34301581
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
7361a62e SPIGOT-5641: Add Block.getDrops(ItemStack, Entity)
1dc91b15 Add specific notes about what is not API
2b05ef88 #484: Allow statistics to be accessed for offline players

CraftBukkit Changes:
f7d6ad53 SPIGOT-5603: Use LootContext#lootingModifier in CraftLootTable
5838285d SPIGOT-5657: BlockPlaceEvent not cancelling for tripwire hooks
f325b9be SPIGOT-5641: Add Block.getDrops(ItemStack, Entity)
e25a2272 Fix some formatting in CraftHumanEntity
498540e0 Add Merchant slot delegate
b2de47d5 SPIGOT-5621: Add missing container types for opening InventoryView
aa3a2f27 #645: Allow statistics to be accessed for offline players
2122c0b1 #649: CraftBell should implement Bell
2020-04-08 03:49:15 -04:00

197 lines
10 KiB
Diff

From 5281507980d4dadb00b963312e8f5056f9671d81 Mon Sep 17 00:00:00 2001
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/World.java b/src/main/java/org/bukkit/World.java
index 808c3b4a4..3b027f67c 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2009,6 +2009,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);
@@ -2025,6 +2026,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);
@@ -2075,6 +2077,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);
@@ -2095,6 +2098,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);
@@ -2151,6 +2155,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);
@@ -2173,6 +2178,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);
@@ -2196,6 +2202,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);
@@ -2221,6 +2228,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 c2096b534..bca9d3659 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 6f3ab730b..cb7d9f055 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -458,7 +458,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*
* 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 '&amp;'
* @param message The message to send
*/
public void sendActionBar(char alternateChar, @NotNull String message);
@@ -525,6 +525,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Update the subtitle of titles displayed to the player
*
+ * @param subtitle Subtitle to set
* @deprecated Use {@link #updateTitle(Title)}
*/
@Deprecated
@@ -533,6 +534,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Update the subtitle of titles displayed to the player
*
+ * @param subtitle Subtitle to set
* @deprecated Use {@link #updateTitle(Title)}
*/
@Deprecated
@@ -541,6 +543,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* 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
@@ -549,6 +552,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* 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
@@ -1198,6 +1202,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);
@@ -1214,6 +1219,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);
@@ -1264,6 +1270,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);
@@ -1284,6 +1291,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);
@@ -1340,6 +1348,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);
@@ -1362,6 +1371,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 1b2267f4e..1a58734d9 100644
--- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
@@ -78,7 +78,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
*
* @return Location the player moved to
*/
- @Nullable
+ @NotNull // Paper
public Location getTo() {
return to;
}
--
2.25.1