Skip to content
Shane Bee edited this page May 3, 2026 · 4 revisions

In Skript there are generally 2 different wants to register events:

  1. You can have a class that extends SimpleEvent and register as many events as you'd like
    (Skript handles a lot of it for you).
  2. You can have a class that extends SkriptEvent for a single event that may need more attention.

SimpleEvents:

public class Events extends SimpleEvent {

    public static void register(Registration reg) {
        // Block Damage Abort Event
        reg.newEvent(BlockEvents.class, BlockDamageAbortEvent.class,
                "block damage abort")
            .name("Block Damage Abort")
            .description("Called when a player stops damaging a Block. Requires MC 1.18.x+")
            .examples("on block damage abort:",
                "\tsend \"get back to work\"")
            .since("2.8.3")
            .register();

        reg.newEventValue(BlockDamageAbortEvent.class, Player.class)
            .converter(BlockDamageAbortEvent::getPlayer)
            .register();
        reg.newEventValue(BlockDamageAbortEvent.class, ItemStack.class)
            .description("Gets the ItemStack for the item currently in the player's hand.")
            .converter(BlockDamageAbortEvent::getItemInHand)
            .register();
        reg.newEventValue(BlockDamageAbortEvent.class, ItemType.class)
            .description("Gets the ItemType for the item currently in the player's hand.")
            .converter(event -> new ItemType(event.getItemInHand()))
            .register();
    }

}

SkriptEvent:

Please see SkBee's Other Event Package for examples.

Clone this wiki locally