RecipeManager

RecipeManager

130k Downloads

Should avoid request mojang uuid api in main thread

prozhong opened this issue · 5 comments

commented

will cause lag and block main thread

commented

If you take a look at the code, the mojang request is hardly, if ever actually called. I'm grabbing the uuid from player's joining and storing them for future lookups. In the cases where it does call it though, I need a response back before continuing (checking for permission to do something) so it currently can't be moved to another thread without a lot of extra work.

If you or someone else wants to create a pull request for this, that'd be great, but I haven't had any reports of lag from people running the plugin since moving to the local->cache system.

commented

Its weird http://pastebin.com/LLmM7Vyz
Sometimes it triggers so frequently
In my server there is only one recipe added:

COMBINE Fish
@individualresults
raw_fish::9
= 54:0:1
@itemname &aSomefish
@itemlore &eToken
@ingredientcondition raw_fish | name regex:^§r§a.
$

I thought the request should never be called

commented

Are you in offline mode?

commented
commented

Could you add an option to config that when in offline mode, plugin gets UUID from namestring, like getUniqueId, and disable UUIDfetcher?