LirandAPI - Advanced Kotlin API for Spigot

Related tags

App LirandAPI
Overview

Lirand API

Lirand API allows you to develop Spigot plugins faster, easier and more Kotlin-like way.

It includes a lot of cool features like:

  • Command builders based on the Mojang Brigadier
  • Three types of inventory-based menus and their builders
  • Scoreboard builder
  • Easy way to change the NBT of items and entities
  • Items and inventories serialization/deserialization
  • Event flow
  • Online player collections
  • A bunch of useful extensions for working with chat, events, items, inventories, etc.

And most importantly it is backward compatible via 1.16+ Minecraft versions.

Declaring a dependency via Gradle

Add the following to your build script:

repositories { 
    // ...
    mavenCentral()
    maven("https://jitpack.io")
    maven("https://repo.codemc.io/repository/maven-snapshots/")
    maven("https://libraries.minecraft.net")
    // ...
}

dependencies {
    // ... 
    implementation("com.github.dyam0:LirandAPI:VERSION")
    compileOnly("com.mojang:brigadier:1.0.18")
    // ...
}

Replace VERSION with the version of Lirand API you need. Also you can build the latest snapshot on the JitPack and use it as a dependency.

I highly recommend you to shade this dependency into your Jar file as well as some dependencies of Lirand API (MCCoroutine and AnvilGUI).

You might also like...
New-SplashScreen-API - SplashScreen API Implementation Sample

SplashScreen API Implementation Sample Installation - Usage style name="Theme.A

Github-Api-Pagination-Example - Pagination 3 Example using Github Api

Github-Api-Pagination Pagination 3 Example using Github Api Tech Stack 100% Kotl

OpenWeatherMap-API-Demo - Demo Android Application for OpenWeatherMap API

WeatherForecast Demo Android Application for OpenWeatherMap API Table of Content

CoroutinesFlow and ViewModel Retrofit API - Practice with CoroutinesFlow, ViewModel and Retrofit API

Practice with Coroutines Flow, ViewModel and get data with Retrofit from two API

Android App to test API requests against the GitHub API.

Reproducing an issue with GitHub's IP allowlist feature GitHub provides a feature for Enterprise orgs to define an IP allowlist. Requests to the GitHu

An simple image gallery app utilizing Unsplash API to showcase modern Android development architecture (MVVM + Kotlin + Retrofit2 + Hilt + Coroutines + Kotlin Flow + mockK + Espresso + Junit)
An simple image gallery app utilizing Unsplash API to showcase modern Android development architecture (MVVM + Kotlin + Retrofit2 + Hilt + Coroutines + Kotlin Flow + mockK + Espresso + Junit)

Imagine App An simple image gallery app utilizing Unsplash API. Built with ❤︎ by Wajahat Karim and contributors Features Popular photos with paginatio

TODO API Client Kata for Kotlin Developers. The main goal is to practice integration testing using MockWebServer
TODO API Client Kata for Kotlin Developers. The main goal is to practice integration testing using MockWebServer

KataTODOApiClient for Kotlin We are here to practice integration testsing using HTTP stubbing. We are going to use MockWebServer to simulate a HTTP se

A Minecraft Kit API written in Kotlin

hglabor-kits Dependency The library is available on Maven Central, add the following dependencies: implementation("net.axay:hglabor-kits:$version") hg

School project: Weather forecast application made in android studio using Kotlin, SQLite and OpenWeatherMaps free API.
School project: Weather forecast application made in android studio using Kotlin, SQLite and OpenWeatherMaps free API.

A*star 4-cast School project made in android studio using Kotlin, SQLite and free API from OpenWeatherMap.org. A weather forecast app with C(U)RD oper

Comments
  • Commands no longer work on 1.19.1 or higher

    Commands no longer work on 1.19.1 or higher

    Description

    With the introduction of 1.19.1, Minecraft introduced their new Player Safety Features. However this broke something in this command library. When running the Replicator in 1.19. It works as expected. Only when run in 1.19.1 or higher, the console can still execute commands but players commands to register in the console but are not executed.

    Tested on a Macbook with M1 and a PC running linux with a amd64 chip.

    Replicator

    class Replicator : KotlinPlugin() {
    	override fun onEnable() {
    		command("test") {
    			executes {
    				// This always get executed for the console. Regardless of the version.
    				// But not for players. Then it only runs on version 1.19 or lower.
    				source.sendMessage("test")
    			}
    		}
    
    		listen<PlayerCommandPreprocessEvent> { event ->
    			// This is stil works! Even if the command is not executed.
    			println("${event.player.name} preprocessed command: ${event.message}")
    		}
    	}
    
    	override fun onDisable() {
    		adventure.close()
    	}
    }
    
    bug 
    opened by gabber235 1
Releases(0.7.0)
  • 0.7.0(Mar 8, 2022)

    General Information

    This release is breaking because the previous one had some architectural problems. NMS 1.18 has been completely obfuscated and a bunch of bugs related to this change have been fixed in this release.

    Major changes

    • Now it is necessary to manually add kotlin-stdlib and kotlinx.coroutines.
    • Refactored to separate publicly exposed and building DSL stuff.
    • Now objects that perform asynchronous operations use their own coroutine scope instead of the plugin one.
    • Event handler callbacks are no more suspend.
    • Controllers now implement Initializable instead of Controller and located in the place they related to.
    • Most builders' lambda parameters are now crossinline.

    • NodeDSLBuilder and its subclasses no more wrap Brigadier ArgumentBuilder.
    • Fixed Brigadier commands syntax error logging.

    • MenuPagination has been redesigned to be more intuitive.
    • Menus and their event handlers now have Inventory generic type parameters.
    • Menu slot indexing now starts from 0.

    • Event flow is now represented as a separate class named SharedEventFlow.
    • Added assign SharedEventFlow operator.

    • NbtData API has been completely redesigned.
    • Аdded support for all NBT data types.

    • ScoreboardController API is now marked as experimental.
    • Fixed color resetting in built scoreboard lines.

    • Improved event listening DSL by adding ListenerWithPlugin class.

    • ComponentBaseBuilder now duplicates BaseComponent before adding it to the sibling text.
    Source code(tar.gz)
    Source code(zip)
  • 0.6.0(Feb 3, 2022)

    First published version of Lirand API

    It already includes a lot of cool features like:

    • Command builders based on the Mojang Brigadier
    • Three types of inventory-based menus and their builders
    • Scoreboard builder
    • Easy way to change the NBT of items and entities
    • Items and inventories serialization/deserialization
    • Event flow
    • Online player collections
    • A bunch of useful extensions for working with chat, events, items, inventories, etc.

    THIS VERSION IS UNSTABLE, PLEASE USE LATER VERSIONS OR SNAPSHOTS. Most features don't work properly in 1.18.

    Source code(tar.gz)
    Source code(zip)
Owner
dyamo
Spigot developer.
dyamo
An advanced Kotlin (Android Native) application that uses SOLID architectural principles, consumes a RESTFUL Service, downloads & images using best practices

Dog-Playground Kotlin An advanced Kotlin (Android Native) application that uses SOLID architectural principles, consumes a RESTFUL Service, downloads

Amose Suwali 1 Jan 10, 2022
Advanced Android Weather App using MVVM Architecture Sample (ViewModel + LiveData + Kotlin + volley) = Weather App

Advanced Android Weather App using MVVM Architecture Sample (ViewModel + LiveData + Kotlin + volley) = Weather App Video Weather.-.HD.720p.mov Introdu

wykee2 4 Jul 12, 2022
Asteroid radar app -Second Project from Udacity Advanced Android Development Kotlin Nanodegree

Asteroid radar app Using open-source Nasa Api Asteroid Radar is an app to view the asteroids detected by NASA that pass near Earth, you can view all t

Mostafa Mohamed 2 Aug 29, 2022
A sample Android app which showcases advanced usage of Dagger among other open source libraries.

U+2020 A sample Android app which showcases advanced usage of Dagger among other open source libraries. Watch the corresponding talk or view the slide

Jake Wharton 5.7k Dec 27, 2022
This is an Android project allowing you to use the advanced biometric authorization features.

PLEASE NOTE: If your project has minSDK 23 and should support only basic Fingerprint Authorization on most devices - take a look first at the AndroidX

Sergej Komlach 82 Dec 30, 2022
An advanced DEX editor for Android.

An advanced DEX editor for Android.

Mike Anderson 75 Jan 3, 2023
Android app with advanced usage of Epoxy library

Epoxy Advanced Best practices and advanced usages (EditText & Forms) of Epoxy library written in accordance with the Modular and Clean Architectures.

Yusuf Gökmen Arısoy 6 Aug 30, 2022
NetGuard provides simple and advanced ways to block access to the internet

NetGuard NetGuard provides simple and advanced ways to block access to the internet - no root required. Applications and addresses can individually be

Marcel Bokhorst 598 Dec 31, 2022
Gender Checker app built using Kotlin, MVVM, Genderize.io API. Take this as a reference for MVVM and Genderize.io API 🚀

Gender-Checker ?? Gender Checker app built using Kotlin, MVVM, Genderize.io API Enter a name and the app will guess the gender ?? ✨ Highligts: API : G

Jai Keerthick 0 Jan 5, 2022
This is a Movie API app in which data is fetched online from the TMDB site using API authentication.

Movie-API This is a Movie API app in which data is fetched online from the TMDB site using API authentication. MVVM model is used for Database Managme

Atishay Jain 1 Dec 4, 2021