File tree Expand file tree Collapse file tree 3 files changed +82
-5
lines changed
src/main/java/dev/journey/PathSeeker Expand file tree Collapse file tree 3 files changed +82
-5
lines changed Original file line number Diff line number Diff line change 11package dev .journey .PathSeeker ;
22
3- import dev .journey .PathSeeker .commands .GarbageCleanerCommand ;
4- import dev .journey .PathSeeker .commands .Stats2b2t ;
5- import dev .journey .PathSeeker .commands .ViewNbtCommand ;
6- import dev .journey .PathSeeker .commands .WorldInfoCommand ;
3+ import dev .journey .PathSeeker .commands .*;
74import dev .journey .PathSeeker .modules .automation .StorageLooter ;
85import dev .journey .PathSeeker .modules .exploration .*;
96import dev .journey .PathSeeker .modules .render .*;
@@ -48,9 +45,11 @@ public void onInitialize() {
4845 Modules .get ().add (new DroppedItemESP ());
4946 Modules .get ().add (new EntityClusterESP ());
5047 //Modules.get().add(new ChestIndex());
51-
48+
5249 //Commands
5350
51+ Commands .add (new MeteorFolderCommand ());
52+ Commands .add (new ScreenshotFolderCommand ());
5453 Commands .add (new Stats2b2t ());
5554 Commands .add (new ViewNbtCommand ());
5655 Commands .add (new GarbageCleanerCommand ());
Original file line number Diff line number Diff line change 1+ package dev .journey .PathSeeker .commands ;
2+
3+ import com .mojang .brigadier .builder .LiteralArgumentBuilder ;
4+ import meteordevelopment .meteorclient .commands .Command ;
5+ import meteordevelopment .meteorclient .utils .player .ChatUtils ;
6+ import net .minecraft .client .MinecraftClient ;
7+ import net .minecraft .command .CommandSource ;
8+ import net .minecraft .text .Text ;
9+
10+ import java .awt .*;
11+ import java .io .File ;
12+ import java .io .IOException ;
13+
14+ public class MeteorFolderCommand extends Command {
15+ public MeteorFolderCommand () {
16+ super ("meteorfolder" , "Opens the meteor folder." );
17+ }
18+
19+ @ Override
20+ public void build (LiteralArgumentBuilder <CommandSource > builder ) {
21+ builder .executes (context -> {
22+ {
23+ ChatUtils .sendMsg (Text .of ("Opening meteor folder." ));
24+ }
25+ File meteor = new File (MinecraftClient .getInstance ().runDirectory , "meteor-client" );
26+ if (Desktop .isDesktopSupported ()) {
27+ try {
28+ Desktop .getDesktop ().open (meteor );
29+ } catch (IOException e ) {
30+ throw new RuntimeException (e );
31+ }
32+ } else {
33+ // Fallback or error handling
34+ ChatUtils .sendMsg (Text .of ("Desktop API not supported on this system." ));
35+ }
36+ return SINGLE_SUCCESS ;
37+ });
38+ }
39+ }
Original file line number Diff line number Diff line change 1+ package dev .journey .PathSeeker .commands ;
2+
3+ import com .mojang .brigadier .builder .LiteralArgumentBuilder ;
4+ import meteordevelopment .meteorclient .commands .Command ;
5+ import meteordevelopment .meteorclient .utils .player .ChatUtils ;
6+ import net .minecraft .client .MinecraftClient ;
7+ import net .minecraft .command .CommandSource ;
8+ import net .minecraft .text .Text ;
9+
10+ import java .awt .*;
11+ import java .io .File ;
12+ import java .io .IOException ;
13+
14+ public class ScreenshotFolderCommand extends Command {
15+ public ScreenshotFolderCommand () {
16+ super ("screenshotfolder" , "Opens the screenshot folder." );
17+ }
18+
19+ @ Override
20+ public void build (LiteralArgumentBuilder <CommandSource > builder ) {
21+ builder .executes (context -> {
22+ {
23+ ChatUtils .sendMsg (Text .of ("Opening screenshot folder." ));
24+ }
25+ File screenshots = new File (MinecraftClient .getInstance ().runDirectory , "screenshots" );
26+ if (Desktop .isDesktopSupported ()) {
27+ try {
28+ Desktop .getDesktop ().open (screenshots );
29+ } catch (IOException e ) {
30+ throw new RuntimeException (e );
31+ }
32+ } else {
33+ // Fallback or error handling
34+ ChatUtils .sendMsg (Text .of ("Desktop API not supported on this system." ));
35+ }
36+ return SINGLE_SUCCESS ;
37+ });
38+ }
39+ }
You can’t perform that action at this time.
0 commit comments