mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2025-10-07 11:45:26 +02:00
updated classes with contract annotations
This commit is contained in:
@@ -25,6 +25,7 @@ import me.clip.placeholderapi.PlaceholderHook;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -271,6 +272,7 @@ public abstract class PlaceholderExpansion extends PlaceholderHook
|
||||
* @deprecated As of versions greater than 2.8.7, use {@link #getRequiredPlugin()}
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.10.8")
|
||||
public String getPlugin()
|
||||
{
|
||||
return null;
|
||||
@@ -280,6 +282,7 @@ public abstract class PlaceholderExpansion extends PlaceholderHook
|
||||
* @deprecated As of versions greater than 2.8.7, use the expansion cloud to show a description
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.10.8")
|
||||
public String getDescription()
|
||||
{
|
||||
return null;
|
||||
@@ -289,6 +292,7 @@ public abstract class PlaceholderExpansion extends PlaceholderHook
|
||||
* @deprecated As of versions greater than 2.8.7, use the expansion cloud to display a link
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2.10.8")
|
||||
public String getLink()
|
||||
{
|
||||
return null;
|
||||
|
@@ -39,6 +39,7 @@ import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.server.PluginDisableEvent;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.Unmodifiable;
|
||||
@@ -163,13 +164,10 @@ public final class LocalExpansionManager implements Listener
|
||||
/**
|
||||
* Do not call this method yourself, use {@link PlaceholderExpansion#register()}
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
public boolean register(@NotNull final PlaceholderExpansion expansion)
|
||||
{
|
||||
final String identifier = expansion.getIdentifier();
|
||||
if (identifier == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (expansion instanceof Configurable)
|
||||
{
|
||||
@@ -267,6 +265,7 @@ public final class LocalExpansionManager implements Listener
|
||||
/**
|
||||
* Do not call this method yourself, use {@link PlaceholderExpansion#unregister()}
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
public boolean unregister(@NotNull final PlaceholderExpansion expansion)
|
||||
{
|
||||
if (expansions.remove(expansion.getIdentifier()) == null)
|
||||
|
Reference in New Issue
Block a user