diff options
Diffstat (limited to 'features/improvements/index.js')
-rw-r--r-- | features/improvements/index.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/features/improvements/index.js b/features/improvements/index.js new file mode 100644 index 0000000..4d003f3 --- /dev/null +++ b/features/improvements/index.js @@ -0,0 +1,36 @@ +/// <reference types="../../../CTAutocomplete" /> +/// <reference lib="es2015" /> +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()){ + cancel(event) + ChatLib.chat(color + "&m" + ChatLib.getChatBreak(" ") + "&r"); + } + }).trigger.triggerIfCanceled(false) + } + + + initVariables(){ + this.betterLineBreaks = undefined + } + + onDisable(){ + this.initVariables() + } +} + +module.exports = { + class: new Improvements() +}
\ No newline at end of file |