Skip to content

Commit b08a464

Browse files
committed
test sifter
1 parent 13fbe6d commit b08a464

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { FormCancelationReason } from '@minecraft/server-ui';
22
import * as bricklib from './bricklib/index.js';
33
import * 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 */
77
const load = bricklib.plugin.loadPlugin;
88
load('gatepass');
9-
load('sift');
9+
load('sifter');
1010

1111

1212
const 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

0 commit comments

Comments
 (0)