Skip to main content
Post Reopened by House
Post Closed as "Duplicate" by House
deleted 9 characters in body; edited title; edited tags
Source Link
user1430
user1430

Minecraft Bukkit - Get How can I get the entity thea player is looking at in a Bukkit plugin?

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!

Minecraft Bukkit - Get the entity the player is looking at

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!

How can I get the entity a player is looking at in a Bukkit plugin?

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!");
    }
}
Source Link
Jojodmo
  • 113
  • 6

Minecraft Bukkit - Get the entity the player is looking at

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!