garbagemule / MobArena

MobArena plugin for Minecraft
GNU General Public License v3.0
195 stars 151 forks source link

Add offhand item selector #722

Closed molor closed 2 years ago

molor commented 2 years ago

Feature request

Don't know how to name it properly.

Implementation details

When selecting a class, player receives items from configuration items section. Sometimes, one item will be more useful if it placed in offhand slot (e.g. shield or potion of healing). Sure, player can place necessary item to this slot manually, but if do this every time... preparation for the fight can take a lot of time.

My suggestion is to add a new setting like offhand-items with the same format like items or armor in classes. And when player will receive items by selecting a class, first matched item (listed in this setting) will be placed in offhand slot, while other items will be placed like before. Example:

global-settings:
  offhand-items: potion:instant_heal:3
classes:
  Test:
    items: diamond_sword, potion:instant_heal:3
    armor: iron_helmet, iron_chestplate, iron_boots

Additional info

After writing an example, I think about another solution: just add a new offhand setting below items and armor. It's more simple and convenient I think, but will not work with classes that uses items from chests (or will, I'm not used it and not sure).

Thanks for all your work.

garbagemule commented 2 years ago

You'll be happy to know that this is already possible: https://github.com/garbagemule/MobArena/wiki/Setting-up-the-config-file#slot-specific-armor-nodes

molor commented 2 years ago

о:

Now I am very ashamed that I did not read the documentation so deeply