Bug Closed · Resolved

Dropping an item while PreventDropping is enabled causes onSwing skills to activate

#2833 opened by Unknown 4 years ago

Unknownreported this bug

Dropping an item with an onPressQ event while PreventDropping is enabled activates the onPressQ event and allows you to keep the item as expected, but it also causes an onSwing event to activate when the item is returned to the inventory.

For example, the following item would, upon pressing Q to drop the item, activate the CTDodge skill as expected, but it would also cause the CTDiamondSwordAtk skill to activate.

onSwing skills are not activated when dropping or picking up items without PreventDropping, even if the item also has an onPressQ event. Similarly, items with an onSwing skill and the PreventDropping option enabled still activate the onSwing skill when dropped even without an onPressQ event.

  Id: diamond_sword
  Display: "Diamond Sword Test"
  Attributes:
    MainHand:
      AttackDamage: -1
      AttackSpeed: 2
  Options:
    PreventDropping: true
    Unbreakable: true
  Lore:
  - "&96 Damage"
  - "&93 Range"
  - "&eRight-Click: Launch a swing attack that hits"
  - "&eall nearby enemies."
  Skills:
    - skill{s=CTDiamondSwordAtk} @self ~onSwing
    - skill{s=CTDiamondSwordSwing} @self ~onUse
    - skill{s=CTDodge} @self ~onPressQ
Unknowncommented

This is a bug with spigot and isn't something we can fix

Sign in to join the discussion.