From 8ac23b92d87b9f8a54098df26f2c9f4ec6265e75 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 17 Apr 2019 22:18:03 +1000 Subject: [PATCH] Use UUID, not just name --- .../plotsquared/plot/commands/DebugImportWorlds.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugImportWorlds.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugImportWorlds.java index f46e9e588..b800932a8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugImportWorlds.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/DebugImportWorlds.java @@ -3,6 +3,7 @@ package com.github.intellectualsites.plotsquared.plot.commands; import com.github.intellectualsites.plotsquared.commands.Command; import com.github.intellectualsites.plotsquared.commands.CommandDeclaration; import com.github.intellectualsites.plotsquared.plot.PlotSquared; +import com.github.intellectualsites.plotsquared.plot.config.Settings; import com.github.intellectualsites.plotsquared.plot.object.PlotId; import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2; @@ -43,7 +44,12 @@ import java.util.UUID; for (File folder : container.listFiles()) { String name = folder.getName(); if (!WorldUtil.IMP.isWorld(name) && PlotId.fromStringOrNull(name) == null) { - UUID uuid = UUIDHandler.getUUID(name, null); + UUID uuid; + if (name.length() > 16) { + uuid = UUID.fromString(name); + } else { + uuid = UUIDHandler.getUUID(name, null); + } if (uuid == null) { uuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(Charsets.UTF_8));