This repository was archived by the owner on Nov 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/main/java/io/github/axolotlclient/modules/freelook Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 22
33import io .github .axolotlclient .AxolotlClient ;
44import io .github .axolotlclient .config .options .BooleanOption ;
5+ import io .github .axolotlclient .config .options .DisableReason ;
56import io .github .axolotlclient .config .options .EnumOption ;
67import io .github .axolotlclient .config .options .OptionCategory ;
78import io .github .axolotlclient .modules .AbstractModule ;
@@ -41,6 +42,12 @@ public void init() {
4142 @ Override
4243 public void tick () {
4344
45+ if (isForbidden ()){
46+ enabled .setForceOff (true , DisableReason .BAN_REASON );
47+ } else if (!isForbidden () && enabled .getForceDisabled ()){
48+ enabled .setForceOff (false , null );
49+ }
50+
4451 if (!enabled .get ()) return ;
4552
4653 if (KEY .isPressed ()) {
@@ -106,7 +113,20 @@ public float pitch(float defaultValue) {
106113
107114 private void setPerspective (Perspective perspective ){
108115 MinecraftClient .getInstance ().options .method_31043 (perspective );
116+ }
109117
118+ private boolean isForbidden (){
119+ for (String a : disallowed_servers ){
120+ if (MinecraftClient .getInstance ().getCurrentServerEntry () != null &&
121+ MinecraftClient .getInstance ().getCurrentServerEntry ().address .contains (a )){
122+ return true ;
123+ }
124+ }
125+ return false ;
110126 }
111127
128+ private static final String [] disallowed_servers = new String []{
129+ "hypixel" , "mineplex" , "gommehd"
130+ };
131+
112132}
You can’t perform that action at this time.
0 commit comments