Fix issue when Import Default Challenges Button did not work
This commit is contained in:
parent
f18c8d0dff
commit
d9486bbbdb
|
@ -102,7 +102,7 @@ public abstract class CommonGUI
|
||||||
|
|
||||||
protected static final String IMPORT = "import";
|
protected static final String IMPORT = "import";
|
||||||
|
|
||||||
protected static final String DEFAULT = "default";
|
protected static final String DEFAULT = "defaults";
|
||||||
|
|
||||||
protected static final String GENERATE = "generate";
|
protected static final String GENERATE = "generate";
|
||||||
|
|
||||||
|
|
|
@ -384,16 +384,9 @@ public class AdminGUI extends CommonGUI
|
||||||
description = this.user.getTranslation("challenges.gui.descriptions.admin.default-import");
|
description = this.user.getTranslation("challenges.gui.descriptions.admin.default-import");
|
||||||
icon = new ItemStack(Material.HOPPER);
|
icon = new ItemStack(Material.HOPPER);
|
||||||
clickHandler = (panel, user, clickType, slot) -> {
|
clickHandler = (panel, user, clickType, slot) -> {
|
||||||
if (clickType.isRightClick())
|
// Run import command.
|
||||||
{
|
this.user.performCommand(this.topLabel + " " + CHALLENGES + " " + DEFAULT + " " + IMPORT);
|
||||||
this.overwriteMode = !this.overwriteMode;
|
|
||||||
this.build();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Run import command.
|
|
||||||
this.user.performCommand(this.topLabel + " " + CHALLENGES + " " + DEFAULT + " " + IMPORT);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
glow = false;
|
glow = false;
|
||||||
|
|
Loading…
Reference in New Issue