Painting Listener

Discussion in 'Plugin Development' started by jordandmc, Jun 14, 2011.

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

    jordandmc

    I'm trying to cancel the PaintingBreakEvent and the PaintingPlaceEvent for my plugin but I'm not seeing any kind of PaintingListener provided in the API. I'm trying to disable certain users from placing/removing paintings.

    • Is there another way to cancel those events?
    • Has bukkit just not added a listener yet and plans to sometime?
    • Do i event need a PaintingListener in order to use those events?
    Any help would be greatly appreciated!
     
  2. Offline

    Baummann

    You don't need a listener just put this in your main class:

    Code:
    public void onPaintingBreak(PaintingBreakEvent event) {
       event.setCancelled(true);
    }
    That'll cancel the event. Do the same thing with onPaintingPlace.
     
  3. Offline

    nisovin

    jordandmc likes this.
  4. Offline

    vildaberper

    Edit: Nevermind, I saw that there are painting events now. As said, thay go in EntityListener.
     
  5. Offline

    jordandmc

    thanks, somehow im not sure why i didn't check the EntityListener to see if it was implemented there seeing as how i knew paintings are entities.
     
Thread Status:
Not open for further replies.

Share This Page