Skip to content

Commit fc63d5f

Browse files
committed
Update javadocs for PluginManager#fromInstance
1 parent 9a0554f commit fc63d5f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/org/spongepowered/api/plugin/PluginManager.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@
3737
public interface PluginManager {
3838

3939
/**
40-
* Get the plugin container from an instance.
40+
* Get the plugin container from an instance, if available.
41+
*
42+
* <p>If the provided object is not a plugin instance (usually a class
43+
* annotated with {@link Plugin}, then {@link Optional#empty()} will be
44+
* returned.</p>
4145
*
4246
* @param instance The instance
43-
* @return The container
47+
* @return The container, if available.
4448
*/
4549
Optional<PluginContainer> fromInstance(Object instance);
4650

0 commit comments

Comments
 (0)