Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fr.smash.reportmain;
- import org.bukkit.Bukkit;
- import org.bukkit.ChatColor;
- import org.bukkit.plugin.PluginManager;
- import org.bukkit.plugin.java.JavaPlugin;
- import fr.smash.reportSQL.DataBase;
- import fr.smash.reportcommandes.ReportCommand;
- import fr.smash.reportcommandes.ReportListCommand;
- import fr.smash.reportlisteners.ReportListeners;
- public final class Main extends JavaPlugin {
- private PluginManager pm ;
- public DataBase db ;
- public void onEnable() {
- //DataBase
- db = new DataBase("jdbc:mysql://", "localhost", "serveur1.8", "root", "") ;
- db.connection() ;
- //Listeners
- pm = Bukkit.getServer().getPluginManager() ;
- pm.registerEvents(new ReportListeners(), this) ;
- //Enregistrement des commandes
- //Commandes report <name>
- getCommand("report").setExecutor(new ReportCommand()) ;
- getCommand("reportlist").setExecutor(new ReportListCommand()) ;
- //Message dans la console lors du start (si bien démarré)
- Bukkit.getConsoleSender().sendMessage(ChatColor.GREEN + "Le plugin " + "ReportCommands" + " a ete demarre correctement ! ") ;
- }
- public void onDisable() {
- //DataBase
- db.disconnect() ;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement