mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2025-01-27 10:11:22 +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;
|
package me.filoghost.holographicdisplays.api.placeholder;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 1
|
* @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 {
|
public interface GlobalPlaceholderReplacementSupplier {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback for providing a placeholder replacement, given the argument of the placeholder (if present).
|
* @see GlobalPlaceholder#getReplacement(String)
|
||||||
* <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
|
* @since 1
|
||||||
*/
|
*/
|
||||||
@Nullable String getReplacement(@Nullable String argument);
|
@Nullable String getReplacement(@Nullable String argument);
|
||||||
|
@ -5,9 +5,18 @@
|
|||||||
*/
|
*/
|
||||||
package me.filoghost.holographicdisplays.api.placeholder;
|
package me.filoghost.holographicdisplays.api.placeholder;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 1
|
* @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 {
|
public interface IndividualPlaceholderReplacementSupplier {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @see IndividualPlaceholder#getReplacement(Player, String)
|
||||||
|
*
|
||||||
* @since 1
|
* @since 1
|
||||||
*/
|
*/
|
||||||
@Nullable String getReplacement(@NotNull Player player, @Nullable String argument);
|
@Nullable String getReplacement(@NotNull Player player, @Nullable String argument);
|
||||||
|
Loading…
Reference in New Issue
Block a user