Improved Wanted system, added Wanted check/edit commands, edited lang files and added events
PLEASE UPDATE YOUR CONFIG AND LANG FILES BEFORE USING IT ON A PUBLIC SERVER MORE INFOS ON THE WIKI.
ADDED:
Commands and permissions:
./karma wanted check <player> : Check your own wanted status (default) or another player (OP)
./karma wanted set [player] [value] : Sets the wanted time of target to the specified value (OP)
./karma wanted add [player] [value] : Add the value to the wanted time of target
./karma wanted remove [player] : Remove the value from the wanted time of target
./karma wanted reset [player] Reset entirely the player wanted timer to the 01-01-1970 00:00
PERMISSION: karma.immune. Immunes the player to karma changes on fights, but not from commands
Events:
PlayerWantedChangeEvent (cancellable): Triggers when player have his wanted time changes
PlayerWantedHasChangedEvent : Triggers when the player wanted time has been changed
PlayerWantedPeriodStartEvent : Triggers when the player enters wanted state
PlayerWantedPeriodRefreshEvent : Triggers when the player is on Wanetd state and have is wanted timer edited
PlayerWantedPeriodEndEvent : Triggers when the player exits wanted state
Wanted system:
Added conditions (karma win/unchanged/loss) to be Wanted
Added conditions to cancel karma changes
EDITED:
Config.yml file: Check the wiki for more informations
Lang files: Check the wiki for more informations
Players data save:
Instead of each player having a save time depending of their connexion time, all connected players will have their data saved at the same time depending on the server start.
Players data will be saved asynchronously on disconnection, every X seconds (see config.yml) or on /karma save command.
On onDisable (plugin disabled), the datas will be saved SYNCHRONOUSLY in order to save before server closing. However, this feature doesn't work right now.