crwdns137567:0crwdne137567:0
Warning
crwdns137569:0crwdne137569:0
crwdns137571:0:javadoc:crwdne137571:0
crwdns137573:0crwdne137573:0
crwdns137575:0:javadoc:crwdnd137575:0:javadoc:crwdne137575:0
crwdns137577:0crwdne137577:0
crwdns137579:0crwdne137579:0
crwdns137581:0crwdne137581:0
Tip
crwdns137583:0:doc:crwdne137583:0
crwdns137585:0crwdne137585:0
import com.google.inject.Inject;
import org.spongepowered.api.plugin.PluginManager;
@Inject
private PluginManager pluginManager;
crwdns137587:0crwdne137587:0
Tip
crwdns137589:0:doc:crwdne137589:0
crwdns137591:0:javadoc:crwdne137591:0
private PluginManager pluginManager = serviceManager.provideUnchecked(PluginManager.class);
crwdns137593:0crwdne137593:0
Tip
crwdns137595:0:javadoc:crwdne137595:0
crwdns137597:0crwdne137597:0
private PluginManager pluginManager = game.getPluginManager();
crwdns137599:0crwdne137599:0
crwdns137601:0crwdne137601:0
crwdns137603:0:javadoc:crwdne137603:0
import org.spongepowered.api.Sponge;
private PluginManager pluginManager = Sponge.pluginManager();
crwdns137605:0crwdne137605:0
crwdns137607:0crwdne137607:0
crwdns137609:0crwdne137609:0
crwdns137611:0crwdne137611:0
import org.spongepowered.plugin.PluginContainer;
import java.util.Collection;
private Collection<PluginContainer> plugins = pluginManager.getPlugins();
crwdns137613:0crwdne137613:0
private PluginContainer myOtherPlugin = pluginManager.getPlugin("myOtherPluginId").orElse(null);
crwdns137615:0crwdne137615:0
crwdns137617:0crwdne137617:0
crwdns137619:0:javadoc:crwdne137619:0
private PluginContainer myOtherPlugin = pluginManager.getPlugin("myOtherPluginId").orElse(null);
private MyOtherPlugin pluginInstance = (MyOtherPlugin) myOtherPlugin.getInstance().orElse(null);
Note
crwdns137621:0:javadoc:crwdne137621:0