This commit is contained in:
Parker2991
2025-01-07 06:50:27 -06:00
commit 1e9fb94e1d
90 changed files with 13082 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
// TODO: Improve how messages are stringified
const ChatMessage = require('prismarine-chat')('1.20.1')
const stringify = message => new ChatMessage(message).toString()
class CommandError extends Error {
constructor (message, filename, lineError) {
super(stringify(message), filename, lineError)
this.name = 'CommandError'
this._message = message
}
get message () {
return stringify(this._message)
}
}
module.exports = CommandError