From 870bf6d232efa9d2b39be7518bb2d9ac12f58e42 Mon Sep 17 00:00:00 2001 From: BONNe Date: Fri, 18 Jan 2019 19:13:39 +0200 Subject: [PATCH] Implement ResetAllChallenges confirmation GUI to ListUsersGUI. --- .../java/world/bentobox/challenges/ChallengesManager.java | 5 +++++ .../bentobox/challenges/panel/admin/ListUsersGUI.java | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/challenges/ChallengesManager.java b/src/main/java/world/bentobox/challenges/ChallengesManager.java index e050e70..f61e0cd 100644 --- a/src/main/java/world/bentobox/challenges/ChallengesManager.java +++ b/src/main/java/world/bentobox/challenges/ChallengesManager.java @@ -539,4 +539,9 @@ public class ChallengesManager { { } + + public void resetAllChallenges(User uuid, World world) + { + + } } diff --git a/src/main/java/world/bentobox/challenges/panel/admin/ListUsersGUI.java b/src/main/java/world/bentobox/challenges/panel/admin/ListUsersGUI.java index c7304a6..fc4612c 100644 --- a/src/main/java/world/bentobox/challenges/panel/admin/ListUsersGUI.java +++ b/src/main/java/world/bentobox/challenges/panel/admin/ListUsersGUI.java @@ -15,6 +15,7 @@ import world.bentobox.bentobox.api.panels.builders.PanelItemBuilder; import world.bentobox.bentobox.api.user.User; import world.bentobox.challenges.ChallengesAddon; import world.bentobox.challenges.panel.CommonGUI; +import world.bentobox.challenges.panel.util.ConfirmationGUI; /** @@ -175,7 +176,12 @@ public class ListUsersGUI extends CommonGUI // TODO: Open Reset Challenge GUI. break; case RESET_ALL: - // TODO: Confirmation GUI for resetting all challenges. + new ConfirmationGUI(this.user, status -> { + if (status) + { + this.addon.getChallengesManager().resetAllChallenges(this.user, this.world); + } + }); break; }