From 2eb935ac5532e46251ee98e5f60ceab92434e6e0 Mon Sep 17 00:00:00 2001 From: Infynyty Date: Sat, 22 Jul 2023 21:38:40 +0200 Subject: [PATCH] Mark Player.sendSignChange as deprecated (#9382) --- patches/api/Adventure.patch | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/patches/api/Adventure.patch b/patches/api/Adventure.patch index 07517c90d8..2bed9550cd 100644 --- a/patches/api/Adventure.patch +++ b/patches/api/Adventure.patch @@ -2321,7 +2321,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @param lines the new text on the sign or null to clear it + * @throws IllegalArgumentException if location is null + * @throws IllegalArgumentException if lines is non-null and has a length less than 4 ++ * @deprecated Use {@link #sendBlockUpdate(Location, TileState)} by creating a new virtual ++ * {@link org.bukkit.block.Sign} block state via {@link BlockData#createBlockState()} ++ * (constructed e.g. via {@link Material#createBlockData()}) + */ ++ @Deprecated + default void sendSignChange(@NotNull Location loc, @Nullable java.util.List lines) throws IllegalArgumentException { + this.sendSignChange(loc, lines, DyeColor.BLACK); + } @@ -2342,7 +2346,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @throws IllegalArgumentException if location is null + * @throws IllegalArgumentException if dyeColor is null + * @throws IllegalArgumentException if lines is non-null and has a length less than 4 ++ * @deprecated Use {@link #sendBlockUpdate(Location, TileState)} by creating a new virtual ++ * {@link org.bukkit.block.Sign} block state via {@link BlockData#createBlockState()} ++ * (constructed e.g. via {@link Material#createBlockData()}) + */ ++ @Deprecated + default void sendSignChange(@NotNull Location loc, @Nullable java.util.List lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException { + this.sendSignChange(loc, lines, dyeColor, false); + } @@ -2363,7 +2371,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @throws IllegalArgumentException if location is null + * @throws IllegalArgumentException if dyeColor is null + * @throws IllegalArgumentException if lines is non-null and has a length less than 4 ++ * @deprecated Use {@link #sendBlockUpdate(Location, TileState)} by creating a new virtual ++ * {@link org.bukkit.block.Sign} block state via {@link BlockData#createBlockState()} ++ * (constructed e.g. via {@link Material#createBlockData()}) + */ ++ @Deprecated + default void sendSignChange(@NotNull Location loc, @Nullable java.util.List lines, boolean hasGlowingText) throws IllegalArgumentException { + this.sendSignChange(loc, lines, DyeColor.BLACK, hasGlowingText); + } @@ -2385,7 +2397,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @throws IllegalArgumentException if location is null + * @throws IllegalArgumentException if dyeColor is null + * @throws IllegalArgumentException if lines is non-null and has a length less than 4 ++ * @deprecated Use {@link #sendBlockUpdate(Location, TileState)} by creating a new virtual ++ * {@link org.bukkit.block.Sign} block state via {@link BlockData#createBlockState()} ++ * (constructed e.g. via {@link Material#createBlockData()}) + */ ++ @Deprecated + void sendSignChange(@NotNull Location loc, @Nullable java.util.List lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) + throws IllegalArgumentException; + // Paper end @@ -2397,7 +2413,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @param lines the new text on the sign or null to clear it * @throws IllegalArgumentException if location is null * @throws IllegalArgumentException if lines is non-null and has a length less than 4 -+ * @deprecated in favour of {@link #sendSignChange(org.bukkit.Location, java.util.List)} ++ * @deprecated Use {@link #sendBlockUpdate(Location, TileState)} by creating a new virtual ++ * {@link org.bukkit.block.Sign} block state via {@link BlockData#createBlockState()} ++ * (constructed e.g. via {@link Material#createBlockData()}) */ + @Deprecated // Paper public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException; @@ -2407,7 +2425,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @throws IllegalArgumentException if location is null * @throws IllegalArgumentException if dyeColor is null * @throws IllegalArgumentException if lines is non-null and has a length less than 4 -+ * @deprecated in favour of {@link #sendSignChange(org.bukkit.Location, java.util.List, org.bukkit.DyeColor)} ++ * @deprecated Use {@link #sendBlockUpdate(Location, TileState)} by creating a new virtual ++ * {@link org.bukkit.block.Sign} block state via {@link BlockData#createBlockState()} ++ * (constructed e.g. via {@link Material#createBlockData()}) */ + @Deprecated // Paper public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException; @@ -2417,7 +2437,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @throws IllegalArgumentException if location is null * @throws IllegalArgumentException if dyeColor is null * @throws IllegalArgumentException if lines is non-null and has a length less than 4 -+ * @deprecated Deprecated in favour of {@link #sendSignChange(Location, java.util.List, DyeColor, boolean)} ++ * @deprecated Use {@link #sendBlockUpdate(Location, TileState)} by creating a new virtual ++ * {@link org.bukkit.block.Sign} block state via {@link BlockData#createBlockState()} ++ * (constructed e.g. via {@link Material#createBlockData()}) */ + @Deprecated // Paper public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException;