From 6f87955898e014d9fdb9f9bf53d853805e8f4ee5 Mon Sep 17 00:00:00 2001 From: "Adam Volkman (itIsMaku)" <68100107+itIsMaku@users.noreply.github.com> Date: Wed, 17 Nov 2021 14:10:19 +0100 Subject: [PATCH] feat: nullable annotation placeholderhook --- src/main/java/me/clip/placeholderapi/PlaceholderHook.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/me/clip/placeholderapi/PlaceholderHook.java b/src/main/java/me/clip/placeholderapi/PlaceholderHook.java index 91c3263..268ee86 100644 --- a/src/main/java/me/clip/placeholderapi/PlaceholderHook.java +++ b/src/main/java/me/clip/placeholderapi/PlaceholderHook.java @@ -23,9 +23,11 @@ package me.clip.placeholderapi; import org.bukkit.OfflinePlayer; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public abstract class PlaceholderHook { + @Nullable public String onRequest(final OfflinePlayer player, @NotNull final String params) { if (player != null && player.isOnline()) { return onPlaceholderRequest((Player) player, params); @@ -34,6 +36,7 @@ public abstract class PlaceholderHook { return onPlaceholderRequest(null, params); } + @Nullable public String onPlaceholderRequest(final Player player, @NotNull final String params) { return null; }