Simplify handling of optional reason
This commit is contained in:
parent
6f77c05f1e
commit
f8ad302d80
@ -280,9 +280,8 @@ public class ReportManager
|
||||
|
||||
Bukkit.getScheduler().runTask(_plugin, () ->
|
||||
{
|
||||
Optional<String> reasonOptional = reportResult.getReason();
|
||||
String prefix = getReportPrefix(reportId);
|
||||
String reason = reasonOptional.isPresent() ? reasonOptional.get() : "No reason specified.";
|
||||
String reason = reportResult.getReason().orElse("No reason specified.");
|
||||
|
||||
if (reportCloser != null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user