Switch to using UtilPlayer.message

This commit is contained in:
Keir Nellyer 2016-08-19 16:48:05 +01:00
parent 26aff936a0
commit 834e6b5fdf

View File

@ -29,7 +29,7 @@ public class ReportStatsCommand extends CommandBase<ReportPlugin>
} }
@Override @Override
public void Execute(Player caller, String[] args) public void Execute(Player player, String[] args)
{ {
if (args != null && args.length == 1) if (args != null && args.length == 1)
{ {
@ -55,20 +55,20 @@ public class ReportStatsCommand extends CommandBase<ReportPlugin>
// don't show handler statistics if user has never handled a report // don't show handler statistics if user has never handled a report
if (role != ReportRole.HANDLER || reportIds.size() > 0) if (role != ReportRole.HANDLER || reportIds.size() > 0)
{ {
caller.sendMessage(F.main(Plugin.getName(), F.elem(role.getHumanName()))); UtilPlayer.message(player, F.main(Plugin.getName(), F.elem(role.getHumanName())));
caller.sendMessage(F.main(Plugin.getName(), StringUtils.join(reportIds, ", "))); UtilPlayer.message(player, F.main(Plugin.getName(), StringUtils.join(reportIds, ", ")));
} }
}) })
)); ));
} }
else else
{ {
UtilPlayer.message(caller, F.main(Plugin.getName(), C.cRed + "Player not found.")); UtilPlayer.message(player, F.main(Plugin.getName(), C.cRed + "Player not found."));
} }
} }
else else
{ {
UtilPlayer.message(caller, F.main(Plugin.getName(), C.cRed + "Invalid Usage: " + F.elem("/reportstat <player>"))); UtilPlayer.message(player, F.main(Plugin.getName(), C.cRed + "Invalid Usage: " + F.elem("/reportstat <player>")));
} }
} }
} }