Skip to content

Commit

Permalink
Fix issue when Import Default Challenges Button did not work
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed May 5, 2019
1 parent f18c8d0 commit d9486bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected enum CommonButtons

protected static final String IMPORT = "import";

protected static final String DEFAULT = "default";
protected static final String DEFAULT = "defaults";

protected static final String GENERATE = "generate";

Expand Down
13 changes: 3 additions & 10 deletions src/main/java/world/bentobox/challenges/panel/admin/AdminGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -384,16 +384,9 @@ private PanelItem createButton(Button button)
description = this.user.getTranslation("challenges.gui.descriptions.admin.default-import");
icon = new ItemStack(Material.HOPPER);
clickHandler = (panel, user, clickType, slot) -> {
if (clickType.isRightClick())
{
this.overwriteMode = !this.overwriteMode;
this.build();
}
else
{
// Run import command.
this.user.performCommand(this.topLabel + " " + CHALLENGES + " " + DEFAULT + " " + IMPORT);
}
// Run import command.
this.user.performCommand(this.topLabel + " " + CHALLENGES + " " + DEFAULT + " " + IMPORT);

return true;
};
glow = false;
Expand Down

0 comments on commit d9486bb

Please sign in to comment.