mirror of
https://github.com/CarmJos/UserPrefix.git
synced 2024-09-19 12:05:47 +00:00
fix(papi): 添加“持久”标签 避免卸载。
Co-authored-by: Carm <KarmunJ@outlook.com>
This commit is contained in:
parent
1ea993a31b
commit
2a0d6b8582
@ -42,6 +42,14 @@ public class UserPrefixExpansion extends EasyPlaceholder {
|
||||
public PlaceholderHandler handlePrefix(Function<PrefixConfig, Object> handler) {
|
||||
return handlePlayer((player, args) -> handler.apply(UserPrefixAPI.getUserManager().getPrefix(player)));
|
||||
}
|
||||
|
||||
/**
|
||||
* This is required or else PlaceholderAPI will unregister the Expansion on reload
|
||||
*/
|
||||
@Override
|
||||
public boolean persist() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public PlaceholderHandler handlePlayer(BiFunction<Player, String[], Object> handler) {
|
||||
return (player, args) -> {
|
||||
|
Loading…
Reference in New Issue
Block a user