Added nullable annotation on Hook#getPlugin()

This commit is contained in:
Florian CUNY 2019-04-07 21:37:23 +02:00
parent 5dd7796be4
commit 5177e2be09

View File

@ -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);
}