LightBackup +API 1.0 BETA

Lightweight backup plugin.

  1. Tabuu
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    [​IMG]
    [​IMG]
    Events:
    Code (Text):
       //Gets called whenever a backup is completed.
        @EventHandler
        public void onBackupComplete(BackupCompleteEvent e) {
            File backup = new File(e.getSavedPath());
        }
     
        //Gets called whenever a backup is started.
        @EventHandler
        public void onBackupStart(BackupStartEvent e) {
            File backup = new File(e.getSavedPath());
        }
     
        //Gets called whenever a backup fails.
        @EventHandler
        public void onBackupFail(BackupFailEvent e) {
            File backup = new File(e.getSavedPath());
        }
    Methodes:
    Code (Text):
       private void lightBackupAPI() {
            //Gets an instance of the LightBackupAPI.
            LightBackupAPI api = LightBackupAPI.getInstance();
       
            //Gets the config.yml file of the LightBackup plugin folder.
            FileConfiguration configuration = api.getFileConfiguration();
       
            //Creates a backup according to the config.yml file of the LightBackup plugin folder.
            api.createBackup();
        }

    Plugin.yml
    Code (Text):
    name: LightBackup
    version: 1.0 BETA
    main: nl.tabuu.lightbackup.LightBackup
    description: Lightweight backup plugin.
    authors: [Tabuu]
    website: https://www.tabuu.nl

    commands:
      lightbackup:
        usage: /lightbackup
        description: Help message.
        aliases: [lb]
      lightbackup help:
        usage: /lightbackup help
        description: Help message.
      lightbackup createbackup:
        usage: /lightbackup createbackup
        description: Creates a backup.
      lightbackup list:
        usage: /lightbackup list
        description: Shows a list of all the backups.
    permissions:
      lightbackup.createbackup:
        description: Allows players to use the '/lightbackup create' command.
        default: op
      lightbackup.notify:
        description: Notifies player about the status of a backup.
        default: op
      lightbackup.list:
        description: Allows players to use the '/lightbackup list' command.
        default: op
    Config.yml
    Code (Text):

    SavePath: 'plugins/LightBackup/backups/'
    BackupPrefix: 'Backup_'

    # https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
    DateFormat: ddMMMMyyyy-HHmmss

    IgnoredPaths:
      - 'plugins'
      - 'spigot-1.12.2.jar'
      - 'start.cmd'
    [​IMG] [​IMG] [​IMG] [​IMG] [​IMG]