From 18b72bc44784bd408bf4ae67c99689a661e2666f Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 20 Jan 2011 02:05:20 -0800 Subject: [PATCH] Added compass setting methods. By: sk89q --- .../java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 1c03f38ab2..a1ed1165ed 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -4,7 +4,9 @@ import java.net.InetSocketAddress; import java.net.SocketAddress; import net.minecraft.server.EntityPlayer; import net.minecraft.server.EntityPlayerMP; +import net.minecraft.server.Packet; import net.minecraft.server.Packet3Chat; +import net.minecraft.server.Packet6SpawnPosition; import org.bukkit.Location; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Player; @@ -100,4 +102,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { entity.a.a(message); } + public void setCompassTarget(Location loc) { + entity.a.b(((Packet) (new Packet6SpawnPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())))); + } + }