Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public SQLConnection sql;
- private static Main instance;
- public TephrasManager tephrasManager;
- @Override
- public void onEnable() {
- /*
- Plugin startup logic
- */
- saveDefaultConfig();
- ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
- getCommand("test").setExecutor(new CommandTest());
- PluginManager pm = Bukkit.getServer().getPluginManager();
- pm.registerEvents(new PlayerJoinEvent(), this);
- console.sendMessage(ChatColor.GREEN + "Started Linosa");
- this.sql = new SQLConnection("jdbc:mysql://", this.getConfig().getString("database.host"), "" + this.getConfig().getString("database.database") + "?autoReconnect=true", this.getConfig().getString("database.user"), this.getConfig().getString("database.password"));
- this.sql.connection();
- getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
- }
- @Override
- public void onDisable() {
- /*
- Plugin shutdown logic
- */
- ConsoleCommandSender console = Bukkit.getServer().getConsoleSender();
- console.sendMessage(ChatColor.RED + "Stopped Linosa");
- sql.disconnect();
- }
Add Comment
Please, Sign In to add comment