From 08269cab5ba0b5cf2ea34b9ac61453fd2ebad545 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 6 May 2019 00:19:42 -0700 Subject: [PATCH] Add back in the UUID upgrade classes just in case anyone from 2014 shows up --- .../runnables/database/UUIDUpdateAsyncTask.java | 12 +++++------- .../com/gmail/nossr50/util/uuid/UUIDFetcher.java | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/database/UUIDUpdateAsyncTask.java b/src/main/java/com/gmail/nossr50/runnables/database/UUIDUpdateAsyncTask.java index d56e9eec6..269e90af3 100644 --- a/src/main/java/com/gmail/nossr50/runnables/database/UUIDUpdateAsyncTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/database/UUIDUpdateAsyncTask.java @@ -1,7 +1,6 @@ -/* package com.gmail.nossr50.runnables.database; -import com.gmail.nossr50.config.ChunkConversionOptions; +import com.gmail.nossr50.config.HiddenConfig; import com.gmail.nossr50.database.DatabaseManager; import com.gmail.nossr50.datatypes.database.UpgradeType; import com.gmail.nossr50.mcMMO; @@ -17,9 +16,9 @@ import java.util.logging.Level; public class UUIDUpdateAsyncTask extends BukkitRunnable { private mcMMO plugin; - private static final int MAX_LOOKUP = Math.max(ChunkConversionOptions.getUUIDConvertAmount(), 100); - private static final int RATE_LIMIT = ChunkConversionOptions.getMojangRateLimit(); - private static final long LIMIT_PERIOD = ChunkConversionOptions.getMojangLimitPeriod(); + private static final int MAX_LOOKUP = 100; + private static final int RATE_LIMIT = 300; + private static final long LIMIT_PERIOD = 6000; private static final int BATCH_SIZE = MAX_LOOKUP * 3; private List userNames; @@ -103,5 +102,4 @@ public class UUIDUpdateAsyncTask extends BukkitRunnable { plugin.getLogger().info("UUID upgrade completed!"); } } -} -*/ +} \ No newline at end of file diff --git a/src/main/java/com/gmail/nossr50/util/uuid/UUIDFetcher.java b/src/main/java/com/gmail/nossr50/util/uuid/UUIDFetcher.java index 42e4a67a1..5b8b3996b 100644 --- a/src/main/java/com/gmail/nossr50/util/uuid/UUIDFetcher.java +++ b/src/main/java/com/gmail/nossr50/util/uuid/UUIDFetcher.java @@ -104,6 +104,6 @@ public class UUIDFetcher implements Callable> { } public static UUID getUUIDOf(String name) throws Exception { - return new UUIDFetcher(Collections.singletonList(name)).call().get(name); + return new UUIDFetcher(Arrays.asList(name)).call().get(name); } -} +} \ No newline at end of file