ItemFrame Shop icon

ItemFrame Shop -----

Create displayable shops using ItemFrames



ItemFrame based shop creation with displayable prices, item name & price display, GUI editor, and more!

[​IMG]

This plugin has been tested, but errors might still occur - if you find any problems, please let me know in the Discussion section or in the GitHub's issues page.
This plugin is a pet project of mine, but I might scrap it if it fails to get attention, so sorry in advance.
On the other hand, if you DO like the plugin please leave a review!

Features
  • Create shops using ItemFrames! Sell an item by displaying it to everyone!
  • 3 types of shops based on permission:
    • Inventory: Sell the item from the attached inventory - Chest (single and double), Shulker Box, and Barrel.
    • Frame: No need to place an inventory - keep and sell the item without having an inventory to take from.
    • Admin: Sell an unlimited amount of the item - let's admit it, we all know what an AdminShop is... (Only available while in creative mode!)
  • Option to close down the shop without having to destroy it.
  • Auto-close the shop when there are no more items to sell.
  • Profits go directly to the owner of the shop (except for AdminShops).
  • Shops are protected - the ItemFrame itself (and the attached inventory if there is one) cannot be broken!
  • Creation and editing of the shop by a GUI - the price is set by chat (recognizes amount suffixes - k = 1000, M = Million, B = Billion, etc. - configurable in the messages.yml file!)!
  • Items are automatically removed from the inventory when using Inventory type. Receive back all the items after removing/changing the shop is Frame type.
  • Right-click to purchase a single item, shift + right-click to open a GUI to purchase multiple and view the item itself!
  • Right-click as the owner of the shop (or while having the permission to edit shops) to edit the shop.
Dependencies
  • Vault
  • ANY Economy plugin
How to create a shop
  • Place an ItemFrame.
  • Shift + right-click the ItemFrame with the item you wish to sell.
  • Set the price by clicking on the Emerald and input your price in chat.
  • Change the type of the shop by clicking the item on the left if you want (default: Inventory type).
  • Click the Diamond block.
  • You're done!
To create or edit AdminShops you must have the permission and be in Creative mode!

Images

[​IMG]
[​IMG]
[​IMG]
[​IMG]
[​IMG]
[​IMG]
[​IMG]
[​IMG]
[​IMG]

Extra info
  • To close the shop without deleting it, simply change the item's price to 0.
  • After creating the shop and making sure it has items to sell, the shop will automatically open and display 2 lines above it
  1. Item's name: The name of the item that's being sold.
    If the item has a custom name it will display it.
    Otherwise, it will display the item's default name as it appears in your inventory - proper color and translated name!
    All colors and translations are as provided by Mojang in the game files.
  2. Price: The price of the item with the proper formatting as is stated in your Economy plugin.

Configs
Code (YAML):
# ItemFrame Shop config file

# Price rounding after the dot (0-2)
price-round-after-dot
: 2

# Minimum price for a shop (>= 0)
# The value is exclusive
# Setting the price to 0 will close the shop
price-minimum
: 0

# Maximum price for a shop (> price-minimum), 0 = no limit
# The value is inclusive
price-maximum
: 0

# Do Op players have permission to create and change AdminShops by default
adminshop-op
: true
Includes support for PlaceholderAPI!
Code (YAML):
# Message to send when issuing reload command
config-reloaded
: "&aConfig reloaded"

# Title of the GUI when creating a shop
shop-title-create
: "&bCreate &6Shop"
# Title of the GUI when editing a shop
shop-title-edit
: "&bEdit &6Shop"
# Title of the GUI when buying from the shop
shop-title-buy
: "&6Shop"

# Name of the Admin type
shop-type-admin
: "Admin"
# Translation to use instead of the set value above
# Will always be used instead of the set value above if not empty!
shop-type-admin-translation
: ""

# Should the suffixes be exact, i.e. NOT ignore case
currency-suffixes-exact
: true

# Each line represents a 1000x jump
# Starts from 1000 - anything below will not a have a suffix
# Add new lines for suffixes for bigger amounts
# Leave empty for no suffixes
currency-suffixes
:
 - "k"
  - "m"
  - "b"
  - "t"
  - "q"

# Message to send when an error occurs during shop creation
# Can be multiple lines
shop-create-error
:
 - "&cProblem creating shop"
  - "&ePlease try again"

# Message to send when a shop was successfully created
# Can be multiple lines
shop-create-success
: "&aShop created successfully!"

# Message to send when an error occurs during shop changing
# Can be multiple lines
shop-change-error
:
 - "&cProblem changing shop"
  - "&ePlease try again"

# Message to send when a shop was successfully changed
# Can be multiple lines
shop-change-success
: "&aShop changed successfully!"

# String to use instead of price when creating a shop before the price was set
price-not-set
: "&cNot set"

# Buying item's name (the Emerald in the buying GUI)
# Extra placeholders: <price> - price of the purchase, <amount> - amount of items for this purchase
price-buy-item-name
: "&f<price>"

# Buying item's lore (the Emerald in the buying GUI)
# Extra placeholders: <price> - price of the purchase, <amount> - amount of items for this purchase
# Can be multiple lines
price-buy-item-lore
: ""

# Border item's name (around the item in the buying GUI)
# Extra placeholders: <amount> - amount of items in the shop
price-border-name
: "&f<amount>"

# Border item's lore (around the item in the buying GUI)
# Extra placeholders: <amount> - amount of items in the shop
# Can be multiple lines
price-border-lore
: ""

# Edit price item's name
# Extra placeholders: <price> - price of the purchase
price-edit-item-name
: "&aPrice"

# Edit price item's lore
# Extra placeholders: <price> - price of the purchase
# Can be multiple lines
price-edit-item-lore
:
 - ""
  - "&f<price>"
  - ""
  - "&8>&7> &eClick to change &7<&8<"

# Message sent to the player after purchasing an item in a shop
# Extra placeholders: <amount> - amount of items purchased
# Can be multiple lines
player-purchase
: "&fPurchased &6<amount>&f items!"

# Message sent to the player when the shop has insufficient amount of items they requested to buy
# Extra placeholders: <amount> - amount of items in the shop
# Can be multiple lines
shop-insufficient-amount
: "&cInsufficient amount of items in shop! Current amount: &6<amount>"

# String to use during price input to cancel the input
# Must NOT be empty! Default value will be used in that case!
price-enter-message-cancel
: "cancel"

# Message to send to the player to enter price for the shop (shop prices HAVE a maximum limit)
# Extra placeholders: <minimum> - minimum price, <maximum> - maximum price, <cancel> - the cancellation String (price-enter-message-cancel)
# Can be multiple lines
price-enter-message-with-maximum
:
 - "&ePlease insert the price in the chat."
  - "&eThe price must be between <minimum> and <maximum>, 0 = closed."
  - "&eType <cancel> to return."

# Message to send to the player to enter price for the shop (shop prices DON'T HAVE a maximum limit)
# Extra placeholders: <minimum> - minimum price, <cancel> - the cancellation String (price-enter-message-cancel)
# Can be multiple lines
price-enter-message-without-maximum
:
 - "&ePlease insert the price in the chat."
  - "&eThe price must be bigger than <minimum>, 0 = closed."
  - "&eType <cancel> to return."

# Message to send to the player when price entered is illegal (shop prices HAVE a maximum limit)
# Extra placeholders: <minimum> - minimum price, <maximum> - maximum price, <cancel> - the cancellation String (price-enter-message-cancel)
# Can be multiple lines
price-enter-error-with-maximum
: "&cOnly numbers between <minimum> and <maximum> or <cancel>! 0 = closed"

# Message to send to the player when price entered is illegal (shop prices DON'T HAVE a maximum limit)
# Extra placeholders: <minimum> - minimum price, <cancel> - the cancellation String (price-enter-message-cancel)
# Can be multiple lines
price-enter-error-without-maximum
: "&cOnly numbers bigger than <minimum> or <cancel>! 0 = closed"

# Logging message when an error occurred when saving a world's shops
# Extra placeholders: <world> - world name
# Can be multiple lines
save-shops-error
: "&cError saving shops in world &e<world>>&c!"

Command
/ifs - the command exists solely to reload the config.

Permissions
  • itemframeshop.create.inventory: allow the creation of Inventory type shops. Default: true (everyone).
  • itemframeshop.create.frameshop: allow the creation of Frame type shops. Default: Op.
  • itemframeshop.change.othershop: allow changing other people's shops (mostly for administrative purposes and removing shops of non-returning players). Default: Op.
  • itemframeshop.adminshop: allow the creation of Admin type shops (AdminShop). Default: false.
  • itemframeshop.command: allow the use of the command - "/ifs" - to reload the config. Default: Op.
To allow the creation and editing of Admin type shops (AdminShop - only possible in Creative mode) the player must have one of the following:
  • The permission "itemframeshop.adminshop".
  • The config option "adminshop-op" set to "true" and the player is Op.

API
The plugin comes with a few built-in API options:
  • ItemFrameShop class with all its functions.
  • ShopType class to distinguish the shops.
  • A manager for all existing shops, accessed with:
    Code (Java):
    me. DMan16. ItemFrameShop. Main. getItemFrameShopManager ( ) ;
  • ItemFrame shop events, main event class: ItemFrameShopEvent.
    1. ItemFrameShopCreateEvent: Fired before creating a shop.
    2. ItemFrameShopChangeEvent: Fired before changing a shop.
    3. ItemFrameShopDeleteEvent: Fired before deleting a shop.

Plans for future updates
  • More config options, mainly for messages and GUI titles and items.
  • Update notifier and BStats.
  • Buying shops - buy items instead of selling them.
  • Discounts when buying multiple items - general discount + shop specific. (Thanks to AdzZman for the suggestion!)
  • More administrative tools.
  • Find shops around you.
  • Better API explanations and more API options.
  • "Item-based" shop - purchase items using other items (like Emeralds or Diamonds). (MAYBE!)
  • ??? - Any suggestions? Let me know in the Discussion section!

[​IMG]

Endnote
If you find any problems or errors with the plugin you are welcome to let me know in the Discussion section or in the GitHub's issues page ( PLEASE don't use the reviews to do so...) - I will try to fix them as soon as possible.
If you like the plugin, please make sure to leave a review!
Resource Information
Author:
----------
Total Downloads: 476
First Release: Jul 7, 2021
Last Update: Aug 17, 2021
Category: ---------------
All-Time Rating:
5 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings