Giter Club home page Giter Club logo

filesync's Introduction

FileSync

Sync your files with all of your Minecraft servers!

Download: https://www.spigotmc.org/resources/filesync-sync-your-files-with-your-servers.93054/

Developer-API

You only have to enable the API option in the config.yml if you want to use "setAllowUpload()", "setGroups()" and "startSyncScheduler()". The only thing this option does is to prevent that "setAllowUpload()", "setGroups()" and "startSyncScheduler()" gets executed when the plugin gets enabled.

If you use the Sync-System: You have to set the groups if you want to use the startSyncScheduler() method. Also, you don't have to use the startSyncScheduler method. You can also do this scheduler by yourself. The syncScheduler just executes syncFiles(group); for each group.

Don't forget to put "FileSync" as Depend or Softdepend

// Manage the Sync-System
FileSyncManager.setAllowUpload(false); // Allow/Disallow this server to upload files
FileSyncManager.setGroups(ArrayList<String>); // Set all groups
FileSyncManager.startSyncScheduler(seconds); // Start the SyncScheduler (not needed)
FileSyncManager.syncFiles(group); // Sync all files of a group
FileSyncManager.syncFiles(group, group); // Sync a specific file

// Manage a specific file
FileSyncManager fsm = new FileSyncManager(group, path);
fsm.writeFile(); // Add a new file to sync (and force upload)
fsm.setCommands(ArrayList<String>); // Set the commands
fsm.getCommands(); // Returns the commands
fsm.fileExists(); // Returns if the file exists (in the MySQL database)
fsm.getLastModified(); // Returns the last modified from the file in the MySQL database
fsm.readFile(); // Forces to read the file from the MySQL database and write it to the server (Use FileSyncManager.syncFiles() if you don't want to force override)
fsm.deleteFile(); // Removes the file from sync list (only deletes in database, no files on disk will be deleted)

filesync's People

Contributors

xitee1 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

filesync's Issues

Cannot create folders

If a file needs to be synced in a folder that doesn't exists on all servers, it gives a not found error because it can't create new folders.

Special characters sometimes don't work

Special characters sometimes don't work.
Most time, it works, but sometime it don't.
I think this could be caused if it tries to download the file while the upload isn't completely finished yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.