Skip to content

Create first Module

LPDMinecraft edited this page Dec 29, 2021 · 10 revisions

Setup

Go into your InteliJ Proyekt
Select File > Project Structure
Go on Libraries
Go on the + and then Java
Select the Lcraft API File
Select your projekt to add it on
You can select multimodules with CLR
The press "OK"

module.yml

Please follow 1 to 1 this order of the objects

name: 'My TestModule'
description: This is my TestModule
version: '1.0'
spigot-main: de.lcraft.test.Module
bungee-main: de.lcraft.test.Module
author: Lcraft
authors:
  - LPD
  - LetsPlayNik
  - Lcraft
required-modules: 'Lcraft-API, Lcraft Permissions API, Lcraft Languages API'

The Name is the name of your module. In the description you can describe your plugin. Under Version you can set a version that you can vary as you please. For Bukkit plug-ins and Bungeecord plug-ins, you can set two different main modules. These must be different because the complete module system is divided into several areas/systems and the BungeeCord system is completely different from the Spigot system. You can set author and authors, in the end it is an ArrayList that counts both together. This way you can also symbolise, for example, main programmers and helpers. At the required-modules you can name all Modules you use. You have to have these required modules, but you can also add others.

Module class

We will explain how to create a class, but not how to create classes and import methods. So you need a little experience in this area because it is basic Java and programming knowledge.

Spigot

Spigot That is a spigot module, you extend the class of "de.lcraft.api.minecraft.spigot.manager.Module", then you have to import the onEnable() and onDisable() Methods. You can get the CommandManager with getCommandManager(); and the ListenerManager with getListenerManager().

BungeeCord

BungeeCord That is a bungeecord module, you extend the class of "de.lcraft.api.minecraft.bungee.manager.Module", then you have to import the onEnable() and onDisable() Methods. You can get the CommandManager with getCommandManager(); and the ListenerManager with getListenerManager()

Supports

Servers Bukkit Spigot Paper Pupur
1.16 ✔️ ✔️ ✔️ ✔️
1.17 ✔️ ✔️ ✔️ ✔️
1.18 ✔️ ✔️ ✔️ ✔️
Proxies BungeeCord Waterfall Velocity
1.16 ✔️ ✔️ ✔️
1.17 ✔️ ✔️ ✔️
1.18 ✔️ ✔️ ✔️

Help map

Commands

Improved Bukkit classes/utils

  • LPlayer
  • CraftingRecipes
  • Inventorys
  • ItemBuilders
  • Other Utils

Improved BungeeCord classes/utils

  • LPlayer

Update Map

Version 1.0.0

Version 1.0.1

Version 1.0.2

Version 1.0.3

Version 1.0.4

Version 1.0.5

Version 1.0.6

Version 1.0.7

Version 1.0.8

Clone this wiki locally