Guest User

Untitled

a guest
Nov 5th, 2023
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.10 KB | None | 0 0
  1. package pl.playgroundhc.survival;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.plugin.java.JavaPlugin;
  5. import pl.playgroundhc.survival.commands.kitCommand;
  6. import pl.playgroundhc.survival.commands.lobbyCommand;
  7. import pl.playgroundhc.survival.commands.moderation.chatCommands;
  8. import pl.playgroundhc.survival.commands.spawnCommand;
  9. import pl.playgroundhc.survival.events.kitMove;
  10. import pl.playgroundhc.survival.events.kits.*;
  11. import pl.playgroundhc.survival.events.playerJoin;
  12. import pl.playgroundhc.survival.sprawdzanie.sprawdzcommand;
  13.  
  14. import java.util.Objects;
  15.  
  16. public final class Survival extends JavaPlugin {
  17.     private static Survival instance;
  18.     @Override
  19.     public void onEnable() {
  20.         instance = this;
  21.         this.getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
  22.  
  23.  
  24.         getServer().getPluginManager().registerEvents(new playerJoin(), this);
  25.         getServer().getPluginManager().registerEvents(new kitMove(), this);
  26.         getServer().getPluginManager().registerEvents(new kitGracz(), this);
  27.         getServer().getPluginManager().registerEvents(new kitVip(), this);
  28.         getServer().getPluginManager().registerEvents(new kitSvip(), this);
  29.         getServer().getPluginManager().registerEvents(new kitSponsor(), this);
  30.         Bukkit.getServer().getPluginManager().registerEvents(new kitMordeczka(), this);
  31.         Objects.requireNonNull(getCommand("kit")).setExecutor(new kitCommand());
  32.         Objects.requireNonNull(getCommand("sprawdz")).setExecutor(new sprawdzcommand());
  33.         Objects.requireNonNull(getCommand("chat")).setExecutor(new chatCommands());
  34.         Objects.requireNonNull(getCommand("spawn")).setExecutor(new spawnCommand(this));
  35.         Objects.requireNonNull(getCommand("lobby")).setExecutor(new lobbyCommand());
  36.  
  37.         Bukkit.getConsoleSender().sendMessage("Uruchomiono plugin trybu survival!");
  38.     }
  39.  
  40.     @Override
  41.     public void onDisable() {
  42.         Bukkit.getConsoleSender().sendMessage("Trwa wyłączanie pluginu trybu survival...");
  43.     }
  44.     public static Survival getInstance() {
  45.         return instance;
  46.     }
  47. }
  48.  
Advertisement
Add Comment
Please, Sign In to add comment