Tested that and perfectly working ! Results are interesting and offer a fantastic decrease of the used performance. (With the startCheck() task, 13% to 0 - 1% according to Paper's timings).
Explainations:
I had to deal with this problem for a while and haven't received a satisfactory answer on your Discord (just "You have to recode the plugin"). So I decided to analyze your code to improve it and I found a great solution! This method reads lines in the data file but doesn't necessarily have to save the file since it's in most cases unchanged. So I added a boolean that goes true when changes are made, forcing the data file being saved ;).
Enjoy
Added:
- %time% placeholder can now be in the selling items lore.
- 1.13 support has been added.
Fixed:
- Sometimes for different languages, the comma would show as an unknown character.
Removed:
- MassiveStats has been removed due to its shutdown.
Changes:
- Small code cleanup to make it more readable.
Added:
- New options to disable and enable the Selling and Bidding features.
- New messages in the Messages.yml.
Changes:
- Recoded how the whole messaging system works.
- Recoded the file system and how all yml files are accessed and controlled.
Added:
- New options to disable and enable the Selling and Bidding features.
- New messages in the Messages.yml.
Changes:
- Recoded how the whole messaging system works.
- Recoded the file system and how all yml files are accessed and controlled.
Bug Fixes:
- A blank line from Crazy Auctions would appear randomly in Console due to old MCUpdate class.
- Damaged leather armor could be sold in the CA even if damaged items are turned off.
- Trying to bid on an item that has just expired causes an error in console.
Changes:
- Bunch of code cleanup.
- Switched from the old MCUpdate class to the new MassiveStats class.
Added:
- New permission to force end auctions. "crazyauctions.force-end"
Bug Fixes:
- A blank line from Crazy Auctions would appear randomly in Console due to old MCUpdate class.
- Damaged leather armor could be sold in the CA even if damaged items are turned off.
- Trying to bid on an item that has just expired causes an error in console.
Changes:
- Bunch of code cleanup.
- Switched from the old MCUpdate class to the new MassiveStats class.
Added:
- New permission to force end auctions. "crazyauctions.force-end"
Bugs:
- Comment in the config.yml said Budding instead of Bidding.
- Small typos were found in the Messages.yml. Thanks to Fozzie for the pull request.
- Some permission plugins such as BungeePerms did not work with /ah sell <Price>.
Added:
- AuctionWinBidEvent: called when someone wins a bidding item. Only called if the winner is online.
- AuctionNewBidEvent: called when a player places a bid onto an item.
- AuctionListEvent: called when a player lists a new item to the auction house.
- AuctionBuyEvent: called when a player buys an item on the buying auction house.
Changes:
- Cleaned up some code so it is more organized.
Bug Fix:
- Error when MCUpdate goes down.
- Error from a method that was running async when it shouldn't have been.
Changes:
- Cleaned up some code for easier reading.