
API Examples
Events:
//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:
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();
}Yaml Files
Plugin.yml
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: opConfig.yml
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'Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta



