v4.2.0-restore
This commit is contained in:
commit
66eef33e1e
171 changed files with 17637 additions and 0 deletions
CommandModules
17
CommandModules/command_error.js
Normal file
17
CommandModules/command_error.js
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue