Wither Skull on Block Place [SOLVED]

Discussion in 'Spigot Plugin Development' started by Arman, Jul 6, 2015.

  1. I'm trying to check if a player places a wither skeleton skull, and if so, send them a debug message:

    Code (Java):
        public void onPlace(BlockPlaceEvent e) {
            Player p = e.getPlayer();
            if (e.getBlock() != null) {
                Block b = e.getBlock();
                if (b.getType() == Material.SKULL_ITEM && b.getData() == (byte) 1) {
    However, no debug message is sent.

    The event is being registered and called.

    Thanks in advance for any help!
  2. Have you tried using Material.SKULL instead of Material.SKULL_ITEM?
    • Agree Agree x 1
    • Winner Winner x 1
  3. Thanks, it works! Thought I was supposed to use SKULL_ITEM because when I checked the information of a wither skull with the Essentials /itemdb command, it showed up as SKULL_ITEM:1.

    Issue fixed!
    • Like Like x 1