Economy made easy for Minecraft: Bedrock

Overview

BedrockEconomy

Economy made easy for Minecraft Bedrock

Commands

Name Description Usage Permission
balance Show your and others balance balance [player: string] bedrockeconomy.command.balance
pay Pay others with your balance pay <player: string> <amount: number> bedrockeconomy.command.pay
addbalance Add points to others balance addbalance <player: string> <amount: number> bedrockeconomy.command.addbalance
removebalance Remove points from others balance removebalance <player: string> <amount: number> bedrockeconomy.command.removebalance
setbalance Set others balance setbalance <player: string> <balance: number> bedrockeconomy.command.setbalance
deleteaccount Delete others account data deleteaccount <player: string> bedrockeconomy.command.deleteaccount
Comments
  • ScoreHud does not update money

    ScoreHud does not update money

    Describe the bug When you add money to a player, the scorehud is updated for 1 millisecond to the money you have added, but after a second it disappears and returns to the money you had before.

    To Reproduce Steps to reproduce the behavior: https://streamable.com/43poru

    Expected behavior ScoreHud will be updated correctly when adding or removing money.

    Screenshots Video up

    OS and version (please complete the following information):

    • Server OS: linux
    • PocketMine-MP version: 4.2.4
    • Version: 2.0.7
    • Plugins (2): BedrockEconomy v2.0.7, ScoreHud v7.0.0

    Additional context X

    Type: Bug Category: UI Resolution: Invalid 
    opened by MrBlasyMSK 28
  • using mysql or sqlite is not recommended

    using mysql or sqlite is not recommended

    using sql to make an economy plugin is very unsuitable and will really lag your server a lot for nothing so I advise you to put the db in json or yml (preferably json) if people want to make a system of economy inter server why not make a plugin that will take care of it and suddenly will be able to attract more people because people who want to do just a server can do it without having to make db and those who want can do it just by installing a " extension" which will do it automatically

    Type: Invalid 
    opened by theohdg2 8
  • Scorehud integration

    Scorehud integration

    Hey, can you please create BedrockmoneyScore? for my ScoreHud

    here a example https://poggit.pmmp.io/p/EcoAPIScore/1.1.0

    Would be cool if you could do something like that because the money doesn't show up in the ScoreHud

    Type: Proposal Category: UI Status: Implemented 
    opened by GamerMJay 4
  • changing command names causes a failure when loading

    changing command names causes a failure when loading

    [16:57:48.900] [Server thread/CRITICAL]: UnhandledMatchError: "Unhandled match value of type string" (EXCEPTION) in "plugins/BedrockEconomy.phar/src/cooldogedev/BedrockEconomy/BedrockEconomy" at line 123

    --- Stack trace ---

    #0 (): cooldogedev\BedrockEconomy\BedrockEconomy->cooldogedev\BedrockEconomy{closure}(array[4])

    #1 plugins/BedrockEconomy.phar/src/cooldogedev/BedrockEconomy/BedrockEconomy(122): array_map(object Closure#100285, array[7])

    #2 plugins/BedrockEconomy.phar/src/cooldogedev/BedrockEconomy/BedrockEconomy(99): cooldogedev\BedrockEconomy\BedrockEconomy->initializeCommands()

    #3 pmsrc/src/plugin/PluginBase(137): cooldogedev\BedrockEconomy\BedrockEconomy->onEnable()

    #4 pmsrc/src/plugin/PluginManager(437): pocketmine\plugin\PluginBase->onEnableStateChange(true)

    #5 pmsrc/src/Server(1385): pocketmine\plugin\PluginManager->enablePlugin(object cooldogedev\BedrockEconomy\BedrockEconomy#101592)

    #6 pmsrc/src/Server(1011): pocketmine\Server->enablePlugins(object pocketmine\plugin\PluginEnableOrder#24932)

    #7 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[16] /home/minecraft/, string[24] /home/minecraft/plugins/)

    #8 pmsrc/src/PocketMine(327): pocketmine\server()

    #9 pmsrc(11): require(string[57] phar:///home/minecraft/pocketmine.phar/src/PocketMine.php)

    --- End of exception information ---

    Type: Question 
    opened by GamerMJay 4
  • help

    help

    Error:

    [Server thread/CRITICAL]: Error: "Class "cooldogedev\libSQL\context\ClosureContext" not found" (EXCEPTION) in "plugins/Perks-main/src/flxiboy/Perks/provider/BedrockEconomyProvider" at line 44
    

    Code:

    use cooldogedev\BedrockEconomy\api\BedrockEconomyAPI;
    use cooldogedev\libSQL\context\ClosureContext;
    
            BedrockEconomyAPI::getInstance()->getPlayerBalance(
                strtolower($player->getName()),
                ClosureContext::create(
                    function (?int $balance): void {
                        var_dump($balance);
                    },
                )
            );
    
    Type: Question 
    opened by FlxiBoy 4
  • CLI has stopped working

    CLI has stopped working

    Describe the bug As soon as I stopped my server, cmd window said that 'Stopping other threads' and a window with title 'CLI has stopped working'. The cmd window was freezed, I can't did anything.

    To Reproduce Steps to reproduce the behavior:

    1. Add BedrockEconomy to plugins folder'...'
    2. Start Pocketmine server'
    3. Stop the server by type 'stop' then Enter
    4. See essue

    Expected behavior

    Screenshots image

    OS and version

    • Server OS: [Windows 10]
    • PocketMine-MP version [4.12.2]
    • PHP 8.0
    • Version [2.0.8]

    Additional context

    Type: Bug Status: Fixed Category: Core Resolution: Confirmed 
    opened by Gin-NonexistentEntity 3
  • questen

    questen

    Hey, Ehm one last question, when I do this, it always comes out as 0, is there another possibility? Have already tried with $end = 0, $end = $balance, return $end doesn't work either.

            BedrockEconomyAPI::getInstance()->getPlayerBalance(
                strtolower($player->getName()),
                ClosureContext::create(
                    function (?int $balance) {
                        return $balance;
                    },
                )
            );
            return 0;
    
    Type: Question 
    opened by FlxiBoy 3
  • Balances

    Balances

    If the user has money, when the server restarts the money will reset to 0 according to the default config /addbalance to player and restart server, and also some translation message like /pay is missing

    Type: Question 
    opened by AIPTU 3
  • Question

    Question

    Can you make the command for the ui. idk how to do this on your way. But the menu i can do!!! i send in requests and you make the command. Output: $this->EcoUI($sender);

    it is okay if i use Form api? or have i to do it self?

    Type: Question Category: UI 
    opened by LBWBDeveloper 2
  • Add Swissgerman Language (v2)

    Add Swissgerman Language (v2)

    Sorry cooldogedev for the first one ( i closed it) Because it was not Good Constucted now IT is and i think some Peoples like SWITZERLAND LANGUAGE!!!!

    Greetings from Switzerland

    Category: UI Status: Implemented 
    opened by LBWBDeveloper 2
  • Better arrangement

    Better arrangement

    Could you possibly add better arrangements.

    for instance change 1000 = 1.000 or 1k

    Would be very helpfull to have this both in the scorehud and the actual plugin

    Type: Duplicate Category: UI 
    opened by YasinKalca18 1
  • Balance is set incorrectly

    Balance is set incorrectly

    Describe the bug Balance is set incorrectly

    To Reproduce Steps to reproduce the behavior:

    1. /setbalance Boo 0
    2. /setbalance Boo -1 (This error occurs with all negative numbers)

    Expected behavior Boo's balance will be -1 or 0

    Screenshots image

    OS and version (please complete the following information):

    • Server OS: [Windows 11]
    • PocketMine-MP version: [4.6.0]
    • Version [2.0.8]

    Additional context N/A

    Category: Core Resolution: Confirmed 
    opened by NhanAZ 2
  • Crash on join

    Crash on join

    Describe the bug When the server starts up, the server crashes once a player joins.

    To Reproduce Steps to reproduce the behavior:

    1. Add the plugin to the server
    2. Start the server
    3. Join the server
    4. See error

    Expected behavior For the plugin not to crash the server or give an error?

    OS and version (please complete the following information):

    • Server OS: Windows 10
    • PocketMine-MP version: 4.2.4
    • Version: Version of what, Minecraft? 1.18.31

    Additional context Here is the error, [Server thread/CRITICAL]: TypeError: "pocketmine\command\SimpleCommandMap::getCommand(): Argument #1 ($name) must be of type string, int given, called in phar://C:/Users/Tristyn/Documents/PocketMine-MP-PM4/plugins/BedrockEconomy.phar/src/cooldogedev/BedrockEconomy/libs/CortexPE/Commando/PacketHooker.php on line 72" (EXCEPTION) in "pmsrc/src/command/SimpleCommandMap" at line 241

    Type: Bug Category: Core Resolution: Unconfirmed 
    opened by ElectroGamesYT 2
  • Introduce labels

    Introduce labels

    Is your feature request related to a problem? Please describe. Rather than storing the balance in a column we store it in a label-based json format, doing so will add more flexibility to implement new features such as the following https://github.com/cooldogedev/BedrockEconomy/issues/73, https://github.com/cooldogedev/BedrockEconomy/issues/69, https://github.com/cooldogedev/BedrockEconomy/issues/46

    Describe the solution you'd like

    Describe alternatives you've considered

    Additional context

    Category: Core 
    opened by cooldogedev 4
  • Please remove getPlayerBalance API

    Please remove getPlayerBalance API

    Is your feature request related to a problem? Please describe. getPlayerBalance is constantly abused for incorrect code where they check for whether the player has enough balance through getPlayerBalance and call subtractFromPlayerBalance without actually checking whether the latter is successful.

    Describe the solution you'd like Remove the method. It is good for nothing other than abuse.

    People who want to display the balance should use an API dedicated for displaying, such as InfoAPI. getPlayerBalance is good for nothing.

    Category: Core 
    opened by SOF3 2
  • API failure reasons

    API failure reasons

    Is your feature request related to a problem? Please describe. Currently, I am working on supporting some economy plugins in my plugin. After implementing Capital, I noticed something BedrockEconomy's API lacks: There are multiple reasons why a transaction gets cancelled, e.g. the player didn't have enough money or the TransactionEvent was simply cancelled. What BedrockEconomy lacks is a way to get the reason why a transaction failed.

    Describe the solution you'd like I personally like Capital's approach to that problem: When the transaction failed, an exception is thrown where the error code is specifically set to a reason. But I know that there isn't a simple solution since BedrockEconomy uses PMMP's promise system which doesn't support parameters in their failure callbacks.

    Describe alternatives you've considered

    Additional context

    Type: Proposal Category: Core 
    opened by ColinHDev 0
  • Force update

    Force update "resources" folder when updating the plugin

    Is your feature request related to a problem? Please describe. I just updated the version (to Dev #24) and the language section has not been updated. I don't know if that happens with the config.yml (since in this update there have been no changes in that). There are other plugins that do update the plugins_data when you add a new version and it contains changes in resources, although I don't know how it works since I'm not a dev.

    Describe the solution you'd like X

    Describe alternatives you've considered X

    Additional context X

    Type: Proposal Category: UI 
    opened by MrBlasyMSK 0
Releases(v2.0.7)
  • v2.0.7(Feb 26, 2022)

    What's Changed

    • Added Indonesian language by @brokiem in https://github.com/cooldogedev/BedrockEconomy/pull/45
    • Rewrote the database layer, includes optimizations and fixes
    • Added more tags to the Scorehud addon

    New Contributors

    • @brokiem made their first contribution in https://github.com/cooldogedev/BedrockEconomy/pull/45

    Full Changelog: https://github.com/cooldogedev/BedrockEconomy/compare/v2.0.6...v2.0.7

    Source code(tar.gz)
    Source code(zip)
    BedrockEconomy.phar(116.40 KB)
  • v2.0.6(Feb 25, 2022)

    What's Changed

    • Implement abbreviation of player names in https://github.com/cooldogedev/BedrockEconomy/commit/f21a7b4ed5b8afb858d3b51183caa2aa86c6ba49
    • Fixed bugs with the mysql data provider in https://github.com/cooldogedev/BedrockEconomy/commit/e38c44477ecc5e7f19eb7d56f88cbc3aec7b118e
    • Improved Vietnamese translations by @NhanAZ in https://github.com/cooldogedev/BedrockEconomy/pull/37
    • Meme by @Endermanbugzjfc in https://github.com/cooldogedev/BedrockEconomy/pull/42
    • Improved Chinese translations by @Endermanbugzjfc in https://github.com/cooldogedev/BedrockEconomy/pull/30

    New Contributors

    • @NhanAZ made their first contribution in https://github.com/cooldogedev/BedrockEconomy/pull/37

    Full Changelog: https://github.com/cooldogedev/BedrockEconomy/compare/2.0.5...v2.0.6

    Source code(tar.gz)
    Source code(zip)
    BedrockEconomy.phar(113.22 KB)
  • 2.0.5(Feb 22, 2022)

    Backwards Compatibility

    This update is backwards compatible with 2.0.4

    What's Changed

    • removed recently added events that were experimental
    • create abstraction of transaction class
    • create a new query for handling money transfers for further optimizations
    • new classes have been added TransferTransaction, UpdateTransaction
    • added new event TransactionProcessEvent
    • implemented support for addons
    • added support for Scorehud, closes https://github.com/cooldogedev/BedrockEconomy/issues/36
    • updated the documentation
    • updated to libSQL v0.1.1

    Full Changelog: https://github.com/cooldogedev/BedrockEconomy/compare/v2.0.4...2.0.5

    Source code(tar.gz)
    Source code(zip)
    BedrockEconomy.phar(110.08 KB)
  • v2.0.4(Feb 18, 2022)

    Backwards Compatibility

    This update is backwards compatible with the older v2.0.0 versions

    What's Changed

    • Added Chinese translations by @Endermanbugzjfc in https://github.com/cooldogedev/BedrockEconomy/pull/28
    • Optimizations for the queries
    • Fixed an unexpected behavior with balances going negative
    • Fixed a case-sensitivity issue
    • Transaction now accepts a ?int $balanceCap parameter
    • Account deletion no longer calls AccountManager::getBalance()
    • Account update query is no longer 2-step query (removed the secondary query)
    • Added further checks for the balance-cap in the queries
    • Send error message to players when there's no top balances to display

    New Contributors

    • @Endermanbugzjfc made their first contribution in https://github.com/cooldogedev/BedrockEconomy/pull/28

    Full Changelog: https://github.com/cooldogedev/BedrockEconomy/compare/v2.0.3...v2.0.4

    Source code(tar.gz)
    Source code(zip)
    BedrockEconomy.phar(96.79 KB)
  • v2.0.3(Feb 18, 2022)

    Backwards Compatibility

    This update is backwards compatible with the older v2.0.0 versions

    What's Changed

    • fixed an issue when paying someone with a balance of zero
    • top balance rows limit is now configurable
    • fixed typos in the default language file
    • removed an outdated script
    • updated to libSQL v0.1.0

    Full Changelog: https://github.com/cooldogedev/BedrockEconomy/compare/v2.0.2...v2.0.3

    Source code(tar.gz)
    Source code(zip)
    BedrockEconomy.phar(95.34 KB)
  • v2.0.2(Feb 18, 2022)

    Backwards Compatibility

    This update is backwards compatible with the older v2.0.0 versions

    What's Changed

    • Support Vietnamese language by @EricGamingYT in https://github.com/cooldogedev/BedrockEconomy/pull/27

    New Contributors

    • @EricGamingYT made their first contribution in https://github.com/cooldogedev/BedrockEconomy/pull/27

    Full Changelog: https://github.com/cooldogedev/BedrockEconomy/compare/v2.0.1...v2.0.2

    Source code(tar.gz)
    Source code(zip)
    BedrockEconomy.phar(94.86 KB)
  • v2.0.1(Feb 7, 2022)

  • v2.0.0(Feb 3, 2022)

    Backwards Compatibility

    This update is not backwards compatible with the older versions.

    What's Changed

    • German translations by @Paul14912 in https://github.com/cooldogedev/BedrockEconomy/pull/20
    • New API for third party developers
    • Removed usage of libpromise
    • Removed the cache (now usable for multi-server networks)
    • Updated to libsql v0.0.6
    • All the data is now retrieved directly from the database upon the request (real-time data retrieval)
    • Introduced a new database design (removed usage of xuids, now usable for offline mode)
    • New command /topbalance

    New Contributors

    • @Paul14912 made their first contribution in https://github.com/cooldogedev/BedrockEconomy/pull/20

    Full Changelog: https://github.com/cooldogedev/BedrockEconomy/compare/v1.0.0...v2.0.0

    Source code(tar.gz)
    Source code(zip)
    BedrockEconomy.phar(91.35 KB)
  • v1.0.0(Dec 23, 2021)

    What's Changed

    • Fixed class import by @AIPTU in https://github.com/cooldogedev/BedrockEconomy/pull/3
    • Disable PHPStan and syntax error lints by @KygekDev in https://github.com/cooldogedev/BedrockEconomy/pull/8
    • Introduced new API for third party developers
    • Introduced a new Transaction API for payment processing
    • All operations are now submitted upon request to provide the most up-to-date snapshots of the database if it has been altered or modified by another server or plugin

    New Contributors

    • @AIPTU made their first contribution in https://github.com/cooldogedev/BedrockEconomy/pull/3
    • @KygekDev made their first contribution in https://github.com/cooldogedev/BedrockEconomy/pull/8

    Full Changelog: https://github.com/cooldogedev/BedrockEconomy/commits/v1.0.0

    Source code(tar.gz)
    Source code(zip)
    BedrockEconomy.phar(117.04 KB)
Owner
full stack developer
null
An implementation of the Minecraft: Bedrock Edition protocol in PHP

BedrockProtocol An implementation of the Minecraft: Bedrock Edition protocol in PHP This library implements all of the packets in the Minecraft: Bedro

PMMP 94 Jan 6, 2023
A game-mode for Minecraft: Bedrock Edition

HardCoreFactions This is an unpaid commission that was only released for educational purposes, consider using it as a reference rather than having it

Doge 3 Sep 8, 2021
SteadFast3 Minecraft: Bedrock Edition Server Software

Steadfast3 is a server software that backports new Minecraft: Bedrock Edition versions to older PocketMine versions with better stability and performance, while retaining as many features from the new PocketMine-MP versions as possible.

null 5 May 21, 2022
CoarseMC Minecraft: Bedrock Edition Server Software

CoarseMC is a server software that backports new Minecraft: Bedrock Edition versions to older PocketMine versions with better stability and performance, while retaining as many features from the new PocketMine-MP versions as possible.

null 5 May 21, 2022
A MCPE server software that backporting new Minecraft: Bedrock Edition to older PocketMine versions with better stability and performance.

CoarseMC is a server software that backports new Minecraft: Bedrock Edition versions to older PocketMine versions with better stability and performance, while retaining as many features from the new PocketMine-MP versions as possible.

null 5 May 21, 2022
A server software for Minecraft: Bedrock Edition in PHP

A server software for Minecraft: BE. This is a SPOON of PocketMine-MP Getting started Documentation Installation instructions Docker image Plugin repo

WolfMC 7 Jul 14, 2022
A Simplistic Plugin to Implement Server Claims to your Minecraft: Bedrock Server.

Claims This plugin allows administrators to create, edit, list, and teleport to land claims on a PocketMine server. These claims have a variety of cus

Santana 5 Jun 10, 2023
A simple but extensible economy engine for PocketMine-MP, using label-oriented APIs.

Capital A simple but very extensible economy plugin for PocketMine-MP. How is Capital different from other economy plugins? Capital introduces a label

Jonathan Chan Kwan Yin 37 Dec 19, 2022
Ekonomy - PocketMine economy plugin with unlimited currencies & more features

Ekonomy What does this plugin do? Similar to EconomyAPI, This economy plugin is optimized with asynchronous query libraries such as libasynql and awai

OctoPush 1 Apr 13, 2022
Cool economy plugin for PM-like servers. API included.

Economy Description Cool and easy to use economy plugin API: 2.0.0 Plugin version: 1.0.0 Default money value on first join: 1000 (can be changed in co

Artem Turov 0 Feb 4, 2022
Allows the connection of Minecraft: JE clients to PocketMine servers. Made for PM4

JavaPlayer Allows the connection of Minecraft: JE clients to PocketMine servers. Made for PM4 MCJE VER: 1.18.2 Need implemented Chunks (convert proble

kanison konkla 30 Dec 7, 2022
NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range of features.

NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range of features

NamelessMC 519 Dec 31, 2022
Developer-friendly framework heavily inspired by Laravel and based on Timber and Wpemerge solutions for WordPress themes development with Bedrock folder structure

Lightweight Brocooly (Brocket) Improved Controllers, Middleware and Routers, but slightly less powerful Container Open beta. Package in development Cr

Ihar Aliakseyenka 3 Mar 4, 2022
PHP Regular expressions made easy

PHPVerbalExpressions ported from VerbalExpressions VerbalExpressions is a PHP library that helps to construct hard regular expressions. Installation T

null 2.4k Jan 3, 2023
Laravel Integration for Switchover PHP SDK. Feature Toggle Management made easy.

Switchover Laravel Integration Switchover Switchover is a Software-As-A-Service for managing feature toggles (aka switches, flags or feature flips) in

Switchover 6 Nov 6, 2022
A plugin that adds worker entities to minecraft.

WorkersDemo A plugin that adds worker entities to minecraft. Workers does things that players does such as mining wood/stone etc. How to use? You can

Oğuzhan 6 Dec 17, 2021
A plugin that adds minions to your Minecraft Server

BetterMinion A plugin that adds minions to your Minecraft Server ⚠️ This project is currently unfinished and needs some help! If you'd like to help us

Khang Nguyen 1 Jul 30, 2022
This plugin allow you play music from resources pack in minecraft

Music Player for PocketMine-MP Commands music-start songname music-stop songname IMPORTANT! You must add music resources pack to PocketMine resources

Excalibur 1 Oct 14, 2021
An open source Minecraft server (true-og.net)

true-og An open source Minecraft server (true-og.net) Website forked from aviel900 https://www.spigotmc.org/resources/minecraft-one-page-template.5973

Alex Noyle 0 Nov 28, 2022