mirror of
https://github.com/ChipmunkMC/node-brigadier-commands.git
synced 2024-11-14 19:14:55 -05:00
17 lines
454 B
JavaScript
17 lines
454 B
JavaScript
const CommandSyntaxException = require('./CommandSyntaxException.js')
|
|
|
|
class DynamicCommandExceptionType {
|
|
constructor (_function) {
|
|
this.function = _function
|
|
}
|
|
|
|
create (...args) {
|
|
return new CommandSyntaxException(this, this.function(...args))
|
|
}
|
|
|
|
createWithContext (reader, ...args) {
|
|
return new CommandSyntaxException(this, this.function(...args), reader.string, reader.cursor)
|
|
}
|
|
}
|
|
|
|
module.exports = DynamicCommandExceptionType
|