# Pozdro 600 command /alert [] []: trigger: player has permission "alert.use": arg 1 is set: arg 1 is "chat" or "c": player has permission "alert.chat": arg 2 is set: broadcast "%nl%%{alert.chat.header}%%nl%&f%coloured arg 2%%nl%%{alert.chat.footer}%%nl% " else: send "%{alert.usage}%" else: send "%{alert.nopermission}%" arg 1 is "title" or "t": player has permission "alert.title": arg 2 is set: loop all players: send loop-player title "%{alert.title.title}%" with subtitle "%coloured arg 2%" else: send "%{alert.usage}%" else: send "%{alert.nopermission}%" arg 1 is "actionbar" or "ab": player has permission "alert.actionbar": arg 2 is set: loop all players: set action bar of loop-player to "%{alert.actionbar.tag}%%coloured arg 2%" else: send "%{alert.usage}%" else: send "%{alert.nopermission}%" arg 1 is "bossbar" or "bb": player has permission "alert.bossbar": arg 2 is set: loop all players: display "%{alert.bossbar.tag}%%coloured arg 2%" on bossbar with 100 percent by 4 seconds for loop-player else: send "%{alert.usage}%" else: send "%{alert.nopermission}%" arg 1 isn't "c" or "t" or "ab" or "bb" or "chat" or "title" or "actionbar" or "bossbar": send "%{alert.usage}%" else: send "%{alert.usage}%" else: send "%{alert.nopermission}%" # Config (YML) on script load: if folder "plugins/Skript/scripts/hiAlert" doesn't exists: create folder "plugins/Skript/scripts/hiAlert" if yaml value "alert.nopermission" from "hiAlert/messages.yml" isn't set: set yaml value "alert.nopermission" from "hiAlert/messages.yml" to "&7&l* &cNie masz permisji" set {alert.nopermission} to yaml value "alert.nopermission" from "hiAlert/messages.yml" if yaml value "alert.usage" from "hiAlert/messages.yml" isn't set: set yaml value "alert.usage" from "hiAlert/messages.yml" to "&7&l* &cUzyj: /alert " set {alert.usage} to yaml value "alert.usage" from "hiAlert/messages.yml" if yaml value "alert.chat.header" from "hiAlert/messages.yml" isn't set: set yaml value "alert.chat.header" from "hiAlert/messages.yml" to "&8&l&m &c&lALERT&8&l&m &r%nl% " set {alert.chat.header} to yaml value "alert.chat.header" from "hiAlert/messages.yml" if yaml value "alert.chat.footer" from "hiAlert/messages.yml" isn't set: set yaml value "alert.chat.footer" from "hiAlert/messages.yml" to " %nl%&8&l&m &c&lALERT&8&l&m &r" set {alert.chat.footer} to yaml value "alert.chat.footer" from "hiAlert/messages.yml" if yaml value "alert.actionbar.tag" from "hiAlert/messages.yml" isn't set: set yaml value "alert.actionbar.tag" from "hiAlert/messages.yml" to "&4&l[ALERT] &f" set {alert.actionbar.tag} to yaml value "alert.actionbar.tag" from "hiAlert/messages.yml" if yaml value "alert.title.title" from "hiAlert/messages.yml" isn't set: set yaml value "alert.title.title" from "hiAlert/messages.yml" to "&4&lALERT" set {alert.title.title} to yaml value "alert.title.title" from "hiAlert/messages.yml" if yaml value "alert.bossbar.tag" from "hiAlert/messages.yml" isn't set: set yaml value "alert.bossbar.tag" from "hiAlert/messages.yml" to "&4&lALERT &f" set {alert.bossbar.tag} to yaml value "alert.bossbar.tag" from "hiAlert/messages.yml"