public class EasyPlaceholder
extends me.clip.placeholderapi.expansion.PlaceholderExpansion
限定符和类型 | 字段和说明 |
---|---|
protected @NotNull java.lang.String |
author |
protected @NotNull java.lang.String |
name |
protected boolean |
persistent |
protected @NotNull java.lang.String |
plugin |
protected @NotNull SectionExpansion |
rootExpansion |
protected @NotNull java.lang.String |
version |
构造器和说明 |
---|
EasyPlaceholder(@NotNull org.bukkit.plugin.java.JavaPlugin plugin,
@NotNull SectionExpansion rootExpansion) |
EasyPlaceholder(@NotNull org.bukkit.plugin.java.JavaPlugin plugin,
@NotNull java.lang.String rootIdentifier) |
EasyPlaceholder(@NotNull java.lang.String plugin,
boolean persistent,
@NotNull SectionExpansion rootExpansion,
@NotNull java.lang.String name,
@NotNull java.lang.String version,
@NotNull java.lang.String author) |
EasyPlaceholder(@NotNull java.lang.String plugin,
boolean persistent,
@NotNull java.lang.String rootIdentifier,
@NotNull java.lang.String name,
@NotNull java.lang.String version,
@NotNull java.lang.String author) |
限定符和类型 | 方法和说明 |
---|---|
@NotNull java.lang.String |
getAuthor() |
@NotNull java.lang.String |
getIdentifier() |
@NotNull java.lang.String |
getName() |
@NotNull java.util.List<java.lang.String> |
getPlaceholders() |
@Nullable java.lang.String |
getRequiredPlugin() |
@NotNull SectionExpansion |
getRootExpansion()
得到根变量解析器
|
@NotNull java.lang.String |
getVersion() |
EasyPlaceholder |
handle(@NotNull java.lang.String identifier,
@NotNull PlaceholderHandler handler,
@NotNull java.util.function.Consumer<java.util.ArrayList<java.lang.String>> paramsConsumer,
java.lang.String... aliases)
处理变量并返回对应内容。
|
EasyPlaceholder |
handle(@NotNull java.lang.String identifier,
@NotNull PlaceholderHandler handler,
@NotNull java.util.List<java.lang.String> availableParams,
java.lang.String... aliases)
处理变量并返回对应内容。
|
EasyPlaceholder |
handle(@NotNull java.lang.String identifier,
@NotNull PlaceholderHandler handler,
java.lang.String... aliases)
处理变量并返回对应内容。
|
EasyPlaceholder |
handle(java.lang.String identifier,
@NotNull PlaceholderHandler handler,
@NotNull java.util.function.Supplier<java.util.List<java.lang.String>> availableParams,
java.lang.String... aliases)
处理变量并返回对应内容。
|
EasyPlaceholder |
handleSection(@NotNull java.lang.String section,
@NotNull java.util.function.Consumer<SectionExpansion> consumer,
java.lang.String... aliases)
处理一组变量。
|
java.lang.String |
onErrorParams(@Nullable org.bukkit.OfflinePlayer player)
当未找到对应变量处理器时调用
|
java.lang.String |
onException(@Nullable org.bukkit.OfflinePlayer player,
@NotNull SubExpansion<?> expansion,
@NotNull java.lang.Exception exception)
当变量处理器抛出异常时调用
|
java.lang.String |
onNullResponse(@Nullable org.bukkit.OfflinePlayer player)
当变量处理器返回 NULL 值时调用
|
java.lang.String |
onRequest(@Nullable org.bukkit.OfflinePlayer player,
@NotNull java.lang.String params) |
boolean |
persist() |
canRegister, configurationContains, equals, get, getConfigSection, getConfigSection, getDescription, getDouble, getInt, getLink, getLong, getPlaceholderAPI, getPlugin, getString, getStringList, hashCode, isRegistered, register, toString, unregister
@NotNull protected final @NotNull java.lang.String plugin
@NotNull protected final @NotNull SectionExpansion rootExpansion
@NotNull protected final @NotNull java.lang.String name
@NotNull protected final @NotNull java.lang.String author
@NotNull protected final @NotNull java.lang.String version
protected final boolean persistent
public EasyPlaceholder(@NotNull @NotNull org.bukkit.plugin.java.JavaPlugin plugin, @NotNull @NotNull java.lang.String rootIdentifier)
public EasyPlaceholder(@NotNull @NotNull org.bukkit.plugin.java.JavaPlugin plugin, @NotNull @NotNull SectionExpansion rootExpansion)
public EasyPlaceholder(@NotNull @NotNull java.lang.String plugin, boolean persistent, @NotNull @NotNull java.lang.String rootIdentifier, @NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String version, @NotNull @NotNull java.lang.String author)
public EasyPlaceholder(@NotNull @NotNull java.lang.String plugin, boolean persistent, @NotNull @NotNull SectionExpansion rootExpansion, @NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String version, @NotNull @NotNull java.lang.String author)
@NotNull public @NotNull SectionExpansion getRootExpansion()
public java.lang.String onErrorParams(@Nullable @Nullable org.bukkit.OfflinePlayer player)
player
- 变量解析时的目标玩家,可能为空或不在线。public java.lang.String onNullResponse(@Nullable @Nullable org.bukkit.OfflinePlayer player)
player
- 变量解析时的目标玩家,可能为空或不在线。public java.lang.String onException(@Nullable @Nullable org.bukkit.OfflinePlayer player, @NotNull @NotNull SubExpansion<?> expansion, @NotNull @NotNull java.lang.Exception exception)
player
- 变量解析时的目标玩家,可能为空或不在线。expansion
- 抛出异常的变量处理器exception
- 异常内容public final EasyPlaceholder handle(@NotNull @NotNull java.lang.String identifier, @NotNull @NotNull PlaceholderHandler handler, @NotNull java.lang.String... aliases)
identifier
- 该变量的标识符handler
- 该变量的处理器,返回值将会被转换为字符串。aliases
- 该变量的别称EasyPlaceholder
public final EasyPlaceholder handle(@NotNull @NotNull java.lang.String identifier, @NotNull @NotNull PlaceholderHandler handler, @NotNull @NotNull java.util.function.Consumer<java.util.ArrayList<java.lang.String>> paramsConsumer, @NotNull java.lang.String... aliases)
identifier
- 该变量的标识符handler
- 该变量的处理器,返回值将会被转换为字符串。paramsConsumer
- 用于提供该变量的可用参数aliases
- 该变量的别称EasyPlaceholder
public final EasyPlaceholder handle(@NotNull @NotNull java.lang.String identifier, @NotNull @NotNull PlaceholderHandler handler, @NotNull @NotNull java.util.List<java.lang.String> availableParams, @NotNull java.lang.String... aliases)
identifier
- 该变量的标识符handler
- 该变量的处理器,返回值将会被转换为字符串。availableParams
- 该变量的可用参数aliases
- 该变量的别称EasyPlaceholder
public final EasyPlaceholder handle(java.lang.String identifier, @NotNull @NotNull PlaceholderHandler handler, @NotNull @NotNull java.util.function.Supplier<java.util.List<java.lang.String>> availableParams, @NotNull java.lang.String... aliases)
identifier
- 该变量的标识符handler
- 该变量的处理器,返回值将会被转换为字符串。availableParams
- 该变量的可用参数aliases
- 该变量的别称EasyPlaceholder
public final EasyPlaceholder handleSection(@NotNull @NotNull java.lang.String section, @NotNull @NotNull java.util.function.Consumer<SectionExpansion> consumer, @NotNull java.lang.String... aliases)
section
- 该组变量的标识符consumer
- 该组变量的处理器操作方法
SectionExpansion.handle(String, PlaceholderHandler, String...)
方法处理子变量,
SectionExpansion.handleSection(String, Consumer, String...)
方法处理下一层组变量aliases
- 该变量的别称EasyPlaceholder
public java.lang.String onRequest(@Nullable @Nullable org.bukkit.OfflinePlayer player, @NotNull @NotNull java.lang.String params)
onRequest
在类中 me.clip.placeholderapi.PlaceholderHook
@Nullable public @Nullable java.lang.String getRequiredPlugin()
getRequiredPlugin
在类中 me.clip.placeholderapi.expansion.PlaceholderExpansion
@NotNull public @NotNull java.lang.String getIdentifier()
getIdentifier
在类中 me.clip.placeholderapi.expansion.PlaceholderExpansion
@NotNull public @NotNull java.lang.String getAuthor()
getAuthor
在类中 me.clip.placeholderapi.expansion.PlaceholderExpansion
@NotNull public @NotNull java.lang.String getVersion()
getVersion
在类中 me.clip.placeholderapi.expansion.PlaceholderExpansion
@NotNull public @NotNull java.lang.String getName()
getName
在类中 me.clip.placeholderapi.expansion.PlaceholderExpansion
@NotNull public @NotNull java.util.List<java.lang.String> getPlaceholders()
getPlaceholders
在类中 me.clip.placeholderapi.expansion.PlaceholderExpansion
public boolean persist()
persist
在类中 me.clip.placeholderapi.expansion.PlaceholderExpansion
Copyright © 2024. All rights reserved.