Don't allow players to report themselves
I left this to last minute to make testing easier, as with this check in place it means at least two players are required to test the report mechanism.
This commit is contained in:
parent
96aa5d1c4b
commit
949f9ca712
@ -37,7 +37,14 @@ public class ReportCommand extends CommandBase<ReportPlugin>
|
||||
|
||||
if (reportedPlayer != null)
|
||||
{
|
||||
new ReportCategoryPage(Plugin, player, reportedPlayer, reason).openInventory();
|
||||
if (reportedPlayer == player)
|
||||
{
|
||||
UtilPlayer.message(player, F.main(Plugin.getName(), C.cRed + "You cannot report yourself."));
|
||||
}
|
||||
else
|
||||
{
|
||||
new ReportCategoryPage(Plugin, player, reportedPlayer, reason).openInventory();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user