Closed GroobleDierne closed 2 years ago
I'm talking about removing this type of calls : https://github.com/nikosgram/gringotts/pull/114/files#diff-7e0ed99ba5fc2a5855d5890ce32119f9fecc05cd4d8bc2d2be18fc81e68c7edeL108
That sounds amazing :) Thank you for looking into it. <3
If you could add the hacktoberfest-accepted
label to this PR it would be cool 😉 (https://hacktoberfest.com/)
As Bukkit.getOfflinePlayer(String name) is doing a blocking web call, it is very slow and results in server freezes when there are many players online and plugins like Towny try to perform transactions. To reduce this impact I avoided calling Bukkit.getOfflinePlayer() multiple times in a row when the result can be stored.
To further address the problem, I would like to discuss with you what the use of accessing the balance of a player who never logged on is. And maybe suppress this feature or at least always return an empty balance without checking if the player exists.