mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Debug Marker API
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2968,4 +_,47 @@
|
||||
@@ -2968,4 +_,133 @@
|
||||
public static Server.Spigot spigot() {
|
||||
return server.spigot();
|
||||
}
|
||||
@@ -47,4 +47,90 @@
|
||||
+ server.removeFuel(material);
|
||||
+ }
|
||||
+ // Purpur end - Added the ability to add combustible items
|
||||
+
|
||||
+ // Purpur start - Debug Marker API
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on the server.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ */
|
||||
+ public static void sendBlockHighlight(@NotNull Location location, int duration) {
|
||||
+ server.sendBlockHighlight(location, duration);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on the server.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @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
|
||||
+ */
|
||||
+ public static void sendBlockHighlight(@NotNull Location location, int duration, int argb) {
|
||||
+ server.sendBlockHighlight(location, duration, argb);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on the server.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @param text Text to show above the highlight
|
||||
+ */
|
||||
+ public static void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text) {
|
||||
+ server.sendBlockHighlight(location, duration, text);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on the server.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @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
|
||||
+ */
|
||||
+ public static void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, int argb) {
|
||||
+ server.sendBlockHighlight(location, duration, text, argb);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on the server.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @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
|
||||
+ */
|
||||
+ public static void sendBlockHighlight(@NotNull Location location, int duration, @NotNull org.bukkit.Color color, int transparency) {
|
||||
+ server.sendBlockHighlight(location, duration, color, transparency);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on the server.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @param text Text to show above the highlight
|
||||
+ * @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
|
||||
+ */
|
||||
+ 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.
|
||||
+ */
|
||||
+ public static void clearBlockHighlights() {
|
||||
+ server.clearBlockHighlights();
|
||||
+ }
|
||||
+ // Purpur end - Debug Marker API
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2607,4 +_,39 @@
|
||||
@@ -2607,4 +_,111 @@
|
||||
*/
|
||||
void allowPausing(@NotNull org.bukkit.plugin.Plugin plugin, boolean value);
|
||||
// Paper end - API to check if the server is sleeping
|
||||
@@ -39,4 +39,76 @@
|
||||
+ */
|
||||
+ public void removeFuel(@NotNull Material material);
|
||||
+ // Purpur end - Added the ability to add combustible items
|
||||
+
|
||||
+ // Purpur start - Debug Marker API
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on the server.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on the server.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @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
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, int argb);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on the server.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @param text Text to show above the highlight
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on the server.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @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
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, int argb);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on the server.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @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
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull org.bukkit.Color color, int transparency);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on the server.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @param text Text to show above the highlight
|
||||
+ * @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
|
||||
+ */
|
||||
+ 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.
|
||||
+ */
|
||||
+ void clearBlockHighlights();
|
||||
+ // Purpur end - Debug Marker API
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -4246,6 +_,16 @@
|
||||
@@ -4246,6 +_,86 @@
|
||||
@Nullable
|
||||
public DragonBattle getEnderDragonBattle();
|
||||
|
||||
@@ -12,6 +12,76 @@
|
||||
+ * @return The local difficulty
|
||||
+ */
|
||||
+ public float getLocalDifficultyAt(@NotNull Location location);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on this world.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on this world.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @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
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, int argb);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on this world.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @param text Text to show above the highlight
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on this world.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @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
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, int argb);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on this world.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @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
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull org.bukkit.Color color, int transparency);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to all players on this world.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @param text Text to show above the highlight
|
||||
+ * @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
|
||||
+ */
|
||||
+ 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.
|
||||
+ */
|
||||
+ void clearBlockHighlights();
|
||||
+ // Purpur end
|
||||
+
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3911,4 +_,33 @@
|
||||
@@ -3911,4 +_,103 @@
|
||||
*/
|
||||
void sendEntityEffect(org.bukkit.@NotNull EntityEffect effect, @NotNull Entity target);
|
||||
// Paper end - entity effect API
|
||||
@@ -32,5 +32,75 @@
|
||||
+ * @deprecated Use {@link #resetIdleDuration()} instead
|
||||
+ */
|
||||
+ void resetIdleTimer();
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to this player.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to this player.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @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
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, int argb);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to this player.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @param text Text to show above the highlight
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to this player.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @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
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, int argb);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to this player.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @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
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull org.bukkit.Color color, int transparency);
|
||||
+
|
||||
+ /**
|
||||
+ * Creates debug block highlight on specified block location and show it to this player.
|
||||
+ * <p>
|
||||
+ * Clients may be inconsistent in displaying it.
|
||||
+ * @param location Location to highlight
|
||||
+ * @param duration Duration for highlight to show in milliseconds
|
||||
+ * @param text Text to show above the highlight
|
||||
+ * @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
|
||||
+ */
|
||||
+ void sendBlockHighlight(@NotNull Location location, int duration, @NotNull String text, @NotNull org.bukkit.Color color, int transparency);
|
||||
+
|
||||
+ /**
|
||||
+ * Clears all debug block highlights
|
||||
+ */
|
||||
+ void clearBlockHighlights();
|
||||
+ // Purpur end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user