your current location:首页 > news>[LE] Light Economy

[LE] Light Economy

2024-12-12 09:31:29|Myriagame |source:minecraft skins

Module introduction

Lighteconomy is a lightweight economic system running based on Forge/Fabric/Neo -like.

A list called "Accounts" (account) is added to the player's NBT data. The list elements are "Currency" and "BALANCE" (balance) to count the players' accounts for multi -currency balance.

This module does not include an command or an in -game interaction system that modifies the balance, only a relatively complete API system is added to the module developer.

It is recommended to use this module with Ecohelper, which adds some economic management commands and dynamic tax systems for the server to Light Economy.

Developer documentation

load

Please use the Maven warehouse or go to GitHub manually to build a.jar file and use it for offline LIBS.

 repositories {maven {url 'https://maven.nova-Committee.cn/releases'// warehouse download} Flatdir { Dir'libs' // Manually build}} Dependencies {// The latest module version is 1.2.0 Implementation fg.deobf ("Committee.nova.mods: Lighteco: Lighteco-FORGE: {mineCraft_version}-{mod_version}")} 

API

API site: Forgeeco/Fabriceco

After loading into front, use committee.nova.mods.lights.api.forgeeco/Committee.nova.mods.lights.api.fabriceco to operate the player's economy. The example is as follows:

The following code is from Ecohelper:

 // Get the player's number of gold coins Public Static Double Double GetBalance (Player Player) {Optional  BALANCE = Forgeeeeee.Instance.Get Balance (Player); Return Balance.Map (BigDecimal:: doughValue) .orelse (0.0);} // Increase the number of gold coins of the player. Double (value); Return forgeeco.instance.debt (player, bigdecimal.Valueof(Value);} // Reduce the number of gold coins of the player Public Static Ecoutils.ecoActionResult Removebarance (Player Player, Double Value) {Value = RoundDouble (Value ); Return forgeeco.instance.credit (Player, BigDeCimal.Valueof (Value));} 

The module is still in the development stage, please do not use it for the production environment, so as not to cause damage to player data.