MoxCore - Basic Utilities Library 1.2

No permission to download
Provides lots of usefull functions and APIs
Supported software
Supported versions
api library moxcore utilities utils
  • 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 :p!
If you want donate us, please give information in donation in which plugin you want to be added to the donation wall.

  1. Null :c You can be first!

Example 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:
SQLDatabase database;
if (getConfig().getString("database.type").equalsIgnoreCase("mysql")){
   String host = getConfig().getString("");
   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);
Example config:
#Types: "mysql" (network), "sqlite" (.db file).
  type: "sqlite"
    file-location: "%plugin-folder%/database.db"
    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:
ActionBar actionBar = new ActionBar("&bSome text!");
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 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()

This API has utils that are related to server stuff.
Example code:
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!");

This API contains method that will calculate something for you with return.
Example code:
if (MathUtils.chanceOfProcent(50){
} else {
   Double distance = MathUtils.calculateDistance3D(player.getLocation(), dungeonLocation);
   ServerUtils.sendMessage(player, "&bYou have been teleported &3"+distance+" &bblocks away!");

With this API you can create itemstacks and modify them. You can use it by callig it directly, for example ItemUtils.setCustomTag(itemStack, "Word", "Love");
Example code:
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");
Creating custom potion:
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

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.
Example code:
ItemStack configItem = ConfigUtils.loadItemStack(myPlugin.getConfig(), "my.item", myPlugin);
Example config:
    material: "POTION"
    data: 0
    amount: 2
    name: "&b&lMy Potion!"
    lore: "&dMy Supa potion!"
      effect: "INVISIBILITY"
      duration: 400
      amplifer: 0
      color: "0,0,150"
      - KNOCKBACK 4
There is lots of more things that are inside MoxCore. Code blocks and descriptions above are only examples. Check it out by downloading this source. If you will experience any problem then please PM me or create issue ticket here, I will try to help or fix this problem! Latest version can be find here.
You need to upgrade!
Our dark style is reserved for our Premium members. Upgrade here.