mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26: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.MAX_PLOTS = config.getInt("max_plots");
|
||||||
Settings.SCHEMATIC_SAVE_PATH = config.getString("schematics.save_path");
|
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.UUID_FROM_DISK = config.getBoolean("uuid.read-from-disk");
|
||||||
|
|
||||||
Settings.REQUIRE_SELECTION = config.getBoolean("worldedit.require-selection-in-mask");
|
Settings.REQUIRE_SELECTION = config.getBoolean("worldedit.require-selection-in-mask");
|
||||||
|
@ -112,15 +112,17 @@ public class ExpireManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isExpired(UUID uuid) {
|
public static boolean isExpired(UUID uuid) {
|
||||||
OfflinePlayer op = UUIDHandler.uuidWrapper.getOfflinePlayer(uuid);
|
String name = UUIDHandler.getName(uuid);
|
||||||
if (!op.hasPlayedBefore()) {
|
if (name != null) {
|
||||||
return true;
|
OfflinePlayer op = Bukkit.getOfflinePlayer(name);
|
||||||
}
|
if (op.hasPlayedBefore()) {
|
||||||
long last = op.getLastPlayed();
|
long last = op.getLastPlayed();
|
||||||
long compared = System.currentTimeMillis() - last;
|
long compared = System.currentTimeMillis() - last;
|
||||||
if (compared >= 86400000 * Settings.AUTO_CLEAR_DAYS) {
|
if (compared >= 86400000 * Settings.AUTO_CLEAR_DAYS) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user