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:
Keir Nellyer 2016-04-24 18:10:01 +01:00
parent 96aa5d1c4b
commit 949f9ca712

View File

@ -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
{