PlayerBucketEmptyEvent not registering?

Discussion in 'Plugin Development' started by PopeUrban, May 2, 2011.

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


    So, after a long hiatus from writing for bukkit, I'm going about updating thermostat for the current reccommended build.

    Now, the sections of the code that handle direct block placement and everything else works, getting the listeners renamed properly was fine, etc.

    Then I get to my player listener, which used to call playeritemevent, So, thinking I've got an easy fix here I popped upen the git and found the event I was looking for, PlayerBucketEmptyEvent.

    Plugged it in, compiled, ran, everything was rosy until I started testing my bucket handling code:

    public void onPlayerItem(PlayerBucketEmptyEvent event) {
            //define the clicked face so we can reference it.
            event.getPlayer().sendMessage("ยง4Detected Bucket Use!");
            BlockFace targetFace = event.getBlockFace();
            //Create targetBlock to fill later
            Block targetBlock = null;
    //Snipped rest of code
    I'll spare you the rest of the code as currently it's not getting executed as PlayerBucketEmptyEvent isn't getting called at all as I suspected, and there's no reason it shouldn't be :(

    Any ideas?

    Never mind, found it!

    public void onPlayerBucketEmpty(PlayerBucketEmptyEvent event)

    I'll leave this here for anyone else coming back that's acclimating to the new player handling XD

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 14, 2016
Thread Status:
Not open for further replies.

Share This Page