Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main extends JavaPlugin {
- private FileConfiguration config;
- private Connect connection;
- /**
- * Plugin enabled
- * Create config with defaults
- * Register events
- */
- @Override
- public void onEnable() {
- config.addDefault("enabled", true);
- config.addDefault("url", "http://www.example.com");
- config.addDefault("key" , "api_key");
- config.options().copyDefaults(true);
- saveConfig();
- connection = new Connect();
- this.getServer().getPluginManager().registerEvents(new Join(), this);
- this.getServer().getPluginManager().registerEvents(new Leave(), this);
- this.getCommand("mcstaff").setExecutor(new Commands());
- }
- /**
- * Plugin disabled
- */
- @Override
- public void onDisable() {
- System.out.println("Mcstaff plugin disabled");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement