2021-06-11 14:02:28 +02:00
|
|
|
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
|
2021-08-13 00:38:25 +02:00
|
|
|
Subject: [PATCH] Fix upstream javadocs
|
2021-06-11 14:02:28 +02:00
|
|
|
|
|
|
|
Upstream still refuses to use Java 8 with the API so they are likely unaware these are even issues.
|
|
|
|
|
2021-08-13 00:38:25 +02:00
|
|
|
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
2022-04-16 10:29:50 +02:00
|
|
|
index a5868c0bdee345195e279467b526d5d9ff7f64d2..ece84330d2700db8708d2ae2ab7badf4acb428a8 100644
|
2021-08-13 00:38:25 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Bukkit.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Bukkit.java
|
2022-04-16 10:29:50 +02:00
|
|
|
@@ -1311,6 +1311,8 @@ public final class Bukkit {
|
2021-08-13 00:38:25 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
2022-05-20 18:57:07 +02:00
|
|
|
index acd69a5d946974e0b50439a98712750698768ce5..0053327f3df85a568befc280b53a0eb34e0510d8 100644
|
2021-08-13 00:38:25 +02:00
|
|
|
--- a/src/main/java/org/bukkit/Server.java
|
|
|
|
+++ b/src/main/java/org/bukkit/Server.java
|
2022-05-20 18:57:07 +02:00
|
|
|
@@ -509,13 +509,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
|
|
|
* </ul>
|
|
|
|
* <p>
|
|
|
|
* <b>Note:</b> If set to 0, {@link SpawnCategory} mobs spawning will be disabled.
|
|
|
|
- * <p>
|
|
|
|
- * Minecraft default: 1.
|
|
|
|
- * <br>
|
|
|
|
- * <b>Note: </b> the {@link SpawnCategory#MISC} are not consider.
|
|
|
|
*
|
|
|
|
* @param spawnCategory the category of spawn
|
|
|
|
* @return the default ticks per {@link SpawnCategory} mobs spawn value
|
|
|
|
+ * @throws IllegalArgumentException if the category is {@link SpawnCategory#MISC}
|
|
|
|
*/
|
|
|
|
public int getTicksPerSpawns(@NotNull SpawnCategory spawnCategory);
|
|
|
|
|
|
|
|
@@ -1110,6 +1107,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
2021-08-13 00:38:25 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
*/
|
2021-09-22 19:23:21 +02:00
|
|
|
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
|
2022-02-12 14:20:33 +01:00
|
|
|
index 50ac6f0374da5697a38ef5ec7625da91d4a4276c..f607c57275958bf1cbf8e77b4d7efa936064c228 100644
|
2021-09-22 19:23:21 +02:00
|
|
|
--- 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>
|
2021-06-11 14:02:28 +02:00
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
2022-04-16 10:29:50 +02:00
|
|
|
index a8ace9646ebcb70a5247a7d25c411a0bcf2d9185..f32eaa35d9152564300455a24c811e15d3ab694f 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
|
|
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
2022-04-16 10:29:50 +02:00
|
|
|
@@ -755,7 +755,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
2021-06-11 14:02:28 +02:00
|
|
|
*
|
|
|
|
* 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)}
|
|
|
|
*/
|
2021-12-05 22:16:55 +01:00
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Slime.java b/src/main/java/org/bukkit/entity/Slime.java
|
|
|
|
index 1119e26e270bb45f517955b19d95a9ec3d113634..4631647c64c89ffdde2d9b63bdab974acfe6cb3d 100644
|
|
|
|
--- a/src/main/java/org/bukkit/entity/Slime.java
|
|
|
|
+++ b/src/main/java/org/bukkit/entity/Slime.java
|
|
|
|
@@ -11,6 +11,16 @@ public interface Slime extends Mob {
|
|
|
|
public int getSize();
|
|
|
|
|
|
|
|
/**
|
|
|
|
+ * Setting the size of the slime (regardless of previous size)
|
|
|
|
+ * will set the following attributes:
|
|
|
|
+ * <ul>
|
|
|
|
+ * <li>{@link org.bukkit.attribute.Attribute#GENERIC_MAX_HEALTH}</li>
|
|
|
|
+ * <li>{@link org.bukkit.attribute.Attribute#GENERIC_MOVEMENT_SPEED}</li>
|
|
|
|
+ * <li>{@link org.bukkit.attribute.Attribute#GENERIC_ATTACK_DAMAGE}</li>
|
|
|
|
+ * </ul>
|
|
|
|
+ * to their per-size defaults and heal the
|
|
|
|
+ * slime to its max health (assuming it's alive).
|
|
|
|
+ *
|
|
|
|
* @param sz The new size of the slime.
|
|
|
|
*/
|
|
|
|
public void setSize(int sz);
|
2021-06-11 14:02:28 +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
|
|
|
|
--- 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;
|
|
|
|
}
|