A react-like kotlin library to create an inventory ui easily in paper plugins

Related tags

Kotlin ieact
Overview

Ieact

A react-like kotlin library to create an inventory ui easily

Use

// build.gradle.kts
repositories {
    // ...
    mavenCentral()
    // ...
}

dependencies {
    // ...
    implementation("xyz.r2turntrue:ieact:0.0.1") // !! DO NOT SHADE THIS LIBRARY
    // ...
}
# plugin.yml
libraries:
  - xyz.r2turntrue:ieact:0.0.1

Example Component

// A component without state & props
class Test1Component(props: Any?, player: Player): IeactComponent(9, Component.text("Hello, World!"), props, player) {
    val theStack = ItemStack(Material.APPLE)

    override fun render(): IeactRendered =
        ieact {
            item(x = 0, y = 0, stack = theStack, onClick = {
                player.sendMessage("TEST")
            })
        }
}
= 1) Material.values().filter { e -> e != Material.APPLE }.random() else Material.APPLE), onClick = { player.sendMessage("TEST") }) counter++ } } }">
// A component with state
data class Test2ComponentState(var counter: Int)

class Test2Component(props: Any?, player: Player): IeactComponent(9, Component.text("Hello, World!"), props, player) {
    init {
        state = Test2ComponentState(0)
    }

    override fun render(): IeactRendered =
        ieact {
            state?.run {
                item(x = 0, y = 0, stack = ItemStack(if(counter >= 1) Material.values().filter { e -> e != Material.APPLE }.random() else Material.APPLE), onClick = {
                    player.sendMessage("TEST")
                })
                counter++
            }
        }

}
You might also like...
A set of highly-opinionated, batteries-included gradle plugins to get you started building delicious multi-module Kotlin projects

Sourdough Gradle What is Sourdough Gradle? Sourdough is a set of highly opinionated gradle plugins that aim to act as the starter for your Kotlin proj

A collection of plugins for Aliucord.

Aliucord Plugins collection Plugins for Aliucord Download Download from here AttachmentUtils Adds a context menu to attachments. Gnuify Appends "GNU/"

BungeePluginManagerPlus - Dynamically manage your BungeeCord plugins

BungeePluginManagerPlus A plugin for BungeeCord / Waterfall that allows you to m

Minimal UI library for Android inspired by React
Minimal UI library for Android inspired by React

Anvil - reactive views for Android Anvil is a small Java library for creating reactive user interfaces. Originally inspired by React, it suits well as

A React Native library making file access easier for developers as first class citizens, without the tears

React Native File Gateway A React Native library making file access easier for developers as first class citizens, without the tears. ⚠️ NOTE: This li

Netflix inspired OTT Home Screen, Contains implementation in Reactjs, Kotlin React Wrapper, Jetpack Compose Web

Netflix-Clone-React Practising React by building Netflix Clone Requirements TMDB api key : Add TMDB API key to AppApi.kt Learning Resourcce Build Netf

Kotlin Multiplatform lifecycle-aware business logic components (aka BLoCs) with routing functionality and pluggable UI (Jetpack Compose, SwiftUI, JS React, etc.), inspired by Badoos RIBs fork of the Uber RIBs framework
Kotlin Multiplatform lifecycle-aware business logic components (aka BLoCs) with routing functionality and pluggable UI (Jetpack Compose, SwiftUI, JS React, etc.), inspired by Badoos RIBs fork of the Uber RIBs framework

Decompose Please see the project website for documentation and APIs. Decompose is a Kotlin Multiplatform library for breaking down your code into life

Reapp is everything you need to build amazing apps with React: a collection of packages that work together, our UI kit, and a CLI that scaffolds your app and includes a server and build system.
Reapp is everything you need to build amazing apps with React: a collection of packages that work together, our UI kit, and a CLI that scaffolds your app and includes a server and build system.

What is it? Reapp is everything you need to build amazing apps with React: a collection of packages that work together, our UI kit, and a CLI that sca

[Android Library] A SharedPreferences helper library to save and fetch the values easily.

Preference Helper A SharedPreferences helper library to save and fetch the values easily. Featured in Use in your project Add this to your module's bu

Comments
  • (추정) 다수가 UI를 열고 있을 때 닫히지 않음

    (추정) 다수가 UI를 열고 있을 때 닫히지 않음

    여러명에서 UI를 렌더링하고 있을 때, Inventory가 닫히지 않는 것 같습니다 (InventoryCreationTests에서 openInventory.close 부분을 주석처리할 시에 testInventoryClose에 실패합니다) 위의 부분을 주석처리 하였음에도 단위테스트 testInventoryClose만 실행할 경우에는 정상적으로 작동합니다.

    MockBukkit의 버그에 의해 발생할 수도 있으니, 실제 게임에서의 테스트가 필요합니다.

    bug need playtest 
    opened by R2turnTrue 1
Owner
R2turnTrue
like kotlin, minecraft, unity programming
R2turnTrue
Gradle plugin adding a task to run a Paper Minecraft server

Run Paper Run Paper is a Gradle plugin which adds a task to automatically download and run a Paper Minecraft server along with your plugin built by Gr

Jason 64 Dec 29, 2022
Solves every bug, ever, for any Paper server.

NoServer Solves every bug, ever, for any Paper server. How does it work? By employing the use of advanced philosophical-programmatic thinking, we have

Brian 7 Dec 29, 2021
A high-performance fork of Paper/Airplane designed for large servers.

Pufferfish A highly optimized Paper/Airplane fork designed for large servers requiring both maximum performance, stability, and "enterprise" features.

Pufferfish Studios LLC 399 Jan 7, 2023
Paper plugin for third-party AuthMe logins

Interactive Login Paper plugin that extends AuthMe (or AuthMeReloaded) with interactive third-party logins. Currently supports Discord as an external

Leonardo Giovanni Scur 0 Nov 25, 2021
A fork from Paper and unofficial Airplane continuation for RedeObscurity.

Obscurity A fork from Paper and unofficial Airplane continuation for RedeObscurity. Features Downloads This fork is in a state of development. If you

null 0 Jan 6, 2022
WolfxPaper - A Paper fork designed for Wolfx Survial, may useful for some Semi-Vanilla Server

WolfxPaper A Paper fork designed for Wolfx Survial, may useful for some "Semi-Va

TenkyuChimata 1 Jan 19, 2022
Paper-ui - A Multiplatform Compose Theme for your Compose app

paper-ui (WIP) Screen.Recording.2022-02-13.at.8.14.45.PM.mov A Multiplatform Com

theapache64 45 Oct 5, 2022
A somewhat copy past of Jetbrain's code from the kotlin plugin repo to make it humanly possible to test Intellij IDEA kotlin plugins that work on kotlin

A somewhat copy past of Jetbrain's code from the kotlin plugin repo to make it humanly possible to test Intellij IDEA kotlin plugins that work on kotlin

common sense OSS 0 Jan 20, 2022
Provides Kotlin libs and some features for building Kotlin plugins

Kotlin Plugin Provides Kotlin libs and some features for building awesome Kotlin plugins. Can be used instead of CreeperFace's KotlinLib (don't use to

null 3 Dec 24, 2021
With MaterialTimelineView you can easily create a material looking timeline.

MaterialTimelineView With MaterialTimelineView you can easily create a material looking timeline. Setup The library is pushed to jCenter() as an AAR,

Przemek 454 Dec 19, 2022