Warning: file_put_contents(/www/wwwroot/nmbt.106988770/cache/modrinth_versions_DL6BwgfK.json): Failed to open stream: Permission denied in /www/wwwroot/nmbt.106988770/resource_detail.php on line 53
ClassySK - 墨喵 Minecraft 资源

ClassySK

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.1.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/classysk
资源信息

Minecraft 版本: 1.21.11 26.1 26.1.1 26.1.2 26.2

平台: paper

标签: utility

资源介绍

ClassySK is an addon that adds proper object orientation capabilities to skript in the form of classes. Allowing you to write powerful, defensive code and explore OOP concepts within skript!

SkriptHubViewTheDocs
SkriptDocs

Roadmap

Nothing here is set in stone but these are my future ambitions regarding the project (in no particular order)

  • Inheritance: extending other classes
  • Abstract Methods: unimplemented methods that should be implemented by inheritors
  • Constant fields: fields that cant be changed after creation
  • Transient fields: Fields that don't get saved
  • Method and Field Reflection
  • Custom types (maybe): I have an idea to possibly achieve this using bytebuddy and converters


Code Examples

class SmartActionBar:
    public player: player
    public refreshRate: integer = 1

    private isActive: boolean = false
    private values: strings

    public play(value: string, duration: timespan):
        add {_value} to self::values

        if self::isActive is false:
            self::start()

        wait {_duration}
        remove {_value} from self::values

    public start():
        set self::isActive to true

        while self::isActive is true:
            if size of self::values is 0:
                exit loop

            set {_text} to join self::values with "&7 | &r"
            send action bar {_text} ? "" to self::player

            wait self::refreshRate*1 tick

        send action bar "" to self::player
        set self::isActive to false
set {-actionBar::%player%} to new instance of SmartActionBar:
    player: player
    refreshRate: 1

{-actionBar::%player%}::play("<red>cool text", 3 seconds)
下载与版本
评论(0)
请 登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

赞助作者

请 登录 后赞助作者。

🔥 相关推荐
Anime totem (ZeroTwo)

价格:0 墨喵币
下载量:0

查看详情
Fresh Buckets VR

价格:0 墨喵币
下载量:0

查看详情
Easy Netherite Forge

价格:0 墨喵币
下载量:0

查看详情
Vinxx's Custom 3D items

价格:0 墨喵币
下载量:0

查看详情