Skip to content

SuppressErrorPreprocessor

youyihj edited this page Jan 15, 2021 · 4 revisions

SuppressErrorPreprocessor

@since 1.5.0

The preprocessor can suppress errors and warnings produced by a single script to show in players' chat. It is different from vanilla CraftTweaker's #ikwid, which suppresses all scripts.

Call

You can suppress warnings by placing one of below in your script.

  • #suppress warning
  • #suppress warnings

You can suppress warnings and errors by placing one of below in your script.

  • #suppress error
  • #suppress errors
  • #suppress all

What it does

It suppresses errors and warnings produced by a single script to show in players' chat. However, script parse issues will still are shown. Errors will still be logged in crafttweaker.log.

The implementation of this preprocessor is to overwrite CraftTweaker's logger. So once you use the preprocessor, #ikwid and #nowarn preprocessors will be useless.

Clone this wiki locally