Perf boost for boot (file and db modes).
This commit is contained in:
parent
25e28c482a
commit
6fcaf3ac7d
|
|
@ -321,9 +321,8 @@ public class GriefPrevention extends JavaPlugin
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
String playerName = player.getName();
|
|
||||||
UUID playerID = player.getUniqueId();
|
UUID playerID = player.getUniqueId();
|
||||||
if(playerName == null || playerID == null) continue;
|
if(playerID == null) continue;
|
||||||
long lastSeen = player.getLastPlayed();
|
long lastSeen = player.getLastPlayed();
|
||||||
|
|
||||||
//if the player has been seen in the last 30 days, cache his name/UUID pair
|
//if the player has been seen in the last 30 days, cache his name/UUID pair
|
||||||
|
|
@ -331,6 +330,8 @@ public class GriefPrevention extends JavaPlugin
|
||||||
long daysDiff = diff / millisecondsPerDay;
|
long daysDiff = diff / millisecondsPerDay;
|
||||||
if(daysDiff <= 30)
|
if(daysDiff <= 30)
|
||||||
{
|
{
|
||||||
|
String playerName = player.getName();
|
||||||
|
if(playerName == null) continue;
|
||||||
this.playerNameToIDMap.put(playerName, playerID);
|
this.playerNameToIDMap.put(playerName, playerID);
|
||||||
this.playerNameToIDMap.put(playerName.toLowerCase(), playerID);
|
this.playerNameToIDMap.put(playerName.toLowerCase(), playerID);
|
||||||
playersCached++;
|
playersCached++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user