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

Wearing armor

Comments in 'Plugin Development' started by KubixQ, Feb 19, 2016.

  1. KubixQ
    Offline

    KubixQ Active Member

    Joined:
    Sep 13, 2015
    Posts:
    85
    Minecraft User:
    KubixQ
    Hey, is it possible to e.g. send popup to player when player wear diamond chestplate, when player take off that chestplate popup disappears?
    If yes can anyone give example code.?
    Thanks.
  2. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    make a repeatingTask
  3. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
  4. minebuilder0110
    Offline

    minebuilder0110 Notable Member

    Joined:
    Dec 8, 2014
    Posts:
    485
    Minecraft User:
    Apparitional
    Most likely that he meant that you need repeating task to keep up the popup.
    PocketKiller likes this.
  5. KubixQ
    Offline

    KubixQ Active Member

    Joined:
    Sep 13, 2015
    Posts:
    85
    Minecraft User:
    KubixQ
    How to check if player wearing e.g. diamond chestplate?
  6. minebuilder0110
    Offline

    minebuilder0110 Notable Member

    Joined:
    Dec 8, 2014
    Posts:
    485
    Minecraft User:
    Apparitional
    PHP:
    $inv $player->getInventory();
    $helmet $inv->getHelmet()->getID();
    $chestplate $inv->getChestplate()->getID();
    $leggings $inv->getLeggings()->getID();
    $boots $inv->getBoots()->getID();
    Compare the player's inventory which you have received from above to 311.
    (I prefer using IDs)
  7. KubixQ
    Offline

    KubixQ Active Member

    Joined:
    Sep 13, 2015
    Posts:
    85
    Minecraft User:
    KubixQ
    Thanks, I test it.
    Marttinek likes this.
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Use EntityArmorChangeEvent instead.

Share This Page

Advertisement