Fix cooldown time usage (#4)

This commit is contained in:
Oleg Ivanov authored and GitHub committed 2022-02-21 13:24:40 +01:00
1 parent dad262c9cb
commit f3deeacf6d
1 file changed
+1 -1
@@ -13,7 +13,7 @@ public class SearchCooldownService {
* @return true if player has active cooldown
*/
public boolean checkSearchCooldown(EntityPlayerMP player) {
long time = player.getEntityWorld().getTotalWorldTime();
long time = player.getServerForPlayer().func_73046_m().getTickCounter();
Long lastTime = lastSearchTime.get(player);
if (lastTime != null && time - lastTime < FindItConfig.SEARCH_COOLDOWN) {