Skip to content

DeveloperMxrlin/FileManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileManager Logo test test test

FileManager

File Manager is a Spigot plugin, made for server owners, to not have the need to edit their files, by opening the file, editing, and then restarting the server. With FileManager this is done ingame! You can edit your entries all ingame, and the saving is done automatically! With your agreement the plugin even searches for the entries and replaces them in the working Plugin! No need to restart the server or anything.

Tutorial

After downloading and restarting the server, the plugin should be working!

You just have to have the permission "filemanager.use" and execute the command /filemanager! It's as easy as that, you are already in the GUI and can now edit your files! If you don't want to go to all your directories you can instantly open the file by adding arguments like that:

  • Aim: Open "[serverDir]\plugins\FileManager\config.yml"
  • Execution: /filemanager FileManager/config.yml

Links

Suggestions or Bugs?

You found Bugs or you have something you would love to have in the plugin?

Go ahead and join our Discord and tell us! We usually answer really fast and we appreciate every thought! 😄

Libraries

API

To use the included API of FileManager, first implement the plugin.

To implement the plugin you can either use maven:

  <dependency>
	    <groupId>com.github.DeveloperMxrlin</groupId>
	    <artifactId>FileManager</artifactId>
	    <version>VERSION</version>
	</dependency>

Or you're using gradle:

  dependencies {
	        implementation 'com.github.DeveloperMxrlin:FileManager:VERSION'
	}

For both methods you will have to add JitPack to your repository.

After implemented, use the method FileManagerAPI#INSTANCE to get all available methods that are working for the API.

Create own FileEditor by either implementing the FileEditor Interface or extending the FileEditorHelper Class.

FileEditorHelper Code Example:

public class Test extends FileEditorHelper {

    protected Test() {
        super("json");
    }

    @Override
    protected InventoryProvider inventory(File file) {
        List<ClickableItem> items = new ArrayList<>();
        // add your items / entries of the file

        return entriesToInventory(items.toArray(new ClickableItem[0]),
                ClickableItem.empty(new ItemStack(Material.PAPER)), // add a information item that shows all information about the file
                new EntryCreator((entry, player) -> {
                    // do something with the entry
                }),
                file,
                "jsonTest:");
    }

    @Override
    protected Consumer<InventoryCloseEvent> closeInventory() {
        return inventoryCloseEvent -> {
            // do something on close
            // f.e save the file, open new inventory...
        };
    }
}

And then you just have to add this into your enable part: new JsonTest().addFileEditor();

Statistics

  • 30 Different Files with Code
  • 5300 Lines of Code
  • 230 KB of Code

License

This Repository uses a MIT License.

Click here to read the entire license.