Start merging chars replacer logic into adventure replacer

very rough no judge
This commit is contained in:
PiggyPiglet
2025-10-25 13:04:24 +08:00
parent 683dc6e8e3
commit 2a8bb3695c
2 changed files with 82 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.Optional;
public abstract class PlaceholderHook {
@Deprecated
@Nullable
public String onRequest(final OfflinePlayer player, @NotNull final String params) {
if (player != null && player.isOnline()) {
@@ -45,8 +46,8 @@ public abstract class PlaceholderHook {
}
@Nullable
public Component onPlaceholderComponentRequest(final Player player, @NotNull final String params) {
final String result = onPlaceholderRequest(player, params);
public Component onPlaceholderComponentRequest(final OfflinePlayer player, @NotNull final String params) {
final String result = onRequest(player, params);
return result == null ? null : Component.text(result);
}