197 lines
10 KiB
Diff
197 lines
10 KiB
Diff
From 6a79e6167bb1cb6969b6953abe148343e8fa0b1c 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 767cdf0aa..3858b0576 100644
|
|
--- a/src/main/java/org/bukkit/World.java
|
|
+++ b/src/main/java/org/bukkit/World.java
|
|
@@ -1786,6 +1786,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);
|
|
|
|
@@ -1802,6 +1803,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);
|
|
|
|
@@ -1852,6 +1854,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);
|
|
|
|
@@ -1872,6 +1875,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);
|
|
|
|
@@ -1928,6 +1932,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);
|
|
|
|
@@ -1950,6 +1955,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);
|
|
|
|
@@ -1973,6 +1979,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);
|
|
|
|
@@ -1998,6 +2005,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 f41545c52..576ad2c68 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -461,7 +461,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 '&'
|
|
* @param message The message to send
|
|
*/
|
|
public void sendActionBar(char alternateChar, @NotNull String message);
|
|
@@ -528,6 +528,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
|
|
@@ -536,6 +537,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
|
|
@@ -544,6 +546,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
|
|
@@ -552,6 +555,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
|
|
@@ -1452,6 +1456,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);
|
|
|
|
@@ -1468,6 +1473,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);
|
|
|
|
@@ -1518,6 +1524,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);
|
|
|
|
@@ -1538,6 +1545,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);
|
|
|
|
@@ -1594,6 +1602,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);
|
|
|
|
@@ -1616,6 +1625,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.23.0
|
|
|