mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16:45 +01:00
Added debug command to start/stop task
This commit is contained in:
parent
ea60f471ad
commit
c0acc4310c
@ -862,7 +862,7 @@ public class PlotMain extends JavaPlugin implements Listener {
|
||||
Settings.MAX_PLOTS = config.getInt("max_plots");
|
||||
Settings.SCHEMATIC_SAVE_PATH = config.getString("schematics.save_path");
|
||||
|
||||
Settings.OFFLINE_MODE = config.getBoolean("uuid.offline");
|
||||
Settings.OFFLINE_MODE = config.getBoolean("UUID.offline");
|
||||
Settings.UUID_FROM_DISK = config.getBoolean("uuid.read-from-disk");
|
||||
|
||||
Settings.REQUIRE_SELECTION = config.getBoolean("worldedit.require-selection-in-mask");
|
||||
|
@ -112,15 +112,17 @@ public class ExpireManager {
|
||||
}
|
||||
|
||||
public static boolean isExpired(UUID uuid) {
|
||||
OfflinePlayer op = UUIDHandler.uuidWrapper.getOfflinePlayer(uuid);
|
||||
if (!op.hasPlayedBefore()) {
|
||||
return true;
|
||||
}
|
||||
long last = op.getLastPlayed();
|
||||
long compared = System.currentTimeMillis() - last;
|
||||
if (compared >= 86400000 * Settings.AUTO_CLEAR_DAYS) {
|
||||
return true;
|
||||
}
|
||||
String name = UUIDHandler.getName(uuid);
|
||||
if (name != null) {
|
||||
OfflinePlayer op = Bukkit.getOfflinePlayer(name);
|
||||
if (op.hasPlayedBefore()) {
|
||||
long last = op.getLastPlayed();
|
||||
long compared = System.currentTimeMillis() - last;
|
||||
if (compared >= 86400000 * Settings.AUTO_CLEAR_DAYS) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user