setowner should allow null UUIDs

This commit is contained in:
dordsor21 2020-11-10 17:24:37 +00:00
parent b0d55d434d
commit 5d4cf3b705
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -146,15 +146,7 @@ public class Owner extends SetCommand {
} catch (Exception ignored) {
}
} else {
PlotSquared.get().getImpromptuUUIDPipeline().getSingle(value, (uuid, throwable) -> {
if (throwable instanceof TimeoutException) {
MainUtil.sendMessage(player, Captions.FETCHING_PLAYERS_TIMEOUT);
} else if (throwable != null) {
MainUtil.sendMessage(player, Captions.INVALID_PLAYER, value);
} else {
uuidConsumer.accept(uuid);
}
});
PlotSquared.get().getImpromptuUUIDPipeline().getSingle(value, (uuid, throwable) -> uuidConsumer.accept(uuid));
}
return true;
}