Forcing Block Placing

Discussion in 'Plugin Development' started by Pik0, Mar 2, 2015.

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

    Pik0

    Hello guys, I am trying to force a block placing from the player. To do that, i am using player interact with RIGHT_CLICK_BLOCK and setting to clickedblock relative to the face clicked to the block in hand. But i have a problem, I can't really simulate the block placement and obviously the blockplacement is a lot faster (interact calls faster than player simple block placing), so i need help in this 2 things D:
     
  2. Offline

    Zombie_Striker

    Code:
    Block b = location.getBlockAt(location)
    b.setType();
    b.getlocation().playSoung(The sound);
    setFace(b,event.getPlayer());
    
    public void setFace(Block b,Player p){
    if(p.getDirection >0&&p.getDirection < 90)
    b.getFace(b).equals (south)
    }
    
    ect.
     
  3. Offline

    Pik0

    "the blockplacement is a lot faster (interact calls faster than player simple block placing)"
     
Thread Status:
Not open for further replies.

Share This Page