/// /// import Feature from "../../featureClass/class"; import ToggleSetting from "../settings/settingThings/toggle"; class Improvements extends Feature { constructor() { super() } onEnable(){ this.initVariables() this.betterLineBreaks = new ToggleSetting("Better line breaks", "Changes all dashed lines (-------) in chat into solid lines", true, "better_line_breaks", this) this.registerChat("${color}-----------------------------------------------------&r", (color, event)=>{ if(this.betterLineBreaks.getValue()){ if(color.length > 6) return cancel(event) ChatLib.chat(color + "&m" + ChatLib.getChatBreak(" ") + "&r"); } }).trigger.triggerIfCanceled(false) this.registerCommand("warp", (...args)=>{ if(args[0] === "dung") args[0] = "dungeon_hub" ChatLib.command("warp " + args.join(" ")) }) this.registerCommand("dung", (...args)=>{ ChatLib.command("warp dungeon_hub") }) } initVariables(){ this.betterLineBreaks = undefined } onDisable(){ this.initVariables() } } module.exports = { class: new Improvements() }