The /backupnow command now uses the backupWorldsAsync method instead of directly calling backupWorlds.
Users receive a message indicating that the backup is starting asynchronously, and the server can continue running without delays caused by the backup process.
Updated /backupnow Block:
Code (YAML):
if
(command.getName
().equalsIgnoreCase
("backupnow")){ if
(!sender.hasPermission
("backupplugin.backupnow")){ sender.sendMessage
("You don't have permission to use this command.");
return true;
} sender.sendMessage
("Starting manual backup asynchronously...");
backupWorldsAsync
("ManualSave");
return true;
}
3. Preserved the Original Functionality
The original backupWorlds method remains unchanged, as it is called internally by the new asynchronous method