These brackets don't need to be here

This commit is contained in:
Keir Nellyer 2016-07-14 22:39:59 +01:00
parent 7b5adc717d
commit da7806147d

View File

@ -36,30 +36,28 @@ public class ReportCloseCommand extends CommandBase<ReportPlugin>
ReportManager reportManager = Plugin.getReportManager();
reportManager.getReportRepository().getReport(reportId).thenAccept(report ->
{
reportManager.isActiveReport(reportId).thenCompose(BukkitFuture.accept(isActive ->
{
if (isActive)
reportManager.isActiveReport(reportId).thenCompose(BukkitFuture.accept(isActive ->
{
int senderId = _commandCenter.GetClientManager().getAccountId(player);
Optional<Integer> handlerIdOptional = report.getHandlerId();
if (handlerIdOptional.isPresent() && handlerIdOptional.get() == senderId)
if (isActive)
{
ReportResultPage reportResultPage = new ReportResultPage(Plugin, reportId, player, reason);
reportResultPage.openInventory(); // report is closed when player selects the result
int senderId = _commandCenter.GetClientManager().getAccountId(player);
Optional<Integer> handlerIdOptional = report.getHandlerId();
if (handlerIdOptional.isPresent() && handlerIdOptional.get() == senderId)
{
ReportResultPage reportResultPage = new ReportResultPage(Plugin, reportId, player, reason);
reportResultPage.openInventory(); // report is closed when player selects the result
}
else
{
player.sendMessage(F.main(Plugin.getName(), C.cRed + "You cannot close this report as you aren't the handler."));
}
}
else
{
player.sendMessage(F.main(Plugin.getName(), C.cRed + "You cannot close this report as you aren't the handler."));
UtilPlayer.message(player, F.main(Plugin.getName(), C.cRed + "That report either does not exist or has been closed."));
}
}
else
{
UtilPlayer.message(player, F.main(Plugin.getName(), C.cRed + "That report either does not exist or has been closed."));
}
}));
});
})));
}
}
}