Updated Upstream (Bukkit/CraftBukkit) (#9485)
Upstream has released updates that appear 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: 82af5dc6 SPIGOT-7396: Add PlayerSignOpenEvent 3f0281ca SPIGOT-7063, PR-763: Add DragonBattle#initiateRespawn with custom EnderCrystals f83c8df4 PR-873: Add PlayerRecipeBookClickEvent 14560d39 SPIGOT-7435: Add TeleportCause#EXIT_BED 2cc6db92 SPIGOT-7422, PR-887: Add API to set sherds on decorated pots 36022f02 PR-883: Add ItemFactory#getSpawnEgg 12eb5c46 PR-881: Update Scoreboard Javadocs, remove explicit exception throwing f6d8d44a PR-882: Add modern time API methods to ban API 21a7b710 Upgrade some Maven plugins to reduce warnings 11fd1225 PR-886: Deprecate the SmithingRecipe constructor as it now does nothing dbd1761d SPIGOT-7406: Improve documentation for getDragonBattle CraftBukkit Changes: d548daac2 SPIGOT-7446: BlockState#update not updating a spawner's type to null 70e0bc050 SPIGOT-7447: Fix --forceUpgrade 6752f1d63 SPIGOT-7396: Add PlayerSignOpenEvent 847b4cad5 SPIGOT-7063, PR-1071: Add DragonBattle#initiateRespawn with custom EnderCrystals c335a555f PR-1212: Add PlayerRecipeBookClickEvent 4be756ecb SPIGOT-7445: Fix opening smithing inventory db70bd6ed SPIGOT-7441: Fix issue placing certain items in creative/op f7fa6d993 SPIGOT-7435: Add TeleportCause#EXIT_BED b435e8e8d SPIGOT-7349: Player#setDisplayName not working when message/format unmodified a2fafdd1d PR-1232: Re-add fix for player rotation 7cf863de1 PR-1233: Remove some old MC bug fixes now fixed in vanilla 08ec344ad Fix ChunkGenerator#generateCaves never being called 5daeb502a SPIGOT-7422, PR-1228: Add API to set sherds on decorated pots 52faa6b32 PR-1224: Add ItemFactory#getSpawnEgg 01cae71b7 SPIGOT-7429: Fix LEFT_CLICK_AIR not working for passable entities and spectators a94277a18 PR-1223: Remove non-existent scoreboard display name/prefix/suffix limits 36b107660 PR-1225: Add modern time API methods to ban API 59ead25bc Upgrade some Maven plugins to reduce warnings 202fc5c4e Increase outdated build delay ce545de57 SPIGOT-7398: TextDisplay#setInterpolationDuration incorrectly updates the line width Spigot Changes: b41c46db Rebuild patches 3374045a SPIGOT-7431: Fix EntityMountEvent returning opposite entities 0ca4eb66 Rebuild patches
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 14 Oct 2021 12:09:28 -0500
|
||||
Subject: [PATCH] Add ItemFactory#getSpawnEgg API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -0,0 +0,0 @@ public interface ItemFactory {
|
||||
@NotNull
|
||||
@Deprecated
|
||||
net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @NotNull net.md_5.bungee.api.chat.BaseComponent[] customName);
|
||||
+
|
||||
+ /**
|
||||
+ * Get a spawn egg ItemStack from an EntityType
|
||||
+ *
|
||||
+ * @param type EntityType
|
||||
+ * @return ItemStack spawner egg
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ ItemStack getSpawnEgg(@Nullable org.bukkit.entity.EntityType type);
|
||||
// Paper end
|
||||
}
|
||||
@@ -25,7 +25,7 @@ diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/jav
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
@@ -0,0 +0,0 @@ public class ShapedRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
/**
|
||||
* Removes an ingredient from the list.
|
||||
*
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
*/
|
||||
@NotNull
|
||||
public ShapelessRecipe removeIngredient(@NotNull Material ingredient) {
|
||||
@@ -93,7 +93,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
*/
|
||||
@NotNull
|
||||
public ShapelessRecipe removeIngredient(int count, @NotNull Material ingredient) {
|
||||
|
||||
@@ -94,3 +94,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return handlers;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerRecipeBookClickEvent.java b/src/main/java/org/bukkit/event/player/PlayerRecipeBookClickEvent.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerRecipeBookClickEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerRecipeBookClickEvent.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Called when a player clicks a recipe in the recipe book.
|
||||
+ * @deprecated use {@link com.destroystokyo.paper.event.player.PlayerRecipeBookClickEvent}
|
||||
*/
|
||||
+@Deprecated(forRemoval = true) // Paper
|
||||
+@org.bukkit.Warning(false) // Paper
|
||||
public class PlayerRecipeBookClickEvent extends PlayerEvent {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@@ -9,9 +9,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -0,0 +0,0 @@ public interface ItemFactory {
|
||||
Material updateMaterial(@NotNull final ItemMeta meta, @NotNull final Material material) throws IllegalArgumentException;
|
||||
Material getSpawnEgg(@NotNull EntityType type);
|
||||
|
||||
// Paper start
|
||||
// Paper start - Adventure
|
||||
+ /**
|
||||
+ * Randomly enchants a copy of the provided {@link ItemStack} using the given experience levels.
|
||||
+ *
|
||||
|
||||
@@ -114,3 +114,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ UNKNOWN,
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerSignOpenEvent.java b/src/main/java/org/bukkit/event/player/PlayerSignOpenEvent.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/event/player/PlayerSignOpenEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/player/PlayerSignOpenEvent.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* This event is fired when a sign is opened by the player.
|
||||
+ * @deprecated use {@link io.papermc.paper.event.player.PlayerOpenSignEvent}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
+@Deprecated(forRemoval = true) // Paper
|
||||
+@org.bukkit.Warning(false) // Paper
|
||||
public class PlayerSignOpenEvent extends PlayerEvent implements Cancellable {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@@ -12,13 +12,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -0,0 +0,0 @@ public interface ItemFactory {
|
||||
*/
|
||||
@NotNull
|
||||
net.kyori.adventure.text.Component displayName(@NotNull ItemStack itemStack);
|
||||
// Paper end - Adventure
|
||||
+
|
||||
+ // Paper start - add getI18NDisplayName
|
||||
+ /**
|
||||
+ * Gets the Display name as seen in the Client.
|
||||
+ * Currently the server only supports the English language. To override this,
|
||||
+ * Currently, the server only supports the English language. To override this,
|
||||
+ * You must replace the language file embedded in the server jar.
|
||||
+ *
|
||||
+ * @param item Item to return Display name of
|
||||
@@ -29,7 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ @Nullable
|
||||
+ @Deprecated
|
||||
+ String getI18NDisplayName(@Nullable ItemStack item);
|
||||
// Paper end
|
||||
+ // Paper end - add getI18NDisplayName
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
|
||||
@@ -2473,6 +2473,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
* @param url The URL from which the client will download the resource
|
||||
* pack. The string must contain only US-ASCII characters and should
|
||||
* be encoded as per RFC 1738.
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* pack correctly.
|
||||
* </ul>
|
||||
*
|
||||
+ * @deprecated in favour of {@link #setResourcePack(String, byte[], Component, boolean)}
|
||||
* @param url The URL from which the client will download the resource
|
||||
* pack. The string must contain only US-ASCII characters and should
|
||||
* be encoded as per RFC 1738.
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
@@ -2531,14 +2539,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
/**
|
||||
* Request that the player's client download and switch resource packs.
|
||||
* <p>
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* pack correctly.
|
||||
* </ul>
|
||||
*
|
||||
+ * @deprecated in favour of {@link #setResourcePack(String, byte[], Component, boolean)}
|
||||
* @param url The URL from which the client will download the resource
|
||||
* pack. The string must contain only US-ASCII characters and should
|
||||
* be encoded as per RFC 1738.
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
@@ -3992,11 +3992,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -0,0 +0,0 @@ public interface ItemFactory {
|
||||
@Deprecated
|
||||
@NotNull
|
||||
Material updateMaterial(@NotNull final ItemMeta meta, @NotNull final Material material) throws IllegalArgumentException;
|
||||
*/
|
||||
@Nullable
|
||||
Material getSpawnEgg(@NotNull EntityType type);
|
||||
+
|
||||
+ // Paper start
|
||||
+ // Paper start - Adventure
|
||||
+ /**
|
||||
+ * Creates a hover event for the given item.
|
||||
+ *
|
||||
@@ -4014,7 +4014,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ net.kyori.adventure.text.Component displayName(@NotNull ItemStack itemStack);
|
||||
+ // Paper end
|
||||
+ // Paper end - Adventure
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
@@ -4621,17 +4621,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
@@ -0,0 +0,0 @@ public interface Objective {
|
||||
*/
|
||||
@NotNull
|
||||
String getName() throws IllegalStateException;
|
||||
+ // Paper start
|
||||
String getName();
|
||||
|
||||
+ // Paper start - Adventure
|
||||
+ /**
|
||||
+ * Gets the name displayed to players for this objective
|
||||
+ * Gets the display name for this objective
|
||||
+ *
|
||||
+ * @return this objective's display name
|
||||
+ * @throws IllegalStateException if this objective has been unregistered
|
||||
+ */
|
||||
+ net.kyori.adventure.text.@NotNull Component displayName() throws IllegalStateException;
|
||||
+ net.kyori.adventure.text.@NotNull Component displayName();
|
||||
+ /**
|
||||
+ * Sets the name displayed to players for this objective.
|
||||
+ *
|
||||
@@ -4641,9 +4641,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @throws IllegalArgumentException if displayName is longer than 128
|
||||
+ * characters.
|
||||
+ */
|
||||
+ void displayName(net.kyori.adventure.text.@Nullable Component displayName) throws IllegalStateException, IllegalArgumentException;
|
||||
+ // Paper end
|
||||
|
||||
+ void displayName(net.kyori.adventure.text.@Nullable Component displayName);
|
||||
+ // Paper end - Adventure
|
||||
+
|
||||
/**
|
||||
* Gets the name displayed to players for this objective
|
||||
*
|
||||
@@ -4653,17 +4653,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
String getDisplayName() throws IllegalStateException;
|
||||
String getDisplayName();
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Objective {
|
||||
* @throws IllegalArgumentException if displayName is null
|
||||
* @throws IllegalArgumentException if displayName is longer than 128
|
||||
* characters.
|
||||
*
|
||||
* @param displayName Display name to set
|
||||
* @throws IllegalStateException if this objective has been unregistered
|
||||
+ * @deprecated in favour of {@link #displayName(net.kyori.adventure.text.Component)}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
void setDisplayName(@NotNull String displayName) throws IllegalStateException, IllegalArgumentException;
|
||||
void setDisplayName(@NotNull String displayName);
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Scoreboard.java b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
|
||||
@@ -4671,31 +4671,26 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Scoreboard.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
|
||||
@@ -0,0 +0,0 @@ public interface Scoreboard {
|
||||
@Deprecated
|
||||
@NotNull
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull String criteria) throws IllegalArgumentException;
|
||||
+ // Paper start
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull String criteria);
|
||||
|
||||
+ // Paper start - Adventure
|
||||
+ /**
|
||||
+ * Registers an Objective on this Scoreboard
|
||||
+ *
|
||||
+ * @param name Name of the Objective
|
||||
+ * @param criteria Criteria for the Objective
|
||||
+ * @param displayName Name displayed to players for the Objective.
|
||||
+ * @param displayName display name for the Objective.
|
||||
+ * @return The registered Objective
|
||||
+ * @throws IllegalArgumentException if name is null
|
||||
+ * @throws IllegalArgumentException if name is longer than 32767
|
||||
+ * characters.
|
||||
+ * @throws IllegalArgumentException if criteria is null
|
||||
+ * @throws IllegalArgumentException if displayName is null
|
||||
+ * @throws IllegalArgumentException if displayName is longer than 128
|
||||
+ * characters.
|
||||
+ * @throws IllegalArgumentException if an objective by that name already
|
||||
+ * exists
|
||||
+ * @deprecated use {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component)}
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ @Deprecated
|
||||
+ Objective registerNewObjective(@NotNull String name, @NotNull String criteria, net.kyori.adventure.text.@Nullable Component displayName) throws IllegalArgumentException;
|
||||
+ Objective registerNewObjective(@NotNull String name, @NotNull String criteria, net.kyori.adventure.text.@Nullable Component displayName);
|
||||
+ /**
|
||||
+ * Registers an Objective on this Scoreboard
|
||||
+ *
|
||||
@@ -4704,14 +4699,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @param displayName Name displayed to players for the Objective.
|
||||
+ * @param renderType Manner of rendering the Objective
|
||||
+ * @return The registered Objective
|
||||
+ * @throws IllegalArgumentException if name is null
|
||||
+ * @throws IllegalArgumentException if name is longer than 32767
|
||||
+ * characters.
|
||||
+ * @throws IllegalArgumentException if criteria is null
|
||||
+ * @throws IllegalArgumentException if displayName is null
|
||||
+ * @throws IllegalArgumentException if displayName is longer than 128
|
||||
+ * characters.
|
||||
+ * @throws IllegalArgumentException if renderType is null
|
||||
+ * @throws IllegalArgumentException if an objective by that name already
|
||||
+ * exists
|
||||
+ * @deprecated use {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component, RenderType)}
|
||||
@@ -4726,13 +4715,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @param criteria Criteria for the Objective
|
||||
+ * @param displayName Name displayed to players for the Objective.
|
||||
+ * @return The registered Objective
|
||||
+ * @throws IllegalArgumentException if name is null
|
||||
+ * @throws IllegalArgumentException if name is longer than 32767
|
||||
+ * characters.
|
||||
+ * @throws IllegalArgumentException if criteria is null
|
||||
+ * @throws IllegalArgumentException if displayName is null
|
||||
+ * @throws IllegalArgumentException if displayName is longer than 128
|
||||
+ * characters.
|
||||
+ * @throws IllegalArgumentException if an objective by that name already
|
||||
+ * exists
|
||||
+ */
|
||||
@@ -4746,37 +4730,40 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @param displayName Name displayed to players for the Objective.
|
||||
+ * @param renderType Manner of rendering the Objective
|
||||
+ * @return The registered Objective
|
||||
+ * @throws IllegalArgumentException if name is null
|
||||
+ * @throws IllegalArgumentException if name is longer than 32767
|
||||
+ * characters.
|
||||
+ * @throws IllegalArgumentException if criteria is null
|
||||
+ * @throws IllegalArgumentException if displayName is null
|
||||
+ * @throws IllegalArgumentException if displayName is longer than 128
|
||||
+ * characters.
|
||||
+ * @throws IllegalArgumentException if renderType is null
|
||||
+ * @throws IllegalArgumentException if an objective by that name already
|
||||
+ * exists
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ Objective registerNewObjective(@NotNull String name, @NotNull Criteria criteria, net.kyori.adventure.text.@Nullable Component displayName, @NotNull RenderType renderType) throws IllegalArgumentException;
|
||||
+ // Paper end
|
||||
|
||||
+ // Paper end - Adventure
|
||||
+
|
||||
/**
|
||||
* Registers an Objective on this Scoreboard
|
||||
*
|
||||
@@ -0,0 +0,0 @@ public interface Scoreboard {
|
||||
* @deprecated use {@link #registerNewObjective(String, Criteria, String)}
|
||||
* characters.
|
||||
* @throws IllegalArgumentException if an objective by that name already
|
||||
* exists
|
||||
- * @deprecated use {@link #registerNewObjective(String, Criteria, String)}
|
||||
+ * @deprecated use {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName) throws IllegalArgumentException;
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName);
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Scoreboard {
|
||||
* @deprecated use {@link #registerNewObjective(String, Criteria, String, RenderType)}
|
||||
* characters.
|
||||
* @throws IllegalArgumentException if an objective by that name already
|
||||
* exists
|
||||
- * @deprecated use {@link #registerNewObjective(String, Criteria, String, RenderType)}
|
||||
+ * @deprecated use {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component, RenderType)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName, @NotNull RenderType renderType) throws IllegalArgumentException;
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName, @NotNull RenderType renderType);
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Scoreboard {
|
||||
@@ -4787,18 +4774,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull Criteria criteria, @NotNull String displayName) throws IllegalArgumentException;
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull Criteria criteria, @NotNull String displayName);
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Scoreboard {
|
||||
* @throws IllegalArgumentException if renderType is null
|
||||
* characters.
|
||||
* @throws IllegalArgumentException if an objective by that name already
|
||||
* exists
|
||||
+ * @deprecated in favour of {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component, RenderType)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull Criteria criteria, @NotNull String displayName, @NotNull RenderType renderType) throws IllegalArgumentException;
|
||||
Objective registerNewObjective(@NotNull String name, @NotNull Criteria criteria, @NotNull String displayName, @NotNull RenderType renderType);
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
@@ -4806,17 +4793,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
*/
|
||||
@NotNull
|
||||
String getName() throws IllegalStateException;
|
||||
+ // Paper start
|
||||
String getName();
|
||||
|
||||
+ // Paper start - Adventure
|
||||
+ /**
|
||||
+ * Gets the name displayed to entries for this team
|
||||
+ * Gets the display name for this team
|
||||
+ *
|
||||
+ * @return Team display name
|
||||
+ * @throws IllegalStateException if this team has been unregistered
|
||||
+ */
|
||||
+ net.kyori.adventure.text.@NotNull Component displayName() throws IllegalStateException;
|
||||
+ net.kyori.adventure.text.@NotNull Component displayName();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the name displayed to entries for this team
|
||||
@@ -4824,7 +4811,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @param displayName New display name
|
||||
+ * @throws IllegalStateException if this team has been unregistered
|
||||
+ */
|
||||
+ void displayName(net.kyori.adventure.text.@Nullable Component displayName) throws IllegalStateException, IllegalArgumentException;
|
||||
+ void displayName(net.kyori.adventure.text.@Nullable Component displayName);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the prefix prepended to the display of entries on this team.
|
||||
@@ -4832,17 +4819,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @return Team prefix
|
||||
+ * @throws IllegalStateException if this team has been unregistered
|
||||
+ */
|
||||
+ net.kyori.adventure.text.@NotNull Component prefix() throws IllegalStateException;
|
||||
+ net.kyori.adventure.text.@NotNull Component prefix();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the prefix prepended to the display of entries on this team.
|
||||
+ *
|
||||
+ * @param prefix New prefix
|
||||
+ * @throws IllegalArgumentException if prefix is null
|
||||
+ * characters
|
||||
+ * @throws IllegalStateException if this team has been unregistered
|
||||
+ */
|
||||
+ void prefix(net.kyori.adventure.text.@Nullable Component prefix) throws IllegalStateException, IllegalArgumentException;
|
||||
+ void prefix(net.kyori.adventure.text.@Nullable Component prefix);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the suffix appended to the display of entries on this team.
|
||||
@@ -4850,17 +4835,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @return the team's current suffix
|
||||
+ * @throws IllegalStateException if this team has been unregistered
|
||||
+ */
|
||||
+ net.kyori.adventure.text.@NotNull Component suffix() throws IllegalStateException;
|
||||
+ net.kyori.adventure.text.@NotNull Component suffix();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the suffix appended to the display of entries on this team.
|
||||
+ *
|
||||
+ * @param suffix the new suffix for this team.
|
||||
+ * @throws IllegalArgumentException if suffix is null
|
||||
+ * characters
|
||||
+ * @throws IllegalStateException if this team has been unregistered
|
||||
+ */
|
||||
+ void suffix(net.kyori.adventure.text.@Nullable Component suffix) throws IllegalStateException, IllegalArgumentException;
|
||||
+ void suffix(net.kyori.adventure.text.@Nullable Component suffix);
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if the team has a color specified
|
||||
@@ -4881,7 +4864,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @throws IllegalStateException if the team doesn't have a color
|
||||
+ * @see #hasColor()
|
||||
+ */
|
||||
+ net.kyori.adventure.text.format.@NotNull TextColor color() throws IllegalStateException;
|
||||
+ net.kyori.adventure.text.format.@NotNull TextColor color();
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the color of the team.
|
||||
@@ -4892,8 +4875,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @param color new color, null for no color
|
||||
+ */
|
||||
+ void color(net.kyori.adventure.text.format.@Nullable NamedTextColor color);
|
||||
+ // Paper end
|
||||
|
||||
+ // Paper end - Adventure
|
||||
+
|
||||
/**
|
||||
* Gets the name displayed to entries for this team
|
||||
*
|
||||
@@ -4903,17 +4886,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
String getDisplayName() throws IllegalStateException;
|
||||
String getDisplayName();
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
* @throws IllegalArgumentException if displayName is longer than 128
|
||||
* characters.
|
||||
*
|
||||
* @param displayName New display name
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
+ * @deprecated in favour of {@link #displayName(net.kyori.adventure.text.Component)}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
void setDisplayName(@NotNull String displayName) throws IllegalStateException, IllegalArgumentException;
|
||||
void setDisplayName(@NotNull String displayName);
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
@@ -4924,17 +4907,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
String getPrefix() throws IllegalStateException;
|
||||
String getPrefix();
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
* @throws IllegalArgumentException if prefix is longer than 64
|
||||
* characters
|
||||
*
|
||||
* @param prefix New prefix
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
+ * @deprecated in favour of {@link #prefix(net.kyori.adventure.text.Component)}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
void setPrefix(@NotNull String prefix) throws IllegalStateException, IllegalArgumentException;
|
||||
void setPrefix(@NotNull String prefix);
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
@@ -4945,17 +4928,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
String getSuffix() throws IllegalStateException;
|
||||
String getSuffix();
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
* @throws IllegalArgumentException if suffix is longer than 64
|
||||
* characters
|
||||
*
|
||||
* @param suffix the new suffix for this team.
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
+ * @deprecated in favour of {@link #suffix(net.kyori.adventure.text.Component)}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
void setSuffix(@NotNull String suffix) throws IllegalStateException, IllegalArgumentException;
|
||||
void setSuffix(@NotNull String suffix);
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
@@ -4966,7 +4949,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated // Paper
|
||||
ChatColor getColor() throws IllegalStateException;
|
||||
ChatColor getColor();
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
|
||||
@@ -241,7 +241,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>net.md-5</groupId>
|
||||
- <artifactId>scriptus</artifactId>
|
||||
- <version>0.4.1</version>
|
||||
- <version>0.5.0</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>initialize</phase>
|
||||
@@ -287,7 +287,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-shade-plugin</artifactId>
|
||||
- <version>3.4.1</version>
|
||||
- <version>3.5.0</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>package</phase>
|
||||
|
||||
@@ -9,10 +9,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -0,0 +0,0 @@ public interface ItemFactory {
|
||||
*/
|
||||
@NotNull
|
||||
ItemStack ensureServerConversions(@NotNull ItemStack item);
|
||||
// Paper end - ensure server conversions API
|
||||
+
|
||||
+ // Paper start - bungee hover events
|
||||
+ /**
|
||||
+ * Creates a {@link net.md_5.bungee.api.chat.hover.content.Content} of that ItemStack for displaying.
|
||||
+ *
|
||||
@@ -71,5 +72,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ @NotNull
|
||||
+ @Deprecated
|
||||
+ net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @NotNull net.md_5.bungee.api.chat.BaseComponent[] customName);
|
||||
// Paper end
|
||||
+ // Paper end - bungee hover events
|
||||
}
|
||||
|
||||
@@ -13,23 +13,23 @@ diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/jav
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
@@ -0,0 +0,0 @@ public class ShapedRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||
@Deprecated
|
||||
public ShapedRecipe(@NotNull ItemStack result) {
|
||||
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
||||
this.key = NamespacedKey.randomKey();
|
||||
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace();
|
||||
this.output = new ItemStack(result);
|
||||
super(NamespacedKey.randomKey(), result);
|
||||
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
@Deprecated
|
||||
public ShapelessRecipe(@NotNull ItemStack result) {
|
||||
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
||||
this.key = NamespacedKey.randomKey();
|
||||
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace();
|
||||
this.output = new ItemStack(result);
|
||||
super(NamespacedKey.randomKey(), result);
|
||||
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,7 +44,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
*/
|
||||
@Nullable
|
||||
- public BanEntry<PlayerProfile> ban(@Nullable String reason, @Nullable Date expires, @Nullable String source);
|
||||
+ public <E extends BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable String reason, @Nullable Date expires, @Nullable String source);
|
||||
+ public <E extends BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable String reason, @Nullable Date expires, @Nullable String source); // Paper - fix ban list API
|
||||
|
||||
/**
|
||||
* Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
|
||||
@@ -0,0 +0,0 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
* (updated) previous ban
|
||||
*/
|
||||
@Nullable
|
||||
- public BanEntry<PlayerProfile> ban(@Nullable String reason, @Nullable Instant expires, @Nullable String source);
|
||||
+ public <E extends BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable String reason, @Nullable Instant expires, @Nullable String source); // Paper - fix ban list API
|
||||
|
||||
/**
|
||||
* Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
|
||||
@@ -0,0 +0,0 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
|
||||
* (updated) previous ban
|
||||
*/
|
||||
@Nullable
|
||||
- public BanEntry<PlayerProfile> ban(@Nullable String reason, @Nullable Duration duration, @Nullable String source);
|
||||
+ public <E extends BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable String reason, @Nullable Duration duration, @Nullable String source); // Paper - fix ban list API
|
||||
|
||||
/**
|
||||
* Checks if this player is whitelisted or not
|
||||
@@ -78,7 +96,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+ @Nullable BanEntry<com.destroystokyo.paper.profile.PlayerProfile> addBan(com.destroystokyo.paper.profile.@NotNull PlayerProfile target, @Nullable String reason, @Nullable Date expires, @Nullable String source);
|
||||
+
|
||||
+ // the 3 methods below are added to maintain compat for the PlayerProfile parameter type
|
||||
+ // the 5 methods below are added to maintain compat for the bukkit.PlayerProfile parameter type
|
||||
+ /**
|
||||
+ * @deprecated use {@link #getBanEntry(Object)}
|
||||
+ */
|
||||
@@ -96,6 +114,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ void pardon(@NotNull PlayerProfile target);
|
||||
+
|
||||
+ /**
|
||||
+ * @deprecated use {@link #addBan(Object, String, java.time.Instant, String)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ @Nullable <E extends BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E addBan(@NotNull PlayerProfile target, @Nullable String reason, @Nullable java.time.Instant expires, @Nullable String source);
|
||||
+
|
||||
+ /**
|
||||
+ * @deprecated use {@link #addBan(Object, String, java.time.Duration, String)}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ @Nullable <E extends BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E addBan(@NotNull PlayerProfile target, @Nullable String reason, @Nullable java.time.Duration duration, @Nullable String source);
|
||||
+
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -107,7 +138,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
*/
|
||||
@Nullable
|
||||
- public BanEntry<PlayerProfile> ban(@Nullable String reason, @Nullable Date expires, @Nullable String source, boolean kickPlayer);
|
||||
+ public <E extends BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable String reason, @Nullable Date expires, @Nullable String source, boolean kickPlayer); // Paper
|
||||
+ public <E extends BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable String reason, @Nullable Date expires, @Nullable String source, boolean kickPlayer); // Paper - fix ban list API
|
||||
|
||||
/**
|
||||
* Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* (updated) previous ban
|
||||
*/
|
||||
@Nullable
|
||||
- public BanEntry<PlayerProfile> ban(@Nullable String reason, @Nullable Instant expires, @Nullable String source, boolean kickPlayer);
|
||||
+ public <E extends BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable String reason, @Nullable Instant expires, @Nullable String source, boolean kickPlayer); // Paper - fix ban list API
|
||||
|
||||
/**
|
||||
* Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* (updated) previous ban
|
||||
*/
|
||||
@Nullable
|
||||
- public BanEntry<PlayerProfile> ban(@Nullable String reason, @Nullable Duration duration, @Nullable String source, boolean kickPlayer);
|
||||
+ public <E extends BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable String reason, @Nullable Duration duration, @Nullable String source, boolean kickPlayer); // Paper - fix ban list API
|
||||
|
||||
/**
|
||||
* Adds this user's current IP address to the {@link IpBanList}. If a previous ban exists, this will
|
||||
|
||||
@@ -344,19 +344,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ @org.jetbrains.annotations.NotNull // Paper
|
||||
public ItemStack getItem();
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/block/DecoratedPot.java b/src/main/java/org/bukkit/block/DecoratedPot.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/block/DecoratedPot.java
|
||||
+++ b/src/main/java/org/bukkit/block/DecoratedPot.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* Represents a captured state of a decorated pot.
|
||||
*/
|
||||
-@ApiStatus.Experimental
|
||||
+//@ApiStatus.Experimental // Paper
|
||||
public interface DecoratedPot extends TileState {
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Enderman.java b/src/main/java/org/bukkit/entity/Enderman.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
@@ -807,7 +794,7 @@ diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/jav
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
@@ -0,0 +0,0 @@ public class ShapedRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||
* @param ingredient The ingredient.
|
||||
* @return The changed recipe, so you can chain calls.
|
||||
* @throws IllegalArgumentException if the {@code key} does not appear in the shape.
|
||||
@@ -818,7 +805,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public ShapedRecipe setIngredient(char key, @NotNull MaterialData ingredient) {
|
||||
return setIngredient(key, ingredient.getItemType(), ingredient.getData());
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ShapedRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||
* Get a copy of the ingredients map.
|
||||
*
|
||||
* @return The mapping of character to ingredients.
|
||||
@@ -832,7 +819,7 @@ diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
*
|
||||
* @param ingredient The ingredient to add.
|
||||
* @return The changed recipe, so you can chain calls.
|
||||
@@ -843,7 +830,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public ShapelessRecipe addIngredient(@NotNull MaterialData ingredient) {
|
||||
return addIngredient(1, ingredient);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
* @param count How many to add (can't be more than 9!)
|
||||
* @param ingredient The ingredient to add.
|
||||
* @return The changed recipe, so you can chain calls.
|
||||
@@ -854,7 +841,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public ShapelessRecipe addIngredient(int count, @NotNull MaterialData ingredient) {
|
||||
return addIngredient(count, ingredient.getItemType(), ingredient.getData());
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
*
|
||||
* @param ingredient The ingredient to remove
|
||||
* @return The changed recipe.
|
||||
@@ -865,7 +852,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public ShapelessRecipe removeIngredient(@NotNull MaterialData ingredient) {
|
||||
return removeIngredient(ingredient.getItemType(), ingredient.getData());
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
* @param count The number of copies to remove.
|
||||
* @param ingredient The ingredient to remove.
|
||||
* @return The changed recipe.
|
||||
@@ -876,7 +863,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public ShapelessRecipe removeIngredient(int count, @NotNull MaterialData ingredient) {
|
||||
return removeIngredient(count, ingredient.getItemType(), ingredient.getData());
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
* Get the list of ingredients used for this recipe.
|
||||
*
|
||||
* @return The input list
|
||||
|
||||
@@ -1066,7 +1066,7 @@ diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/jav
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||
@@ -0,0 +0,0 @@ public class ShapedRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||
* @param result The item you want the recipe to create.
|
||||
* @see ShapedRecipe#shape(String...)
|
||||
* @see ShapedRecipe#setIngredient(char, Material)
|
||||
@@ -1075,7 +1075,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
* @see ShapedRecipe#setIngredient(char, RecipeChoice)
|
||||
* @deprecated Recipes must have keys. Use {@link #ShapedRecipe(NamespacedKey, ItemStack)}
|
||||
* instead.
|
||||
@@ -0,0 +0,0 @@ public class ShapedRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||
* @param result The item you want the recipe to create.
|
||||
* @see ShapedRecipe#shape(String...)
|
||||
* @see ShapedRecipe#setIngredient(char, Material)
|
||||
@@ -1088,7 +1088,7 @@ diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
* @param key the unique recipe key
|
||||
* @param result The item you want the recipe to create.
|
||||
* @see ShapelessRecipe#addIngredient(Material)
|
||||
@@ -1100,8 +1100,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @see ShapelessRecipe#addIngredient(RecipeChoice)
|
||||
*/
|
||||
public ShapelessRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) {
|
||||
Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe implements Recipe, Keyed {
|
||||
super(key, result);
|
||||
@@ -0,0 +0,0 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||
|
||||
/**
|
||||
* Removes multiple instances of an ingredient from the list. If there are
|
||||
@@ -1110,20 +1110,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
* matches, with a data value of 0.
|
||||
*
|
||||
* @param count The number of copies to remove.
|
||||
diff --git a/src/main/java/org/bukkit/inventory/SmithingRecipe.java b/src/main/java/org/bukkit/inventory/SmithingRecipe.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/SmithingRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/SmithingRecipe.java
|
||||
@@ -0,0 +0,0 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
* @param result The item you want the recipe to create.
|
||||
* @param base The base ingredient
|
||||
* @param addition The addition ingredient
|
||||
+ * @deprecated use {@link SmithingTrimRecipe} or {@link SmithingTransformRecipe}
|
||||
*/
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) {
|
||||
this.key = key;
|
||||
this.result = result;
|
||||
diff --git a/src/main/java/org/bukkit/inventory/StonecuttingRecipe.java b/src/main/java/org/bukkit/inventory/StonecuttingRecipe.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/StonecuttingRecipe.java
|
||||
@@ -1179,7 +1165,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- * @see Criterias#HEALTH
|
||||
+ * @see Criteria#HEALTH
|
||||
*/
|
||||
boolean isModifiable() throws IllegalStateException;
|
||||
boolean isModifiable();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
@@ -1189,11 +1175,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
* Gets the Set of entries on the team
|
||||
*
|
||||
* @return entries on the team
|
||||
- * @throws IllegalStateException if this entries has been unregistered\
|
||||
- * @throws IllegalStateException if this entries has been unregistered
|
||||
+ * @throws IllegalStateException if this team has been unregistered
|
||||
*/
|
||||
@NotNull
|
||||
Set<String> getEntries() throws IllegalStateException;
|
||||
Set<String> getEntries();
|
||||
diff --git a/src/main/java/org/bukkit/util/BoundingBox.java b/src/main/java/org/bukkit/util/BoundingBox.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/util/BoundingBox.java
|
||||
|
||||
@@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
@@ -0,0 +0,0 @@ public interface Objective {
|
||||
* @throws IllegalArgumentException if player is null
|
||||
* @return Score tracking the Objective and player specified
|
||||
* @throws IllegalStateException if this objective has been unregistered
|
||||
* @see #getScore(String)
|
||||
- * @deprecated Scoreboards can contain entries that aren't players
|
||||
@@ -17,14 +17,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- @Deprecated
|
||||
+ // @Deprecated // Paper
|
||||
@NotNull
|
||||
Score getScore(@NotNull OfflinePlayer player) throws IllegalArgumentException, IllegalStateException;
|
||||
Score getScore(@NotNull OfflinePlayer player);
|
||||
|
||||
@@ -0,0 +0,0 @@ public interface Objective {
|
||||
*/
|
||||
@NotNull
|
||||
Score getScore(@NotNull String entry) throws IllegalArgumentException, IllegalStateException;
|
||||
Score getScore(@NotNull String entry);
|
||||
+
|
||||
+ // Paper start
|
||||
+ // Paper start - improve scoreboard entries
|
||||
+ /**
|
||||
+ * Gets an entity's Score for an Objective on this Scoreboard.
|
||||
+ *
|
||||
@@ -34,51 +34,51 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @throws IllegalStateException if this objective has been unregistered
|
||||
+ */
|
||||
+ @NotNull Score getScoreFor(@NotNull org.bukkit.entity.Entity entity) throws IllegalArgumentException, IllegalStateException;
|
||||
+ // Paper end
|
||||
+ // Paper end - improve scoreboard entries
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Scoreboard.java b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Scoreboard.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
|
||||
@@ -0,0 +0,0 @@ public interface Scoreboard {
|
||||
* @param player the player whose scores are being retrieved
|
||||
* @return immutable set of all scores tracked for the player
|
||||
* @throws IllegalArgumentException if player is null
|
||||
* @see #getScores(String)
|
||||
- * @deprecated Scoreboards can contain entries that aren't players
|
||||
*/
|
||||
- @Deprecated
|
||||
+ // @Deprecated // Paper
|
||||
@NotNull
|
||||
Set<Score> getScores(@NotNull OfflinePlayer player) throws IllegalArgumentException;
|
||||
Set<Score> getScores(@NotNull OfflinePlayer player);
|
||||
|
||||
@@ -0,0 +0,0 @@ public interface Scoreboard {
|
||||
*
|
||||
* @param player the player to drop all current scores for
|
||||
* @throws IllegalArgumentException if player is null
|
||||
* @see #resetScores(String)
|
||||
- * @deprecated Scoreboards can contain entries that aren't players
|
||||
*/
|
||||
- @Deprecated
|
||||
+ // @Deprecated // Paper
|
||||
void resetScores(@NotNull OfflinePlayer player) throws IllegalArgumentException;
|
||||
void resetScores(@NotNull OfflinePlayer player);
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Scoreboard {
|
||||
* @param player the player to search for
|
||||
* @return the player's Team or null if the player is not on a team
|
||||
* @throws IllegalArgumentException if player is null
|
||||
* @see #getEntryTeam(String)
|
||||
- * @deprecated Scoreboards can contain entries that aren't players
|
||||
*/
|
||||
- @Deprecated
|
||||
+ // @Deprecated // Paper
|
||||
@Nullable
|
||||
Team getPlayerTeam(@NotNull OfflinePlayer player) throws IllegalArgumentException;
|
||||
Team getPlayerTeam(@NotNull OfflinePlayer player);
|
||||
|
||||
@@ -0,0 +0,0 @@ public interface Scoreboard {
|
||||
* @throws IllegalArgumentException if slot is null
|
||||
* @param slot the slot to remove objectives
|
||||
*/
|
||||
void clearSlot(@NotNull DisplaySlot slot) throws IllegalArgumentException;
|
||||
void clearSlot(@NotNull DisplaySlot slot);
|
||||
+
|
||||
+ // Paper start
|
||||
+ // Paper start - improve scoreboard entries
|
||||
+ /**
|
||||
+ * Gets all scores for an entity on this Scoreboard
|
||||
+ *
|
||||
@@ -107,50 +107,50 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @see #getEntryTeam(String)
|
||||
+ */
|
||||
+ @Nullable Team getEntityTeam(@NotNull org.bukkit.entity.Entity entity) throws IllegalArgumentException;
|
||||
+ // Paper end
|
||||
+ // Paper end - improve scoreboard entries
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
* @throws IllegalArgumentException if player is null
|
||||
* @param player the player to add
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
* @see #addEntry(String)
|
||||
- * @deprecated Teams can contain entries that aren't players
|
||||
*/
|
||||
- @Deprecated
|
||||
+ // @Deprecated // Paper
|
||||
void addPlayer(@NotNull OfflinePlayer player) throws IllegalStateException, IllegalArgumentException;
|
||||
void addPlayer(@NotNull OfflinePlayer player);
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
* @throws IllegalArgumentException if player is null
|
||||
* @return if the player was on this team
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
* @see #removeEntry(String)
|
||||
- * @deprecated Teams can contain entries that aren't players
|
||||
*/
|
||||
- @Deprecated
|
||||
+ // @Deprecated // Paper
|
||||
boolean removePlayer(@NotNull OfflinePlayer player) throws IllegalStateException, IllegalArgumentException;
|
||||
boolean removePlayer(@NotNull OfflinePlayer player);
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
* @throws IllegalArgumentException if player is null
|
||||
* @return true if the player is a member of this team
|
||||
* @throws IllegalStateException if this team has been unregistered
|
||||
* @see #hasEntry(String)
|
||||
- * @deprecated Teams can contain entries that aren't players
|
||||
*/
|
||||
- @Deprecated
|
||||
+ // @Deprecated // Paper
|
||||
boolean hasPlayer(@NotNull OfflinePlayer player) throws IllegalArgumentException, IllegalStateException;
|
||||
boolean hasPlayer(@NotNull OfflinePlayer player);
|
||||
/**
|
||||
* Checks to see if the specified entry is a member of this team.
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
*/
|
||||
void setOption(@NotNull Option option, @NotNull OptionStatus status) throws IllegalStateException;
|
||||
void setOption(@NotNull Option option, @NotNull OptionStatus status);
|
||||
|
||||
+ // Paper start
|
||||
+ // Paper start - improve scoreboard entries
|
||||
+ /**
|
||||
+ * This puts the specified entity onto this team for the scoreboard.
|
||||
+ * <p>
|
||||
@@ -184,7 +184,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @see #hasEntry(String)
|
||||
+ */
|
||||
+ boolean hasEntity(@NotNull org.bukkit.entity.Entity entity) throws IllegalStateException, IllegalArgumentException;
|
||||
+ // Paper end
|
||||
+ // Paper end - improve scoreboard entries
|
||||
+
|
||||
/**
|
||||
* Represents an option which may be applied to this team.
|
||||
|
||||
@@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
*/
|
||||
void addEntry(@NotNull String entry) throws IllegalStateException, IllegalArgumentException;
|
||||
void addEntry(@NotNull String entry);
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
@@ -71,7 +71,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
*
|
||||
@@ -0,0 +0,0 @@ public interface Team {
|
||||
*/
|
||||
boolean removeEntry(@NotNull String entry) throws IllegalStateException, IllegalArgumentException;
|
||||
boolean removeEntry(@NotNull String entry);
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
|
||||
@@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
* Create a smithing recipe to produce the specified result ItemStack.
|
||||
@@ -0,0 +0,0 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
*/
|
||||
@Deprecated(forRemoval = true) // Paper
|
||||
@Deprecated
|
||||
public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) {
|
||||
+ // Paper start
|
||||
+ this(key, result, base, addition, true);
|
||||
@@ -33,7 +33,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @param copyNbt whether to copy the nbt from the input base item to the output
|
||||
+ * @deprecated use {@link SmithingTrimRecipe} or {@link SmithingTransformRecipe}
|
||||
+ */
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
+ @Deprecated
|
||||
+ public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyNbt) {
|
||||
+ this.copyNbt = copyNbt;
|
||||
+ // Paper end
|
||||
|
||||
@@ -11,22 +11,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -0,0 +0,0 @@ public interface ItemFactory {
|
||||
@Nullable
|
||||
@Deprecated
|
||||
String getI18NDisplayName(@Nullable ItemStack item);
|
||||
// Paper end - add getI18NDisplayName
|
||||
+
|
||||
+ // Paper start - ensure server conversions API
|
||||
+ /**
|
||||
+ * Minecraft updates are converting simple item stacks into more complex NBT oriented Item Stacks.
|
||||
+ * Minecraft's updates are converting simple item stacks into more complex NBT oriented Item Stacks.
|
||||
+ *
|
||||
+ * Use this method to ensure any desired data conversions are processed.
|
||||
+ * The input itemstack will not be the same as the returned itemstack.
|
||||
+ *
|
||||
+ * @param item The item to process conversions on
|
||||
+ * @return A potentially Data Converted ItemStack
|
||||
+ * @return A potentially Data-Converted-ItemStack
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ ItemStack ensureServerConversions(@NotNull ItemStack item);
|
||||
// Paper end
|
||||
+ // Paper end - ensure server conversions API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
|
||||
Reference in New Issue
Block a user