Home›Java›Mods›LightBackup +API
LightBackup +API
ModsJava

LightBackup +API

Java mod listed for Minecraft 1.7–1.12. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
[​IMG]
[​IMG]
Spoiler: API Examples
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();
    }

Spoiler: Yaml Files
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]​

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

LightBackup +API is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 154 times (via Spigot). Download it and open it directly in the game.

Explore more