File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717### [ Timers Module] ( ./timers )
1818
19- ### [ mojang-net-auth] ( ./mojang-net-auth/ )
19+ ### [ mojang-net-auth] ( ./mojang-net-auth/ )
20+
21+ ### [ Command Handler] ( ./commandHandler.js )
22+
23+ ### [ Compass Prompt] ( ./compass-prompt.js )
24+
25+ ### [ /help] ( ./help_command.js )
Original file line number Diff line number Diff line change 1+ import { world } from "mojang-minecraft" ;
2+
3+ export default function ( ) {
4+ let response = "" ;
5+ let prev = "" ;
6+ for ( let index = 1 ; index <= 26 ; index ++ ) {
7+ let help = world . getDimension ( "overworld" ) . runCommand ( `help ${ index } ` ) ;
8+ let messages = help . statusMessage . split ( "\n" ) . filter ( msg => msg . startsWith ( "/" ) ) ;
9+
10+ for ( const iterator of messages ) {
11+ const command = iterator . split ( " " ) [ 0 ] . replace ( '/' , '' ) ;
12+ if ( command === prev ) continue ;
13+ let message = world . getDimension ( "overworld" ) . runCommand ( "help " + command ) . statusMessage ;
14+ response += message + "\n\n" ;
15+ prev = command ;
16+ }
17+ } ;
18+
19+ console . warn ( response . replace ( / § [ a b c d e f g k l 0 1 2 3 4 5 6 7 8 9 ] / g, '' ) ) ;
20+ return response ;
21+ } ;
You can’t perform that action at this time.
0 commit comments