Skript Paylaşımı LevionasMobCarry [1.8-1.19] Yaratık Yakalama, YAML Desteği, Daha Fazlası!

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Team Levionas

Birisi mi Spawnlandı?
Katılım
2 Ağustos 2022
Mesajlar
3
Elmaslar
1
Puan
125
Yaş
22
Konum
Türkiye
Minecraft
Aertha
giriş.png
bilgi.png
komutlar.png
ön-gösterim.png
ayar-dosyası.png
yaratık-verileri.png
iletişim.png


Kod:
#  ___      ___     ______    _______        ______        __        _______    _______   ___  ___
# |"  \    /"  |   /    " \  |   _  "\      /" _  "\      /""\      /"      \  /"      \ |"  \/"  |
#  \   \  //   |  // ____  \ (. |_)  :)    (: ( \___)    /    \    |:        ||:        | \   \  /
#  /\\  \/.    | /  /    ) :)|:     \/      \/ \        /' /\  \   |_____/   )|_____/   )  \\  \/  
# |: \.        |(: (____/ // (|  _  \\      //  \ _    //  __'  \   //      /  //      /   /   /  
# |.  \    /:  | \        /  |: |_)  :)    (:   _) \  /   /  \\  \ |:  __   \ |:  __   \  /   /    
# |___|\__/|___|  \"_____/   (_______/      \_______)(___/    \___)|__|  \___)|__|  \___)|___/
#   _    _____   _____ ___  _  _   _   ___
#  | |  | __\ \ / /_ _/ _ \| \| | /_\ / __|
#  | |__| _| \ V / | | (_) | .` |/ _ \\__ \
#  |____|___| \_/ |___\___/|_|\_/_/ \_\___/

import:
    org.bukkit.Bukkit

on load:
    YAML()

function YAML():
    load yaml "plugins/LevionasMobCarry/plugin.yml" as "plugin"
    if yaml "plugin" is empty:

        set yaml value "Customer Number" from "plugin" to "✘"
       
        set yaml value "Information.Name" from "plugin" to "LevionasMobCarry"
        set yaml value "Information.Author" from "plugin" to "Team Levionas"
        set yaml value "Information.Version" from "plugin" to "1.0.0"

        set the comments of yaml node "Customer Number" from "plugin" to "" and " _    _____   _____ ___  _  _   _   ___ " and "| |  | __\ \ / /_ _/ _ \| \| | /_\ / __|" and "| |__| _| \ V / | | (_) | .` |/ _ \\__ \" and "|____|___| \_/ |___\___/|_|\_/_/ \_\___/" and "" and "Selam, eklentiyi kullandığın için teşekkürler!" and "" and "Bu eklenti sayesinde belirlenen eşya ile sağ" and "tıkladığınız yaratığı ya da canlıyı envanterinize alabilirsiniz." and "" and "Eklentinin ayar ve mesaj yapılandırmaları için 'config.yml'" and "dosyalarını kullanabilirsiniz." and "" and "Herhangi bir sorunuz var ise Ardy##5203 discord adresini ekleyin." and ""
        set the comments of yaml node "Information" from "plugin" to "" and "Eklentinin kendisi hakkında ufak tefek bilgiler." and ""

        save yaml "plugin"

    load yaml "plugins/LevionasMobCarry/config.yml" as "config"
    if yaml "config" is empty:

        set yaml value "Version" from "config" to "1.0.0"

        set yaml value "Prefix" from "config" to "&6MobCarry &8»"

        add "world" to yaml list "enabled_worlds" from "config"
        add "world_nether" to yaml list "enabled_worlds" from "config"
        add "world_the_end" to yaml list "enabled_worlds" from "config"

        set yaml value "mob_carry_item" from "config" to lead

        set yaml value "Messages.wrong_usage" from "config" to "&cHatalı komut, yardım için &7/mc yardım &cyazın."
        set yaml value "Messages.mob_carrying" from "config" to "&aBir yumurta yakaladın: &6{MOB}"
        set yaml value "Messages.not_enough_permission" from "config" to "&cBunun için yetkin yok."
        set yaml value "Messages.plugin_reloaded" from "config" to "&aEklenti dosyaları başarıyla yenilendi."

        set the comments of yaml node "Version" from "config" to " _    _____   _____ ___  _  _   _   ___ " and "| |  | __\ \ / /_ _/ _ \| \| | /_\ / __|" and "| |__| _| \ V / | | (_) | .` |/ _ \\__ \" and "|____|___| \_/ |___\___/|_|\_/_/ \_\___/"
        set the comments of yaml node "Prefix" from "config" to "" and "Eklenti mesajlarının başına gelen yazıdır." and ""
        set the comments of yaml node "enabled_worlds" from "config" to "" and "Eklentinin çalışacağı dünyaların listesi." and ""
        set the comments of yaml node "mob_carry_item" from "config" to "" and "Yumurtaları yakalamak için hangi eşya kullanılsın?" and ""
        set the comments of yaml node "Messages" from "config" to "" and "Eklentinin kullandığı oyun içi mesajlardır. İstediğiniz" and "gibi sunucunuza uygun değiştirebilirsiniz." and ""

        save yaml "config"

    load yaml "plugins/LevionasMobCarry/mobs.yml" as "mobs"
    if yaml "mobs" is empty:

        set yaml value "Version" from "mobs" to "1.0.0"

        set yaml value "Mobs.zombie" from "mobs" to true
        set yaml value "Mobs.skeleton" from "mobs" to true
        set yaml value "Mobs.creeper" from "mobs" to true
        set yaml value "Mobs.spider" from "mobs" to true
        set yaml value "Mobs.sheep" from "mobs" to true
        set yaml value "Mobs.cow" from "mobs" to true
        set yaml value "Mobs.chicken" from "mobs" to true
       
        set the comments of yaml node "Version" from "mobs" to " _    _____   _____ ___  _  _   _   ___ " and "| |  | __\ \ / /_ _/ _ \| \| | /_\ / __|" and "| |__| _| \ V / | | (_) | .` |/ _ \\__ \" and "|____|___| \_/ |___\___/|_|\_/_/ \_\___/"
        set the comments of yaml node "Mobs" from "mobs" to "" and "Hangi mobların yakalanabileceğini buradan" and "ayarlayabilirsiniz. Eğer 'false' olarak değiştirirseniz" and "ayarlanan mob oyun içinde yakalanmaz." and ""

        save yaml "mobs"

    Bukkit.getConsoleSender().sendMessage("")
    Bukkit.getConsoleSender().sendMessage("&b _    _____   _____ ___  _  _   _   ___")
    Bukkit.getConsoleSender().sendMessage("&b| |  | __\ \ / /_ _/ _ \| \| | /_\ / __|")
    Bukkit.getConsoleSender().sendMessage("&b| |__| _| \ V / | | (_) | .` |/ _ \\__ \")
    Bukkit.getConsoleSender().sendMessage("&b|____|___| \_/ |___\___/|_|\_/_/ \_\___/")
    Bukkit.getConsoleSender().sendMessage("")
    Bukkit.getConsoleSender().sendMessage(" &fMobCarry &7başarıyla sorunsuz çalıştı!")
    Bukkit.getConsoleSender().sendMessage(" &fİyi oyunlar dileriz :) &c<3")
    Bukkit.getConsoleSender().sendMessage("")

function reload(p:player):
    unload yaml "config"
    unload yaml "mobs"
    load yaml "plugins/LevionasMobCarry/config.yml" as "config"
    load yaml "plugins/LevionasMobCarry/mobs.yml" as "mobs"
    set {_prefix} to yaml value "Prefix" from "config"
    set {_msg} to yaml value "Messages.plugin_reloaded" from "config"
    send "%{_prefix}% %{_msg}%" to {_p}

command mobcarry [<text>]:
    aliases: mc
    trigger:
        set {_prefix} to yaml value "Prefix" from "config"
        if player has permission "levionasmobcarry.admin":
            set {_msg} to yaml value "Messages.wrong_usage" from "config"
            send "%{_prefix}% %{_msg}%" if arg-1 isn't set
            if arg-1 is "yardım" or "yardim":
                send "" and ""
                send "&8&m=============&r&8[ &b&lMOB CARRY &8]&8&m=============" and ""
                send " &e/mobcarry reload &7- &fEklentinin dosyalarını yeniler."
                send " &e/mobcarry yardım &8- &fBu komutları gösterir." and ""
                send "&8&m=============&r&8[ &b&lMOB CARRY &8]&8&m=============" and ""
                send ""
            if arg-1 is "reload":
                reload(player)
        else:
            set {_msg} to yaml value "Messages.not_enough_permission" from "config"
            send "%{_prefix}% %{_msg}%"

on rightclick on entity:
    set {_i} to yaml value "mob_carry_item" from "config"
    if player's held item is {_i}:
        if clicked entity is zombie or skeleton or creeper or spider or chicken or cow or sheep:
            if yaml value "Mobs.%clicked entity%" from "mobs" = true:
                cancel event
                loop yaml list "enabled_worlds" from "config":
                    if player is in "%loop-value%":
                        kill clicked entity
                        give 1 zombie spawn egg to player if clicked entity = zombie
                        give 1 skeleton spawn egg to player if clicked entity = skeleton
                        give 1 creeper spawn egg to player if clicked entity = creeper
                        give 1 spider spawn egg to player if clicked entity = spider
                        give 1 cow spawn egg to player if clicked entity = cow
                        give 1 sheep spawn egg to player if clicked entity = sheep
                        give 1 chicken spawn egg to player if clicked entity = chicken
                        set {_prefix} to yaml value "Prefix" from "config"
                        set {_msg} to yaml value "Messages.mob_carrying" from "config"
                        replace "{MOB}" in {_msg} with "%clicked entity%"
                        send "%{_prefix}% %{_msg}%" to player
                        stop loop
 
Öncelikle selam.

Sistemi çok güzel şekilde kodlamışsın başarılar diliyorum :)
Ama şunu belirtmeliyimki çok kullanılacağını sanmıyorum amacım kötülemek asla değil.

Başarılar.
 
fikir hoş
başarılar.
 
Öncelikle selam.

Sistemi çok güzel şekilde kodlamışsın başarılar diliyorum :)
Ama şunu belirtmeliyimki çok kullanılacağını sanmıyorum amacım kötülemek asla değil.

Başarılar.
Teşekkürler, bir sunucu da gördük ve belki kullanmak isteyen olur diye kodladık.
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Hala Discord sunucumuza katılmadın mı?

Büyük bir topluluğun parçası ol, etkinliklere katıl ve özel hediyeler kazanma şansı yakala!

Şimdi Katıl
Üst