From 6e1fca7350e8560adbf81d7bf6d7cad3817c751f Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 21 May 2011 20:28:42 +0100 Subject: [PATCH] Adds update chunk method for sending fake chunk updates to the client. This is to match the sendBlockChange method. By: raphfrk --- .../main/java/org/bukkit/entity/Player.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Player.java b/paper-api/src/main/java/org/bukkit/entity/Player.java index 6b71698742..d2304386e6 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Player.java +++ b/paper-api/src/main/java/org/bukkit/entity/Player.java @@ -152,6 +152,25 @@ public interface Player extends HumanEntity, CommandSender { */ public void sendBlockChange(Location loc, Material material, byte data); + /** + * Send a chunk change. This fakes a chunk change packet for a user at + * a certain location. The updated cuboid must be entirely within a single + * chunk. This will not actually change the world in any way. + * + * At least one of the dimensions of the cuboid must be even. The size of the + * data buffer must be 2.5*sx*sy*sz and formatted in accordance with the Packet51 + * format. + * + * @param loc The location of the cuboid + * @param sx The x size of the cuboid + * @param sy The y size of the cuboid + * @param sz The z size of the cuboid + * @param data The data to be sent + * + * @return true if the chunk change packet was sent + */ + public boolean sendChunkChange(Location loc, int sx, int sy, int sz, byte[] data); + /** * Send a block change. This fakes a block change packet for a user at * a certain location. This will not actually change the world in any way.