(5.0.0 - 5.16.0) 0.7.1-beta (5.0.0 - 5.16.0) 0.8.2-pre (5.0.0 - 5.16.0) 0.9.1-pre (5.0.0 - 5.16.0) 1.0.0 (5.0.0 - 5.16.0) 1.3.0
Thanks to Muqsit for the InvMenu virion who have contributed to the creation for this plugin!
Also this plugin helped me!
The base command is /shopkeepers
but you can also use /sk
, /skeepers
and /shopk
as alias.
Here a list of all commands that you can use:
Command | Args | Description |
---|---|---|
info | none | Show the plugin's informations |
info | SHOP NAME | Show the shop configuration page |
edit | SHOP NAME | Edit the shop recepies |
create | SHOP NAME / NULL | Create a new shop, if the name is leaved empty will be generated |
summon | SHOP NAME | Summon a Shopkeeper entity (as a Villager) for your Shop |
rename | SHOP NAME and NEW NAME | [NOT AVAILABLE] Rename a current shop |
list | none | Show all of your shops |
permissions:
shopkeepers.base:
description: "Allows users to use the base command"
default: true
shopkeepers.shop.summon:
description: "Allows users to summon player's shop"
default: true
shopkeepers.shop.create:
description: "Allow users to create a shop"
default: true
shopkeepers.shop.edit:
description: "Allow users to edit they'r shop"
default: true
shopkeepers.shop.list:
description: "Allow users to see a list of their shops"
default: true
shopkeepers.shop.remove:
description: "Allow users to despawn they'r Villager shops"
default: true
shopkeepers.shop.rename:
descritpion: "Allow users to rename they'r shops"
default: true
shopkeepers.shop.namevisible:
description: "Allow users to decide if the shopkepeer's name should be visible or no"
default: true
shopkeepers.shop.admin:
description: "Allows users to decide if the shopkeepers should be admin or none"
default: op
shopkeepers.shop.kill:
description: "Allow users to kill every shopkeepers, also of other players"
default: op
shopkeepers.shop.defaultGUI:
description: "Allow users to see and use the /sk command without args to open the base GUI"
default: true
shopkeepers.shop.use:
description: "Allow users to use a shopkeeper when they touch it"
default: true
shopkeepers.shop.allowRemoteInventoryOpen:
description: "Allow users to open a shopkeeper's inventory with the command /sk inventory"
default: op
There is not really an Admin shop but you can activate this function by using the command /sk info <SHOP NAME>
and then clicking on the Blaze Powder and then clicking on the red wool block that has "Admin shop" as its name
There are two ways:
/sk info <SHOP NAME>
and then click on the chest at the center of the GUIEasy: shift and click on the Shopkeeper
Although I love to receive messages from people who are excited about something I have created it would be better if any bugs or problems you find are reposted in the issues of this repository so that everything is more orderly and accessible!
Everyone can contribute and take inspiration from my code, however for those who would like to contribute here are some guidelines:
FoxWorn3365Shopkeepers\utils
as namespace must be static and finalCopyright (C) 2023-now FoxWorn3365
like Contributor(s): YouGitHubUsername
and update the file mapping (Current file
)
That said feel free to contribute, it's not like I'm going to eat you if you make a mistake!Shopkeepers, to be as configurable and manageable as possible saves IRT (In-Real-Time) player configurations in a .json file located in its PocketMine-MP plugins folder (/path/to/server/plugin_data/
) and these are the objects that are serialized and then saved:
The main object, if a player have one or more shop will have also a shop object in his .json.
Note
The Shop object is in an object array and have the title as key!
Name | Type | Description |
---|---|---|
author | string | The username of the shop author |
admin | bool | If the shop is an Admin shop, so you don't have to put items in the inventory and you won't earn anything |
title | string | The real name of the shop |
namevisible | bool | Should the shop name be visible when summoned? |
inventory | array | The inventory of the shop |
items | array | A list of all recepies (max 9) |
{
"author":"[PlayerName]",
"admin":false,
"title":"[ShopName]",
"namevisible":false,
"inventory":[],
"items":[
itemObjects
]
}
How we save items to sell and buy.
{
"sell":nbtSerializedItemString,
"buy":nbtSerializedItemString
}
It is the object string as NBT. Ez.
$this->trades->{PLAYER}
object because otherwise is OP!