From 5177e2be09a6dea35c9d611ceebd841a6438d1e2 Mon Sep 17 00:00:00 2001 From: Florian CUNY Date: Sun, 7 Apr 2019 21:37:23 +0200 Subject: [PATCH] Added nullable annotation on Hook#getPlugin() --- src/main/java/world/bentobox/bentobox/api/hooks/Hook.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/world/bentobox/bentobox/api/hooks/Hook.java b/src/main/java/world/bentobox/bentobox/api/hooks/Hook.java index 6542c8b24..0c2c0adfc 100644 --- a/src/main/java/world/bentobox/bentobox/api/hooks/Hook.java +++ b/src/main/java/world/bentobox/bentobox/api/hooks/Hook.java @@ -2,6 +2,7 @@ package world.bentobox.bentobox.api.hooks; import org.bukkit.Bukkit; import org.bukkit.plugin.Plugin; +import org.eclipse.jdt.annotation.Nullable; /** * @author Poslovitch @@ -30,6 +31,7 @@ public abstract class Hook { * Returns the Plugin instance related to this Hook or null if it could not be found. * @return the Plugin instance of the plugin this Hook hooks into. */ + @Nullable public Plugin getPlugin() { return Bukkit.getPluginManager().getPlugin(pluginName); }