Thanks to visit codestin.com
Credit goes to github.com

Skip to content

LewMC/Essence

Essence

Maven Repository - Documentation - Javadocs - Code Analysis

Crowdin

Contributing

We welcome contributions from the community. Please fork the repository, make your changes, and submit a pull request.

Please read our contributor guide before submitting any changes, thank you!

Please merge any changes into the next-update branch, not the main branch. This helps us to ensure that our snapshot builds are labelled as snapshot so that it is clear to users downloading them that they are still in development, and that any changes being made will work with future versions of Essence.

Build Process

Install JDK 21 before continuing. Click here for documentation.

  • You will also need Maven for the mvn command, which can be installed here.
  • Make sure that your version of JDK 21 includes Javadoc.
    • For example, Eclipse Temurin JDK with Hotspot 21 includes this executable.
# Clone the repository and move into it.
git clone https://github.com/lewmc/essence && cd essence

# Perform a build
mvn clean package

Handling Player Data

As of version 1.11.0, player data is no longer to be handled via files. Player data is now stored in-memory as a cache which is automatically read from and written to file when the user joins and leaves the game. This reduces the I/O load on larger servers and allows for faster operations plugin-wide.

For more information please see the Javadoc. Please feel free to message Lew or email [email protected] for assistance.

Use function getPlayer(UUID, Key) to get a value from the player's data, and setPlayer(UUID, Key, Value) to set a value in the player's data.

All new features accessing player data must use this system. Some limited older systems may still use files.

For example, to set and get a player's balance:

class ExampleEconomyClass {
    public void getSetEconomy(UUID playerUUID, Essence plugin) {
        UtilPlayer up = new UtilPlayer(plugin);
        up.getPlayer(playerUUID, UtilPlayer.KEYS.ECONOMY_BALANCE);
        up.setPlayer(playerUUID, UtilPlayer.KEYS.ECONOMY_BALANCE, 10.0);
    }
}

Licensing

Essence is licensed under the Apache License 2.0. See LICENSE for more information.

Packages

No packages published

Contributors 8

Languages