Hologram Maker

Share scripts you wrote for Denizen-Bukkit here!
Post Reply
User avatar
Moonstone
New
New
Posts: 1
Joined: June 1st, 2020, 9:56 am
Location: LA, California
Contact:

Hologram Maker

Post by Moonstone » July 31st, 2020, 7:34 pm

Ok, so I'm not the best at Denizen, but I made a script that I thought would be useful!

All you have to do is type a message after the command with color and boom! You have a hologram!

Example usage:
/hologrammaker Hello there &4Moonstone!

And a hologram should appear with the text: Hello there Moonstone!
That's it!

Here is the haste link:
https://one.denizenscript.com/haste/73633

Here is the raw code:
Spoiler!

Code: Select all

HologramMaker:
    type: command
    name: hologrammaker
    usage: /hologrammaker [text to be displayed]
    aliases:
    - hmaker
    - hologram
    - holomaker
    - holo
    description: Will make holograms
    permission: moonstone.admin.hologram
    tab completions:
        1: AnyTextHere
    script:
        - if !<player.has_permission[moonstone.admin.hologram]>:
            - stop
        - define message <context.raw_args.parse_color>
        - spawn <entity[armor_stand]> <player.location> save:stand
        - adjust <entry[stand].spawned_entity> visible:false
        - adjust <entry[stand].spawned_entity> custom_name:<[message]>
        - adjust <entry[stand].spawned_entity> custom_name_visible:true
        
Thanks!

User avatar
mcmonkey
Site Admin
Site Admin
Posts: 289
Joined: August 5th, 2016, 7:27 pm
Location: Los Angeles, California, USA
Contact:

Re: Hologram Maker

Post by mcmonkey » August 1st, 2020, 9:08 am

- You can remove the adjust lines and simply use properties on the spawn line
- the tag <entity[armor_stand]> is entirely redundant, just do armor_stand
- you should probably enable marker, disable gravity, ...
- This is usually a case where an entity script might actually be best... make a hologram entity script that has all the relevant armor stand properties for a hologram, so you can just - spawn hologram[custom_name=<[message]>] <player.location><
- You should probably get rid of that weird tab completion
- You should probably remove the redundant has_permission check
Denizen lead developer. On Discord as mcmonkey#6666.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest