Skript Paylaşımı fCoin | Forumun en iyi coin skripti | 54 adet itemli market | %100 Yaml | 0 Variable

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Tebrik ederim, olağanüstü.
 
Ha yaml kullanmışsın ha variable. ikiside tamamen aynı. yaml'ı sürekli kaydedip sunucuya ani yük bindirdiğinden bunun gibi skriptlerde yaml kullanmak daha kötü.

sanırım else if nasıl çalışır bilmiyorsun. Kısaca anlatacağım:
if, parametre değeri true döndürürse body sinde bulunan kodu çalıştırır.
her if için bu kontrol sağlanır.

else if, için ise bu durum biraz daha farklıdır. eğer kontrollerden birisi true döndürmüşse kalan kontroller atlanır.
kısacası, 3 kontrol yerine 1 kontrol sağlanmış olur. Bu uzun bir kod için epey performans sağlar.
eğer ki else if karışık geldiyse, switch case de kullanabilirsin.

bu yazdığım mesajı "baltalama" veya "kötüleme" olarak algılamaman için ek bir not düşürüyorum. seni baltalamak isteyenler, kendini geliştirmene yarayacak olan kötü yanlarından bahsetmezler, kötü(l)(d)eyip geçerler.

Kod:
function impCoin(p: player, n: number, a: text):
    if {_a} is "add":
        set {_v} to (yaml value "players.%{_p}%" from "players")
        set (yaml value "players.%{_p}%" from "players") to {_n} + {_v}
    if {_a} is "remove":
        set {_v} to (yaml value "players.%{_p}%" from "players")
        set (yaml value "players.%{_p}%" from "players") to {_v} - {_n}
    if {_a} is "set":
        set (yaml value "players.%{_p}%" from "players") to {_n}
    save yaml "players"
Kod:
function impCoin(p: player, n: number, a: text):
    if {_a} is "add":
        set {_v} to (yaml value "players.%{_p}%" from "players")
        set (yaml value "players.%{_p}%" from "players") to {_n} + {_v}
    else if {_a} is "remove":
        set {_v} to (yaml value "players.%{_p}%" from "players")
        set (yaml value "players.%{_p}%" from "players") to {_v} - {_n}
    else if {_a} is "set":
        set (yaml value "players.%{_p}%" from "players") to {_n}
    save yaml "players"
 
Vay be, efsane olmuş.Elinize sağlık!
 
Ha yaml kullanmışsın ha variable. ikiside tamamen aynı. yaml'ı sürekli kaydedip sunucuya ani yük bindirdiğinden bunun gibi skriptlerde yaml kullanmak daha kötü.

sanırım else if nasıl çalışır bilmiyorsun. Kısaca anlatacağım:
if, parametre değeri true döndürürse body sinde bulunan kodu çalıştırır.
her if için bu kontrol sağlanır.

else if, için ise bu durum biraz daha farklıdır. eğer kontrollerden birisi true döndürmüşse kalan kontroller atlanır.
kısacası, 3 kontrol yerine 1 kontrol sağlanmış olur. Bu uzun bir kod için epey performans sağlar.
eğer ki else if karışık geldiyse, switch case de kullanabilirsin.

bu yazdığım mesajı "baltalama" veya "kötüleme" olarak algılamaman için ek bir not düşürüyorum. seni baltalamak isteyenler, kendini geliştirmene yarayacak olan kötü yanlarından bahsetmezler, kötü(l)(d)eyip geçerler.

Kod:
function impCoin(p: player, n: number, a: text):
    if {_a} is "add":
        set {_v} to (yaml value "players.%{_p}%" from "players")
        set (yaml value "players.%{_p}%" from "players") to {_n} + {_v}
    if {_a} is "remove":
        set {_v} to (yaml value "players.%{_p}%" from "players")
        set (yaml value "players.%{_p}%" from "players") to {_v} - {_n}
    if {_a} is "set":
        set (yaml value "players.%{_p}%" from "players") to {_n}
    save yaml "players"
Kod:
function impCoin(p: player, n: number, a: text):
    if {_a} is "add":
        set {_v} to (yaml value "players.%{_p}%" from "players")
        set (yaml value "players.%{_p}%" from "players") to {_n} + {_v}
    else if {_a} is "remove":
        set {_v} to (yaml value "players.%{_p}%" from "players")
        set (yaml value "players.%{_p}%" from "players") to {_v} - {_n}
    else if {_a} is "set":
        set (yaml value "players.%{_p}%" from "players") to {_n}
    save yaml "players"

Değerli yorumun için teşekkür ederim. Else if konusunda çok haklısın. Hep kullanmayı unutuyorum daha dikkatli olacağım artık. Ayrıca yaml kullanmak variable kullanmaktan daha performanslı oluyor. Bunu @Kardan İsmail denemişti hatta. Eğer hala bilgisayarında duruyorsa ekran görüntüleri buraya atabilir.
 
G
Merhaba Türkiye'nin sevgili Minecraft oyuncuları, bugün harika bir coin skripti ile karşınızdayım. Skriptimin adı fCoin.

Skript 1.8 için yapılmıştır. Eğer 1.8 kullanmayıp bu skripti kullanmak istiyorsanız bana discord adresimden ulaşın istediğiniz versiyonu yapıp atayım size.





YAML:
items:
    item1:
        name: Elmas &2Kılıç
        coin: 20
        slot: 0
        ditem: Diamond Sword
        lore:
        - "&8&m----------------------"
        - " "
        - "&7Büyüler;"
        - "&8► &7Keskinlik: &210"
        - "&8► &7Kırılmazlık: &210"
        - " "
        - "&8&m----------------------"
        - " "
        - "&7Ücret: &2%price%&7 Coin"
        - " "
        - "&8&m----------------------"
        - " "
        - "&8►&2&nSatın almak için tıkla"
        - " "
        item:
            name: Kılıç
            item: diamond sword
            amount: 1
            lore:
            - "Bu skript Fhalinkz tarafından yapılmıştır"
            - "Bu bir kılıçtır"
            enchant:
            - "sharpness 10"
            - "unbreaking 10"
            commands:
                player:
                - test1
                console:
                - test2

Kod:
on load:
    load yaml "plugins/fCoin/players.yml" as "players"
    load yaml "plugins/fCoin/market.yml" as "market"
    if yaml "market" is empty:
        set yaml value "items.item1.name" from "market" to "xD"
        set yaml value "items.item1.coin" from "market" to "xD"
        set yaml value "items.item1.slot" from "market" to 1
        set yaml value "items.item1.ditem" from "market" to "xD"
        add "&6Fiyatı: &a50 Coin" to yaml list "items.item1.lore" from "market"
        add "bu bir kilic" to yaml list "items.item1.item.lore" from "market"
        add "sharpness 5" to yaml list "items.item1.item.enchant" from "market"
        add "unbreaking 5" to yaml list "items.item1.item.enchant" from "market"
        add "test1" to yaml list "items.item1.item.commands.player" from "market"
        add "test2" to yaml list "items.item1.item.commands.console" from "market"
        save yaml "market"
    loop yaml nodes with keys "items" from "market":
        if yaml value "items.%loop-value%.coin" from "market" isn't set:
            send "&8[&afCoin&8] &4Yaml Hatası! &c""plugins/fCoin/market.yml"" dosyasında hata bulundu. &6Coin&4'e değer verilmemiş." to console
on inventory close:
    set {_n} to impGetCoin(player)
    if {_n} is 0:
        delete yaml value "players.%player%" from "players"

command /coin [<text>] [<player>] [<number>]:
    trigger:
        if arg-1 isn't set:
            send "&6Coin Miktarın: &f%impGetCoin(player) otherwise 0%" to player
        if arg-1 is "gönder" or "gonder":
            if arg-2 is set:
                if arg-3 is set:
                    if impGetCoin(player) is greater than or equal to arg-3:
                        impCoin(player, arg-3, "remove")
                        impCoin(arg-2, arg-3, "add")
                        send "&6%player% &7adlı oyuncu sana &6%arg-3% &7adet coin gönderdi." to arg-2
                        send "&6%arg-2% &7adlı oyuncuya &6%arg-3% &7adet coin gönderdin." to player
                        save yaml "players"
        if arg-1 is "market":
            impCoinMarket(player)
          
command /fcoin [<text>] [<offline player>] [<number>]:
    permission: coin.admin
    trigger:
        if arg-1 isn't set:
            send "&6/fcoin &fgonder [player] [sayı]"
            send "&6/fcoin &fyap [player] [sayı]"
            send "&6/fcoin &feksilt [player] [sayı]"
            send "&6/fcoin &fogren [player]"
        if arg-1 is "gonder" or "gönder":
            impCoin(arg-2, arg-3, "add")
            send "&6%arg-2% &7adlı oyuncuya &6%arg-3% &7adet coin gönderildi."
        if arg-1 is "yap":
            impCoin(arg-2, arg-3, "set")
            send "&6%arg-2% &7adlı oyuncunun coini &6%arg-3% &7olarak ayarlandı."
        if arg-1 is "eksilt":
            impCoin(arg-2, arg-3, "remove")
            send "&6%arg-2% &7adlı oyuncudan &6%arg-3% &7adet coin silindi."
        if arg-1 is "ogren" or "öğren":
            send "&6%arg-2% &7adlı oyuncunun coin miktarı &6%impGetCoin(arg-2) otherwise 0%."
          
function impCoin(p: player, n: number, a: text):
    if {_a} is "add":
        set {_v} to (yaml value "players.%{_p}%" from "players")
        set (yaml value "players.%{_p}%" from "players") to {_n} + {_v}
    if {_a} is "remove":
        set {_v} to (yaml value "players.%{_p}%" from "players")
        set (yaml value "players.%{_p}%" from "players") to {_v} - {_n}
    if {_a} is "set":
        set (yaml value "players.%{_p}%" from "players") to {_n}
    save yaml "players"
  
function impGetCoin(p: player) :: number:
    set {_coin} to (yaml value "players.%{_p}%" from "players") otherwise 0
    return {_coin}
          
function impCoinMarket(player: player):
    open virtual chest with size 6 named "&6Coin &8>> &aMarket" to {_player}
    make gui slot (integers between 0 and 53) of {_player} with black stained glass pane named " " to nothing
    loop yaml nodes with keys "items" from "market":
        delete {_s::*}
        set {_s::slot} to yaml value "items.%loop-value%.slot" from "market"
        set {_s::ditem} to yaml value "items.%loop-value%.ditem" from "market" parsed as item type
        set {_s::lore::*} to yaml list "items.%loop-value%.lore" from "market"
        set {_s::name} to yaml value "items.%loop-value%.name" from "market"
        set {_coin} to yaml value "items.%loop-value%.coin" from "market"

        set {_item::name} to yaml value "items.%loop-value%.item.name" from "market"
        set {_item::item} to yaml value "items.%loop-value%.item.item" from "market" parsed as item type
        set {_item::lore::*} to yaml list "items.%loop-value%.item.lore" from "market"
        set {_item::amount} to yaml value "items.%loop-value%.item.amount" from "market"
        set {_item::enchant::*} to yaml list "items.%loop-value%.item.enchant" from "market"
        loop {_item::enchant::*}:
            set {_item::enchant::%loop-value-2%} to loop-value-2 parsed as enchantment type
        set {_item::player-commands::*} to yaml list "items.%loop-value%.item.commands.player" from "market"
        set {_item::console-commands::*} to yaml list "items.%loop-value%.item.commands.console" from "market"
        replace "%%price%%" with "%{_coin}%" in {_s::lore::*}
        replace "%%player%%" with "%{_player}%" in {_item::console-commands::*}
        make gui slot {_s::slot} of {_player} with ({_s::ditem} named colored {_s::name} with lore colored join {_s::lore::*} with "||") to close:
            if impGetCoin({_player}) is greater than or equal to {_coin}:
                impCoin({_player}, {_coin}, "remove")
                loop {_item::player-commands::*}:
                    execute player command {_item::player-commands::*}
                    stop loop
                loop {_item::console-commands::*}:
                    execute console command {_item::console-commands::*}
                    stop loop
                if {_item::enchant::*} is set:
                    set {_item-} to ({_item::item} named colored {_item::name} with lore colored join {_item::lore::*} with "||")
                    loop {_item::enchant::*}:
                        enchant {_item-} with {_item::enchant::%loop-value-2%}
                    give {_item::amount} of {_item-} to {_player}
                else:
                    give {_item::amount} of ({_item::item} named colored {_item::name} with lore colored join {_item::lore::*} with "||") to {_player}
                save yaml "players" 
            else:
                send "&7Bu eşyayı almak için yeterli miktarda &6Coin&7'e sahip değilsin." to {_player}
on break:
    if event-block is obsidian block:
        impCoin(player, {_level}, "add")


Notlar:
- 1 obsidian kırmak 1 adet coin kazandırır.
- Markete maksimum 54 adet eşya koyabilirsiniz.
- Bütün oyuncuların coin bilgileri "plugins/fCoin/players.yml" içerisinde bulunur.
- Admin komutlarını kullanmak için "coin.admin" izni gerekmektedir.

Admin komutları:
- fcoin gönder [oyuncu] [miktar]
- fcoin yap [oyuncu] [miktar]
- fcoin eksilt [oyuncu] [miktar]
- fcoin öğren [oyuncu] [miktar]

Oyuncu komutları:
- coin
- coin gönder [oyuncu] [miktar]
- coin market

Güzel
 
Değerli yorumun için teşekkür ederim. Else if konusunda çok haklısın. Hep kullanmayı unutuyorum daha dikkatli olacağım artık. Ayrıca yaml kullanmak variable kullanmaktan daha performanslı oluyor. Bunu @Kardan İsmail denemişti hatta. Eğer hala bilgisayarında duruyorsa ekran görüntüleri buraya atabilir.

79503


Böyle bir dünya kaydedilirken alınan tps gerçekten çok şaşırtıcı. 1 tick içerisinde 20mb veri yazmaya çalışan sunucu bu işlem, SYNC olduğundan zorlanmakta. Yani, 1 tick içerisinde bir şeyleri **bir dosyaya yazdırmak** sunucuyu zorlamakta.


Skript yaml, save yaml kaynak:
Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.

Kod:
        for (String name : this.file.getAll(event)) {
            if (!SkriptYaml.YAML_STORE.containsKey(name))
                continue;
            YAMLProcessor yaml = SkriptYaml.YAML_STORE.get(name);
            if (yamlIndent != null)
                yaml.setIndent(this.yamlIndent.getSingle(event).intValue());
            yaml.save(this.mark == 1 ? false : true);
        }

YamlProccessor#save


Kod:
    public boolean save(boolean extraLines) {
        OutputStream stream = null;

        File parent = file.getParentFile();

        if (parent != null) {
            parent.mkdirs();
        }

        try {
            stream = getOutputStream();
            if (stream == null)
                return false;
            OutputStreamWriter writer = new OutputStreamWriter(stream, "UTF-8");
            if (header != null) {
                writer.append(header);
                writer.append(LINE_BREAK);
                if (extraHeaderLine)
                    writer.append(LINE_BREAK);
            }
            String firstKey = "";
            if (!root.keySet().isEmpty())
                firstKey = root.keySet().toArray(new String[root.size()])[0];
            if (comments.isEmpty() || format != YAMLFormat.EXTENDED) {
                if (extraLines && header != null)
                    writer.append(LINE_BREAK);
                for (Entry<String, Object> entry : root.entrySet()) {
                    if (extraLines && !entry.getKey().equals(firstKey))
                        writer.append(LINE_BREAK);
                    yaml.dump(Collections.singletonMap(entry.getKey(), serialize(entry.getValue())), writer);
                }
                // yaml.dump(root, writer);
            } else {
                if (extraLines && header != null)
                    writer.append(LINE_BREAK);
                // Iterate over each root-level property and dump
                for (Entry<String, Object> entry : root.entrySet()) {
                    // make an extra line between nodes if true
                    if (extraLines && !entry.getKey().equals(firstKey))
                        writer.append(LINE_BREAK);
                    // Output comment, if present
                    YAMLComment comment = comments.get(entry.getKey());
                    if (comment != null) {
                        if (comment.hasExtraLine())
                            writer.append(LINE_BREAK);
                        writer.append(comment.getComment());
                        writer.append(LINE_BREAK);
                    }
                    // Dump property
                    yaml.dump(Collections.singletonMap(entry.getKey(), serialize(entry.getValue())), writer);
                }
            }
            return true;
        } catch (IOException ignored) {
        } finally {
            try {
                if (stream != null) {
                    stream.close();
                }
            } catch (IOException ignored) {
            }
        }

        return false;

bu kod, dünyanın kaydedilmesinden bile daha zahmetli şeyler yapıyor. bukkit apisi kullanılarak yazılsaydı daha sağlıklı olabilirdi lakin OutputStream kullanılmış...

böyle bir kodu her, oyuncuya coin verildiğinde, alındığında vs çalıştırmak sunucuyu zorlamaktadır.
bu yazdıklarım herhangi bir skript için geçerli, sadece bu skripte değil.

yaml kullanmak güzel ve hoş lakin her dakika save yaml kullanılmasına neden olunacak bir skript ise, kullanılması hiç iyi değildir...
 
Ekli dosyayı görüntüle 79503

Böyle bir dünya kaydedilirken alınan tps gerçekten çok şaşırtıcı. 1 tick içerisinde 20mb veri yazmaya çalışan sunucu bu işlem, SYNC olduğundan zorlanmakta. Yani, 1 tick içerisinde bir şeyleri **bir dosyaya yazdırmak** sunucuyu zorlamakta.


Skript yaml, save yaml kaynak:
Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.

Kod:
        for (String name : this.file.getAll(event)) {
            if (!SkriptYaml.YAML_STORE.containsKey(name))
                continue;
            YAMLProcessor yaml = SkriptYaml.YAML_STORE.get(name);
            if (yamlIndent != null)
                yaml.setIndent(this.yamlIndent.getSingle(event).intValue());
            yaml.save(this.mark == 1 ? false : true);
        }

YamlProccessor#save


Kod:
    public boolean save(boolean extraLines) {
        OutputStream stream = null;

        File parent = file.getParentFile();

        if (parent != null) {
            parent.mkdirs();
        }

        try {
            stream = getOutputStream();
            if (stream == null)
                return false;
            OutputStreamWriter writer = new OutputStreamWriter(stream, "UTF-8");
            if (header != null) {
                writer.append(header);
                writer.append(LINE_BREAK);
                if (extraHeaderLine)
                    writer.append(LINE_BREAK);
            }
            String firstKey = "";
            if (!root.keySet().isEmpty())
                firstKey = root.keySet().toArray(new String[root.size()])[0];
            if (comments.isEmpty() || format != YAMLFormat.EXTENDED) {
                if (extraLines && header != null)
                    writer.append(LINE_BREAK);
                for (Entry<String, Object> entry : root.entrySet()) {
                    if (extraLines && !entry.getKey().equals(firstKey))
                        writer.append(LINE_BREAK);
                    yaml.dump(Collections.singletonMap(entry.getKey(), serialize(entry.getValue())), writer);
                }
                // yaml.dump(root, writer);
            } else {
                if (extraLines && header != null)
                    writer.append(LINE_BREAK);
                // Iterate over each root-level property and dump
                for (Entry<String, Object> entry : root.entrySet()) {
                    // make an extra line between nodes if true
                    if (extraLines && !entry.getKey().equals(firstKey))
                        writer.append(LINE_BREAK);
                    // Output comment, if present
                    YAMLComment comment = comments.get(entry.getKey());
                    if (comment != null) {
                        if (comment.hasExtraLine())
                            writer.append(LINE_BREAK);
                        writer.append(comment.getComment());
                        writer.append(LINE_BREAK);
                    }
                    // Dump property
                    yaml.dump(Collections.singletonMap(entry.getKey(), serialize(entry.getValue())), writer);
                }
            }
            return true;
        } catch (IOException ignored) {
        } finally {
            try {
                if (stream != null) {
                    stream.close();
                }
            } catch (IOException ignored) {
            }
        }

        return false;

bu kod, dünyanın kaydedilmesinden bile daha zahmetli şeyler yapıyor. bukkit apisi kullanılarak yazılsaydı daha sağlıklı olabilirdi lakin OutputStream kullanılmış...

böyle bir kodu her, oyuncuya coin verildiğinde, alındığında vs çalıştırmak sunucuyu zorlamaktadır.
bu yazdıklarım herhangi bir skript için geçerli, sadece bu skripte değil.

yaml kullanmak güzel ve hoş lakin her dakika save yaml kullanılmasına neden olunacak bir skript ise, kullanılması hiç iyi değildir...
krdş skript-yaml async krdş
Ekran_Alnts.PNG

ss felinkzin
hiçbir şey olmz bunu daha önce de bir arkadaşla tartıştık, skripti bilmiyon desem yalan olcak, biliyon, niye böyle sçma sçma şylr söylüon ?
20 yıllık hddniz yoksa hçbr şy olmz
skript çöb
yaml çöb
 
Ekli dosyayı görüntüle 79503

Böyle bir dünya kaydedilirken alınan tps gerçekten çok şaşırtıcı. 1 tick içerisinde 20mb veri yazmaya çalışan sunucu bu işlem, SYNC olduğundan zorlanmakta. Yani, 1 tick içerisinde bir şeyleri **bir dosyaya yazdırmak** sunucuyu zorlamakta.


Skript yaml, save yaml kaynak:
Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.

Kod:
        for (String name : this.file.getAll(event)) {
            if (!SkriptYaml.YAML_STORE.containsKey(name))
                continue;
            YAMLProcessor yaml = SkriptYaml.YAML_STORE.get(name);
            if (yamlIndent != null)
                yaml.setIndent(this.yamlIndent.getSingle(event).intValue());
            yaml.save(this.mark == 1 ? false : true);
        }

YamlProccessor#save


Kod:
    public boolean save(boolean extraLines) {
        OutputStream stream = null;

        File parent = file.getParentFile();

        if (parent != null) {
            parent.mkdirs();
        }

        try {
            stream = getOutputStream();
            if (stream == null)
                return false;
            OutputStreamWriter writer = new OutputStreamWriter(stream, "UTF-8");
            if (header != null) {
                writer.append(header);
                writer.append(LINE_BREAK);
                if (extraHeaderLine)
                    writer.append(LINE_BREAK);
            }
            String firstKey = "";
            if (!root.keySet().isEmpty())
                firstKey = root.keySet().toArray(new String[root.size()])[0];
            if (comments.isEmpty() || format != YAMLFormat.EXTENDED) {
                if (extraLines && header != null)
                    writer.append(LINE_BREAK);
                for (Entry<String, Object> entry : root.entrySet()) {
                    if (extraLines && !entry.getKey().equals(firstKey))
                        writer.append(LINE_BREAK);
                    yaml.dump(Collections.singletonMap(entry.getKey(), serialize(entry.getValue())), writer);
                }
                // yaml.dump(root, writer);
            } else {
                if (extraLines && header != null)
                    writer.append(LINE_BREAK);
                // Iterate over each root-level property and dump
                for (Entry<String, Object> entry : root.entrySet()) {
                    // make an extra line between nodes if true
                    if (extraLines && !entry.getKey().equals(firstKey))
                        writer.append(LINE_BREAK);
                    // Output comment, if present
                    YAMLComment comment = comments.get(entry.getKey());
                    if (comment != null) {
                        if (comment.hasExtraLine())
                            writer.append(LINE_BREAK);
                        writer.append(comment.getComment());
                        writer.append(LINE_BREAK);
                    }
                    // Dump property
                    yaml.dump(Collections.singletonMap(entry.getKey(), serialize(entry.getValue())), writer);
                }
            }
            return true;
        } catch (IOException ignored) {
        } finally {
            try {
                if (stream != null) {
                    stream.close();
                }
            } catch (IOException ignored) {
            }
        }

        return false;

bu kod, dünyanın kaydedilmesinden bile daha zahmetli şeyler yapıyor. bukkit apisi kullanılarak yazılsaydı daha sağlıklı olabilirdi lakin OutputStream kullanılmış...

böyle bir kodu her, oyuncuya coin verildiğinde, alındığında vs çalıştırmak sunucuyu zorlamaktadır.
bu yazdıklarım herhangi bir skript için geçerli, sadece bu skripte değil.

yaml kullanmak güzel ve hoş lakin her dakika save yaml kullanılmasına neden olunacak bir skript ise, kullanılması hiç iyi değildir...

Java:
        for (String name : this.file.getAll(event)) {

            if (!SkriptYaml.YAML_STORE.containsKey(name))

                continue;

            YAMLProcessor yaml = SkriptYaml.YAML_STORE.get(name);

            if (yamlIndent != null)

                yaml.setIndent(this.yamlIndent.getSingle(event).intValue());

            yaml.save(this.mark == 1 ? false : true);

        }

Yapılan şeyler:
  1. String'ler for loopuna alınıyor, şu an kullanılan String'e name diyoruz.
  2. Eğer YAML isim-işleyici kombinasyonlarını depolayan değişkende (SkriptYaml.YAML_STORE) name girdisi bulunmuyorsa;
  3. for loopuna devam et.
  4. Bulunduğu kesinleşen name girdisinin değeri yaml değişkeninin değeri olarak belirleniyor.
  5. yamlIndent değişkeni boş değilse; (Bu değişken init method'unda ayarlanıyor.)
  6. YAML işleyicinin (YAMLProcessor) setIndent methoduyla YAML boşlukları yamlIndent değişkeninin tam sayı değerine atanıyor.
  7. Efektin kod çalıştırılırken kullanılan "parse mark" değeri kontrol edilerek dosyada boşluk olup olmayacağı belirlenerek işleyiciyle kayıt işlemi yapılıyor.

Kodda hiç bir sorun yok, sadece hava atmak için kullanmışsın.
skript-yaml async çalışır. Sunucunun ana işlemini etkilemez. Kasma ve donma yapmayacaktır.
Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.
tüm Java IO API'sinde olan output sınıflarının kullandığı bir "abstract class"dır. Direkt Java IO'nun output kısmına çöp dedin kısacası.
Bukkit API'si?
 
çoğu coin sisteminin arasında en iyilerinden başarılar dilerim gelistirilebilir
 
+
 
kategori sistemi ekle kardsm
 
bu
ne
yav
çöp
git
süper
hızlı
uçuş
scripti
kodla
coin
neymiş
forumda
50
tane
örneği
var
 
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