From 609f137230ae4e07aa71ba676c66118454b6f55d Mon Sep 17 00:00:00 2001 From: Patrick Seidel Date: Thu, 21 Mar 2013 16:48:06 -0400 Subject: Add method to send fake sign updates to players. Adds BUKKIT-2300 --- src/main/java/org/bukkit/entity/Player.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index 44c9b5a7..fe8a0bd7 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -305,6 +305,23 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline @Deprecated public void sendBlockChange(Location loc, int material, byte data); + /** + * 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, int, byte)} or + * {@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 + * @throws IllegalArgumentException if location is null + * @throws IllegalArgumentException if lines is non-null and has a length less than 4 + */ + public void sendSignChange(Location loc, String[] lines) throws IllegalArgumentException; + /** * Render a map and send it to the player in its entirety. This may be * used when streaming the map in the normal manner is not desirable. -- cgit v1.2.3