mirror of
https://github.com/CarmJos/UserPrefix.git
synced 2024-09-19 20:15:47 +00:00
fix(placeholder): 修复PlaceholderAPI重载后变量失效的问题
This commit is contained in:
parent
36cc4bf7ce
commit
da23eaa8fe
@ -12,24 +12,25 @@ import java.util.List;
|
||||
|
||||
public class UserPrefixExpansion extends PlaceholderExpansion {
|
||||
|
||||
protected final @NotNull Main plugin;
|
||||
protected final @NotNull List<String> placeholders = Arrays.asList(
|
||||
"%UserPrefix_prefix%", "%UserPrefix_amount%", "%UserPrefix_weight%",
|
||||
protected static final @NotNull List<String> SUPPORTED_PLACEHOLDERS = Arrays.asList(
|
||||
"%UserPrefix_prefix%", "%UserPrefix_amount%", "%UserPrefix_weight%",
|
||||
"%UserPrefix_identifier%", "%UserPrefix_name%",
|
||||
"%UserPrefix_has_<Identifier>%"
|
||||
);
|
||||
|
||||
protected final @NotNull Main plugin;
|
||||
|
||||
public UserPrefixExpansion(@NotNull Main plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull List<String> getPlaceholders() {
|
||||
return this.placeholders;
|
||||
return SUPPORTED_PLACEHOLDERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRegister() {
|
||||
public boolean persist() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user