GC-spigot / AdvancedEnchantments

Superior Custom Enchantments Creator for Minecraft And Spigot platform
139 stars 61 forks source link

Reproducing bug enchantments #4303

Closed Batatoones closed 1 month ago

Batatoones commented 1 month ago

Describe the bug

Enchanted items with the same enchantment but with different levels always end up working, ignoring the recharge time.

How to reproduce

Apply the same enchantment to 2 different items and the enchantments need to be of different levels, for example: take two boots and apply the same enchantment to one boot at lvl 3 and the other at lvl 4. Use the item until the enchantment activates and when it activates, change the boot and do the same process and the enchantment will activate again shortly afterwards.

Screenshots / Videos

https://youtu.be/muzsMsrnIP8

"/ae plinfo" link

https://paste.md-5.net/atozamimay

Server Log

No response

leogianfagna commented 1 month ago

this is the enchantment used, which we can see that the cooldown is saved by level and not enchantment (this is wrong).

botasgelatinosas:
  display: '%group-color%Botas Gelatinosas'
  description: " Protege o portador de dano\n&e de quedas.\n\n&b» &fChance: &72% &8(&a+6% &8P/N)"
  applies-to: 'Botas'
  type: 'FALL_DAMAGE'
  group: 'HEROICO'
  settings:
    showActionBar: true
  applies:
    - ALL_BOOTS
  levels:
    1:
      chance: 2
      cooldown: 100
      effects:
        - 'CANCEL_EVENT'
        - 'PARTICLE:SLIME:70:1'
    2:
      description: " Protege o portador de dano\n&e de quedas.\n\n&b» &fChance: &78% &8(&a+6% &8P/N)"
      chance: 8
      cooldown: 100
      effects:
        - 'CANCEL_EVENT'
        - 'PARTICLE:SLIME:70:1'
    3:
      description: " Protege o portador de dano\n&e de quedas.\n\n&b» &fChance: &714% &8(&a+6% &8P/N)"
      chance: 14
      cooldown: 100
      effects:
        - 'CANCEL_EVENT'
        - 'PARTICLE:SLIME:70:1'
    4:
      description: " Protege o portador de dano\n&e de quedas.\n\n&b» &fChance: &720%"
      chance: 20
      cooldown: 100
      effects:
        - 'CANCEL_EVENT'
        - 'PARTICLE:SLIME:70:1'
ThomasWega commented 1 month ago

DISABLE_ACTIVATION:<enchant>:<seconds> effect is probably what you are looking for? https://wiki.advancedplugins.net/abilities/effects

leogianfagna commented 1 month ago

DISABLE_ACTIVATION:<enchant>:<seconds> effect is probably what you are looking for? https://wiki.advancedplugins.net/abilities/effects

No. I will re-explain the bug.

There is a exploit that when a enchant is in cooldown, you can use another item with that same enchant but in another level to use it again. The cooldown of enchants should be (and always was) enchantment based and not level-enchantment based.

So for example, I have this enchantment:

test:
  # ...
  levels:
    1:
      cooldown: 100
      effects:
        # do something (whatever it is)
    2:
      cooldown: 100
      effects:
        # do something (whatever it is)
    3:
      cooldown: 100
      effects:
        # do something (whatever it is)

I named the enchantment with "Test". So I can apply it on 3 items: Item 1: enchanted with Test I Item 2: enchanted with Test II Item 3: enchanted with Test III

And now I'm using the Item 1, when the enchanted is activated, I can now swipe to Item 2 and activate the enchantment again. Understood?

That's what happened on video, he is using one enchantment on boots and when activited he swipe the boots with the same enchantment but a lower level. And the enchantment activated again.

austv commented 1 month ago

DISABLE_ACTIVATION:<enchant>:<seconds> effect is probably what you are looking for? https://wiki.advancedplugins.net/abilities/effects

No. I will re-explain the bug.

There is a exploit that when a enchant is in cooldown, you can use another item with that same enchant but in another level to use it again. The cooldown of enchants should be (and always was) enchantment based and not level-enchantment based.

So for example, I have this enchantment:

test:
  # ...
  levels:
    1:
      cooldown: 100
      effects:
        # do something (whatever it is)
    2:
      cooldown: 100
      effects:
        # do something (whatever it is)
    3:
      cooldown: 100
      effects:
        # do something (whatever it is)

I named the enchantment with "Test". So I can apply it on 3 items: Item 1: enchanted with Test I Item 2: enchanted with Test II Item 3: enchanted with Test III

And now I'm using the Item 1, when the enchanted is activated, I can now swipe to Item 2 and activate the enchantment again. Understood?

That's what happened on video, he is using one enchantment on boots and when activited he swipe the boots with the same enchantment but a lower level. And the enchantment activated again.

@ThomasWega

ThomasWega commented 1 month ago

Will be fixed in the next update