ModsJava
DataBase
Java mod listed for Minecraft 1.13. Download on the author's site.
⬇ Download on Spigot Features:
get methods:
- 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.)
- Download the file from github, or there is an external link:
[Link] - Drag and drop the .java file to your project!
- Done!
- Create a new DataBase variable and fill it in the onEnable() method
Code (Java):public class Main extends JavaPlugin ( ) {
public DataBase db ;
public void onEnable ( ) {
db = new DataBase ( this ) ;
}
}
Spoiler: Setting a folder
Code (Java):
//There is two way of:
//You call the class like:
db = new DataBase ( this , "foldername" ) ;
//You can set in another line:
db. setFolder ( "foldername" ) ;
//You call the class like:
db = new DataBase ( this , "foldername" ) ;
//You can set in another line:
db. setFolder ( "foldername" ) ;
Spoiler: Creating a new file
Code (Java):
db.
create
(
"Name"
)
;
//You don't need to save the file after creating.
//You don't need to save the file after creating.
Spoiler: Saving the file
Code (Java):
db.
save
(
"Name"
)
;
Spoiler: Deleting a file
Code (Java):
db.
delete
(
"Name"
)
;
Spoiler: Checking the success
Code (Java):
//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" ) ;
boolean success = save ( "name.yml" ) ;
boolean success = create ( "name.yml" ) ;
boolean success = delete ( "name.yml" ) ;
Spoiler: Setting a value
Code (Java):
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" ) ;
//And after getYML() you can do everything like a getConfig().
//Examples:
db. getYML ( "Name.yml" ) . createSection ( "test" ) ;
//Never forget saving!
db. save ( "Name.yml" ) ;
Spoiler: Getting a value
Code (Java):
Spoiler: Checking the file is exist in the DataBase
Code (Java):
db.
containsFile
(
"Name.yml"
)
;
//Example:
if ( db. containsFile ( "Name.yml" ) ) {
p. sendMessage ( "True!" ) ;
}
//Example:
if ( db. containsFile ( "Name.yml" ) ) {
p. sendMessage ( "True!" ) ;
}
Spoiler: Clearing or Deleting a folder
Code (Java):
db.
clearFolder
(
)
;
//This is delete all files from the folder
db. deleteFolder ( ) ;
//This is delete the folder and delete all files from it
//This is delete all files from the folder
db. deleteFolder ( ) ;
//This is delete the folder and delete all files from it
get methods:
Code (Java):
db.
getFolderFile
(
)
;
//returns a File variable
Code (Java):
db.
getFolderName
(
)
;
//returns a String variable
Code (Java):
db.
getFolderFileCount
(
)
;
//returns an int variable, which is the number of how many files in the folder
Code (Java):
db.
getFolderFiles
(
)
;
//returns the all files from the folder
Code (Java):
db.
getFolderSize
(
)
;
//returns a long , which is the folder size in kilobytes
Code (Java):
db.
getFileSize
(
"Name"
)
;
//returns a long, which is the size of the file in kilobytes.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.13
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
DataBase is a free Minecraft Java mod. Compatible with Minecraft 1.13. Downloaded 149 times (via Spigot). Download it and open it directly in the game.