PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
53 stars 21 forks source link

Cooldown event doesn't work properly #1301

Closed SirSeba98 closed 2 years ago

SirSeba98 commented 2 years ago

Terms

Discord tag (optional)

No response

What happened?

The events-cooldown of a item doesn't get activated on the first usage, sometimes on the 4th sometimes on the 10th try. It looks like this happens only if the player receives the item from /iagive command.

If I give myself the item and drop it to a player, after the player uses the item once, the event cooldown gets activated.

Steps to reproduce the issue

  1. Give yourself a item with event-cooldown with the command /iagive or /iaget
  2. Use the item

Server version

No response

ItemsAdder Version

ItemsAdder version 2.4.21c

ProtocolLib Version

ProtocolLib version 4.7.0

LoneLibs Version

LoneLibs version 1.0.15

LightAPI Version (optional)

No response

LibsDisguises Version (optional)

No response

FULL server log

No response

Error (optional)

No response

ItemsAdder config.yml

No response

Problematic items yml configuration file (optional)

blue_ring:
    display_name: "&7Miners &fRing"
    lore:
    - 'This ring gives you &enight vision'
    - 'for &e15 minutes.'
    - 'You can use this item &e20 times&f.'
    resource:
      material: WOODEN_SWORD
      generate: true
      textures:
      - item/blue_ring.png
    item_flags:
      - HIDE_ATTRIBUTES
    attribute_modifiers:
      mainhand:
        attackDamage: 1
      offhand:
        attackDamage: 1
    durability:
      max_custom_durability: 20
      custom_durability: 20
      disappear_when_broken: true
      unbreakable: false
    events_cooldown: 18000
    events:
      interact:
        right:
          decrement_durability:
            amount: 1
          execute_commands:
            cmd1:
              command: 'effect give {player} minecraft:night_vision 900 1 true'
              as_console: true
              delay: 0
            cmd2:
              command: 'screeneffect fullscreen_transparent BLACK 10 10 10 freeze {player} &eMiners Ring&f activated'
              as_console: true
              delay: 0

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

No response

LoneDev6 commented 2 years ago

I think you reloaded the plugin using /plugman, correct? I tested the item and works fine (also good idea, it's a good item!).

https://user-images.githubusercontent.com/27242001/140766836-339d0aff-4d0f-4bf2-bbff-226114cba0d8.mp4

SirSeba98 commented 2 years ago

Hey there, thanks.

I thought that myself, but I also restarted the server and it does the same thing. Before I posted the bug I tried everything.

Video with item given with the command /iaget: https://user-images.githubusercontent.com/82121837/140816875-ce1eaf49-51b1-4274-8e40-267e03255e8f.mp4

Video with item given with the command /iaget but dropped to me:

https://user-images.githubusercontent.com/82121837/140817549-aa02c469-f0d1-413e-83ae-26031c941547.mp4

Can it be that I have OP on the SirFulgeruL account ? i dont know...

LoneDev6 commented 2 years ago

I can't reproduce the issue at all. This may be caused because of a reload of the server or a plugin which can reload other plugins (example: Plugman, ServerUtils). Please let me know if you have any step by step way to reproduce this. I literally tried with two accounts like in your video and it doesn't happen. I even tried to reload the plugin, run /reload confirm command, everything, still I can't reproduce the issue

SirSeba98 commented 2 years ago

I don't have any kind of plugins that can do that . Here is the list with all my plugins> AdvancedHelp, AdvancedPortals, AnimatedScoreboard, BetterRTP, ChatControl, Citizens, CMI, CMILib, CrazyAuctions, DeluxeMenus, dtlTraders, Dungeons, ExploitFixer, FastAsyncWorldEdit (WorldEdit), GoldenCrates, HamsterAPI, ItemsAdder, ItemsXL, JPremium, LibertyDungeon, LibsDisguises, LiteBans, LoneLibs, LPC, LuckPerms, Mimic, Minepacks, MMOCore, Multiverse-Core, MythicLib, MythicMobs, NexEngine, PlaceholderAPI, ProtectionStones, ProtocolLib, PvPManager, Quests, RPGInventory, ScreenEffects, ServerTutorialPlus*, ShopGUIPlus, SkinsRestorer, TradeSystem, Vault, VoidGen,WorldGuard, WorldGuardExtraFlags

LoneDev6 commented 2 years ago

I'll try to mitigate this rare issue, thanks for the infos