Mineplex-like player titles

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Ankle Boiii

Member
Jun 27, 2020
3
0
1
20
For a hub or lobby core I guess, or just for fun <3

Code:
effect clear title entities for %player%:
    trigger:
        loop all entities:
            if metadata tag "Title" of loop-entity is expression-1:
                teleport loop-entity 1000 above expression-1
                kill loop-entity
effect spawn title for %players% with text %string%:
    trigger:
        clear title entities for expression-1
        set {title::%expression-1's uuid%} to expression-2
        set {_titleName} to colored {title::%expression-1's uuid%}
        spawn snowball at location of expression-1
        set {_titleEntity} to last spawned snowball
        {_titleEntity}.setCustomNameVisible(true)
        {_titleEntity}.setCustomName({_titleName})
        {_titleEntity}.noAI(true) # Incase your snowball decides to hit you in the face, happened sometimes without it
        hide {_titleEntity} from expression-1
        make {_titleEntity} ride expression-1
        send colored "&9Titles> &7Your title has been updated to %expression-2%" to expression-1

Code:
command /title [<string>] [<player>]:
    permission: title.use
    permission message: &9Permissions> &7You do not have permission to do this.
    trigger:
        if arg-1 is set:
            if arg-2 is not set:
                spawn title for player with text arg-1
            else:
                spawn title for arg-2 with text arg-1
                send colored "&9Titles> &7Set the title of &e%arg-2%&7 to %colored arg-1%"
        else:
            send "&9Titles> &cProper Syntax: &6/title [title text] <player>"

Screenshots from results of the example posted above:
unknown.png

Me, with a title - PS: I removed the 'hide' code to take these
unknown.png

Incase anyones wondering if it blocks player nametags, not as much as the ones on Mineplex do.

Requirements:
Skript 2.5 (any version of 2.5 should work)
skript-mirror 2.0.0-SNAPSHOT (I'm sure I'm using an outdated version, the code is very flexible so I doubt using the latest anything would hurt it)

Thanks, have a great time using this!