Project Essentials Core

Documentation for Project Essentials Core users and developers, describing commands, permissions and API methods and other.

This is the base module (core) for all other Project Essentials modules. It contains the necessary dependencies that are used in other modules, for example Kotlin std lib and Kotlinx Serialization and Brigadier, this core also contains common code, for example, the initialization process and some extensions of existing forge classes, which can be useful and can reduce duplicate code.

How to Install

For start the modification, you need installed Forge, it is desirable that the version matches the supported versions. You can download Forge 1.14.4 from the link and Forge 1.15.2 from it link. Move the downloaded mod (marked -MOD in the file name) to the mods folder (installation example below).

If there is already a modification that loads the kotlin and kotlinx serialization libraries, then download the -API modification, instead of -MOD.

val MV = valueOf(your_minecraft_version)

.
โ”œโ”€โ”€ assets
โ”œโ”€โ”€ config
โ”œโ”€โ”€ libraries
โ”œโ”€โ”€ mods (that's how it should be)
โ”‚   โ”œโ”€โ”€ Project Essentials Cooldown-1.MV.X-1.X.X.jar (recommended)
โ”‚   โ”œโ”€โ”€ Project Essentials Permissions-1.MV.X-1.X.X.jar (recommended)
โ”‚   โ””โ”€โ”€ Project Essentials Core-MOD-1.MV.X-1.X.X.jar
โ””โ”€โ”€ ...

Dependencies

Also do not forget to install dependencies, only two types of dependencies: mandatory (game will not start without a mod) and recommended (without a mod, game can start, but I recommend using it).

Download dependencies: Cooldown ยท Permissions

Let's check it!

Now try to start the game, go to the mods tab, if this modification is displayed in the mods tab, then the mod has been successfully installed.

Vanilla Replacements

For compatibility with the Permissions module, all the native Vanilla commands have been rewritten in the Core module, they simply replace them with the addition of a check for the permissions and operator level.

In this regard, if you have the Permissions module installed, you will need to issue permissions to the native Vanilla commands. By default, all commands (with operator level 0) available to the player will be available (they are pre-registered in the permissions). The permissions to use the native Vanilla commands are very simple and consist of the command name itself, for example: native.time (for the/time command), or for example: native.ban (for the/ban command). Exceptions: /me, for this command the right is native.message.

Vanilla commands replacement can be disabled in the configuration.

Commands aliases

Command aliases are declared in the configuration, by default several popular aliases are made to which many players are used to, they are described in the table below.

Configuration

Configuration location

.minecraft/config/ProjectEssentials/native-commands.json

Configuration documentation

Below is a table with documentation for some properties from the configuration of native commands.

Using as API

Dev. Dependencies 1.14.4

    - kotlin-std lib version: 1.3.61
    - kotlinx serialization version: 0.14.0
    - forge version: 1.14.4-28.1.114
    - brigadier version: 1.0.17
    - target jvm version: 1.8

Dev. Dependencies 1.15.2

    - kotlin-std lib version: 1.3.61
    - kotlinx serialization version: 0.14.0
    - forge version: 1.14.4-31.1.1
    - brigadier version: 1.0.17
    - target jvm version: 1.8

Get as Dependency

:: Only for Forge 1.14.4 ::

repositories {
    maven { url("https://jitpack.io") }
}

dependencies {
    compile(
        group: "com.github.projectessentials",
        name: "ProjectEssentials-Core",
        version: "v1.14.4-1.2.1"
    )
}

:: Only for Forge 1.15.2 ::

repositories {
    maven { url("https://jitpack.io") }
}

dependencies {
    compile(
        group: "com.github.projectessentials",
        name: "ProjectEssentials-Core",
        version: "v1.15.2-1.0.0"
    )
}

API Consts

API Functions

API Extensions

@ CommandSourceExtensions.sendMsg arguments:

API Helpers

If you have any questions or encounter a problem, be sure to open an issue

Last updated