BlockPlaceEvent dont work

Discussion in 'Plugin Development' started by drafix, Jul 6, 2019.

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

    drafix

    public class Main extends JavaPlugin implements Listener {

    public void onEnable() {
    Bukkit.getServer().getPluginManager().registerEvents(this, this);
    }

    public void onBlockPlace(BlockPlaceEvent e) {
    e.getPlayer().sendMessage("a");
    }
    }

    Why don't work? :(
     
  2. Offline

    timtower Moderator Moderator

    @drafix You are missing the @EventHandler
     
Thread Status:
Not open for further replies.

Share This Page