11package com .nxyi .addon .modules ;
22
33import com .nxyi .addon .Addon ;
4+ import com .nxyi .addon .Utils .JinxUtils ;
45import meteordevelopment .meteorclient .events .world .TickEvent ;
56import meteordevelopment .meteorclient .settings .*;
67import meteordevelopment .meteorclient .systems .modules .Module ;
8+ import meteordevelopment .meteorclient .utils .Utils ;
79import meteordevelopment .orbit .EventHandler ;
810
911public class SpamBypass extends Module {
1012
1113 private final SettingGroup sgGeneral = this .settings .getDefaultGroup ();
1214
13- private final Setting <String > bc = sgGeneral .add (new StringSetting .Builder ().name ("Command" ).description ("Bypass Command" ).defaultValue ("/skill" ).build ());
1415
1516 private final Setting <String > message = sgGeneral .add (new StringSetting .Builder ().name ("Message" ).description ("Message To Spam" ).defaultValue ("Jinx" ).build ());
1617
18+ private final Setting <Bypass > bypass = sgGeneral .add (new EnumSetting .Builder <Bypass >()
19+ .name ("bypass" )
20+ .description ("bypass" )
21+ .defaultValue (Bypass .Command )
22+ .build ()
23+ );
24+ private final Setting <String > bc = sgGeneral .add (new StringSetting .Builder ().name ("Command" ).description ("Bypass Command" ).defaultValue ("/skill" ).visible (() -> bypass .get ().equals (Bypass .Command )).build ());
25+
1726 private final Setting <Modes > mode = sgGeneral .add (new EnumSetting .Builder <Modes >()
1827 .name ("mode" )
1928 .description ("modes" )
@@ -57,7 +66,7 @@ private void onTick(TickEvent.Post event) {
5766
5867 case DelayPerTick -> {
5968 if (timer <= 0 ) {
60- mc .player .networkHandler .sendChatMessage (bc + " " + message );
69+ mc .player .networkHandler .sendChatMessage ((( bypass . get () == Bypass . Command ) ? bc . get () : "" ) + " " + message + ((( bypass . get () == Bypass . RndString ) ? " " + JinxUtils . randomString ( 4 ) : "" )) );
6170 timer = delay .get ();
6271 } else {
6372 timer --;
@@ -66,15 +75,19 @@ private void onTick(TickEvent.Post event) {
6675
6776 case AmountPerTick -> {
6877 for (int i = 0 ; i < amount .get (); i ++) {
69- mc .player .networkHandler .sendChatMessage (bc + " " + message );
78+ mc .player .networkHandler .sendChatMessage ((( bypass . get () == Bypass . Command ) ? bc . get () : "" ) + " " + message + ((( bypass . get () == Bypass . RndString ) ? " " + JinxUtils . randomString ( 4 ) : "" )) );
7079 }
7180 }
72-
7381 }
7482 }
7583
7684 public enum Modes {
7785 DelayPerTick ,
7886 AmountPerTick
7987 }
88+
89+ public enum Bypass {
90+ Command ,
91+ RndString
92+ }
8093}
0 commit comments