Skip to content

Instantly share code, notes, and snippets.

@Bastian
Created December 8, 2016 10:17
Show Gist options
  • Save Bastian/6b24b8de1583e6d09490b299ca75c082 to your computer and use it in GitHub Desktop.
Save Bastian/6b24b8de1583e6d09490b299ca75c082 to your computer and use it in GitHub Desktop.
How your plugin may look like (Sponge)
@Plugin(id = "exampleplugin", name = "ExamplePlugin", version = "1.0")
public class Main {
@Inject
private Metrics metrics;
@Listener
public void onServerStart(GameStartedServerEvent event) {
// No need to call a constructor or any method.
// The metrics field gets initialised using @Inject :)
// Check out https://docs.spongepowered.org/master/en/plugin/injection.html if you don't know what @Inject does
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment