ModsJava
MoxCore - Basic utilities library
Java mod listed for Minecraft 1.15. Download on the author's site.
⬇ Download on Spigot Introduction:
Donation wall:
If you want be on this list, send us donate.
We will promote your server here or whatever you will want!
Donations are giving us motivation to add new things into our plugins because by that we know that someone appreciates our work!
Also we are adding and developing our stuff for free, so dontaions are, for us, very nice gift from you
!
If you want donate us, please give information in donation in which plugin you want to be added to the donation wall.
Features:
SQL Databases :
ActionBar:
Title:
ServerUtils:
ItemUtils:
ConfigUtils:
- Do you want to have everything essential like SQL databases in some lines instead of few files and hundreds lines?
- Do you need basic maths like .chanceOf(30)?
- Do you want to create action bars, titles very easy without working with packets?
- Do you want to have tools like calculating distance 2D or 3D and much more?
Then this Library is for you.
We have created this library to create plugins faster without unessesary managing with minecraft server classes. Our Mox plugins will usually use those APIs.
Donation wall:
If you want be on this list, send us donate.
We will promote your server here or whatever you will want!
Donations are giving us motivation to add new things into our plugins because by that we know that someone appreciates our work!
Also we are adding and developing our stuff for free, so dontaions are, for us, very nice gift from you
! If you want donate us, please give information in donation in which plugin you want to be added to the donation wall.
- Null :c You can be first!
Features:
SQL Databases :
MySQLDatabase is working with scheduler. It means that update queries will not affect performance and will not dreadlock your machine due to too many Threads created!
Example code :
Example config:
Example code :
Code (Java):
SQLDatabase database
;
if ( getConfig ( ) . getString ( "database.type" ) . equalsIgnoreCase ( "mysql" ) ) {
String host = getConfig ( ) . getString ( "database.mysql.host" ) ;
String port = getConfig ( ) . getString ( "database.mysql.port" ) ;
String databaseName = getConfig ( ) . getString ( "database.mysql.database" ) ;
String user = getConfig ( ) . getString ( "database.mysql.user" ) ;
String password = getConfig ( ) . getString ( "database.mysql.password" ) ;
database = new MySQLDatabase ( this ) ;
database. createConnection ( host, port, databaseName, user, password ) ;
} else {
String fileLocation = getConfig ( ) . getString ( "database.sqlite.file-location" ) . replace ( "%plugin-folder%" , getDataFolder ( ) . getPath ( ) ) ;
database = new SQLiteDatabase ( this ) ;
database. createConnection ( fileLocation ) ;
}
if ( getConfig ( ) . getString ( "database.type" ) . equalsIgnoreCase ( "mysql" ) ) {
String host = getConfig ( ) . getString ( "database.mysql.host" ) ;
String port = getConfig ( ) . getString ( "database.mysql.port" ) ;
String databaseName = getConfig ( ) . getString ( "database.mysql.database" ) ;
String user = getConfig ( ) . getString ( "database.mysql.user" ) ;
String password = getConfig ( ) . getString ( "database.mysql.password" ) ;
database = new MySQLDatabase ( this ) ;
database. createConnection ( host, port, databaseName, user, password ) ;
} else {
String fileLocation = getConfig ( ) . getString ( "database.sqlite.file-location" ) . replace ( "%plugin-folder%" , getDataFolder ( ) . getPath ( ) ) ;
database = new SQLiteDatabase ( this ) ;
database. createConnection ( fileLocation ) ;
}
Code (YAML):
#Types: "mysql" (network), "sqlite" (.db file).
database :
type : "sqlite"
sqlite :
file-location : "%plugin-folder%/database.db"
mysql :
host : "localhost"
port : "3306"
database : "MoxCore"
user : "root"
password : "password"
database :
type : "sqlite"
sqlite :
file-location : "%plugin-folder%/database.db"
mysql :
host : "localhost"
port : "3306"
database : "MoxCore"
user : "root"
password : "password"
Actionbars are called asynchronously so you will not experience any affect on main thread .
Example code:
Example code:
Code (Java):
ActionBar actionBar
=
new ActionBar
(
"&bSome text!"
)
;
actionBar. send ( player ) ; // Can be send to List<Player> or .sendToAll()
actionBar. send ( player ) ; // Can be send to List<Player> or .sendToAll()
Ending titles are called asynchronously so you will not experience any affect on main thread .
Example code:
Example code:
Code (Java):
// Example method
public void showTitle ( String titleText, String subTitleText, Player player ) {
Title title = new Title ( titleText, subTitleText, 40 ) ; // 40 is in ticks how long title will appear. 20 ticks = 1 second.
title. setFadeIn ( 8 ) ; // Default value is 10
title. setFadeOut ( 12 ) ; // Default value is 10
title. send ( player ) ; // Can be send to List<Player> or .sendToAll()
}
public void showTitle ( String titleText, String subTitleText, Player player ) {
Title title = new Title ( titleText, subTitleText, 40 ) ; // 40 is in ticks how long title will appear. 20 ticks = 1 second.
title. setFadeIn ( 8 ) ; // Default value is 10
title. setFadeOut ( 12 ) ; // Default value is 10
title. send ( player ) ; // Can be send to List<Player> or .sendToAll()
}
This API has utils that are related to server stuff. You can get it using MoxCore.getServerUtils(); or you can call it directly, for example ServerUtils .sendMessage(player, "&2[&aINFO&2] ", "&cHello!");
Example code:
MathUtils:
Example code:
Code (Java):
ServerUtils.
sendMessage
( player,
"&c[&4Prefix&c] " ,
"&cMessage with prefix!"
)
;
ServerUtils. sendMessage ( player, "&cMessage without prefix!" ) ;
ServerUtils. sendMessage ( Bukkit. getOnlinePlayers ( ) , "&cMessage to list of players!" ) ;
ServerUtils. setTablistHeaderFooter ( player, "&aThis is tab header!" , "&2This is tab footer!" ) ;
ServerUtils. sendMessage ( player, "&cMessage without prefix!" ) ;
ServerUtils. sendMessage ( Bukkit. getOnlinePlayers ( ) , "&cMessage to list of players!" ) ;
ServerUtils. setTablistHeaderFooter ( player, "&aThis is tab header!" , "&2This is tab footer!" ) ;
This API contains method that will calculate something for you with return. You can get it using MoxCore.getMathUtils(); or you can call it directly, for example MathUtils.chanceOfProcent(50);
Example code:
Example code:
Code (Java):
if
( MathUtils.
chanceOfProcent
(
50
)
{
player. setHealth ( 0 ) ;
} else {
Double distance = MathUtils. calculateDistance3D ( player. getLocation ( ) , dungeonLocation ) ;
player. teleport ( dungeonLocation ) ;
ServerUtils. sendMessage ( player, "&bYou have been teleported &3" + distance + " &bblocks away!" ) ;
}
player. setHealth ( 0 ) ;
} else {
Double distance = MathUtils. calculateDistance3D ( player. getLocation ( ) , dungeonLocation ) ;
player. teleport ( dungeonLocation ) ;
ServerUtils. sendMessage ( player, "&bYou have been teleported &3" + distance + " &bblocks away!" ) ;
}
With this API you can create itemstacks and modify them. You can get it using MoxCore.getItemUtils(); or you can call it directly, for example ItemUtils.addGlow(itemStack);
Example code:
Creating custom potion:
Example code:
Code (Java):
ItemStack itemStack
= ItemUtils.
createItemStack
( Material.
STICK ,
1 ,
0 ,
"&5Stick with hidden word Love" ,
"&dDo you believe in true love?"
)
;
itemStack = ItemUtils. setCustomTag ( itemStack, "Word" , "Love" ) ;
itemStack = ItemUtils. addGlow ( itemStack ) ;
itemStack = ItemUtils. setCustomTag ( itemStack, "Word" , "Love" ) ;
itemStack = ItemUtils. addGlow ( itemStack ) ;
Code (Java):
ItemStack potion
= ItemUtils.
createPotionItemStack
( Material.
POTION ,
1 , PotionEffectType.
REGENERATION ,
100 ,
1
)
;
// Normal regeneration potion II with 5s duration (100 ticks)
potion = ItemUtils. setPotionColor ( potion, Color . fromRGB ( 175 , 0 , 0 ) ) ; // Adding pink color. You can define your own as you want.
potion = ItemUtils. addPotionEffect ( potion, PotionEffectType. HEAL , 0 , 2 ) ; // Adding HEAL III to potion.
// Here it is. We have created normal potion with custom color that heals instantly and gives regeneration for 5s
potion = ItemUtils. setPotionColor ( potion, Color . fromRGB ( 175 , 0 , 0 ) ) ; // Adding pink color. You can define your own as you want.
potion = ItemUtils. addPotionEffect ( potion, PotionEffectType. HEAL , 0 , 2 ) ; // Adding HEAL III to potion.
// Here it is. We have created normal potion with custom color that heals instantly and gives regeneration for 5s
This API allows you to do nice things with your configuration file, for example - set missing keys automaticly with default values from plugin's source config. You can get it using MoxCore.getConfigUtils(); or you can call it directly, for example Config Utils.loadItemStack(myPlugin.getConfig(), "my.item", myPlugin);
Example code:
Example config:
Example code:
Code (Java):
ItemStack configItem
= ConfigUtils.
loadItemStack
( myPlugin.
getConfig
(
) ,
"my.item" , myPlugin
)
;
Code (YAML):
my :
item :
material : "POTION"
data : 0
amount : 2
name : "&b&lMy Potion!"
lore : "&dMy Supa potion!"
potion-data :
effect : "INVISIBILITY"
duration : 400
amplifer : 0
color : "0,0,150"
enchants :
- KNOCKBACK 4
item :
material : "POTION"
data : 0
amount : 2
name : "&b&lMy Potion!"
lore : "&dMy Supa potion!"
potion-data :
effect : "INVISIBILITY"
duration : 400
amplifer : 0
color : "0,0,150"
enchants :
- KNOCKBACK 4
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.15
- 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.
MoxCore - Basic utilities library is a free Minecraft Java mod. Compatible with Minecraft 1.15. Downloaded 285 times (via Spigot). Download it and open it directly in the game.