Resource icon

Addon ClassySK 1.2.0

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

Supported Skript Version
  1. 2.15
Supported Minecraft Versions
  1. 1.21
  2. 26.1
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!

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

Code Examples
C#:
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

C#:
set {-actionBar::%player%} to new instance of SmartActionBar:
    player: player
    refreshRate: 1

{-actionBar::%player%}::play("<red>cool text", 3 seconds)
Author
novystxr
Downloads
145
Views
361
First release
Last update
Rating
0.00 star(s) 0 ratings

Latest updates

  1. 1.2.0 Release

    Constant fields This update adds constant fields, along with some bug fixes from the last...
  2. Concrete types

    This update primarily adds class-specific types to classysk. This was a *big* maybe for the...
  3. 1.0.2 Hotfix

    - fixed an issue where classes would be registered before methods/field were validated meaning...