Skip to content

Commit

Permalink
Register all request handlers in ChallengesAddon (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Feb 22, 2019
1 parent dd1e689 commit 3f3cfd8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/world/bentobox/challenges/ChallengesAddon.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import world.bentobox.challenges.commands.ChallengesUserCommand;
import world.bentobox.challenges.commands.admin.Challenges;
import world.bentobox.challenges.commands.admin.ChallengesAdminCommand;
import world.bentobox.challenges.handlers.*;
import world.bentobox.challenges.listeners.ResetListener;
import world.bentobox.challenges.listeners.SaveListener;
import world.bentobox.level.Level;
Expand Down Expand Up @@ -170,6 +171,15 @@ public void onEnable() {
this.registerListener(new ResetListener(this));
// Register the autosave listener.
this.registerListener(new SaveListener(this));

// Register Request Handlers
this.registerRequestHandler(new ChallengeListRequestHandler(this));
this.registerRequestHandler(new LevelListRequestHandler(this));

this.registerRequestHandler(new ChallengeDataRequestHandler(this));
this.registerRequestHandler(new LevelDataRequestHandler(this));

this.registerRequestHandler(new CompletedChallengesRequestHandler(this));
} else {
this.logError("Challenges could not hook into AcidIsland or BSkyBlock so will not do anything!");
this.setState(State.DISABLED);
Expand Down

0 comments on commit 3f3cfd8

Please sign in to comment.