Use a long to calculate the purge limit. This may solve a problem

reported on Discord. Suspect is that there may be a calculation
overflow.
This commit is contained in:
tastybento 2024-08-02 07:45:38 -07:00
parent fc22fd23da
commit 505de3b5f9

View File

@ -127,7 +127,7 @@ public class AdminPurgeCommand extends CompositeCommand implements Listener {
*/
Set<String> getOldIslands(int days) {
long currentTimeMillis = System.currentTimeMillis();
double daysInMilliseconds = days * 1000 * 3600 * 24;
long daysInMilliseconds = (long) days * 1000 * 3600 * 24;
Set<String> oldIslands = new HashSet<>();
// Process islands in one pass, logging and adding to the set if applicable