sendBlockChange

Discussion in 'Plugin Development' started by girardcome, Jun 22, 2019.

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

    girardcome

    Good evening, I have a problem with the "sendBlockChange".

    I would like to make sure that when a player sees a block of LEAVES (generated by the sendBlockChange method) it must turns it into another block (also generated by another sendBlockChange).
    And i don't know how to do that with some tricks..

    My code:

    PHP:


    sendBlockUpdate
    (pp.getLocation(), Material.LEAVES);

    if(
    p.getTargetBlock((HashSet<Byte>) null100).getType() == Material.LEAVES &&  p.getTargetBlock((HashSet<Byte>) null100).getType()  != null){
    sendBlockUpdate(pp.getTargetBlock((HashSet<Byte>) null100).getLocation(), Material.GRASS);
    }

    public final 
    void sendBlockUpdate(Player pLocation lMaterial m) {
            
    p.sendBlockChange(lm, (byte0);
        }


     
  2. Offline

    timtower Administrator Administrator Moderator

    @girardcome sendBlockChange is a clientside thing.
    Server doesn't keep track of it.
     
Thread Status:
Not open for further replies.

Share This Page