2020-07-20 22:59:25 +02:00
|
|
|
package me.clip.placeholderapi.replacer;
|
|
|
|
|
|
|
|
import me.clip.placeholderapi.PlaceholderHook;
|
|
|
|
import org.bukkit.OfflinePlayer;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
|
|
|
|
import java.util.function.Function;
|
|
|
|
|
|
|
|
public interface Replacer
|
|
|
|
{
|
|
|
|
|
|
|
|
@NotNull
|
|
|
|
String apply(@NotNull final String text, @Nullable final OfflinePlayer player, @NotNull final Function<String, @Nullable PlaceholderHook> lookup);
|
|
|
|
|
|
|
|
|
|
|
|
enum Closure
|
|
|
|
{
|
2020-07-21 01:50:36 +02:00
|
|
|
BRACKET('{', '}'),
|
2020-07-20 22:59:25 +02:00
|
|
|
PERCENT('%', '%');
|
|
|
|
|
|
|
|
|
|
|
|
public final char head, tail;
|
|
|
|
|
|
|
|
Closure(final char head, final char tail)
|
|
|
|
{
|
|
|
|
this.head = head;
|
|
|
|
this.tail = tail;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|