crwdns128973:0crwdne128973:0

crwdns128975:0:javadoc:crwdne128975:0

crwdns128977:0crwdne128977:0

crwdns128979:0:javadoc:crwdnd128979:0:javadoc:crwdne128979:0

crwdns128981:0crwdne128981:0

crwdns128983:0crwdne128983:0

crwdns128985:0crwdne128985:0

Tip

crwdns128987:0:doc:crwdne128987:0

crwdns128989:0crwdne128989:0

import com.google.inject.Inject;
import org.spongepowered.api.plugin.PluginManager;

@Inject
private PluginManager pluginManager;

crwdns128991:0crwdne128991:0

Tip

crwdns128993:0:doc:crwdne128993:0

crwdns128995:0:javadoc:crwdne128995:0

private PluginManager pluginManager = serviceManager.provide(PluginManager.class);

crwdns128997:0crwdne128997:0

Tip

crwdns128999:0:javadoc:crwdne128999:0

crwdns129001:0crwdne129001:0

private PluginManager pluginManager = game.getPluginManager();

crwdns129003:0crwdne129003:0

crwdns129005:0crwdne129005:0

crwdns129007:0:javadoc:crwdne129007:0

import org.spongepowered.api.Sponge;

private PluginManager pluginManager = Sponge.getPluginManager();

crwdns129009:0crwdne129009:0

crwdns129011:0crwdne129011:0

crwdns129013:0crwdne129013:0

crwdns129015:0crwdne129015:0

import org.spongepowered.api.plugin.PluginContainer;

import java.util.List;

private List<PluginContainer> plugins = pluginManager.getPlugins();

crwdns129017:0crwdne129017:0

private PluginContainer myOtherPlugin = pluginManager.getPlugin("myOtherPluginId").orNull();

crwdns129019:0crwdne129019:0

crwdns129021:0crwdne129021:0

crwdns129023:0:javadoc:crwdne129023:0

private PluginContainer myOtherPlugin = pluginManager.getPlugin("myOtherPluginId").orNull();
private MyOtherPlugin pluginInstance = (MyOtherPlugin) myOtherPlugin.getInstance();

Note

crwdns129025:0:javadoc:crwdne129025:0