Solved I want to change the text on the sign when the chest is placed underneath.

Discussion in 'Spigot Plugin Development' started by FinnTG, Jun 19, 2021.

  1. Hello,

    I want to change the text on the sign when the chest is placed underneath. How can I access the sign and change the text?

    This is my code:

    Code (Java):
    if(e.getBlockPlaced().getType() == Material.CHEST) {
                    if(e.getBlockPlaced().getLocation().add(0, 1, 0).getBlock().getType() == Material.WALL_SIGN) {
                        p.sendMessage("It works!");
                    }
                }
     
    • Like Like x 1
  2. Thanks man!