Created
December 8, 2016 10:17
-
-
Save Bastian/6b24b8de1583e6d09490b299ca75c082 to your computer and use it in GitHub Desktop.
How your plugin may look like (Sponge)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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