Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper /nldg confirmation #383

Merged
merged 10 commits into from
May 1, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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))
drekamor marked this conversation as resolved.
Show resolved Hide resolved
{
//check if they met the 15 second window
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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));
drekamor marked this conversation as resolved.
Show resolved Hide resolved
confirmDeleteGroup.put(uuid, groupDate);
return;
}
Expand Down
Loading