mirror of
				https://github.com/PlaceholderAPI/PlaceholderAPI
				synced 2025-10-30 18:03:43 +01:00 
			
		
		
		
	Uhh
This commit is contained in:
		| @@ -20,11 +20,14 @@ | ||||
|  | ||||
| package me.clip.placeholderapi; | ||||
|  | ||||
| import net.kyori.adventure.text.Component; | ||||
| import org.bukkit.OfflinePlayer; | ||||
| import org.bukkit.entity.Player; | ||||
| import org.jetbrains.annotations.NotNull; | ||||
| import org.jetbrains.annotations.Nullable; | ||||
|  | ||||
| import java.util.Optional; | ||||
|  | ||||
| public abstract class PlaceholderHook { | ||||
|   @Nullable | ||||
|   public String onRequest(final OfflinePlayer player, @NotNull final String params) { | ||||
| @@ -35,8 +38,16 @@ public abstract class PlaceholderHook { | ||||
|     return onPlaceholderRequest(null, params); | ||||
|   } | ||||
|  | ||||
|   @Deprecated | ||||
|   @Nullable | ||||
|   public String onPlaceholderRequest(final Player player, @NotNull final String params) { | ||||
|     return null; | ||||
|   } | ||||
|  | ||||
|   @Nullable | ||||
|   public Component onPlaceholderComponentRequest(final Player player, @NotNull final String params) { | ||||
|     final String result = onPlaceholderRequest(player, params); | ||||
|  | ||||
|     return result == null ? null : Component.text(result); | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user