mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 19:52:55 +01:00
116 lines
5.2 KiB
Diff
116 lines
5.2 KiB
Diff
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 javadocs
|
|
|
|
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/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
|
index 282bd71697aff52d43bce0a3543a3ec50a5b7b1b..fa3cd5395ec29d7c51c792720acbb2394f238c45 100644
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
|
@@ -1163,6 +1163,8 @@ public final class Bukkit {
|
|
|
|
/**
|
|
* Gets every player that has ever played on this server.
|
|
+ * <p>
|
|
+ * <b>This method can be expensive as it loads all the player data files from the disk.</b>
|
|
*
|
|
* @return an array containing all previous players
|
|
*/
|
|
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
|
index 2de18d69ad80fe872b36a4975b354cb144b3a302..d1e5e679e0a7482a87a9a049ed0ce5c1b9891c90 100644
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
|
@@ -980,6 +980,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|
|
|
/**
|
|
* Gets every player that has ever played on this server.
|
|
+ * <p>
|
|
+ * <b>This method can be expensive as it loads all the player data files from the disk.</b>
|
|
*
|
|
* @return an array containing all previous players
|
|
*/
|
|
diff --git a/src/main/java/org/bukkit/entity/ArmorStand.java b/src/main/java/org/bukkit/entity/ArmorStand.java
|
|
index 91fc11dda99de506be83d40df8929bf7cd8e8d85..7dc631ebd009f5f5c3ac1699c3f3515c47609c05 100644
|
|
--- a/src/main/java/org/bukkit/entity/ArmorStand.java
|
|
+++ b/src/main/java/org/bukkit/entity/ArmorStand.java
|
|
@@ -360,5 +360,8 @@ public interface ArmorStand extends LivingEntity {
|
|
* @param move {@code true} if this armour stand can move, {@code false} otherwise
|
|
*/
|
|
void setCanMove(boolean move);
|
|
+
|
|
+ @Override
|
|
+ org.bukkit.inventory.@NotNull EntityEquipment getEquipment();
|
|
// Paper end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
|
index db4ba67618d29f72d695c66c27d771795565a1d0..0ab94ddd3b88eee8040233a89823bd2fadc78d55 100644
|
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
|
@@ -21,6 +21,11 @@ import org.jetbrains.annotations.Nullable;
|
|
*/
|
|
public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder {
|
|
|
|
+ // Paper start
|
|
+ @Override
|
|
+ org.bukkit.inventory.@NotNull EntityEquipment getEquipment();
|
|
+ // Paper end
|
|
+
|
|
/**
|
|
* Returns the name of this player
|
|
*
|
|
diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
|
|
index be9334a8b5fba9181ad63c211697e798be63da25..0514a141cb93a650be38c63d4336d46e4304f4b6 100644
|
|
--- a/src/main/java/org/bukkit/entity/Mob.java
|
|
+++ b/src/main/java/org/bukkit/entity/Mob.java
|
|
@@ -8,6 +8,10 @@ import org.jetbrains.annotations.Nullable;
|
|
*/
|
|
public interface Mob extends LivingEntity, Lootable {
|
|
|
|
+ // Paper start
|
|
+ @Override
|
|
+ org.bukkit.inventory.@org.jetbrains.annotations.NotNull EntityEquipment getEquipment();
|
|
+ // Paper end
|
|
/**
|
|
* Instructs this Mob to set the specified LivingEntity as its target.
|
|
* <p>
|
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
|
index 82e4b89bf280ad3f99d94c9aaa6075449737932a..4771a1537646217ad0836f7d5ed62940339b44c6 100644
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
|
@@ -727,7 +727,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
|
|
* @deprecated use {@link #sendActionBar(Component)}
|
|
*/
|
|
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
|
|
+++ 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;
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java
|
|
index 99d900b2394b6c210ccf845768dae72864f32270..515587a958041e94f03c48ae87812abc39e1791c 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);
|
|
|
|
/**
|