Detect when player changes their armor

Discussion in 'Plugin Development' started by T0pAz7, Feb 3, 2015.

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

    T0pAz7

    I can't seem to put my head on this one. How would I go about detecting if a player changes their armor and what was the old armor and the new armor?
     
  2. Offline

    sirrus86

    Inventory events would be a good place to start.
     
  3. Offline

    mine-care

    In addition to what
    @sirrus86 said, check if the slot type is armor slot and then process data :)
     
  4. Offline

    T0pAz7

    Yep, got it. I disabled shift click when putting on armor because it would get glitchy :) Thanks

    I have an issue. I cannot find a way to detect the new armor being put on whenever a player takes the item out of the armor and put backs the same armor or whenever they replace the armor. Bukkit needs an API for armor changing but it's so frustrating and glitchy if you do it by yourself.
     
    Last edited by a moderator: Feb 4, 2015
  5. Offline

    Burnett

  6. Offline

    T0pAz7

    Does anyone know the event that get's called whenever player moves item using the numbers on the keyboard?
     
  7. Offline

    Burnett

    @T0pAz7 I gave you the list of all the inventory events. Trial and error it.
     
  8. Offline

    Lewishjames

    If im correct i believe you cannot do this as its client side, Its like trying to get when a player opens their inventory.
     
  9. Offline

    SuperOriginal

Thread Status:
Not open for further replies.

Share This Page