mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Don't validate plot aliases with offline players (Fixes PS-126)
This commit is contained in:
parent
d19dde2f85
commit
babad3ab6d
1 changed files with 7 additions and 0 deletions
|
@ -27,6 +27,7 @@ package com.plotsquared.core.command;
|
||||||
|
|
||||||
import com.plotsquared.core.PlotSquared;
|
import com.plotsquared.core.PlotSquared;
|
||||||
import com.plotsquared.core.configuration.Captions;
|
import com.plotsquared.core.configuration.Captions;
|
||||||
|
import com.plotsquared.core.configuration.Settings;
|
||||||
import com.plotsquared.core.location.Location;
|
import com.plotsquared.core.location.Location;
|
||||||
import com.plotsquared.core.player.PlotPlayer;
|
import com.plotsquared.core.player.PlotPlayer;
|
||||||
import com.plotsquared.core.plot.Plot;
|
import com.plotsquared.core.plot.Plot;
|
||||||
|
@ -151,6 +152,12 @@ public class Alias extends SubCommand {
|
||||||
MainUtil.sendMessage(player, Captions.ALIAS_IS_TAKEN);
|
MainUtil.sendMessage(player, Captions.ALIAS_IS_TAKEN);
|
||||||
return;
|
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) -> {
|
PlotSquared.get().getImpromptuUUIDPipeline().getSingle(alias, ((uuid, throwable) -> {
|
||||||
if (throwable instanceof TimeoutException) {
|
if (throwable instanceof TimeoutException) {
|
||||||
MainUtil.sendMessage(player, Captions.FETCHING_PLAYERS_TIMEOUT);
|
MainUtil.sendMessage(player, Captions.FETCHING_PLAYERS_TIMEOUT);
|
||||||
|
|
Loading…
Reference in a new issue