Guest User

Main

a guest
Apr 9th, 2020
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. package stargaze.plugin;
  2.  
  3. import org.bukkit.plugin.java.JavaPlugin;
  4. import org.bukkit.scheduler.BukkitTask;
  5.  
  6. import stargaze.plugin.commands.BanCommand;
  7. import stargaze.plugin.events.BanEvents;
  8. import stargaze.plugin.events.TimeListener;
  9. import stargaze.plugin.events.WeatherListener;
  10.  
  11. public class Main extends JavaPlugin {
  12.  
  13. @Override
  14. public void onEnable() {
  15. registerCommands();
  16. registerListeners();
  17. @SuppressWarnings("unused")
  18. BukkitTask keepDay = new TimeListener(this).runTaskTimer(this, 0L, 100L);
  19. }
  20.  
  21. public void registerListeners() {
  22. getServer().getPluginManager().registerEvents(new BanEvents(this), this);
  23. getServer().getPluginManager().registerEvents(new WeatherListener(), this);
  24. }
  25.  
  26. public void registerCommands() {
  27. new BanCommand(this);
  28. }
  29.  
  30. }
Add Comment
Please, Sign In to add comment