-
Notifications
You must be signed in to change notification settings - Fork 9
WebAPI 5
Requires: -
Returns: VShop[]
Returns a list of all shop on the server
Requires: -
Returns: VShop
Returns the shop with given shop UUID
Requires: VShop
Returns: VShop
Create a new shop from request body.
The only values read from the body are:
entityType
, entityVariant
, name
, location
, rotation
.
You can put the same object onto the returned object's id.
Requires: VShop
Returns: VShop
Dynamically updates all values of this shop except items
.
Requires: -
Returns: VShop
Delete a shop.
Requires: -
Returns: Item[]
Get the item listing for this shop.
Requires: -
Returns: Item
Get information about a specific shop item.
Requires: Item
Returns: Item
Add a item at the end of the shops item list.
A shop can hold up to 27 items before the inventory is full.
Requires: Item
Returns: Item
Replaces the items at this position with the new item definition.
Requires: -
Returns: Item
Delete this item from the shop listing, decrementing the index for all items with position > item.
UUID uid
UUID string uniquely identifying the shop. This field is never read.
String name
The &code-escaped name of the shop.
Location location
A Location object pointing to the shop entity.
Decimal rotation
The Rotation of this shop in degree around the up-axis.
String entityType
The entity identifier. Example minecraft:villager
String entityVariant
A string defining the variant of the entityType. Supports most vanilla mobs (see minecraft wiki for values).
If the entityType is Sponge:Human
the variant may be a player id in order to load the player skin.
UUID owner
The UUID of the player owning this shop. Only valid if playerShop
is true.
Boolean playerShop
True if this shop is owned by a player.
Location stockContainer
The location of a Container to pull and put stock items from.
Note that setting a stock limit for items has no effect unless the shop has a stock container set.
Item[] stockItems
A list of items as defined below.
Integer id
The index of this item within the shop. This field is never read.
UUID uid
The UUID of the shop this item is listed within. This field is never read.
Decimal buyPrice
The amount of money it costs a player to buy the amount of items specified in item
.
Both buyPrice
and sellPrice
can't be null!
Decimal sellPrice
The amount of money a player receives for selling the amount of items specified in item
.
Both buyPrice
and sellPrice
can't be null!
String currency
The id or name of the currency to use for this item listing. Fallback is default currency.
Integer stock
How many single items of this type are currently socked in the stock container OR
The size of the item stack in this listing if there's no stock for this item.
Integer maxStock
How much of this item can be stock up at a time, or 0 if hasStock
is false indicating
unlimited stock.
Boolean hasStock
True if this shop has a maximum on how much single items of this type the stock container may
hold.
ItemStack item
A Minecraft item-stack describing the item for sale.