Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help getting item iD

Comments in 'Plugin Development' started by luca28pet, Apr 23, 2014.

  1. luca28pet
    Offline

    luca28pet Active Member

    Joined:
    Feb 20, 2014
    Posts:
    251
    Minecraft User:
    luca28pet
    Hi coders, I'm developing a little plugins that I'll use in my server.
    So, I have a question: how can I get Item Placed ID?
    Like this: (It's a part of the plugin)
    PHP:
        $this->api->addHandler("player.block.place", array($this"eventHandler"), 100);

        }
     
        public function 
    eventHandler($data$event)
        {
        switch(
    $event)
        {
            case 
    'player.block.place':
               if 
    /* part of code that I need!!! */ == 7
               
    return false;
         
            break;
        }
    }
    Could someone help me?
    Last edited: Apr 23, 2014
  2. luca28pet
    Offline

    luca28pet Active Member

    Joined:
    Feb 20, 2014
    Posts:
    251
    Minecraft User:
    luca28pet
    Don't worry, I've found it by myself:
    PHP:
           if($data["block"]->getID()===10)

Share This Page

Advertisement