From 4e5a2b9f96407630416e5ead4d6f6735f6870b71 Mon Sep 17 00:00:00 2001 From: Alexander Brandes Date: Fri, 29 Jul 2022 23:00:37 +0200 Subject: [PATCH] fix: Add user friendly message for creationdate placeholder (#3745) --- .../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();