Advertisement
Guest User

Main.java

a guest
Nov 27th, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.94 KB | None | 0 0
  1. package me.pepejson.basicsponge;
  2.  
  3. import org.slf4j.Logger;
  4.  
  5. import org.spongepowered.api.Game;
  6. import org.spongepowered.api.event.state.PreInitializationEvent;
  7. import org.spongepowered.api.event.state.ServerStartingEvent;
  8. import org.spongepowered.api.event.state.ServerStoppingEvent;
  9. import org.spongepowered.api.plugin.Plugin;
  10. import org.spongepowered.api.util.event.Subscribe;
  11.  
  12.  
  13. @Plugin(id = Reference.PLUGINID, name = Reference.NAME, version = Reference.VERSION)
  14. public class Main {
  15.  
  16.     Game game;
  17.     Logger logger;
  18.  
  19.     @Subscribe
  20.     public void onPreInitialization(PreInitializationEvent event) {
  21.         game = event.getGame();
  22.         logger = event.getPluginLog();
  23.     }
  24.  
  25.     @Subscribe
  26.     public void onEnable(ServerStartingEvent event) {
  27.         logger.info("TestPlugin Enabled");
  28.     }
  29.  
  30.     @Subscribe
  31.     public void onDisable(ServerStoppingEvent event) {
  32.         logger.info("TestPlugin Disabled");
  33.     }
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement