HomeJavaModsSteve's Series | Gui Library
Steve's Series | Gui Library
ModsJava

Steve's Series | Gui Library

> Gui Library < THIS PLUGIN REQUIRES Steve's Series | Kotlin ​ The most (or at least one of) advanced GUI management library. Unlike other GUI libraries…

⬇ Download on Spigot
[​IMG]
> Gui Library <
THIS PLUGIN REQUIRES Steve's Series | Kotlin
The most (or at least one of) advanced GUI management library. Unlike other GUI libraries, SS-GuiLibrary supports any kind of GUI, in addition to inventory GUIs, while not currently supported by the library itself, it is entirely possible to create a kind of GUI that would use books instead, as an example. SS-GuiLibrary uses Kotlin for most of it's functions, while it is possible to use it from Java, I highly recommend Kotlin as there are a lot of things with this plugin that would not be as clean of solutions in Java as they can be in Kotlin. The most powerful part of this library is the GuiComponents with their state management.

There are multiple ways in which you can create a chest GUI with this library:

Here's a more advanced example of the GuiComponents:
Code (Kotlin):
class PlayerInfoComponent (
    private val player : Player
) : GuiComponent ( ) {
    private fun getMaxHealth ( ) =
        this@PlayerInfoComponent. player. getAttribute ( Attribute. GENERIC_MAX_HEALTH ) ?. value
 
    override fun ComponentCanvas. render ( ) {
        val playerName = this@PlayerInfoComponent. player. name // The name of a player cannot change, no need to watch it.
        val playerHealth = watch { this@PlayerInfoComponent. player. health }
        val playerMaxHealth = watch { this@PlayerInfoComponent. getMaxHealth ( ) }
 
        item ( 0, 0 ) {
            stack { type = Material. PLAYER_HEAD }
            meta <SkullMeta > {
                setDisplayName ( "${ChatColor.WHITE}$playerName" )
                lore = listOf (
                    "",
                    "${ChatColor.GRAY}Health: ${ChatColor.YELLOW}$playerHealth/${ChatColor.YELLOW}$playerMaxHealth"
                )
            }
        }
    }
}

class SelfInfoComponent : GuiComponent ( ), RootComponent {
    override fun getSize ( ) = GridInventorySize. HOPPER
    override fun getTitle ( ) = "Your Player Info"
 
    override fun ComponentCanvas. render ( ) {
        val player = this@SelfInfoComponent. gui. player
        component ( 2, 0, 1, 1, PlayerInfoComponent (player ) )
    }
}

INTRODUCTION PAGE IS A WORK-IN-PROGRESS!

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Steve's Series | Gui Library is a free Minecraft Java mod. Compatible with Minecraft 1.18. Downloaded 518 times (via Spigot). Download it and open it directly in the game.

Explore more