mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-17 04:41:40 +01:00
Fixes a bug with cache. (#1533)
It was not possible to set it to unlimited time due to my poor programming and logic skills. It also was contradicting to config comments.
This commit is contained in:
parent
cda300e28a
commit
6cd9339652
@ -78,9 +78,8 @@ public class HeadGetter {
|
||||
// If timestamp is set to 0, then it must be kept forever.
|
||||
// If settings time is set to 0, then always use cache.
|
||||
if (cache != null &&
|
||||
cache.getTimestamp() != 0 &&
|
||||
cacheTimeout > 0 &&
|
||||
System.currentTimeMillis() - cache.getTimestamp() <= cacheTimeout)
|
||||
(cache.getTimestamp() == 0 || cacheTimeout == 0 ||
|
||||
System.currentTimeMillis() - cache.getTimestamp() <= cacheTimeout))
|
||||
{
|
||||
panelItem.setHead(cachedHeads.get(panelItem.getPlayerHeadName()).getPlayerHead());
|
||||
requester.setHead(panelItem);
|
||||
@ -285,4 +284,4 @@ public class HeadGetter {
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user