L0v0lup

Skript✎Autobroadcast aus .yml 📷#138 Tutorial

Aug 13th, 2020 (edited)
680
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on load:
  2.     load yaml "plugins/Config/Broadcast.yml" as "plugins/Config/Broadcast.yml"
  3.     if skript-yaml value "Autobroadcast" from "plugins/Config/Broadcast.yml" does not exist:
  4.         add "" to skript-yaml list "Autobroadcast" from "plugins/Config/Broadcast.yml"
  5.  
  6.     if skript-yaml value "Status" from "plugins/Config/Broadcast.yml" does not exist:
  7.         set skript-yaml value "Status" from "plugins/Config/Broadcast.yml" to "inaktiv"
  8.  
  9.     save yaml "plugins/Config/Broadcast.yml"
  10.  
  11. command /yml:
  12.     trigger:
  13.         load yaml "plugins/Config/Broadcast.yml" as "plugins/Config/Broadcast.yml"
  14.  
  15. every 1 seconds:
  16.     set {_Autobroadcast} to skript-yaml value "Status" from "plugins/Config/Broadcast.yml"
  17.     {_Autobroadcast} is "aktiv"
  18.     if skript-yaml list "Autobroadcast" from "plugins/Config/Broadcast.yml" is empty:
  19.         stop
  20.     if {Autobroadcast::*} is not set:
  21.         set {Autobroadcast::*} to skript-yaml list "Autobroadcast" from "plugins/Config/Broadcast.yml"
  22.     set {_message} to first element out of {Autobroadcast::*}
  23.     {_message} is not ""
  24.     broadcast {_message}
  25.     remove {_message} from {Autobroadcast::*}
Add Comment
Please, Sign In to add comment