Add a toggleKey method
This commit is contained in:
parent
86bc75991a
commit
7821cf311e
@ -34,6 +34,14 @@ public abstract class Module {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void toggleKey() {
|
||||
if (key != null) {
|
||||
if (key.wasPressed()) {
|
||||
this.setState(!this.isState());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isState() {
|
||||
return state;
|
||||
}
|
||||
|
@ -17,9 +17,7 @@ public class Fullbright extends Module {
|
||||
|
||||
@Override
|
||||
public void onTick(MinecraftClient client) {
|
||||
if (key.wasPressed()) {
|
||||
this.setState(!this.isState());
|
||||
}
|
||||
this.toggleKey();
|
||||
|
||||
if (this.isState()) {
|
||||
c0deFoxModClient.LOGGER.warn("Active State");
|
||||
|
Loading…
Reference in New Issue
Block a user