Skip to content

Commit

Permalink
ChestShop v4.0! (#52)
Browse files Browse the repository at this point in the history
* ChestShop Rewrite! Use at your own risk :D
* ChestShop is now double-chested
* New categories view (/cs addcategory, /cs removecategory)
* Renamed /cs add to /cs additem
* Currently no way to delete items off ChestShop individually
* Many features are missing as this branch is incomplete right now

* Add buttons.yml config for modifying what buttons look like.

* Add 'double-tapping' option in config (#37)

* Improved Button::getOptions(), Button::setOptions() and message formats

* Update README.md

* Fix retvals of /cs additem command.
  • Loading branch information
Muqsit authored Apr 8, 2018
1 parent de73600 commit be6957b
Show file tree
Hide file tree
Showing 12 changed files with 675 additions and 598 deletions.
41 changes: 24 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
# ChestShop
[![](https://poggit.pmmp.io/shield.state/ChestShop)](https://poggit.pmmp.io/p/ChestShop)

ChestShop for PocketMine-MP (pmmp) by Muqsit. Note that you must have **EconomyAPI** installed before running the plugin, else the plugin won't enable.
Chest shop allows you to create Chest GUI based shops - a widely used feature in minigames such as MoneyWars, SkyBlock and SkyWars.
If you are looking for a compressed .phar file, go here: https://poggit.pmmp.io/ci/Muqsit/ChestShop/ChestShop

Features:
- Ability to add enchanted, custom named, custom NBT tagged items.
- Everything can be managed in-game on run time. No config modification needed.
- Two papers, named "Turn Left" and "Turn Right" are located at the end of the GUI to switch pages.
- ChestGUI (block and inventory) is only sent to the command issuer. The GUI tile block is unbreakable, making it impossible for anyone to duplicate the chest contents.
- Usage of custom chest tiles and inventories rather than bulk events for performance.

Commands:
- /cs - Opens the ChestShop. (Permission: Everyone)
- /cs add [price] - Add the item in your hand to the ChestShop. (Permission: OP)
- /cs remove [page] [slot] - Remove item from a specific page and slot. (Permission: OP)
- /cs removebyid [itemid] [itemdamage] - Remove items with id [itemid] and damage [itemdamage] off ChestShop. (Permission: OP)
- /cs reload - Reloads the plugin (use this if you experience issues).
- /cs help - List all commands with their descriptions.

That's it. Dont forget to star the repository.
**NOTE:** ChestShop depends upon EconomyAPI for transactions, you must have **EconomyAPI** plugin installed before running the plugin.

### Basic Features
- Ability to sell items along with their NBT tags.
- Categories! Create shop categories to sort out your items.
- Optional double-tap-to-buy feature for those who value their money.

### How To Use?
Download the compiled .phar file from poggit and drop it into your server's `plugins/` folder.
**NOTE:** You must either be OP or have the permission `chestshop.command.admin` to use the commands: `/cs addcategory`, `/cs removecategory` and `/cs additem`

#### Adding a category
Categories are the front-page of the `/chestshop` command. If you do not have any categories, the `/chestshop` command will send you an empty chest GUI. To add a category, use `/cs addcategory <category name>` while holding an item. The item that you are holding will be used to represent the category in `/chestshop`.
![](https://i.imgur.com/8cPouEf.png)

Now let's see how `/chestshop` looks.

![](https://imgur.com/iRWAJ6a.png)

Neato! Let's add some items to our category using `/cs additem <category name> <cost>`.

![](https://i.imgur.com/fF8gPap.png)

Awesome! You might be wondering what the 2 papers and one chest is doing in the last row of the GUI. The two papers turn towards the left/right page in case you have more than 45 items in your category. The chest in the middle of the two papers bring you back to the list of categories (`/chestshop`).
5 changes: 2 additions & 3 deletions plugin.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: ChestShop
main: ChestShop\Main
main: muqsit\chestshop\ChestShop
api: 3.0.0-ALPHA11
version: 3.0
depend: [EconomyAPI]
version: 4
commands:
chestshop:
aliases: ["cs", "cshop"]
Expand Down
File renamed without changes.
11 changes: 3 additions & 8 deletions resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
---
# These items cannot be sold in-game using "/cs add".
banned-items:
- 35:1
- 7

# Whether to enable the "/cs synceconomy" command.
'enable-sync': false
...
# Whether to have players double-tap items in the GUI to purchase.
double-tapping: false
...
Loading

0 comments on commit be6957b

Please sign in to comment.