From da23eaa8fef135ca8a90e8b71a75711a3710d8ea Mon Sep 17 00:00:00 2001 From: carm Date: Wed, 1 Feb 2023 15:32:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(placeholder):=20=E4=BF=AE=E5=A4=8DPlacehold?= =?UTF-8?q?erAPI=E9=87=8D=E8=BD=BD=E5=90=8E=E5=8F=98=E9=87=8F=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/userprefix/hooker/UserPrefixExpansion.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/cc/carm/plugin/userprefix/hooker/UserPrefixExpansion.java b/src/main/java/cc/carm/plugin/userprefix/hooker/UserPrefixExpansion.java index dae966b..6302ef8 100644 --- a/src/main/java/cc/carm/plugin/userprefix/hooker/UserPrefixExpansion.java +++ b/src/main/java/cc/carm/plugin/userprefix/hooker/UserPrefixExpansion.java @@ -12,24 +12,25 @@ import java.util.List; public class UserPrefixExpansion extends PlaceholderExpansion { - protected final @NotNull Main plugin; - protected final @NotNull List placeholders = Arrays.asList( - "%UserPrefix_prefix%", "%UserPrefix_amount%", "%UserPrefix_weight%", + protected static final @NotNull List SUPPORTED_PLACEHOLDERS = Arrays.asList( + "%UserPrefix_prefix%", "%UserPrefix_amount%", "%UserPrefix_weight%", "%UserPrefix_identifier%", "%UserPrefix_name%", "%UserPrefix_has_%" ); + protected final @NotNull Main plugin; + public UserPrefixExpansion(@NotNull Main plugin) { this.plugin = plugin; } @Override public @NotNull List getPlaceholders() { - return this.placeholders; + return SUPPORTED_PLACEHOLDERS; } @Override - public boolean canRegister() { + public boolean persist() { return true; }