EssentialsX

EssentialsX

2M Downloads

Add an option for placing items in specific slots (offhand, armor, etc)

mataaj opened this issue ยท 5 comments

commented

Feature description

Currently, when you put an item in your offhand slot, create a kit in-game using /kitcreate and then run /kit <kit> to recieve the kit, the item does not appear in your offhand slot, but in the first available slot instead. Im suggesting to add a toggleable option that, when enabled, would automatically put the item in the offhand slot (as long as the item was in offhand slot when creating the kit of course).

How the feature is useful

The feature could be quite useful for kits containing, for example, shields. As most players would probably want to put them in their offhand slot, I think they would appreciate receiving the kit in this state and not having to move their shield there every time they get the kit.

commented

Have you tried this with the config option use-nbt-serialization-in-createkit set to true?

commented

Yes, is that supposed to have any effect on this? Because for me, it does not.

commented

Not sure, I assumed it would've but seems not

commented

Rather than auto equip certain items into the offhand slot it would make more sense to allow specific items into separate slots with /kit. This would solve the issue of equipping correctly as well without making assumptions about what items to auto equip (for example, auto equipping shields when someone else may want to auto equip a torch instead).

commented

adding onto this, a potential idea of formatting the kits.yml to add this could be as such:

kits:
  a:
    delay: 1
    items:
    - diamond_chestplate 1
    equipment:
      helmet: diamond_helmet 1 name:helmet
      chestplate: diamond_chestplate 1 name:chestplate
      leggings: diamond_leggings 1 name:leggings
      boots: diamond_boots 1 name:boots
      offhand: shield name:shield