Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 3e1eb50

Browse files
committed
freelook disabler
1 parent 811c34d commit 3e1eb50

File tree

1 file changed

+20
-0
lines changed
  • src/main/java/io/github/axolotlclient/modules/freelook

1 file changed

+20
-0
lines changed

src/main/java/io/github/axolotlclient/modules/freelook/Freelook.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import io.github.axolotlclient.AxolotlClient;
44
import io.github.axolotlclient.config.options.BooleanOption;
5+
import io.github.axolotlclient.config.options.DisableReason;
56
import io.github.axolotlclient.config.options.EnumOption;
67
import io.github.axolotlclient.config.options.OptionCategory;
78
import 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
}

0 commit comments

Comments
 (0)