mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-29 06:05:17 +01:00
Refresh sleep timers
This commit is contained in:
parent
36671daeae
commit
f6823fd842
@ -1212,7 +1212,10 @@ public class NMSImpl implements NMSBridge {
|
||||
List<Player> nearbyPlayers = Lists.newArrayList(Iterables
|
||||
.filter(CitizensAPI.getLocationLookup().getNearbyPlayers(entity.getLocation(), 64), (p) -> {
|
||||
Long time = meta.getMarker(p.getUniqueId(), entity.getUniqueId().toString());
|
||||
return time == null || Math.abs(System.currentTimeMillis() - time) > 5000;
|
||||
if (time == null || Math.abs(System.currentTimeMillis() - time) > 5000)
|
||||
return true;
|
||||
meta.set(p.getUniqueId(), entity.getUniqueId().toString(), System.currentTimeMillis());
|
||||
return false;
|
||||
}));
|
||||
if (nearbyPlayers.size() == 0)
|
||||
return;
|
||||
|
@ -1279,7 +1279,10 @@ public class NMSImpl implements NMSBridge {
|
||||
List<Player> nearbyPlayers = Lists.newArrayList(Iterables
|
||||
.filter(CitizensAPI.getLocationLookup().getNearbyPlayers(entity.getLocation(), 64), (p) -> {
|
||||
Long time = meta.getMarker(p.getUniqueId(), entity.getUniqueId().toString());
|
||||
return time == null || Math.abs(System.currentTimeMillis() - time) > 5000;
|
||||
if (time == null || Math.abs(System.currentTimeMillis() - time) > 5000)
|
||||
return true;
|
||||
meta.set(p.getUniqueId(), entity.getUniqueId().toString(), System.currentTimeMillis());
|
||||
return false;
|
||||
}));
|
||||
if (nearbyPlayers.size() == 0)
|
||||
return;
|
||||
|
@ -1289,7 +1289,10 @@ public class NMSImpl implements NMSBridge {
|
||||
List<Player> nearbyPlayers = Lists.newArrayList(Iterables
|
||||
.filter(CitizensAPI.getLocationLookup().getNearbyPlayers(entity.getLocation(), 64), (p) -> {
|
||||
Long time = meta.getMarker(p.getUniqueId(), entity.getUniqueId().toString());
|
||||
return time == null || Math.abs(System.currentTimeMillis() - time) > 5000;
|
||||
if (time == null || Math.abs(System.currentTimeMillis() - time) > 5000)
|
||||
return true;
|
||||
meta.set(p.getUniqueId(), entity.getUniqueId().toString(), System.currentTimeMillis());
|
||||
return false;
|
||||
}));
|
||||
if (nearbyPlayers.size() == 0)
|
||||
return;
|
||||
|
@ -1329,7 +1329,10 @@ public class NMSImpl implements NMSBridge {
|
||||
List<Player> nearbyPlayers = Lists.newArrayList(Iterables
|
||||
.filter(CitizensAPI.getLocationLookup().getNearbyPlayers(entity.getLocation(), 64), (p) -> {
|
||||
Long time = meta.getMarker(p.getUniqueId(), entity.getUniqueId().toString());
|
||||
return time == null || Math.abs(System.currentTimeMillis() - time) > 5000;
|
||||
if (time == null || Math.abs(System.currentTimeMillis() - time) > 5000)
|
||||
return true;
|
||||
meta.set(p.getUniqueId(), entity.getUniqueId().toString(), System.currentTimeMillis());
|
||||
return false;
|
||||
}));
|
||||
if (nearbyPlayers.size() == 0)
|
||||
return;
|
||||
|
@ -1149,7 +1149,10 @@ public class NMSImpl implements NMSBridge {
|
||||
List<Player> nearbyPlayers = Lists.newArrayList(Iterables
|
||||
.filter(CitizensAPI.getLocationLookup().getNearbyPlayers(entity.getLocation(), 64), (p) -> {
|
||||
Long time = meta.getMarker(p.getUniqueId(), entity.getUniqueId().toString());
|
||||
return time == null || Math.abs(System.currentTimeMillis() - time) > 5000;
|
||||
if (time == null || Math.abs(System.currentTimeMillis() - time) > 5000)
|
||||
return true;
|
||||
meta.set(p.getUniqueId(), entity.getUniqueId().toString(), System.currentTimeMillis());
|
||||
return false;
|
||||
}));
|
||||
if (nearbyPlayers.size() == 0)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user