An example to show how a proper plugin for Lambda Client is set up

Overview

Lambda Plugin SDK

This project in an example to show how a proper plugin for Lambda Client is set up. The advantage of plugins for a utility mod is that they allow the user to decide what features their personalized client will have. Plugins work in plug and play manner, and can be downloaded and activated inside the ingame menu without reloading the client as long as no mixins are used for the plugin. If you are scared about the Kotlin in this project be aware that Kotlin is a wrapper language for Java. That means that plugins can also be natively written in Java.

Setup

To achieve coding building and publishing your own plugin most of the following steps are required.

Fork

This is a template repository and can be used as a base to create a custom plugin. Press the Use as template button on GitHub to automatically create a linked fork to this repository.

Clone Repository

Clone the repository to your local machine. Use the link of either your fork or the main repository.

git clone https://github.com/lambda-client/plugin-sdk

Setup IDE

In this guide we will use IntelliJ IDEA as IDE.

  1. Open the project from File > Open...
  2. Let the IDE collect dependencies and index the code.
  3. Goto File > Project Structure... > SDKs and make sure an SDK for Java 8 is installed and selected, if not download it here
  4. Run the genIntellijRuns Gradle task, or run ./gradlew genIntellijRuns

Configure Gradle

Test if the environment is set up correctly by building the plugin jar using the Gradle tab on the right side of the IDE.

  1. Go to PluginExample > Tasks > build > jar in the Gradle tab and run the script
  2. IntelliJ will create a new directory called build. The final built jar will be in build/libs

Config

Configure the metadata of your plugin in plugin_info.json. The flag main_class must contain the target main class Plugin in this case it is PluginExample.kt

Plugin

The plugin main class will act as a register for the functions a plugin can provide. For example when a new module class is created you have to add this to the onLoad() function of the plugin class.

modules.add(ModuleExample)

Every service is required to be added to the main class in order to index the contents.

PluginModule

A module represents a utility module inside the game. The PluginModule class acts as a wrapper for Module class. For many examples on how a module can work check out the native modules of lambda, or the given example in this project. The difference from the native Module class is that each component of a plugin requires a reference to the main Plugin class.

pluginMain = PluginExample

Every PluginModule class will need to be registered to the main plugin class

ClientCommand

Plugins use the same class as the native client for registering commands. Feel free to check out the commands of Lambda Client as a reference.

PluginLabelHud

A LabelHud is used to display information in the player GUI. The PluginLabelHud class acts as a wrapper for LabelHud class. For many examples on how a hud can work check out the native hud elements of lambda, or the given example in this project. The difference to the native LabelHud class is that a referral to the main plugin class is given in the object data.

pluginMain = PluginExample

Every PluginLabelHud class will need to be registered to the main Plugin class.

Background Jobs

If coroutines are needed background jobs can be registered using

bgJobs.add(BackgroundJob)

Mixin

Example coming soon. Plugin won't be able to hot reload anymore because mixins need to be triggered on client start.

Build

  1. Go to PluginExample > Tasks > build > jar in the Gradle tab and run the script
  2. IntelliJ will create a new directory called build the final built jar will be in build/libs
  3. Put the ExamplePlugin-1.0.jar into your ./minecraft/lambda/plugins folder and run the game.

Publish (coming soon)

Insert the link of your created fork into the plugin manager to load the plugin, or transfer your repository to official plugin organization of Lambda. After review, your plugin may get added to the native marketplace.

You might also like...
ListView Example with custom Adapter Using Kotlin in Android Studio
ListView Example with custom Adapter Using Kotlin in Android Studio

Kotlin-ListView ListView Example with custom Adapter Using Kotlin in Android Studio Steps to follow : Build ListView with Custom Adapter in Kotlin Add

This application is an example of how to create menu on android platform.
This application is an example of how to create menu on android platform.

HW_Menu This application is an example of how to create menu on android platform. Table of Contents Introduction Screenshots Resources Contact Introdu

Example of combination recommended by Google libraries

Project description This project includes several widely used libraries and shows how to deal with them in connection. Project created as multilayer p

Spring Native Bookcase Backend Example

Spring Native Bookcase Backend Example Simple example for bookcase backend. Saves bookcases and list them (simple CRUD). set database connection prope

PolitcalPreparedness is an example application built to demonstrate core Android Development skills recommended by Google.

PolitcalPreparedness is an example application built to demonstrate core Android Development skills recommended by Google.

Quarkus Sample Application with extensions cache, kotlin, rest client, resteasy and smallrye

quarkus-sample Project This project uses Quarkus, the Supersonic Subatomic Java Framework. If you want to learn more about Quarkus, please visit its w

Basic-Android-Project - A Basic Android Project with proper structure and all necessary dependencies

Basic-Android-Project A Basic Android Project with proper structure and all nece

Kotlin/JVM Lambda example

kotlin-lambda-example-jvm Kotlin Lambda example on JVM contains four CDK stacks of Kotlin Lambda on JVM: JVM on x86, JVM on Arm64, JVM with C1 compile

A gradle plugin for getting java lambda support in java 6, 7 and android

Gradle Retrolambda Plugin This plugin will automatically build your java or android project with retrolambda, giving you lambda goodness on java 6 or

Lambda Plugin for duping on 5b5t

Autodupes I said I wouldn't, but here we are. This is a Lambda client plugin. Becuase I was bored. These 2 Modules are for 5b5t, a server with an inte

Lynx is an Android library created to show a custom view with all the information Android logcat is printing, different traces of different levels will be rendererd to show from log messages to your application exceptions. You can filter this traces, share your logcat to other apps, configure the max number of traces to show or the sampling rate used by the library. This is a Kotlin multiplatform template project used to generate and deploy a natively compiled AWS lambda function using the custom runtime.
This is a Kotlin multiplatform template project used to generate and deploy a natively compiled AWS lambda function using the custom runtime.

Overview This is a Kotlin multiplatform template project used to generate and deploy a natively compiled AWS Lambda function using a custom runtime. U

Lambda-snake.kt - Snake Game Implementation for Web using Kotlin programming language compiled for Javascript
Lambda-snake.kt - Snake Game Implementation for Web using Kotlin programming language compiled for Javascript

Projeto da disciplina de Linguagem de Programação Funcional 2021.1 (jan/2022) 📄

LiteGo is a Java-based asynchronous concurrency library. It has a smart executor, which can be freely set the maximum number of concurrent at same time , and the number of threads in waiting queue. It can also set waiting policies and overload strategies.

LiteGo:「迷你」的Android异步并发类库 LiteGo是一款基于Java语言的「异步并发类库」,它的核心是一枚「迷你」并发器,它可以自由地设置同一时段的最大「并发」数量,等待「排队」线程数量,还可以设置「排队策略」和「超载策略」。 LiteGo可以直接投入Runnable、Callable

A beautiful set of predefined colors and a set of color methods to make your Android development life easier.
A beautiful set of predefined colors and a set of color methods to make your Android development life easier.

Colours is a port of the Colours Library for iOS made by my good friend Ben Gordon. You can find that project here. Installation Maven Central Colours

Sample project created to show some of the best Android practices to work in the Android UI Layer. The UI layer of this project has been implemented using MVP or MVVM (without binding engine) to show how this patterns works. This project is used during the talk
Kotlin-client-dsl - A kotlin-based dsl project for a (Client) - (Plugin) styled program

kotlin-client-dsl a kotlin-based dsl project for a (Client) - (Plugin) styled p

Example of migrating from Dagger to Hilt with a real service/repository example

DaggerToHilt Overview This repo provides a real example of using Hilt for dependency injection. It hits endpoints provided by the Movie Database, and

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

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

Owner
KMatias
awkdjoesfhi
KMatias
An app to manage posts such as create, update, show the post list and detail also delete the post.

Otopost An app to manage posts such as create, update, show the post list and detail also delete the post. Minimum Requirements Software Android Studi

Imantoko 1 Oct 20, 2021
This is An Android Project. in which we use SqLite Database. We perform Insert,delete,update and Show The existing data. operations using SqLite.

SqLite Database Keywords : SqLite, Android, Database This is An Android Project. in which we use SqLite Database. We perform Insert,delete,update and

Rudra_deep 1 Nov 7, 2021
This is an example implementation of android accessibility services with 5 Sample Actions

Android Accessibility Services Example This is an example implementation of android accessibility services with 5 Sample Actions such as: Simulate Pow

Muhammad Fahriansyah 7 Jul 1, 2022
This is an example repository to demonstrate the good practices of using ViewModel and how usage of AndroidViewModel can make things worst in a codebase

ViewModel Good Practices ??‍♂️ This is a example repository to demonstrate the good practices of using ViewModel and how usage of AndroidViewModel can

Shreyas Patil 29 Sep 28, 2022
📌This repo contains the kotlin implementation of TensorflowLite Example Android Apps🚀

TensorflowLite Examples Kotlin This repo contains the kotlin implementation of TensorflowLite Example Apps here, which are mostly implemented in java

Sunit Roy 29 Jan 1, 2023
Example Android library project that works with jitpack.io

android-example Example Android library project that works with jitpack.io. See this Tutorial on how to publish an Android Library with JitPack. For m

Denys Denysenko 0 Dec 20, 2021
This example was built for lecturing proposes, it shows how to consume data from an API.

Android Kotlin NewsMobEDJDCM2122 Example - EDJD 2021/2022 This example was wirten during the Mobile Computing lectures in the course 'Lincentura em En

null 0 Nov 8, 2021
An example Android Application to test out Kotlin development in Adndroid

AndroidDiceGenerator This is an example Android Application to test out Kotlin development in Adndroid. On pressing a button, the application generate

Fredrick Ojure 0 Oct 28, 2021
Its a small example with Custom Employee object is sent from one Fragment to another.

Kotlin-SafeArgs-Custom-Object Its a small example with Custom Employee object is sent from one Fragment to another. Dependencies used // Navigation

Akshay Teli 0 Oct 30, 2021
ROOM Database Example with MVVM in Kotlin[Fragments,Navigation]

RoomDatabase_SampleApp Room Database Sample App Overview Of This Room Database Application In this app, we can do operation on room database | Insert,

RUHUL AMIN CHOUDHURY 0 Nov 3, 2021