mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 21:27:44 +01:00
Added nullable annotation on Hook#getPlugin()
This commit is contained in:
parent
5dd7796be4
commit
5177e2be09
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user