DA
Features:
- You can create as many yml file as you want.
- Easy file saving
- You can save your yml files to a folder
- You can delete files
- You can clear or delete the DataBase's folder
- You can get statistics of the DataBase (e.g: how many files in the folder or the size of the folder.)
Installation:
- Download the file from github, or there is an external link:
[Link] - Drag and drop the .java file to your project!
- Done!
Basic:
- Create a new DataBase variable and fill it in the onEnable() method
public class Main extends JavaPlugin ( ) { public DataBase db ; public void onEnable ( ) { db = new DataBase ( this ) ; } }
You everywhere can use name.yml format insead of name
Setting a folder
//There is two way of:
//You call the class like:
db = new DataBase ( this , "foldername" ) ;
//You can set in another line:
db. setFolder ( "foldername" ) ;Creating a new file
db. create ( "Name" ) ;
//You don't need to save the file after creating.Saving the file
db. save ( "Name" ) ;Deleting a file
db. delete ( "Name" ) ;Checking the success
//You can check the success of save , delete, create methods
boolean success = save ( "name.yml" ) ;
boolean success = create ( "name.yml" ) ;
boolean success = delete ( "name.yml" ) ;Setting a value
db - getYML ( "Name.yml" ) ;
//And after getYML() you can do everything like a getConfig().
//Examples:
db. getYML ( "Name.yml" ) . createSection ( "test" ) ;
//Never forget saving!
db. save ( "Name.yml" ) ;Getting a value
String a1 = db. getYML ( "Name" ) . getString ( "teszt.a1" ) ;Checking the file is exist in the DataBase
db. containsFile ( "Name.yml" ) ;
//Example:
if ( db. containsFile ( "Name.yml" ) ) {
p. sendMessage ( "True!" ) ;
}Clearing or Deleting a folder
db. clearFolder ( ) ;
//This is delete all files from the folder
db. deleteFolder ( ) ;
//This is delete the folder and delete all files from itget methods:
db. getFolderFile ( ) ; //returns a File variable
db. getFolderName ( ) ; //returns a String variable
db. getFolderFileCount ( ) ; //returns an int variable, which is the number of how many files in the folder
db. getFolderFiles ( ) ; //returns the all files from the folder
db. getFolderSize ( ) ; //returns a long , which is the folder size in kilobytes
db. getFileSize ( "Name" ) ; //returns a long, which is the size of the file in kilobytes.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