TitleCombination

Script TitleCombination 1.0

  • 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!

Contributors
iRegalia
Supported Minecraft Versions
  1. 1.9
  2. 1.10
Title-Combination.png

Permission
  • All can set by yourself in config.yml
Commands
  • /admintitle [remove / add] [player] [prefix/middle/suffix]
    Add Title to player / remove title from player
    - Aliases: /at
  • /playertitle
    Open TitleGUI
    - Aliases: /pt
Depenceny
  • TusKe for GUI
  • skRayfall [Optional] for Citizen Support
  • Skellet [Optional] for MySQL Support
  • skUtilities or Skquery for Yaml Support
Video

code_language.skript:
config:
  gui:
    display_name: '{P} - Title' #Gui Name {P} = Player
    integration:
      citizen: true   #Support Citizen
      citizen-name: -- Title -- #Citizen Name For Detect Click Open GUI
      command: true #Commands [/pt]
      command-permission: playertitle.player #/pt command permission
  title:
    prefix: Prefix #prefix (Change watever u want)
    middle: Middle #middle (Change watever u want)
    suffix: Suffix #suffix (Change watever u want)
    splitter: ',' (Splitter cant be added to commands , you can & ? | and much more for detection in database)
  unlocker:
    item: true
    item-id: '276'
    item-prefix-detection: §6{type} §f- {title} # Item for unlocking name , {type} = prefix/middle/suffix , {title} = the title , etc &6Prefix &f- &eFront&bTitle
    command: true #command unlocking for admin
    command-permission: playertitle.admin
  chat:
    replace: false
    replace-format: '{T}{P}: {MSG}' # {T} = title , {P} = player name , {MSG} = message sent by player
    add-to-current: true  # support with other plugins , u can just put {T} in the chat message
    replace-display-name: false # display name will repalce with etc [Prefix/Middle/Suffix] iRegalia
    replace-display-format: '{T} {P}'
  message:
    title-claimed: §fYou already have the title
    title-unlock: §fYou unlocked new title
    last-pages: §fYou already at last pages
    first-pages: §fYou already at first pages
    admin-add-title: §fYou added title to specify player
    admin-remove-title: §fYou removed title from specify player[/B]
code_language.skript:
config:
  mysql: #database mysql setting
    ip: 127.0.0.1
    port: '3306'
    username: root
    password: ''
    database: test
  gui:
    display_name: '{P} - Title' #Gui Name {P} = Player
    integration:
      citizen: true   #Support Citizen
      citizen-name: -- Title -- #Citizen Name For Detect Click Open GUI
      command: true #Commands [/pt]
      command-permission: playertitle.player #/pt command permission
  title:
    prefix: Prefix #prefix (Change watever u want)
    middle: Middle #middle (Change watever u want)
    suffix: Suffix #suffix (Change watever u want)
    splitter: ',' #(Splitter cant be added to commands , you can & ? | and much more for detection in database)
  unlocker:
    item: true
    item-id: '276'
    item-prefix-detection: §6{type} §f- {title} # Item for unlocking name , {type} = prefix/middle/suffix , {title} = the title , etc &6Prefix &f- &eFront&bTitle
    command: true #command unlocking for admin
    command-permission: playertitle.admin
  chat:
    replace: false
    replace-format: '{T}{P}: {MSG}' # {T} = title , {P} = player name , {MSG} = message sent by player
    add-to-current: true  # support with other plugins , u can just put {T} in the chat message
    replace-display-name: false # display name will repalce with etc [Prefix/Middle/Suffix] iRegalia
    replace-display-format: '{T} {P}'
  message:
    title-claimed: §fYou already have the title
    title-unlock: §fYou unlocked new title
    last-pages: §fYou already at last pages
    first-pages: §fYou already at first pages
    admin-add-title: §fYou added title to specify player
    admin-remove-title: §fYou removed title from specify player[/B]
Database Setup
upload_2017-5-17_15-40-24.png

  • UUID = player's uuid
  • TITLE = using title
  • PREFIX = prefix that player have
  • MIDDLE = middle that player have
  • SUFFIX = suffix that player have
  • Get the all prefix player have u can read from database and split by "Splitter" in config
  • Skript Function (You can see at skript all the function)
    code_language.skript:
    getPlayerTitle(player, prefix/middle/suffix) #for get player title (return text/string)
    function getPlayerTitle(p: player, t: text) :: text:
        set {_sql} to "SELECT * FROM playertitle WHERE uuid='%{_p}'s uuid%'"
        connect mysql
        set {_title} to mysql result of query {_sql}
        set {_result::*} to mysql string "%{_t}%" in {_title}
        disconnect mysql
        return {_result::1}
  • upload_2017-5-17_15-41-49.png
    upload_2017-5-17_15-41-49.png
    2.6 KB · Views: 274
Author
iRegalia
Downloads
584
Views
584
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from iRegalia