File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 11import { FormCancelationReason } from '@minecraft/server-ui' ;
22import * as bricklib from './bricklib/index.js' ;
33import * as gatepass from './gatepass/index.js' ;
4- import * as sift from './sift /index.js' ;
4+ import * as sifter from './sifter /index.js' ;
55
66/* load plugins */
77const load = bricklib . plugin . loadPlugin ;
88load ( 'gatepass' ) ;
9- load ( 'sift ' ) ;
9+ load ( 'sifter ' ) ;
1010
1111
1212const mgr = new bricklib . command . CommandManager ( ) ;
@@ -26,16 +26,16 @@ const def = {
2626 args : [
2727 {
2828 id : 'text' ,
29- type : sift . parsers . variadic ( sift . parsers . string ( ) ) ,
29+ type : sifter . restType ( sifter . stringType ( ) ) ,
3030 }
3131 ]
3232} ;
3333
34- mgr . registerCommand ( ... sift . makeCommand ( def , ( args , src ) => {
34+ sifter . registerCommand ( mgr , def , ( args , src ) => {
3535 gatepass . assertPermission ( 'chat.echo' , src ) ;
36- src . sendMessage ( args . text . join ( ' ' ) ) ;
36+ src . sendMessage ( args . get ( ' text' ) ? .join ( ' ' ) ) ;
3737 return 0 ;
38- } ) ) ;
38+ } ) ;
3939
4040
4141
You can’t perform that action at this time.
0 commit comments