From babad3ab6de755de20a9e11376837442b5879a16 Mon Sep 17 00:00:00 2001 From: Hannes Greule Date: Fri, 4 Sep 2020 14:49:02 +0200 Subject: [PATCH] Don't validate plot aliases with offline players (Fixes PS-126) --- Core/src/main/java/com/plotsquared/core/command/Alias.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Core/src/main/java/com/plotsquared/core/command/Alias.java b/Core/src/main/java/com/plotsquared/core/command/Alias.java index 59c0da49c..71a82c91f 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Alias.java +++ b/Core/src/main/java/com/plotsquared/core/command/Alias.java @@ -27,6 +27,7 @@ package com.plotsquared.core.command; import com.plotsquared.core.PlotSquared; import com.plotsquared.core.configuration.Captions; +import com.plotsquared.core.configuration.Settings; import com.plotsquared.core.location.Location; import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.plot.Plot; @@ -151,6 +152,12 @@ public class Alias extends SubCommand { MainUtil.sendMessage(player, Captions.ALIAS_IS_TAKEN); return; } + if (Settings.UUID.OFFLINE) { + plot.setAlias(alias); + MainUtil.sendMessage(player, + Captions.ALIAS_SET_TO.getTranslated().replaceAll("%alias%", alias)); + return; + } PlotSquared.get().getImpromptuUUIDPipeline().getSingle(alias, ((uuid, throwable) -> { if (throwable instanceof TimeoutException) { MainUtil.sendMessage(player, Captions.FETCHING_PLAYERS_TIMEOUT);