1.4.2 Final version

Added a check to Analyze if AAHook is UsingUUID.
This commit is contained in:
Rsl1122 2016-12-10 00:27:03 +02:00
parent a3af8202e5
commit ce8490f814
2 changed files with 13 additions and 0 deletions

View File

@ -96,4 +96,7 @@ public class AdvancedAchievementsHook implements Hook {
return getData(player); return getData(player);
} }
public boolean isUsingUUID() {
return usingUUID;
}
} }

View File

@ -1,6 +1,7 @@
package com.djrapitops.plan.command.utils; package com.djrapitops.plan.command.utils;
import com.djrapitops.plan.Plan; import com.djrapitops.plan.Plan;
import com.djrapitops.plan.command.hooks.AdvancedAchievementsHook;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -79,7 +80,16 @@ public class DataUtils {
"TOW-LAST LOGIN", "TOW-OWNER OF", "TOW-PLOT PERMS", "TOW-PLOT OPTIONS", "TOW-FRIENDS", "ESS-ONLINE SINCE", "TOW-LAST LOGIN", "TOW-OWNER OF", "TOW-PLOT PERMS", "TOW-PLOT OPTIONS", "TOW-FRIENDS", "ESS-ONLINE SINCE",
"ESS-OFFLINE SINCE"}; "ESS-OFFLINE SINCE"};
List<String> ignoreKeys = new ArrayList<>(); List<String> ignoreKeys = new ArrayList<>();
try {
AdvancedAchievementsHook aaHook = (AdvancedAchievementsHook) plugin.getHooks().get("AdvancedAchievements");
if (!aaHook.isUsingUUID()) {
ignoreKeys.add("AAC-ACHIEVEMENTS");
}
} catch (Exception e) {
ignoreKeys.add("AAC-ACHIEVEMENTS");
}
ignoreKeys.addAll(Arrays.asList(ignore)); ignoreKeys.addAll(Arrays.asList(ignore));
for (UUID key : playerData.keySet()) { for (UUID key : playerData.keySet()) {
for (String dataKey : playerData.get(key).keySet()) { for (String dataKey : playerData.get(key).keySet()) {
if (ignoreKeys.contains(dataKey)) { if (ignoreKeys.contains(dataKey)) {