diff --git a/purpur-api/paper-patches/files/src/main/java/org/bukkit/Bukkit.java.patch b/purpur-api/paper-patches/files/src/main/java/org/bukkit/Bukkit.java.patch index 8a81ab6c4..20a83c6cf 100644 --- a/purpur-api/paper-patches/files/src/main/java/org/bukkit/Bukkit.java.patch +++ b/purpur-api/paper-patches/files/src/main/java/org/bukkit/Bukkit.java.patch @@ -1,6 +1,6 @@ --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -3003,4 +_,133 @@ +@@ -3003,4 +_,147 @@ public static void restart() { server.restart(); } @@ -48,14 +48,16 @@ + } + // Purpur end - Added the ability to add combustible items + -+ // Purpur start - Debug Marker API ++ // Purpur start - Debug Marker API + /** + * Creates debug block highlight on specified block location and show it to all players on the server. + *
+ * Clients may be inconsistent in displaying it. + * @param location Location to highlight + * @param duration Duration for highlight to show in milliseconds ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + public static void sendBlockHighlight(@NotNull Location location, int duration) { + server.sendBlockHighlight(location, duration); + } @@ -67,7 +69,9 @@ + * @param location Location to highlight + * @param duration Duration for highlight to show in milliseconds + * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + public static void sendBlockHighlight(@NotNull Location location, int duration, int argb) { + server.sendBlockHighlight(location, duration, argb); + } @@ -79,7 +83,9 @@ + * @param location Location to highlight + * @param duration Duration for highlight to show in milliseconds + * @param text Text to show above the highlight ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + public static void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text) { + server.sendBlockHighlight(location, duration, text); + } @@ -92,7 +98,9 @@ + * @param duration Duration for highlight to show in milliseconds + * @param text Text to show above the highlight + * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + public static void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, int argb) { + server.sendBlockHighlight(location, duration, text, argb); + } @@ -106,7 +114,9 @@ + * @param color Color of the highlight. Will be ignored on some versions of vanilla client + * @param transparency Transparency of the highlight + * @throws IllegalArgumentException If transparency is outside 0-255 range ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + public static void sendBlockHighlight(@NotNull Location location, int duration, @NotNull org.bukkit.Color color, int transparency) { + server.sendBlockHighlight(location, duration, color, transparency); + } @@ -121,14 +131,18 @@ + * @param color Color of the highlight. Will be ignored on some versions of vanilla client + * @param transparency Transparency of the highlight + * @throws IllegalArgumentException If transparency is outside 0-255 range ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + public static void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, @NotNull org.bukkit.Color color, int transparency) { + server.sendBlockHighlight(location, duration, text, color, transparency); + } + + /** + * Clears all debug block highlights for all players on the server. ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + public static void clearBlockHighlights() { + server.clearBlockHighlights(); + } diff --git a/purpur-api/paper-patches/files/src/main/java/org/bukkit/Server.java.patch b/purpur-api/paper-patches/files/src/main/java/org/bukkit/Server.java.patch index 52f0776b4..7b2bbe835 100644 --- a/purpur-api/paper-patches/files/src/main/java/org/bukkit/Server.java.patch +++ b/purpur-api/paper-patches/files/src/main/java/org/bukkit/Server.java.patch @@ -1,6 +1,6 @@ --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2760,4 +_,111 @@ +@@ -2760,4 +_,125 @@ */ void allowPausing(@NotNull org.bukkit.plugin.Plugin plugin, boolean value); // Paper end - API to check if the server is sleeping @@ -47,7 +47,9 @@ + * Clients may be inconsistent in displaying it. + * @param location Location to highlight + * @param duration Duration for highlight to show in milliseconds ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void sendBlockHighlight(@NotNull Location location, int duration); + + /** @@ -57,7 +59,9 @@ + * @param location Location to highlight + * @param duration Duration for highlight to show in milliseconds + * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void sendBlockHighlight(@NotNull Location location, int duration, int argb); + + /** @@ -67,7 +71,9 @@ + * @param location Location to highlight + * @param duration Duration for highlight to show in milliseconds + * @param text Text to show above the highlight ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text); + + /** @@ -78,7 +84,9 @@ + * @param duration Duration for highlight to show in milliseconds + * @param text Text to show above the highlight + * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, int argb); + + /** @@ -90,7 +98,9 @@ + * @param color Color of the highlight. Will be ignored on some versions of vanilla client + * @param transparency Transparency of the highlight + * @throws IllegalArgumentException If transparency is outside 0-255 range ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void sendBlockHighlight(@NotNull Location location, int duration, @NotNull org.bukkit.Color color, int transparency); + + /** @@ -103,12 +113,16 @@ + * @param color Color of the highlight. Will be ignored on some versions of vanilla client + * @param transparency Transparency of the highlight + * @throws IllegalArgumentException If transparency is outside 0-255 range ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, @NotNull org.bukkit.Color color, int transparency); + + /** + * Clears all debug block highlights for all players on the server. ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void clearBlockHighlights(); + // Purpur end - Debug Marker API } diff --git a/purpur-api/paper-patches/files/src/main/java/org/bukkit/World.java.patch b/purpur-api/paper-patches/files/src/main/java/org/bukkit/World.java.patch index d5603af97..688609d81 100644 --- a/purpur-api/paper-patches/files/src/main/java/org/bukkit/World.java.patch +++ b/purpur-api/paper-patches/files/src/main/java/org/bukkit/World.java.patch @@ -1,6 +1,6 @@ --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -4491,6 +_,86 @@ +@@ -4491,6 +_,100 @@ @Nullable public DragonBattle getEnderDragonBattle(); @@ -19,7 +19,9 @@ + * Clients may be inconsistent in displaying it. + * @param location Location to highlight + * @param duration Duration for highlight to show in milliseconds ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void sendBlockHighlight(@NotNull Location location, int duration); + + /** @@ -29,7 +31,9 @@ + * @param location Location to highlight + * @param duration Duration for highlight to show in milliseconds + * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void sendBlockHighlight(@NotNull Location location, int duration, int argb); + + /** @@ -39,7 +43,9 @@ + * @param location Location to highlight + * @param duration Duration for highlight to show in milliseconds + * @param text Text to show above the highlight ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text); + + /** @@ -50,7 +56,9 @@ + * @param duration Duration for highlight to show in milliseconds + * @param text Text to show above the highlight + * @param argb Color of the highlight. ARGB int. Will be ignored on some versions of vanilla client ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, int argb); + + /** @@ -62,7 +70,9 @@ + * @param color Color of the highlight. Will be ignored on some versions of vanilla client + * @param transparency Transparency of the highlight + * @throws IllegalArgumentException If transparency is outside 0-255 range ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void sendBlockHighlight(@NotNull Location location, int duration, @NotNull org.bukkit.Color color, int transparency); + + /** @@ -75,12 +85,16 @@ + * @param color Color of the highlight. Will be ignored on some versions of vanilla client + * @param transparency Transparency of the highlight + * @throws IllegalArgumentException If transparency is outside 0-255 range ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, @NotNull org.bukkit.Color color, int transparency); + + /** + * Clears all debug block highlights for all players on this world. ++ * @deprecated until further notice. NOOP since 1.21.10 + */ ++ @Deprecated + void clearBlockHighlights(); + // Purpur end + diff --git a/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/CraftServer.java.patch b/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/CraftServer.java.patch index d1c8921b0..125da2e66 100644 --- a/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/CraftServer.java.patch +++ b/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/CraftServer.java.patch @@ -99,7 +99,7 @@ + + @Override + public void clearBlockHighlights() { -+ this.worlds.forEach((name, world) -> clearBlockHighlights()); ++ this.worlds.forEach((name, world) -> world.clearBlockHighlights()); + } + // Purpur end - Debug Marker API + diff --git a/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/CraftWorld.java.patch b/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/CraftWorld.java.patch index 0963030be..53e0a2392 100644 --- a/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/CraftWorld.java.patch +++ b/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/CraftWorld.java.patch @@ -28,7 +28,7 @@ + + @Override + public void sendBlockHighlight(Location location, int duration, String text, int argb) { -+ // Purpur - TODO: fix block highlight API ++ // Purpur - TODO: NOOP until further notice + //net.minecraft.network.protocol.game.DebugPackets.sendGameTestAddMarker(getHandle(), org.bukkit.craftbukkit.util.CraftLocation.toBlockPosition(location), text, argb, duration); + } + @@ -45,7 +45,7 @@ + + @Override + public void clearBlockHighlights() { -+ // Purpur - TODO: fix block highlight API ++ // Purpur - TODO: NOOP until further notice + //net.minecraft.network.protocol.game.DebugPackets.sendGameTestClearPacket(getHandle()); + } + // Purpur end - Debug Marker API diff --git a/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java.patch b/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java.patch index a9383b27a..48bd955e4 100644 --- a/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java.patch +++ b/purpur-server/paper-patches/files/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java.patch @@ -64,7 +64,7 @@ + @Override + public void sendBlockHighlight(Location location, int duration, String text, int argb) { + if (this.getHandle().connection == null) return; -+ // Purpur - TODO: fix block highlight API ++ // Purpur - TODO: NOOP until further notice + //this.getHandle().connection.send(new net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket(new net.minecraft.network.protocol.common.custom.GameTestAddMarkerDebugPayload(org.bukkit.craftbukkit.util.CraftLocation.toBlockPosition(location), argb, text, duration))); + } + @@ -82,7 +82,7 @@ + @Override + public void clearBlockHighlights() { + if (this.getHandle().connection == null) return; -+ // Purpur - TODO: fix block highlight API ++ // Purpur - TODO: NOOP until further notice + //this.getHandle().connection.send(new net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket(new net.minecraft.network.protocol.common.custom.GameTestClearMarkersDebugPayload())); + } + // Purpur end - Debug Marker API