mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2025-01-26 09:41:20 +01:00
Do not make *PlaceholderReplacementSupplier extend *Placeholder
This commit is contained in:
parent
6f6a214ecd
commit
8a80c063b7
@ -5,9 +5,23 @@
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.api.placeholder;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @since 1
|
||||
*/
|
||||
public interface GlobalPlaceholder extends GlobalPlaceholderReplacementSupplier, Placeholder {
|
||||
public interface GlobalPlaceholder extends Placeholder {
|
||||
|
||||
/**
|
||||
* Callback for providing a placeholder replacement, given the argument of the placeholder (if present).
|
||||
* <p>
|
||||
* For example, the argument of {test} is null, the argument of {test: hello world} is the string "hello world".
|
||||
* <p>
|
||||
* <b>Warning</b>: this method should be performance efficient, as it may be invoked often.
|
||||
*
|
||||
* @return the placeholder replacement
|
||||
* @since 1
|
||||
*/
|
||||
@Nullable String getReplacement(@Nullable String argument);
|
||||
|
||||
}
|
||||
|
@ -16,13 +16,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
public interface GlobalPlaceholderReplacementSupplier {
|
||||
|
||||
/**
|
||||
* Callback for providing a placeholder replacement, given the argument of the placeholder (if present).
|
||||
* <p>
|
||||
* For example, the argument of {test} is null, the argument of {test: hello world} is the string "hello world".
|
||||
* <p>
|
||||
* <b>Warning</b>: this method should be performance efficient, as it may be invoked often.
|
||||
* @see GlobalPlaceholder#getReplacement(String)
|
||||
*
|
||||
* @return the placeholder replacement
|
||||
* @since 1
|
||||
*/
|
||||
@Nullable String getReplacement(@Nullable String argument);
|
||||
|
@ -5,9 +5,18 @@
|
||||
*/
|
||||
package me.filoghost.holographicdisplays.api.placeholder;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @since 1
|
||||
*/
|
||||
public interface IndividualPlaceholder extends IndividualPlaceholderReplacementSupplier, Placeholder {
|
||||
public interface IndividualPlaceholder extends Placeholder {
|
||||
|
||||
/**
|
||||
* @since 1
|
||||
*/
|
||||
@Nullable String getReplacement(@NotNull Player player, @Nullable String argument);
|
||||
|
||||
}
|
||||
|
@ -16,6 +16,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
public interface IndividualPlaceholderReplacementSupplier {
|
||||
|
||||
/**
|
||||
* @see IndividualPlaceholder#getReplacement(Player, String)
|
||||
*
|
||||
* @since 1
|
||||
*/
|
||||
@Nullable String getReplacement(@NotNull Player player, @Nullable String argument);
|
||||
|
Loading…
Reference in New Issue
Block a user