Skip to content
Permalink
Browse files
Fix bug where errors in events in cmdline would fail to render the er…
…ror properly
  • Loading branch information
LadyCailin committed Apr 13, 2020
1 parent 5026fe9 commit c86736dff33e6c4e05f4fbd23d88c12ea0467bcb
Showing 1 changed file with 2 additions and 1 deletion.
@@ -303,7 +303,8 @@ private static void DoReport(String message, String exceptionType, ConfigRuntime

private static void DoReport(ConfigRuntimeException e, Environment env) {
MCPlayer p = null;
if(e.getEnv() != null && e.getEnv().getEnv(CommandHelperEnvironment.class).GetPlayer() != null) {
if(e.getEnv() != null && e.getEnv().hasEnv(CommandHelperEnvironment.class)
&& e.getEnv().getEnv(CommandHelperEnvironment.class).GetPlayer() != null) {
p = e.getEnv().getEnv(CommandHelperEnvironment.class).GetPlayer();
}
List<StackTraceElement> st = new ArrayList<>();

0 comments on commit c86736d

Please sign in to comment.