Added compass setting methods.

This commit is contained in:
sk89q 2011-01-20 02:05:20 -08:00
parent 62624a0799
commit 0357c8f936

View File

@ -4,7 +4,9 @@ import java.net.InetSocketAddress;
import java.net.SocketAddress; import java.net.SocketAddress;
import net.minecraft.server.EntityPlayer; import net.minecraft.server.EntityPlayer;
import net.minecraft.server.EntityPlayerMP; import net.minecraft.server.EntityPlayerMP;
import net.minecraft.server.Packet;
import net.minecraft.server.Packet3Chat; import net.minecraft.server.Packet3Chat;
import net.minecraft.server.Packet6SpawnPosition;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -100,4 +102,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
entity.a.a(message); entity.a.a(message);
} }
public void setCompassTarget(Location loc) {
entity.a.b(((Packet) (new Packet6SpawnPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()))));
}
} }