- Katılım
- 30 Haziran 2015
- Mesajlar
- 182
- Elmaslar
- 241
- Puanlar
- 13.675
- Yaş
- 24
- Minecraft
- bilektugrul
Merhaba!
Bu konuda size DeluxeMenus ve ChestCommands (ölü, kullanışsız) eklentilerine/onların benzerlerine muadil olan SkriptGUI adındaki sistemimi tanıtıcam. Kendisiyle bayağı bir uğraştım, tek başıma yapmadım tabii, gerçekten çok kafa yormak gerekti bazı kısımlarına.
Sistem tamamen YAML üzerinden işliyor ve %70 düzenlenebilir. GUI'leri siz oluşturuyorsunuz, istediğiniz gibi dosya üzerinden düzenleyebiliyorsunuz. Aynı zamanda bir config dosyası bulunuyor, belirli şeyleri düzenleyebilirsiniz oradan da.
Sistem İngilizce olarak kodlandı, kod üzerinden veya ayar dosyalarından birçok şeyi çevirebilirsiniz.
Sistemin kendisini görmek için aşağıdaki bağlantıları kullanabilirsiniz:
Sürümleri görmek/hızlıca indirmek için: bilektugrul/SkriptGUI
Tam kodu şuradan bulabilirsiniz: bilektugrul/SkriptGUI
Sistemin kullanımını öğretmek için hazırlanmış Türkçe / İngilizce bir doküman yok, şu anlık.
Gereken eklentiler/skript addonları:
- skUtilities
- skript-mirror
- skript-yaml
- skript-nms
- MundoSK
- TuSKe
- PlaceholderAPI (Eğer placeholderlerden yararlanmak istiyorsanız gerekiyor.)
GitHub kullanmayı biliyorsanız, kendi forkunuzu oluşturup kodu istediğiniz gibi geliştirebilirsiniz. Fikirleriniz orijinal projenin de gelişmesine yardımcı olacaktır.
Bu konuda size DeluxeMenus ve ChestCommands (ölü, kullanışsız) eklentilerine/onların benzerlerine muadil olan SkriptGUI adındaki sistemimi tanıtıcam. Kendisiyle bayağı bir uğraştım, tek başıma yapmadım tabii, gerçekten çok kafa yormak gerekti bazı kısımlarına.
Sistem tamamen YAML üzerinden işliyor ve %70 düzenlenebilir. GUI'leri siz oluşturuyorsunuz, istediğiniz gibi dosya üzerinden düzenleyebiliyorsunuz. Aynı zamanda bir config dosyası bulunuyor, belirli şeyleri düzenleyebilirsiniz oradan da.
Sistem İngilizce olarak kodlandı, kod üzerinden veya ayar dosyalarından birçok şeyi çevirebilirsiniz.
Sistemin kendisini görmek için aşağıdaki bağlantıları kullanabilirsiniz:
Sürümleri görmek/hızlıca indirmek için: bilektugrul/SkriptGUI
Tam kodu şuradan bulabilirsiniz: bilektugrul/SkriptGUI
Sistemin kullanımını öğretmek için hazırlanmış Türkçe / İngilizce bir doküman yok, şu anlık.
Gereken eklentiler/skript addonları:
- skUtilities
- skript-mirror
- skript-yaml
- skript-nms
- MundoSK
- TuSKe
- PlaceholderAPI (Eğer placeholderlerden yararlanmak istiyorsanız gerekiyor.)
GitHub kullanmayı biliyorsanız, kendi forkunuzu oluşturup kodu istediğiniz gibi geliştirebilirsiniz. Fikirleriniz orijinal projenin de gelişmesine yardımcı olacaktır.
Kod:
#Version: 0.5
#Don't change these (^*) lines!
import:
java.io.BufferedReader
java.io.InputStreamReader
java.net.URL
me.clip.placeholderapi.PlaceholderAPI
expression text get of url %text% [line %-integer%]:
get:
set {_in} to new BufferedReader(new InputStreamReader(new URL(expression 1).openStream()))
while true:
add 1 to {_count}
set {_return::%{_count}%} to {_in}.readLine()
if {_count} is expression-2:
{_in}.close()
return {_return::%{_count}%}
{_in}.close()
return {_return::*}
expression placeholder[s] parsed %$strings% [(for|from) %-player%]:
return type: string
get:
loop expressions-1:
add PlaceholderAPI.setPlaceholders(expression-2, loop-value) to {_return::*}
return {_return::*}
on load:
execute console command "skgui reload"
on command:
if yaml value "gui-commands./%full command%" from "SkriptGUI/config" is set:
cancel event
openGUI(player, yaml value "gui-commands./%full command%" from "SkriptGUI/config")
command /skgui [<text>] [<text>] [<player=%player%>]:
trigger:
if executor has permission {SkriptGUI::adminPerm}:
if arg-1 is "reload" or "rl":
set {_systemMS} to current system milliseconds
if file "plugins/SkriptGUI/" doesn't exist:
create dir "plugins/SkriptGUI/GUIs/"
set file contents of "plugins/SkriptGUI/GUIs/example.yml" to text get of url "https://raw.githubusercontent.com/bilektugrul/SkriptGUI/master/SkriptGUI/GUIs/example.yml"
set file contents of "plugins/SkriptGUI/config.yml" to text get of url "https://raw.githubusercontent.com/bilektugrul/SkriptGUI/master/SkriptGUI/config.yml"
load yaml "plugins/SkriptGUI/config.yml" as "SkriptGUI/config"
save yaml "SkriptGUI/config" without extra lines between nodes
set {SkriptGUI::adminPerm} to yaml value "admin-permission" from "SkriptGUI/config"
set {SkriptGUI::prefix} to yaml value "prefix" from "SkriptGUI/config"
set {SkriptGUI::noPermMSG} to yaml value "no-permission-message" from "SkriptGUI/config"
set {SkriptGUI::helpCMD::*} to colored join yaml list "help-command" from "SkriptGUI/config" with nl
replace "%%prefix%%" with {SkriptGUI::prefix} in {SkriptGUI::noPermMSG}
replace "%%prefix%%" with {SkriptGUI::prefix} in {SkriptGUI::helpCMD::*}
if line 1 in file "plugins/Skript/scripts/%script's name%.sk" isn't text get of url "https://raw.githubusercontent.com/bilektugrul/SkriptGUI/master/SkriptGUI.sk" line 1:
send "%{SkriptGUI::prefix}% &cYou're running with outdated version of SkriptGUI." and "%{SkriptGUI::prefix}% &cPlease update from &ehttps://github.com/bilektugrul/SkriptGUI/releases" to executor
else:
send "%{SkriptGUI::prefix}% &2You're running with latest version of SkriptGUI." and "%{SkriptGUI::prefix}% &2Thanks!" to executor
loop files in directory "plugins/SkriptGUI/GUIs":
load yaml "plugins/SkriptGUI/GUIs/%name of file loop-value%.yml" as "SkriptGUI/GUIs/%name of file loop-value%.yml"
save yaml "SkriptGUI/GUIs/%name of file loop-value%.yml" without extra lines between nodes
loop loaded yaml:
if loop-value contains "SkriptGUI/GUIs/":
if file "plugins/%loop-value%" doesn't exist:
unload yaml loop-value
send "%{SkriptGUI::prefix}% &2Succesfully reloaded with %size of files in directory ""plugins/SkriptGUI/GUIs""% GUI. &8(&e%difference between {_systemMS} and current system milliseconds% ms&8)" to executor
else if arg-1 is "open":
if yaml "SkriptGUI/GUIs/%arg-2%.yml" is loaded:
openGUI(arg-3, arg-2)
else:
send "%{SkriptGUI::prefix}% &cThere is no GUI with this name."
else if arg-1 is "create":
if arg-2 is set:
if yaml "SkriptGUI/GUIs/%arg-2%.yml" isn't loaded:
set {_systemMS} to current system milliseconds
create file "plugins/SkriptGUI/GUIs/%arg-2%.yml"
set file contents of "plugins/SkriptGUI/GUIs/%arg-2%.yml" to join text get of url "https://raw.githubusercontent.com/bilektugrul/SkriptGUI/master/SkriptGUI/GUIs/example.yml" with nl
load yaml "plugins/SkriptGUI/GUIs/%arg-2%.yml" as "SkriptGUI/GUIs/%arg-2%.yml"
send "%{SkriptGUI::prefix}% &2Succesfully created. &8(&e%difference between {_systemMS} and current system milliseconds% ms&8)"
else:
send "%{SkriptGUI::prefix}% &cYou can't create this GUI because there is already a GUI with this name."
else:
send "%{SkriptGUI::prefix}% &cPlease enter a GUI name."
else:
send "%{SkriptGUI::helpCMD::*}%"
else:
send {SkriptGUI::noPermMSG}
function openGUI(player: player, gui: text):
if {_player} has permission yaml value "gui.permission" from "SkriptGUI/GUIs/%{_gui}%.yml":
set {_size} to yaml value "gui.size" from "SkriptGUI/GUIs/%{_gui}%.yml"
set {_name} to yaml value "gui.name" from "SkriptGUI/GUIs/%{_gui}%.yml"
open virtual chest inventory with {_size} rows named {_name} to {_player}
loop yaml node keys "gui.slots" from "SkriptGUI/GUIs/%{_gui}%.yml":
set {_value} to loop-value
set {_item} to yaml value "gui.slots.%loop-value%.item" from "SkriptGUI/GUIs/%{_gui}%.yml" parsed as item
set {_slot} to yaml value "gui.slots.%loop-value%.slot" from "SkriptGUI/GUIs/%{_gui}%.yml"
set {_playerCommands::*} to placeholder parsed join yaml list "gui.slots.%{_value}%.player-commands" from "SkriptGUI/GUIs/example.yml" from {_player}
set {_itemLore::*} to placeholder parsed yaml list "gui.slots.%{_value}%.lore" from "SkriptGUI/GUIs/example.yml" from {_player}
set {_itemName} to placeholder parsed yaml value "gui.slots.%{_value}%.item-name" from "SkriptGUI/GUIs/example.yml" from {_player}
set {_consoleCommands::*} to placeholder parsed join yaml list "gui.slots.%{_value}%.console-commands" from "SkriptGUI/GUIs/example.yml" from {_player}
if {_itemLore::*} is set:
make gui slot {_slot} of {_player} with {_item} with no nbt named colored {_itemName} with lore join {_itemLore::*} with "||" to run:
if yaml value "gui.slots.%{_value}%.close-on-click" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
close {_player}'s inventory
loop {_consoleCommands::*}:
execute console command loop-value-2
loop {_playerCommands::*}:
execute {_player} command loop-value-2
else:
make gui slot {_slot} of {_player} with {_item} with no nbt named colored {_itemName} to run:
if yaml value "gui.slots.%{_value}%.close-on-click" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
close {_player}'s inventory
loop {_consoleCommands::*}:
execute console command loop-value-2
loop {_playerCommands::*}:
execute {_player} command loop-value-2
else:
set {_noPermMSG} to colored yaml value "no-permission-message" from "SkriptGUI/GUIs/%{_gui}%.yml"
replace "%%prefix%%" with "%{skriptgui::prefix}%" in {_noPermMSG}
send {_noPermMSG} to {_player}
Gözünüz biraz gerçek Skript görsün istedim xd.
Son düzenleme: