From c07ac43528b56790fa2b036b0f446ce4847e606e Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Wed, 27 Jul 2022 16:06:14 +0200 Subject: [PATCH] fix: Add user friendly message for creationdate placeholder --- .../plotsquared/core/util/placeholders/PlaceholderRegistry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/util/placeholders/PlaceholderRegistry.java b/Core/src/main/java/com/plotsquared/core/util/placeholders/PlaceholderRegistry.java index 0f71356d8..291d10361 100644 --- a/Core/src/main/java/com/plotsquared/core/util/placeholders/PlaceholderRegistry.java +++ b/Core/src/main/java/com/plotsquared/core/util/placeholders/PlaceholderRegistry.java @@ -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();