Date: 2025/06/18 21:19:05 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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 <player.has_flag[sit_armorstand]>:
- narrate "<red>You're already sitting."
- stop
- if <player.location.below.material.is_solid.not>:
- narrate "<red>You can't sit down here."
- stop
- define location <player.location.center.add[0, -0.5, 0]>
- spawn chair_armorstand <[location]> save:stand
- flag <player> sit_armorstand:<entry[stand].spawned_entities.get[1]>
- mount <player>|<entry[stand].spawned_entities.get[1]>
sit_rightclick_handler:
type: world
debug: false
events:
on player right clicks block:
- define loc <context.location>
- define mat <[loc].block.material>
- if <[mat].name.contains[slab].not> && <[mat].name.contains[stairs].not>:
- stop
- if <player.has_permission[sit.stairs].not>:
- narrate "<red>You don't have the permission to sit on this."
- stop
- if <player.is_sneaking>:
- stop
- if <player.has_flag[sit_armorstand]>:
- stop
- define location <[loc].center.add[0, 0.05, -0.4]>
- spawn chair_armorstand <[location]> save:stand
- flag <player> sit_armorstand:<entry[stand].spawned_entities.get[1]>
- mount <player>|<entry[stand].spawned_entities.get[1]>
sit_unsit_handler:
type: world
debug: false
events:
on player starts sneaking:
- if <context.state.not>:
- stop
- if <player.flag[sit_armorstand].exists.not>:
- stop
- define stand <player.flag[sit_armorstand]>
- if <[stand].is_spawned>:
- remove <[stand]>
- flag <player> sit_armorstand:!