mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 04:05:50 -07:00
Add method to send fake sign updates to players. Adds BUKKIT-2300
By: Patrick Seidel <psycowithespn1@aim.com>
This commit is contained in:
@@ -305,6 +305,23 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public void sendBlockChange(Location loc, int material, byte data);
|
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)}.
|
||||||
|
* <p>
|
||||||
|
* 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
|
* 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.
|
* used when streaming the map in the normal manner is not desirable.
|
||||||
|
Reference in New Issue
Block a user