Implement buy command - #6622
Open
superspeed500 wants to merge 6 commits into
Open
Conversation
superspeed500
marked this pull request as ready for review
September 6, 2026 17:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Information
Implementation of a /buy command in order to be able to buy items from the server. All items that have a value set could be bought from the server. Permission node controlls if a player should be able to buy stuff or not.
This PR closes #2785.
Details
Proposed feature:
Typing /buy <item_name> should allow you to buy that amount of the given item from the server. Money for the items will then be drawn from the player bank account.
The bought items will be dropped if
isDropItemsIfFullis enabled in the Essentials config. The item will otherwise be discarded. Money will still be discarded from the player bank account.Environments tested:
OS: Fedora Linux
Java version: OpenJDK 25.0.4.1
Demonstration:
Bellow is sample commands after trying to buy a total of three gold ingots. The first is bought without problems, while the next two can't be bought (as indicated by no bought command shown in the CLI).