Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
deez
Browse files Browse the repository at this point in the history
  • Loading branch information
Gav06 committed Oct 9, 2021
1 parent 61736e4 commit df7f986
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions src/main/java/dev/moonlight/module/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 57,14 @@ public String getDesc() {
public void enable() {
enabled = true;
MinecraftForge.EVENT_BUS.register(this);
ModuleEnableEvent moduleEnableEvent = new ModuleEnableEvent(name);
MinecraftForge.EVENT_BUS.post(moduleEnableEvent);
MinecraftForge.EVENT_BUS.post(new ModuleEnableEvent(name));
onEnable();
}

public void disable() {
enabled = false;
MinecraftForge.EVENT_BUS.unregister(this);
ModuleDisableEvent moduleDisableEvent = new ModuleDisableEvent(name);
MinecraftForge.EVENT_BUS.post(moduleDisableEvent);
MinecraftForge.EVENT_BUS.post(new ModuleDisableEvent(name));
onDisable();
}

Expand Down Expand Up @@ -136,17 134,17 @@ public enum Category {

boolean enabled() default false;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Module module = (Module) o;
return enabled == module.enabled && name.equals(module.name) && category == module.category && desc.equals(module.desc);
}

@Override
public int hashCode() {
return Objects.hash(name, category, desc, enabled, getBind());
}
//
// @Override
// public boolean equals(Object o) {
// if (this == o) return true;
// if (o == null || getClass() != o.getClass()) return false;
// Module module = (Module) o;
// return enabled == module.enabled && name.equals(module.name) && category == module.category && desc.equals(module.desc);
// }
//
// @Override
// public int hashCode() {
// return Objects.hash(name, category, desc, enabled, getBind());
// }
}

0 comments on commit df7f986

Please sign in to comment.