This commit is contained in:
Telesphoreo 2024-05-26 16:50:15 -05:00
parent a60338e316
commit 49b1a18d43
3 changed files with 13 additions and 2 deletions

View File

@ -31,6 +31,12 @@ public class ReportCommand extends MedinaCommand
Player player = getNonNullPlayer(args[0]);
if (player.getName().equalsIgnoreCase(sender.getName()))
{
send(sender, messageComponent("cantReportYourself"));
return null;
}
String reason = StringUtils.join(args, " ", 1, args.length);
Report report = new Report(

View File

@ -75,8 +75,11 @@ public class ReportsCommand extends MedinaCommand
return null;
}
default:
{
return usage();
}
}
return null;
}
private void readReports(@NotNull CommandSender sender, OfflinePlayer player, List<Report> reports)

View File

@ -42,4 +42,6 @@ reportDoesntExist: "<red>There is no report with this ID belonging to that playe
# 0 - The person who initiated the report
# 1 - The person being reported
# 2 - The reason for the report
notifyReport: "<dark_gray>[<yellow>REPORT<dark_gray>] <gold>{0} reported {1} for {2}"
notifyReport: "<dark_gray>[<yellow>REPORT<dark_gray>] <gold>{0} reported {1} for {2}"
cantReportYourself: "<red>You cannot report yourself."