Getting the center of a player?

Discussion in 'Plugin Development' started by thok13, Jan 4, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    thok13

    I'm trying to make a blood effect when players get hurt by entities.
    I've gotten it working but the effect appears to be coming from the player leg.
    So is there any way I can get the center of the player? Like maybe by adding something to the players coordinates? Sorry if I'm not explaining this well.
    Code:java
    1. p.getWorld().playEffect(p.getLocation(), Effect.STEP_SOUND, Material.REDSTONE_WIRE.getId());
     
  2. Offline

    PhilipsNostrum

    Hm I guess you can make Y one block above:
    Code:
    Location loc = p.getLocation();
    loc.setY(loc.getY+1);
    //your code
    
     
  3. Offline

    thok13

    What I meant was it looks like the effect is coming from a bottom corner of the players hitbox.
     
Thread Status:
Not open for further replies.

Share This Page