Restore pre 2.10.7 API functionality for the most part. Only things actually being removed in 2.11.0 are deprecated. No breaking API changes until 3.0

This commit is contained in:
extendedclip
2020-08-04 10:04:34 -04:00
parent 6d38f411ba
commit eeb9c8d5db
3 changed files with 195 additions and 251 deletions

View File

@@ -22,21 +22,11 @@ package me.clip.placeholderapi;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* @deprecated This class will be completely removed in the next release, please use {@link
* me.clip.placeholderapi.expansion.PlaceholderExpansion}
*/
@Deprecated
@ApiStatus.NonExtendable
@ApiStatus.ScheduledForRemoval(inVersion = "2.11.0")
public abstract class PlaceholderHook {
@Nullable
public String onRequest(@Nullable final OfflinePlayer player, @NotNull final String params) {
public String onRequest(final OfflinePlayer player, @NotNull final String params) {
if (player != null && player.isOnline()) {
return onPlaceholderRequest((Player) player, params);
}
@@ -44,14 +34,7 @@ public abstract class PlaceholderHook {
return onPlaceholderRequest(null, params);
}
/**
* @deprecated This method will be completely removed, please use {@link
* me.clip.placeholderapi.expansion.PlaceholderExpansion#onRequest(OfflinePlayer, String)}
*/
@Nullable
@Deprecated
public String onPlaceholderRequest(@Nullable final Player player, @NotNull final String params) {
public String onPlaceholderRequest(final Player player, @NotNull final String params) {
return null;
}
}