chair_armorstand: type: entity debug: false entity_type: armor_stand mechanisms: visible: false marker: true gravity: false arms: false base_plate: false collidable: false equipment: [] sit_command: type: command debug: false name: sit description: Sit on the ground. usage: /sit permission: sit.command script: - if : - narrate "You're already sitting." - stop - if : - narrate "You can't sit down here." - stop - define location - spawn chair_armorstand <[location]> save:stand - flag sit_armorstand: - mount | sit_rightclick_handler: type: world debug: false events: on player right clicks block: - define loc - define mat <[loc].block.material> - if <[mat].name.contains[slab].not> && <[mat].name.contains[stairs].not>: - stop - if : - narrate "You don't have the permission to sit on this." - stop - if : - stop - if : - stop - define location <[loc].center.add[0, 0.05, -0.4]> - spawn chair_armorstand <[location]> save:stand - flag sit_armorstand: - mount | sit_unsit_handler: type: world debug: false events: on player starts sneaking: - if : - stop - if : - stop - define stand - if <[stand].is_spawned>: - remove <[stand]> - flag sit_armorstand:!