Paste #24048: Repo Script BedHome

Date: 2015/12/19 13:34:37 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


BedHome:
    type: command
    name: bedhome
    description: Returns you to your bed.
    usage: /bedhome
    aliases:
        - bed
        - home
    script:
        - if <player.bed_spawn||null> != null {
            - teleport <player> <player.bed_spawn>
            - wait 1t
            - narrate "<&2>You have been teleported to your bed."
            - queue clear
        } else {
            - narrate "<&2>No bed was found."
            - queue clear
        }


BedSet:
    type: world
    events:
        on player right clicks bed_block:
            - adjust <player> bed_spawn_location:<player.location.cursor_on>
            - narrate "<&2>Your bed location has been set."
            - queue clear