fix: Add user friendly message for creationdate placeholder (#3745)

This commit is contained in:
Alexander Brandes 2022-07-29 23:00:37 +02:00 committed by GitHub
parent aeb4350ccb
commit 4e5a2b9f96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -164,7 +164,7 @@ public final class PlaceholderRegistry {
PlayerManager.getPlayerList(plot.getDenied(), player));
});
this.createPlaceholder("currentplot_creationdate", (player, plot) -> {
if (plot.getTimestamp() == 0) {
if (plot.getTimestamp() == 0 || !plot.hasOwner()) {
return legacyComponent(TranslatableCaption.of("info.unknown"), player);
}
long creationDate = plot.getTimestamp();