diff --git a/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java b/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java index 73e5a90fc..8935edacc 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/report/ReportManager.java @@ -395,16 +395,10 @@ public class ReportManager */ public static String getReportPrefix(Report report) { - Optional reportIdOptional = report.getId(); + long reportId = report.getId().orElseThrow(() -> + new IllegalStateException("Report has not yet been assigned an id.")); - if (reportIdOptional.isPresent()) - { - return getReportPrefix(reportIdOptional.get()); - } - else - { - throw new IllegalStateException("Report has not yet been assigned an id."); - } + return getReportPrefix(reportId); } /**