Blockbench Reference Docs
    Preparing search index...

    Class ValidatorCheck

    A check for the validator. A check can be triggered by certain things, and updates the list of warnings and errors that can be displayed in the status bar.

    new ValidatorCheck('special_cube_name_rule', {
    update_triggers: ['update_selection'],
    run() {
    Cube.all.forEach(cube => {
    if (cube.name == 'sphere') {
    this.warn({
    message: `The cube "${cube.name}" has an invalid names. Cubes may not be called "sphere".`,
    buttons: [
    {
    name: 'Select Cube',
    icon: 'fa-cube',
    click() {
    Validator.dialog.hide();
    cube.select();
    }
    }
    ]
    })
    }
    })
    }
    })

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    id: string
    name: string
    plugin?: string

    The ID of the plugin that created the object

    Methods