From 3be370071c390a33be86f682f2f675aad6115ce6 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 23 Dec 2020 14:13:50 +0000 Subject: [PATCH] fix purge --- .../main/java/com/plotsquared/core/command/Purge.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Purge.java b/Core/src/main/java/com/plotsquared/core/command/Purge.java index 1842a5664..5a0e017ed 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Purge.java +++ b/Core/src/main/java/com/plotsquared/core/command/Purge.java @@ -39,6 +39,7 @@ import com.plotsquared.core.plot.world.PlotAreaManager; import com.plotsquared.core.util.StringMan; import com.plotsquared.core.util.query.PlotQuery; import com.plotsquared.core.util.task.TaskManager; +import com.plotsquared.core.uuid.UUIDMapping; import net.kyori.adventure.text.minimessage.Template; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -118,25 +119,27 @@ public class Purge extends SubCommand { break; case "owner": case "o": - owner = PlotSquared.get().getImpromptuUUIDPipeline().getSingle(split[1], Settings.UUID.BLOCKING_TIMEOUT); - if (owner == null) { + UUIDMapping ownerMapping = PlotSquared.get().getImpromptuUUIDPipeline().getImmediately(split[1]); + if (ownerMapping == null) { player.sendMessage( TranslatableCaption.of("errors.invalid_player"), Template.of("value", split[1]) ); return false; } + owner = ownerMapping.getUuid(); break; case "shared": case "s": - added = PlotSquared.get().getImpromptuUUIDPipeline().getSingle(split[1], Settings.UUID.BLOCKING_TIMEOUT); - if (added == null) { + UUIDMapping addedMapping = PlotSquared.get().getImpromptuUUIDPipeline().getImmediately(split[1]); + if (addedMapping == null) { player.sendMessage( TranslatableCaption.of("errors.invalid_player"), Template.of("value", split[1]) ); return false; } + owner = addedMapping.getUuid(); break; case "clear": case "c":