SuperMarket Plugin
Features Overview
SuperMarket is a powerful Minecraft plugin designed to provide players with a convenient marketplace platform, supporting multiple languages (zh_tw and en). Below are the main features of this plugin:
Main Features
1. Economy Support: Manage economy using Vault, allowing players to buy and sell items.
2. Discord Integration: Support for sending notifications and commands through Discord using the
DiscordSRV plugin.
3. Redis Support: Use Redis as a data storage backend for faster data read/write and distributed data management.
4. Multi-language Support: Offers both Chinese (Traditional) and English versions, loading the appropriate language based on configuration settings.
5. Convenient Commands: Operate the marketplace with simple commands, such as `/ah` to view the market and conduct transactions.
Configuration
Code (YAML):
###################################################################################################
# ███████╗██╗ ██╗██████╗ ███████╗██████╗ ███╗ ███╗ █████╗ ██████╗ ██╗ ██╗███████╗████████╗ #
# ██╔════╝██║ ██║██╔══██╗██╔════╝██╔══██╗████╗ ████║██╔══██╗██╔══██╗██║ ██╔╝██╔════╝╚══██╔══╝ #
# ███████╗██║ ██║██████╔╝█████╗ ██████╔╝██╔████╔██║███████║██████╔╝█████╔╝ █████╗ ██║ #
# ╚════██║██║ ██║██╔═══╝ ██╔══╝ ██╔══██╗██║╚██╔╝██║██╔══██║██╔══██╗██╔═██╗ ██╔══╝ ██║ #
# ███████║╚██████╔╝██║ ███████╗██║ ██║██║ ╚═╝ ██║██║ ██║██║ ██║██║ ██╗███████╗ ██║ #
# ╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚══════╝ ╚═╝ #
###################################################################################################
# support language: zh_tw en #
###################################################################################################
language
: en
###################################################################################################
# command message and GUI message and others #
###################################################################################################
messages:
welcome_message
: Welcome to our server!
goodbye_message
: Thank you for visiting, goodbye!
error_message
: §cAn error occurred, please try again later.
purchase_success_message
: §ePurchase successful!
remove_success_message
: §eSuccessfully removed from sale!
not_enough_money_message
: §eYou do not have enough money to buy this item.
offline_seller_message
: §eThe seller is offline, the transaction cannot be completed.
purchase_cancelled_message
: §ePurchase has been cancelled!
item_not_found_message
: §eItem not found.
player_income_message
: §eYour item has been purchased, income
%price%.
glass_block_in_shop
: §eShop decoration
market_menu_title
: §0§lMarket Menu
item_details_title
: §0§lItem Details
chest_item_details_title
: §0§lChest Item Contents
confirm_purchase_title
: §0§lConfirm Purchase
item_purchased_title
: §0§lPurchased/Removed Item
select_sell_inventory_title
: §0§lSelect Items to Sell
sell_menu_message
: §6§lView Listed Items
sell_menu_title
: §0§lListed Items
category_menu_title
: §0§lSelect Category
record_purchase_message
: §6§lView Purchased/Removed Items
sort_item_message
: §6§lSort Items
previous_page_message
: §6§lPrevious Page
next_page_message
: §6§lNext Page
exit_menu_message
: §c§lExit Menu
return_menu_message
: §c§lReturn to Menu
sell_no_item_in_hand
: §cYou do not have
any items in hand.
sell_inventory_success_message
: You have successfully sold your items.
sell_success_message
: '§aYou have successfully sold §c
%type% §aPrice: §c%price% §aTotal: §c%quantity%'
sell_inventory_confirm_message
: §aConfirm Sale
sell_inventory_cancel_message
: §cCancel Sale
sell_inventory_price_is_not_number_message
: §cPrice must be a number.
sell_inventory_cancelled_message
: §eSale has been cancelled.
sell_inventory_prompt_message
: '§cPlease provide a price
: /ah sellinventory <price>'
sell_prompt_message
: '§cPlease provide a price
: /ah sell <price>'
sell_price_between_message
: §cThe sale price must be between §a
%lowest_price% §c and §a%highest_price%
claim_success_message
: §aSuccessfully claimed
%pendingAmount% pending earnings.
pending_claims_message
:
"§aYou have %amount% pending earnings to claim."
item_expired_message
:
"§cYour item %item% has expired and been removed."
purchased_item_to_your_bag
: §aItem has been successfully removed and added to your bag.
no_item_to_your_bag
: §cYour bag is full. Please clear some space and try again.
item_not_allowed
: §cItem is not allowed to sell!
lowest_price
: '50.0'
highest_price
: '10000.0'
confirm
: §2§lConfirm
cancel
: §c§lCancel
###################################################################################################
# item setting #
###################################################################################################
item:
seller
: '§aSeller
: §2§l
%seller%'
price
: '§aPrice
: §e§l
%price%'
quantity
: '§aQuantity
: §c§l
%quantity%'
currentTime
: '§aListed on
: §6
%currentTime%'
expireTime
: '§aExpires on
: §6
%expireTime%'
category
: '§aCategory
:
%category%'
###################################################################################################
# sort setting #
###################################################################################################
sort:
color:
selected
: '§8'
not_selected
: '§7'
sort_by_date_desc
: Sort by Date Descending
sort_by_date_inc
: Sort by Date Ascending
sort_by_price_desc
: Sort by Price Descending
sort_by_price_inc
: Sort by Price Ascending
###################################################################################################
# category setting #
###################################################################################################
category:
sellitem:
option_1
: §3§lBlocks
option_2
: §e§lOres
option_3
: §c§lFood
option_4
: §e§lArmor
option_5
: §e§lWeapons
option_6
: §d§lPotions
option_7
: §6§lOthers
sellinventory:
option
: §6§lChest
blacklists:
- type
:
"supermarket:names_contains"
key
:
"Custom Sword"
- type
:
"supermarket:contains_lore"
key
:
"Cosmetics"
- type
:
"supermarket:material_similar"
key
: STONE_HOE
###################################################################################################
# storage setting #
###################################################################################################
storage:
type
:
"yaml"
# Use Redis as storage
redis:
host
:
"127.0.0.1"
port
: 6379
password
:
""
# Leave blank if no password
channel
:
"supermarket_channel"
# Server Configuration
server:
name
:
"server1"
# Server name, must match the server name in the BungeeCord / Velocity configuration
lobby
: false
# Whether this is a lobby server
heartbeat-interval
: 5
# Interval for server heartbeat messages to other servers, default is 5 seconds
discord:
enabled
:
"false"
# true/false
webhook-url
: https://discord.com/api/webhooks/12555010457870008938/xxx
User Guide
1. Install the Plugin: Place the plugin jar file into the server's plugins directory.
2. Configuration File: Edit the config.yml file as needed to set language, storage type, Redis configuration, and Discord integration options.
3. Start the Server: Start the server and ensure Vault and DiscordSRV plugins are correctly installed and loaded.
4. Use Commands: Use the `/ah` command to open the market interface and conduct transactions.
FAQs
- How to set the language?
Change the `language` option in the config.yml file to `zh_tw` or `en`.
- How to configure Redis?
Set the Redis `host`, `port`, and `password` in the `storage` section of the config.yml file.
- How to set up Discord notifications?
In the `discord` section of the config.yml file, set `enabled` to `true` and fill in the `web
I hope this information helps you better understand and configure the SuperMarket plugin. If you have any other questions, feel free to ask.