Paper/Spigot-API-Patches/0050-Fix-upstream-javadoc-warnings-and-errors.patch

103 lines
4.7 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 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/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index fd235f7ac71b0243d2189e89efb232915991f9ff..b422abde1a504aa36c726e1c0597da11c1b6afd0 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
*
* 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);
@@ -573,6 +573,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
@@ -581,6 +582,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
@@ -589,6 +591,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
@@ -597,6 +600,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
diff --git a/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java b/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java
index 1cb70b5c8776863f44f1c4cdde152c35cb51edb5..da26531c42abb074c805352e0f8467a970195a01 100644
--- a/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java
@@ -43,7 +43,9 @@ public class PlayerBedLeaveEvent extends PlayerEvent implements Cancellable {
* {@link Player#setBedSpawnLocation(Location)}.
*
* @return true if the spawn location will be changed
+ * @deprecated NOT IMPLEMENTED <!-- paper -->
*/
+ @Deprecated // Paper
public boolean shouldSetSpawnLocation() {
return setBedSpawn;
}
@@ -59,7 +61,9 @@ public class PlayerBedLeaveEvent extends PlayerEvent implements Cancellable {
* {@link Player#setBedSpawnLocation(Location)}.
*
* @param setBedSpawn true to change the new spawn location
+ * @deprecated NOT IMPLEMENTED <!-- paper -->
*/
+ @Deprecated // Paper
public void setSpawnLocation(boolean setBedSpawn) {
this.setBedSpawn = setBedSpawn;
}
2019-04-15 00:45:42 +02:00
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
2019-04-15 00:45:42 +02:00
--- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java
2019-05-06 04:58:04 +02:00
@@ -78,7 +78,7 @@ public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
2019-04-15 00:45:42 +02:00
*
* @return Location the player moved to
*/
- @Nullable
+ @NotNull // Paper
public Location getTo() {
return to;
}
diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java
index 91afd844dafec4ed9ab9e2e16b220ffbd35e7495..1e45c9078ffffe9d3c25538fdd433780ae751270 100644
--- a/src/main/java/org/bukkit/inventory/PlayerInventory.java
+++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java
@@ -106,7 +106,7 @@ public interface PlayerInventory extends Inventory {
*
* @return the ItemStack in the given slot
*/
- @NotNull
+ @Nullable
public ItemStack getItem(@NotNull EquipmentSlot slot);
/**