From 5232882778dd0ee645f60f556db593811a1f8b1a Mon Sep 17 00:00:00 2001 From: drekamor Date: Thu, 21 Mar 2024 23:34:30 +0000 Subject: [PATCH 1/9] Proper /nldg confirmation --- .../civcraft/mc/namelayer/command/commands/DeleteGroup.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java index 1505b4c7d1..d971e40ac4 100644 --- a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java +++ b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java @@ -28,7 +28,7 @@ public void execute(Player sender, String groupName) { Player p = (Player) sender; UUID uuid = NameAPI.getUUID(p.getName()); String x = groupName; - String confirm = "CONFIRM"; + String confirm = "CONFIRM DELETION"; if(x.equals(confirm)) { //check if they met the 15 second window @@ -56,7 +56,7 @@ public void execute(Player sender, String groupName) { return; } else{ - p.sendMessage(ChatColor.RED + "You did not do /nldg CONFIRM fast enough, you will need to start over"); + p.sendMessage(ChatColor.RED + "You did not do /nldg %s fast enough, you will need to start over".formatted(confirm)); confirmDeleteGroup.remove(uuid); return; } @@ -85,7 +85,7 @@ public void execute(Player sender, String groupName) { Date date = new Date(); Long dateString = date.getTime(); String[] groupDate = new String[] {g.getName(), dateString.toString()}; - p.sendMessage(ChatColor.GREEN + "To confirm deletion of group: " + g.getName() + "\nuse /nldg CONFIRM within 15 seconds"); + p.sendMessage(ChatColor.RED + "To confirm deletion of group: %s\nuse /nldg %s within 15 seconds".formatted(g.getName(), confirm)); confirmDeleteGroup.put(uuid, groupDate); return; } From d984bf0a9cac25df788a746fe78d183bb1a067d7 Mon Sep 17 00:00:00 2001 From: drekamor Date: Thu, 21 Mar 2024 23:36:55 +0000 Subject: [PATCH 2/9] remove space in confirm string --- .../vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java index d971e40ac4..175ab18577 100644 --- a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java +++ b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java @@ -28,7 +28,7 @@ public void execute(Player sender, String groupName) { Player p = (Player) sender; UUID uuid = NameAPI.getUUID(p.getName()); String x = groupName; - String confirm = "CONFIRM DELETION"; + String confirm = "CONFIRM_DELETION"; if(x.equals(confirm)) { //check if they met the 15 second window From f79e3d08cc2b82784e99e612efa87800724b67ee Mon Sep 17 00:00:00 2001 From: drekamor Date: Thu, 21 Mar 2024 23:58:11 +0000 Subject: [PATCH 3/9] Foolproof --- .../command/commands/DeleteGroup.java | 54 ++++++++++--------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java index 175ab18577..43ccd1c485 100644 --- a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java +++ b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java @@ -29,36 +29,40 @@ public void execute(Player sender, String groupName) { UUID uuid = NameAPI.getUUID(p.getName()); String x = groupName; String confirm = "CONFIRM_DELETION"; - if(x.equals(confirm)) + if(x.contains(confirm)) { //check if they met the 15 second window if(confirmDeleteGroup.containsKey(uuid)){ //user is in the hashmap String[] entry = confirmDeleteGroup.get(uuid); Group gD = gm.getGroup(entry[0]); - //player could have lost delete permission in the mean time - if (!NameAPI.getGroupManager().hasAccess(gD, uuid, PermissionType.getPermission("DELETE"))){ - p.sendMessage(ChatColor.RED + "You do not have permission to run that command."); - return; - } - Date now = new Date(System.currentTimeMillis() - 15000); - //if it has been less than 15 seconds - if(now.getTime() < Long.parseLong(entry[1])) - { - //good to go delete the group - if(gm.deleteGroup(gD.getName())) - p.sendMessage(ChatColor.GREEN + "Group was successfully deleted."); - else - p.sendMessage(ChatColor.GREEN + "Group is now disciplined." - + " Check back later to see if group is deleted."); - - confirmDeleteGroup.remove(uuid); - return; - } - else{ - p.sendMessage(ChatColor.RED + "You did not do /nldg %s fast enough, you will need to start over".formatted(confirm)); - confirmDeleteGroup.remove(uuid); - return; + + if(x.equals("%s_%s".formatted(confirm, gD.getName()))) { + + //player could have lost delete permission in the mean time + if (!NameAPI.getGroupManager().hasAccess(gD, uuid, PermissionType.getPermission("DELETE"))){ + p.sendMessage(ChatColor.RED + "You do not have permission to run that command."); + return; + } + Date now = new Date(System.currentTimeMillis() - 15000); + //if it has been less than 15 seconds + if(now.getTime() < Long.parseLong(entry[1])) + { + //good to go delete the group + if(gm.deleteGroup(gD.getName())) + p.sendMessage(ChatColor.GREEN + "Group was successfully deleted."); + else + p.sendMessage(ChatColor.GREEN + "Group is now disciplined." + + " Check back later to see if group is deleted."); + + confirmDeleteGroup.remove(uuid); + return; + } + else{ + p.sendMessage(ChatColor.RED + "You did not do /nldg %s fast enough, you will need to start over".formatted(confirm)); + confirmDeleteGroup.remove(uuid); + return; + } } } @@ -85,7 +89,7 @@ public void execute(Player sender, String groupName) { Date date = new Date(); Long dateString = date.getTime(); String[] groupDate = new String[] {g.getName(), dateString.toString()}; - p.sendMessage(ChatColor.RED + "To confirm deletion of group: %s\nuse /nldg %s within 15 seconds".formatted(g.getName(), confirm)); + p.sendMessage(ChatColor.RED + "To confirm the IRREVERSIBLE deletion of the group '%s' along with ALL reinforcements, bastions and snitches on it:\nType /nldg %s_%s within 15 seconds.".formatted(g.getName(), confirm, g.getName())); confirmDeleteGroup.put(uuid, groupDate); return; } From 30ff1d2adab937837c05e2e7b73aae9648c93015 Mon Sep 17 00:00:00 2001 From: drekamor Date: Fri, 22 Mar 2024 00:12:36 +0000 Subject: [PATCH 4/9] Use text components --- .../command/commands/DeleteGroup.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java index 43ccd1c485..a9bd908b79 100644 --- a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java +++ b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java @@ -8,6 +8,9 @@ import java.util.HashMap; import java.util.Map; import java.util.UUID; + +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.TextColor; import org.bukkit.ChatColor; import org.bukkit.entity.Player; import vg.civcraft.mc.namelayer.GroupManager.PlayerType; @@ -41,7 +44,7 @@ public void execute(Player sender, String groupName) { //player could have lost delete permission in the mean time if (!NameAPI.getGroupManager().hasAccess(gD, uuid, PermissionType.getPermission("DELETE"))){ - p.sendMessage(ChatColor.RED + "You do not have permission to run that command."); + p.sendMessage(Component.text("You do not have permission to run that command.").color(TextColor.color(255, 0, 0))); return; } Date now = new Date(System.currentTimeMillis() - 15000); @@ -50,16 +53,15 @@ public void execute(Player sender, String groupName) { { //good to go delete the group if(gm.deleteGroup(gD.getName())) - p.sendMessage(ChatColor.GREEN + "Group was successfully deleted."); + p.sendMessage(Component.text("Group was successfully deleted.").color(TextColor.color(0, 255, 0))); else - p.sendMessage(ChatColor.GREEN + "Group is now disciplined." - + " Check back later to see if group is deleted."); + p.sendMessage(Component.text("Group is now disciplined. Check back later to see if group is deleted.").color(TextColor.color(0, 255, 0))); confirmDeleteGroup.remove(uuid); return; } else{ - p.sendMessage(ChatColor.RED + "You did not do /nldg %s fast enough, you will need to start over".formatted(confirm)); + p.sendMessage(Component.text("You did not do /nldg %s fast enough, you will need to start over".formatted(confirm)).color(TextColor.color(255, 0, 0))); confirmDeleteGroup.remove(uuid); return; } @@ -73,23 +75,23 @@ public void execute(Player sender, String groupName) { return; } if (!NameAPI.getGroupManager().hasAccess(g, uuid, PermissionType.getPermission("DELETE"))){ - p.sendMessage(ChatColor.RED + "You do not have permission to run that command."); + p.sendMessage(Component.text("You do not have permission to run that command.").color(TextColor.color(255, 0, 0))); return; } PlayerType pType = g.getPlayerType(uuid); if (pType == null && !p.hasPermission("namelayer.admin")){ - p.sendMessage(ChatColor.RED + "You are not on that group."); + p.sendMessage(Component.text("You are not on that group.").color(TextColor.color(255, 0, 0))); return; } if (g.isDisciplined() && !p.hasPermission("namelayer.admin")){ - p.sendMessage(ChatColor.RED + "Group is disiplined."); + p.sendMessage(Component.text("Group is disiplined.").color(TextColor.color(255, 0, 0))); return; } //set that user can confirm group in 15 seconds Date date = new Date(); Long dateString = date.getTime(); String[] groupDate = new String[] {g.getName(), dateString.toString()}; - p.sendMessage(ChatColor.RED + "To confirm the IRREVERSIBLE deletion of the group '%s' along with ALL reinforcements, bastions and snitches on it:\nType /nldg %s_%s within 15 seconds.".formatted(g.getName(), confirm, g.getName())); + p.sendMessage(Component.text("To confirm the IRREVERSIBLE deletion of the group '%s' along with ALL reinforcements, bastions and snitches on it:\nType /nldg %s_%s within 15 seconds.".formatted(g.getName(), confirm, g.getName())).color(TextColor.color(255, 0, 0))); confirmDeleteGroup.put(uuid, groupDate); return; } From e9eda48b1a502694b88289819c48f53fccb2974d Mon Sep 17 00:00:00 2001 From: drekamor Date: Fri, 22 Mar 2024 00:15:08 +0000 Subject: [PATCH 5/9] Allow lower case --- .../civcraft/mc/namelayer/command/commands/DeleteGroup.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java index a9bd908b79..f46083acb7 100644 --- a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java +++ b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java @@ -32,7 +32,7 @@ public void execute(Player sender, String groupName) { UUID uuid = NameAPI.getUUID(p.getName()); String x = groupName; String confirm = "CONFIRM_DELETION"; - if(x.contains(confirm)) + if(x.toLowerCase().contains(confirm.toLowerCase())) { //check if they met the 15 second window if(confirmDeleteGroup.containsKey(uuid)){ @@ -40,7 +40,7 @@ public void execute(Player sender, String groupName) { String[] entry = confirmDeleteGroup.get(uuid); Group gD = gm.getGroup(entry[0]); - if(x.equals("%s_%s".formatted(confirm, gD.getName()))) { + if(x.equalsIgnoreCase("%s_%s".formatted(confirm, gD.getName()))) { //player could have lost delete permission in the mean time if (!NameAPI.getGroupManager().hasAccess(gD, uuid, PermissionType.getPermission("DELETE"))){ From 912652d55cfbbb97eb0d14a27dc2e7eb35505034 Mon Sep 17 00:00:00 2001 From: drekamor Date: Fri, 22 Mar 2024 00:20:06 +0000 Subject: [PATCH 6/9] Small fixes --- .../namelayer/command/commands/DeleteGroup.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java index f46083acb7..6d1a9d2ff1 100644 --- a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java +++ b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java @@ -10,6 +10,7 @@ import java.util.UUID; import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.format.TextColor; import org.bukkit.ChatColor; import org.bukkit.entity.Player; @@ -44,7 +45,7 @@ public void execute(Player sender, String groupName) { //player could have lost delete permission in the mean time if (!NameAPI.getGroupManager().hasAccess(gD, uuid, PermissionType.getPermission("DELETE"))){ - p.sendMessage(Component.text("You do not have permission to run that command.").color(TextColor.color(255, 0, 0))); + p.sendMessage(Component.text("You do not have permission to run that command.").color(NamedTextColor.RED)); return; } Date now = new Date(System.currentTimeMillis() - 15000); @@ -53,15 +54,15 @@ public void execute(Player sender, String groupName) { { //good to go delete the group if(gm.deleteGroup(gD.getName())) - p.sendMessage(Component.text("Group was successfully deleted.").color(TextColor.color(0, 255, 0))); + p.sendMessage(Component.text("Group was successfully deleted.").color(NamedTextColor.GREEN)); else - p.sendMessage(Component.text("Group is now disciplined. Check back later to see if group is deleted.").color(TextColor.color(0, 255, 0))); + p.sendMessage(Component.text("Group is now disciplined. Check back later to see if group is deleted.").color(NamedTextColor.GREEN)); confirmDeleteGroup.remove(uuid); return; } else{ - p.sendMessage(Component.text("You did not do /nldg %s fast enough, you will need to start over".formatted(confirm)).color(TextColor.color(255, 0, 0))); + p.sendMessage(Component.text("You did not do /nldg %s_%s fast enough, you will need to start over".formatted(confirm, gD.getName())).color(NamedTextColor.RED)); confirmDeleteGroup.remove(uuid); return; } @@ -75,23 +76,23 @@ public void execute(Player sender, String groupName) { return; } if (!NameAPI.getGroupManager().hasAccess(g, uuid, PermissionType.getPermission("DELETE"))){ - p.sendMessage(Component.text("You do not have permission to run that command.").color(TextColor.color(255, 0, 0))); + p.sendMessage(Component.text("You do not have permission to run that command.").color(NamedTextColor.RED)); return; } PlayerType pType = g.getPlayerType(uuid); if (pType == null && !p.hasPermission("namelayer.admin")){ - p.sendMessage(Component.text("You are not on that group.").color(TextColor.color(255, 0, 0))); + p.sendMessage(Component.text("You are not on that group.").color(NamedTextColor.RED)); return; } if (g.isDisciplined() && !p.hasPermission("namelayer.admin")){ - p.sendMessage(Component.text("Group is disiplined.").color(TextColor.color(255, 0, 0))); + p.sendMessage(Component.text("Group is disiplined.").color(NamedTextColor.RED)); return; } //set that user can confirm group in 15 seconds Date date = new Date(); Long dateString = date.getTime(); String[] groupDate = new String[] {g.getName(), dateString.toString()}; - p.sendMessage(Component.text("To confirm the IRREVERSIBLE deletion of the group '%s' along with ALL reinforcements, bastions and snitches on it:\nType /nldg %s_%s within 15 seconds.".formatted(g.getName(), confirm, g.getName())).color(TextColor.color(255, 0, 0))); + p.sendMessage(Component.text("To confirm the IRREVERSIBLE deletion of the group '%s' along with ALL reinforcements, bastions and snitches on it:\nType /nldg %s_%s within 15 seconds.".formatted(g.getName(), confirm, g.getName())).color(NamedTextColor.RED)); confirmDeleteGroup.put(uuid, groupDate); return; } From a5ae34f3e7d03abac71edd83751965b3e026f13f Mon Sep 17 00:00:00 2001 From: drekamor Date: Fri, 22 Mar 2024 00:23:43 +0000 Subject: [PATCH 7/9] Remove unused imports --- .../vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java index 6d1a9d2ff1..f2580338a7 100644 --- a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java +++ b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java @@ -11,8 +11,6 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; -import net.kyori.adventure.text.format.TextColor; -import org.bukkit.ChatColor; import org.bukkit.entity.Player; import vg.civcraft.mc.namelayer.GroupManager.PlayerType; import vg.civcraft.mc.namelayer.NameAPI; From a56fd1d2fb42c2855343b57acf5ff9917f7e0d2b Mon Sep 17 00:00:00 2001 From: drekamor Date: Fri, 22 Mar 2024 17:16:38 +0000 Subject: [PATCH 8/9] Remove underscores --- .../mc/namelayer/command/commands/DeleteGroup.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java index f2580338a7..fa60c07d95 100644 --- a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java +++ b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java @@ -30,7 +30,7 @@ public void execute(Player sender, String groupName) { Player p = (Player) sender; UUID uuid = NameAPI.getUUID(p.getName()); String x = groupName; - String confirm = "CONFIRM_DELETION"; + String confirm = "CONFIRM DELETION"; if(x.toLowerCase().contains(confirm.toLowerCase())) { //check if they met the 15 second window @@ -39,7 +39,7 @@ public void execute(Player sender, String groupName) { String[] entry = confirmDeleteGroup.get(uuid); Group gD = gm.getGroup(entry[0]); - if(x.equalsIgnoreCase("%s_%s".formatted(confirm, gD.getName()))) { + if(x.equalsIgnoreCase("%s %s".formatted(confirm, gD.getName()))) { //player could have lost delete permission in the mean time if (!NameAPI.getGroupManager().hasAccess(gD, uuid, PermissionType.getPermission("DELETE"))){ @@ -60,7 +60,7 @@ public void execute(Player sender, String groupName) { return; } else{ - p.sendMessage(Component.text("You did not do /nldg %s_%s fast enough, you will need to start over".formatted(confirm, gD.getName())).color(NamedTextColor.RED)); + p.sendMessage(Component.text("You did not do /nldg %s %s fast enough, you will need to start over".formatted(confirm, gD.getName())).color(NamedTextColor.RED)); confirmDeleteGroup.remove(uuid); return; } @@ -90,7 +90,7 @@ public void execute(Player sender, String groupName) { Date date = new Date(); Long dateString = date.getTime(); String[] groupDate = new String[] {g.getName(), dateString.toString()}; - p.sendMessage(Component.text("To confirm the IRREVERSIBLE deletion of the group '%s' along with ALL reinforcements, bastions and snitches on it:\nType /nldg %s_%s within 15 seconds.".formatted(g.getName(), confirm, g.getName())).color(NamedTextColor.RED)); + p.sendMessage(Component.text("To confirm the IRREVERSIBLE deletion of the group '%s' along with ALL reinforcements, bastions and snitches on it:\nType /nldg %s %s within 15 seconds.".formatted(g.getName(), confirm, g.getName())).color(NamedTextColor.RED)); confirmDeleteGroup.put(uuid, groupDate); return; } From e8e3a35ebedd5e58b703ddf0faea2520c6198486 Mon Sep 17 00:00:00 2001 From: drekamor Date: Fri, 22 Mar 2024 22:00:04 +0000 Subject: [PATCH 9/9] Add quotes --- .../civcraft/mc/namelayer/command/commands/DeleteGroup.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java index fa60c07d95..22598b7ab9 100644 --- a/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java +++ b/plugins/namelayer-paper/src/main/java/vg/civcraft/mc/namelayer/command/commands/DeleteGroup.java @@ -60,7 +60,7 @@ public void execute(Player sender, String groupName) { return; } else{ - p.sendMessage(Component.text("You did not do /nldg %s %s fast enough, you will need to start over".formatted(confirm, gD.getName())).color(NamedTextColor.RED)); + p.sendMessage(Component.text("You did not do '/nldg %s %s' fast enough, you will need to start over".formatted(confirm, gD.getName())).color(NamedTextColor.RED)); confirmDeleteGroup.remove(uuid); return; } @@ -90,7 +90,7 @@ public void execute(Player sender, String groupName) { Date date = new Date(); Long dateString = date.getTime(); String[] groupDate = new String[] {g.getName(), dateString.toString()}; - p.sendMessage(Component.text("To confirm the IRREVERSIBLE deletion of the group '%s' along with ALL reinforcements, bastions and snitches on it:\nType /nldg %s %s within 15 seconds.".formatted(g.getName(), confirm, g.getName())).color(NamedTextColor.RED)); + p.sendMessage(Component.text("To confirm the IRREVERSIBLE deletion of the group '%s' along with ALL reinforcements, bastions and snitches on it:\nType '/nldg %s %s' within 15 seconds.".formatted(g.getName(), confirm, g.getName())).color(NamedTextColor.RED)); confirmDeleteGroup.put(uuid, groupDate); return; }