Zrips / CMI

114 stars 97 forks source link

PlayTime (One-Time) Rewards are given multiple times... #5135

Closed klaidoshka closed 3 years ago

klaidoshka commented 3 years ago

Description of issue: PlayTimeRewards, that are supposed to be given only once, are given multiple times after every /cmi reload command.


CONFIG SECTION (DELETE IF NOT RELEVANT):

[config.yml]
PlaytimeRewards:
  Enabled: true
  ExcludeAfk: true
  RewardInform: 15
  OneTimeAmount: 2
  RequiresPermission: false

[PlayTimeRewards.yml]
OneDay:
  DisplayName: "&6Hopper"
  AutoClaim: true
  Description:
  - "&ePrize for playing for one day &8(&686400 seconds&8)&e."
  PayFor: 86400
  Commands:
  - asConsole! give [playerName] hopper 1

!!! In example:

• After player reaches 1 day, he gets the reward;
• I change something in config, so I do /cmi reload;
• Player gets the reward once again (if he's online, if he's not - nothing happens), doesn't matter if it's one-time.

Cmi Version (using/cmi version): 8.8.1.3

Server Type (Spigot/Paperspigot/etc): Yatopia

Server Version (using /ver): Yatopia 1.16.5-R0.1-SNAPSHOT (latest stable build)

Edit: I have fixed this by enabling required-permission: true // and then by giving everyone permissions to get every reward // and then by disabling permission after reward is given, so that they're not able to "use it" again... This is the only "fix" that I could have thought of, but still, would be nice if it was somehow fixed by not going into such actions. 😌

klaidoshka commented 3 years ago

Also, could it be possible to add a feature anytime soon for "Global" messages to have customizable prefix in locale file? Just like local chat has [L], it would be way more simpler to change just global messages with some prefix 🙁...

And I understand that it can't be a priority or something like that, but if 'you', Zrips, could do this, I would be thankful! =]

Zrips commented 3 years ago

Should be fixed with next build

klaidoshka commented 3 years ago

Hello. Updated the version today and tested if it was fixed, but sadly it was not.

It is still happening 😓