ca someone make a plugin that auto adds these effects to armor.

Discussion in 'Archived: Plugin Requests' started by gollumking, Jul 28, 2013.

  1. Offline

    gollumking

    full leather gives : speed 2
    full chain gives : speed 1 and strength 1
    full iron gives: strength 2


    I don't care about this one, but if you feel like it have full diamond give weakness 1 and slowness 1

    or if you know of one which lets me do something like this please tell me
     
  2. Offline

    Colcut

    If you know a bit of code you can probably use what I wrote up as a template.
    I could not find a suitable class since the inventory class is deprecated, I hope you can find one yourself. Sorry that I could not create it fully, I lack the time :p
    Code:java
    1. @EventHandler
    2. public void onPlayerJoin(PlayerJoinEvent evt) {
    3. Player player = evt.getPlayer();
    4. if (player.getInventory().getChestplate().getType()
    5. .equals(Material.LEATHER_CHESTPLATE)) {
    6. player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED,
    7. 2000, 10));
     
    andrewabosh likes this.
  3. Offline

    Eikester

    are you still need that plugin?
    if so feel free to try this one:
    https://dl.dropboxusercontent.com/u/24414601/ArmorsetEffects.jar

    config is empty at first start,
    to add Armor Effects just use:
    /armor add <Armortype> <PotionEffectType:[optional]amplifier>
    ArmorType: can be leather/chain/gold/iron/diamond
    PotionEffectType: = one of the Potion names as seen here (e.g. jump, heal, speed)
    amplifier: optional, default = 0, Level of the PotionEffect

    example:
    /armor add gold jump -> would add level 1 jump potion effect to gold armor set
    /armor add leather speed:2 -> would add level 2 speed potion effect to leather armor set

    To remove an Effect just use:
    /armor del <ArmorType> <PotionEffectType>

    To reload the config file use:
    /armor reload

    all commands permissions are set to op by default, permission is "armorEffects.commands"

    Let me know if it works as you want and/or if you need anything else, changes etc.

    Todo:
    allow IDs instead of PotionEffect names
     

Share This Page