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) { } catch (Exception ignored) {
} }
} else { } else {
PlotSquared.get().getImpromptuUUIDPipeline().getSingle(value, (uuid, throwable) -> { PlotSquared.get().getImpromptuUUIDPipeline().getSingle(value, (uuid, throwable) -> uuidConsumer.accept(uuid));
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);
}
});
} }
return true; return true;
} }