I'm creating a wizardry plugin for Minecraft, and I was wondering how you would get the entity that a player was looking at, I know that you would have to use a Vector
, but I really am not familiar with them. Pretty much what I'm looking for is something like this:
public void entityLookingAt(Player p){
if(p.EntityLookingAt() instanceof Player){
p.sendMessage("You're looking at a player!");
}
}
Thanks!