Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { distanceToXpLevel, getXpLevel, getBaseXpFromLevel } = require('flying-squid').experience
module.exports.player = function (player, serv) {
player.xp = 0
player.displayXp = 0
player.xpLevel = 0
player.sendXp = () => {
player._client.write('experience', {
experienceBar: player.displayXp,
level: player.level,
totalExperience: player.xp
})
}
player.setXpLevel = (level) => {
player.xpLevel = level