Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Write plugins as JSON rules instead of Java. One engine runs the spec, so rules keep working when the server updates.
Two new conditions read the player at the time of the event: where they stand and what they hold.
- Player position (
player.position) compares one coordinate of the player's feet (x,yorz, in blocks) with a value. Usey < 0for a player below Y=0, including when the trigger does not provide their position, such as chat, join or command. Underblock.break,{x},{y}and{z}still describe the block. - Item in the main hand (
player.holding) checks the material the player currently holds. UseAIRfor an empty hand. Invalid material names are rejected at runtime, as in the give-item action. - The engine keeps no memory of its own. These are immediate reads: no counters, no blocks-broken totals, no distance-travelled totals, and no player data written by the engine.
specVersionremains 1. Existing 1.1.x specs keep working. An older engine rejects a spec using either new condition as a whole, just as it rejects any unknown catalogue entry.- The
protection-diamant.jsonexample uses the new checks in itspioche-en-mainrule. - Same Paper versions as 1.1.0 and the same Java 21 minimum.
Platforms
Paper
1.21.4–26.2