crwdns140373:0crwdne140373:0
Note
crwdns140375:0crwdne140375:0
crwdns140377:0crwdne140377:0
crwdns140379:0crwdne140379:0
crwdns140381:0crwdne140381:0
crwdns140383:0:javadoc:crwdnd140383:0:doc:crwdne140383:0
package io.github.username.project;
import org.spongepowered.plugin.builtin.jvm.Plugin;
@Plugin("exampleplugin")
public class ExamplePlugin {
}
Note
crwdns140385:0:doc:crwdne140385:0
crwdns140387:0crwdne140387:0
crwdns140389:0:javadoc:crwdnd140389:0:javadoc:crwdnd140389:0:javadoc:crwdne140389:0
crwdns140391:0crwdne140391:0
import org.spongepowered.api.event.Listener;
import org.spongepowered.api.event.lifecycle.StartedEngineEvent;
import org.spongepowered.plugin.builtin.jvm.Plugin;
// Imports for logger
import com.google.inject.Inject;
import org.apache.logging.log4j.Logger;
@Plugin("exampleplugin")
public class ExamplePlugin {
@Inject
private Logger logger;
@Listener
public void onServerStart(final StartedEngineEvent<Server> event) {
logger.info("Successfully running ExamplePlugin!!!");
}
}
Tip
crwdns140393:0:doc:crwdne140393:0
crwdns140395:0crwdne140395:0
crwdns140397:0:doc:crwdne140397:0