diff --git a/patches/api/Add-Player-Client-Options-API.patch b/patches/api/Add-Player-Client-Options-API.patch index e1a66a70d0..c579c4940c 100644 --- a/patches/api/Add-Player-Client-Options-API.patch +++ b/patches/api/Add-Player-Client-Options-API.patch @@ -180,8 +180,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ package org.bukkit.entity; - import java.net.InetSocketAddress; + import java.util.List; // Paper import java.util.UUID; +import com.destroystokyo.paper.ClientOption; // Paper import com.destroystokyo.paper.Title; // Paper diff --git a/patches/api/Add-String-based-Action-Bar-API.patch b/patches/api/Add-String-based-Action-Bar-API.patch index 40c557dabf..23823244f1 100644 --- a/patches/api/Add-String-based-Action-Bar-API.patch +++ b/patches/api/Add-String-based-Action-Bar-API.patch @@ -8,8 +8,8 @@ diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/buk index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -0,0 +0,0 @@ package org.bukkit.entity; - import java.net.InetSocketAddress; +@@ -0,0 +0,0 @@ import java.net.InetSocketAddress; + import java.util.List; // Paper import java.util.UUID; import com.destroystokyo.paper.Title; // Paper +import net.kyori.adventure.text.Component; diff --git a/patches/api/Adventure.patch b/patches/api/Adventure.patch index abfcdcfa8f..2456445989 100644 --- a/patches/api/Adventure.patch +++ b/patches/api/Adventure.patch @@ -1355,6 +1355,14 @@ diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/buk index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java +@@ -0,0 +0,0 @@ + package org.bukkit.entity; + + import java.net.InetSocketAddress; ++import java.util.List; // Paper + import java.util.UUID; + import org.bukkit.DyeColor; + import org.bukkit.Effect; @@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable; /** * Represents a player, connected or not @@ -1530,14 +1538,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public boolean sendChunkChange(@NotNull Location loc, int sx, int sy, int sz, @NotNull byte[] data); + // Paper start - /** - * Send a sign change. This fakes a sign change packet for a user at - * a certain location. This will not actually change the world in any way. -@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - * @throws IllegalArgumentException if location is null - * @throws IllegalArgumentException if lines is non-null and has a length less than 4 - */ -+ void sendSignChange(@NotNull Location loc, @Nullable java.util.List lines) throws IllegalArgumentException; + /** + * Send a sign change. This fakes a sign change packet for a user at + * a certain location. This will not actually change the world in any way. @@ -1550,13 +1550,72 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * + * @param loc the location of the sign + * @param lines the new text on the sign or null to clear it -+ * @param dyeColor the color of the sign ++ * @throws IllegalArgumentException if location is null ++ * @throws IllegalArgumentException if lines is non-null and has a length less than 4 ++ */ ++ default void sendSignChange(@NotNull Location loc, @Nullable java.util.List lines) throws IllegalArgumentException { ++ this.sendSignChange(loc, lines, DyeColor.BLACK); ++ } ++ + /** + * Send a sign change. This fakes a sign change packet for a user at + * a certain location. This will not actually change the world in any way. +@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * + * @param loc the location of the sign + * @param lines the new text on the sign or null to clear it ++ * @param dyeColor the color of the sign + * @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 + */ ++ default void sendSignChange(@NotNull Location loc, @Nullable java.util.List lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException { ++ this.sendSignChange(loc, lines, dyeColor, false); ++ } ++ ++ /** ++ * Send a sign change. This fakes a sign change packet for a user at ++ * a certain location. This will not actually change the world in any way. ++ * This method will use a sign at the location's block or a faked sign ++ * sent via ++ * {@link #sendBlockChange(org.bukkit.Location, org.bukkit.Material, byte)}. ++ *

++ * If the client does not have a sign at the given location it will ++ * display an error message to the user. ++ * ++ * @param loc the location of the sign ++ * @param lines the new text on the sign or null to clear it ++ * @param hasGlowingText whether the text of the sign should glow as if dyed with a glowing ink sac + * @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 + */ -+ void sendSignChange(@NotNull Location loc, @Nullable java.util.List lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException; ++ default void sendSignChange(@NotNull Location loc, @Nullable java.util.List lines, boolean hasGlowingText) throws IllegalArgumentException { ++ this.sendSignChange(loc, lines, DyeColor.BLACK, hasGlowingText); ++ } ++ ++ /** ++ * Send a sign change. This fakes a sign change packet for a user at ++ * a certain location. This will not actually change the world in any way. ++ * This method will use a sign at the location's block or a faked sign ++ * sent via ++ * {@link #sendBlockChange(org.bukkit.Location, org.bukkit.Material, byte)}. ++ *

++ * If the client does not have a sign at the given location it will ++ * display an error message to the user. ++ * ++ * @param loc the location of the sign ++ * @param lines the new text on the sign or null to clear it ++ * @param dyeColor the color of the sign ++ * @param hasGlowingText whether the text of the sign should glow as if dyed with a glowing ink sac ++ * @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 ++ */ ++ void sendSignChange(@NotNull Location loc, @Nullable java.util.List lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) ++ throws IllegalArgumentException; + // Paper end ++ + /** + * Send a sign change. This fakes a sign change packet for a user at + * a certain location. This will not actually change the world in any way. @@ -1576,7 +1635,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Deprecated // Paper public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException; - + /** @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @throws IllegalArgumentException if location is null * @throws IllegalArgumentException if dyeColor is null @@ -1586,6 +1645,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Deprecated // Paper public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException; + /** +@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * @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, List, DyeColor, boolean)} + */ ++ @Deprecated // Paper + public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException; + /** @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM */ diff --git a/patches/api/Expose-Tracked-Players.patch b/patches/api/Expose-Tracked-Players.patch index a667005325..68dab829aa 100644 --- a/patches/api/Expose-Tracked-Players.patch +++ b/patches/api/Expose-Tracked-Players.patch @@ -8,10 +8,10 @@ diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/buk index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -0,0 +0,0 @@ - package org.bukkit.entity; +@@ -0,0 +0,0 @@ package org.bukkit.entity; import java.net.InetSocketAddress; + import java.util.List; // Paper +import java.util.Set; // Paper import java.util.UUID; import com.destroystokyo.paper.ClientOption; // Paper diff --git a/patches/api/Player-Tab-List-and-Title-APIs.patch b/patches/api/Player-Tab-List-and-Title-APIs.patch index 7d7d129e72..d24aa05121 100644 --- a/patches/api/Player-Tab-List-and-Title-APIs.patch +++ b/patches/api/Player-Tab-List-and-Title-APIs.patch @@ -436,8 +436,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +0,0 @@ package org.bukkit.entity; - import java.net.InetSocketAddress; + import java.util.List; // Paper import java.util.UUID; +import com.destroystokyo.paper.Title; // Paper import org.bukkit.DyeColor; diff --git a/patches/api/Player.setPlayerProfile-API.patch b/patches/api/Player.setPlayerProfile-API.patch index a99e290d5e..9118dbd7c2 100644 --- a/patches/api/Player.setPlayerProfile-API.patch +++ b/patches/api/Player.setPlayerProfile-API.patch @@ -9,7 +9,7 @@ diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/buk index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -0,0 +0,0 @@ import java.net.InetSocketAddress; +@@ -0,0 +0,0 @@ import java.util.List; // Paper import java.util.UUID; import com.destroystokyo.paper.Title; // Paper import net.kyori.adventure.text.Component; diff --git a/patches/server/Adventure.patch b/patches/server/Adventure.patch index 7ed080d7a3..9aac0451b6 100644 --- a/patches/server/Adventure.patch +++ b/patches/server/Adventure.patch @@ -2261,11 +2261,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start + @Override -+ public void sendSignChange(Location loc, List lines) { -+ this.sendSignChange(loc, lines, org.bukkit.DyeColor.BLACK); -+ } -+ @Override -+ public void sendSignChange(Location loc, List lines, DyeColor dyeColor) { ++ public void sendSignChange(Location loc, @Nullable List lines, DyeColor dyeColor, boolean hasGlowingText) { + if (getHandle().connection == null) { + return; + } @@ -2278,12 +2274,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + throw new IllegalArgumentException("Must have at least 4 lines"); + } + Component[] components = CraftSign.sanitizeLines(lines); -+ this.sendSignChange0(components, loc, dyeColor); ++ this.sendSignChange0(components, loc, dyeColor, hasGlowingText); + } + -+ private void sendSignChange0(Component[] components, Location loc, DyeColor dyeColor) { ++ private void sendSignChange0(Component[] components, Location loc, DyeColor dyeColor, boolean hasGlowingText) { + SignBlockEntity sign = new SignBlockEntity(new BlockPos(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()), Blocks.OAK_SIGN.defaultBlockState()); + sign.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData())); ++ sign.setHasGlowingText(hasGlowingText); + System.arraycopy(components, 0, sign.messages, 0, sign.messages.length); + + getHandle().connection.send(sign.getUpdatePacket()); @@ -2291,23 +2288,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end @Override public void sendSignChange(Location loc, String[] lines) { - this.sendSignChange(loc, lines, DyeColor.BLACK); + this.sendSignChange(loc, lines, DyeColor.BLACK); @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } Component[] components = CraftSign.sanitizeLines(lines); - SignBlockEntity sign = new SignBlockEntity(new BlockPos(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()), Blocks.OAK_SIGN.defaultBlockState()); -- sign.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData())); -- for (int i = 0; i < components.length; i++) { -- sign.setMessage(i, components[i]); -- } + /*SignBlockEntity sign = new SignBlockEntity(new BlockPos(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()), Blocks.OAK_SIGN.defaultBlockState()); -+ sign.setColor(EnumColor.fromColorIndex(dyeColor.getWoolData())); -+ System.arraycopy(components, 0, sign.lines, 0, sign.lines.length); + sign.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData())); + sign.setHasGlowingText(hasGlowingText); + for (int i = 0; i < components.length; i++) { + sign.setMessage(i, components[i]); + } - this.getHandle().connection.send(sign.getUpdatePacket()); + this.getHandle().connection.send(sign.getUpdatePacket());*/ // Paper -+ this.sendSignChange0(components, loc, dyeColor); // Paper ++ this.sendSignChange0(components, loc, dyeColor, hasGlowingText); // Paper } @Override diff --git a/work/Bukkit b/work/Bukkit index 75a0ee4f04..e0598aa29e 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 75a0ee4f0481a29f71142a9c0c11e26b1e0d79db +Subproject commit e0598aa29ef8f0622378d929c0ed0542e698db60 diff --git a/work/CraftBukkit b/work/CraftBukkit index e1c96e507f..2cdc6b1e4c 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit e1c96e507f7019e30e353166645d6dbeaa6c1482 +Subproject commit 2cdc6b1e4cc28d67eeb6397b5650ecc1e13efdfa