Easy to use API based on LXL and CJS. Adds some methods to increase your LXL scripting experiece
You have to install LiteXLoader and cjs.js to use this API.
After everything is done, simply put the API script into bds_folder/plugins/cjs
To use MixerAPI, you have to put your script in bds_folder/plugins/cjs
and add a require
//This is your script
const api = require('./MixerAPI.js')
Documentation for every API method can be found in repo's wiki. Attention! API may be changed in future
//This is your script
const api = require('./MixerAPI.js')
//MixerAPI is 100% compatible with LXL's JS API
mc.regPlayerCmd('ban', 'Ban any player', function(player, args){
let gameTag = args[0] //You can use XUID as well
let reason = args[1] //Optional, if == null, won't display ban reason for banned player
api.BanAPI.banByGametag(gameTag, reason)
})
mc.regPlayerCmd('unban', 'unban player', function(player, args){
let gameTag = args[0] //You can use XUID as well
api.BanAPI.unbanByGametag(gameTag)
})
//This is your script
const api = require('./MixerAPI.js')
//MixerAPI is 100% compatible with LXL's JS API
mc.regPlayerCmd("get","Get XP",function(pl,args){
pl.tell(`You have: ${api.ExperienceAPI.get(pl)}XP`);
});