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

Show popup on ItemHold ?

Comments in 'Plugin Development' started by Radix, Jul 24, 2015.

  1. Radix
    Offline

    Radix Active Member

    Joined:
    Jul 2, 2015
    Posts:
    211
    Minecraft User:
    Dicks123
    I really need an example on how to display a popup when you put a Item in your hotbar!
  2. Asidert
    Offline

    Asidert Active Member Plugin Developer

    Joined:
    Oct 21, 2014
    Posts:
    123
    Plugins:
    1
    Minecraft User:
    Asidert
    Search on forum .-.
  3. Radix
    Offline

    Radix Active Member

    Joined:
    Jul 2, 2015
    Posts:
    211
    Minecraft User:
    Dicks123
    Didn't find any ... I need a example
  4. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    Use playerItemHeldEvent
    CraftYourBukkit likes this.
  5. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
  6. Radix
    Offline

    Radix Active Member

    Joined:
    Jul 2, 2015
    Posts:
    211
    Minecraft User:
    Dicks123
  7. TryoneLegendZzz
    Offline

    TryoneLegendZzz Active Member

    Joined:
    May 31, 2015
    Posts:
    201
    Minecraft User:
    SavionLegendZzz
    Try..
    PHP:
    public function PlayerItemHeld(PlayerItemHeldEvent $ev){
            
    $item $ev->getItem();
            
    $player $ev->getPlayer();
            if(
    $item instanceof Item){
                switch(
    $item->getId()){
                    case 
    276:
                            
    $player->sendPopUp(TextFormat::RED."You Have Activated Power Sword!");
                    break;
            }
            }
    }
    PEMapModder likes this.
  8. Radix
    Offline

    Radix Active Member

    Joined:
    Jul 2, 2015
    Posts:
    211
    Minecraft User:
    Dicks123
    Is there a way to see if player tap sky with the item?
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    $ev->getFace() === 0xff
    Legoboy0215 likes this.
  10. Radix
    Offline

    Radix Active Member

    Joined:
    Jul 2, 2015
    Posts:
    211
    Minecraft User:
    Dicks123
    TF?
  11. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    getFace()?
  12. BalAnce
    Offline

    BalAnce Active Member

    Joined:
    Mar 10, 2015
    Posts:
    125
    Minecraft User:
    BalAnce
    What's wrong with checking id block is equals 0?

Share This Page

Advertisement