Bazaar - Player, Admin & Clan Shops icon

Bazaar - Player, Admin & Clan Shops -----

Player Shops - Admin Shops - Clan Shops




Change Log 1.4.6

This update addresses some bug fixes that could prevent shops stacking items when buying them, as well as some other potential buy/sell issues related to payment.

New feature - Buy/Sell safeguard

This feature prevents players from having a higher sell price than a buy price, therefore protecting shops from becoming bankrupt from players abusing a mistake.

The default for this behavior is on, you can modify this by adding the following to your config.yml

Code (YAML):
buy_sell_safeguard : true
And the following to lang.yml for translation purposes

Code (YAML):
buy_sell_safeguard : "&cSorry, you can't create a shop that sells for more than it buys"
----------, Nov 20, 2024

Change Log 1.4.5

This update addresses two issues:

- With worldguard, breaking the block can cause the error message about breaking shops to not display to the user

- The icons over barrels were slightly too low causing the blocks to render incorrectly
----------, Nov 18, 2024

Change Log 1.4.4

This update corrects a bug introduced in 1.4.3 which broke the localization for item names
----------, Oct 11, 2024

Change Log

Entering a value without a tag (-c, -admin, -clan) when creating a shop can now be used to give it a custom name

For example:

/shop create 1 5 10 -c:10 Some Name Here

Would create a shop called Some Name Here instead of the item name you are holding

This update also utilizes Myriad Clans 1.3.0 - If you use Myriad Clans, please update at the same time or you will receive errors. This is due to a change in the package name in the Myriad Clans api
----------, Aug 23, 2024

Change Log 1.4.1

Bazaar prevents you from destroying the chest where the shop is based, however, it does not prevent plugins similar to WorldEdit from deleting it.

There is a new timed feature now which will check to make sure there is a valid shop at the location, and if not, will remove it until next restart, or delete it permanently.

This feature is turned OFF by default. Add the following to config.yml

Code (YAML):
# Shop Cleanup
shop_cleanup
:
  # The number of seconds between runs for the cleanup job for missing shops if WorldEdit or similar removes the chest
  # Each time the timer runs, it will check each shop to ensure there is a Chest or Barrel at the location
  # and if not, will remove the shop. Any number below 1 will prevent the cleanup from happening
  seconds
: 60
  # If true, if a shop is removed during cleanup because a Chest or Barrel was not found, will delete the
  # shop permanently. If false, it will only remove the shop until the next reload
  delete
: true
Bug Fixes:

The plugin prefix was missing missing from messages. This has been corrected. You can modify the prefix in config.yml

The lang.yml file incorrectly uses "buy" and "sell" for the prices on the chest. Add the following to lang.yml if you wish to change the text on them:

Code (YAML):
buy_from_shop : "&cⒷ %currency_symbol%%from_shop_price%"

sell_to_shop
: "&aⓈ %currency_symbol%%to_shop_price%"
----------, Aug 1, 2024

Change Log 1.4.0

This update does the following:

Potion Types

Adds potion types to your shops (naming configurable in lang.yml)

image.png

Removal of Dependencies

It also removes Holographic Displays and ProtocolLib support - Please use Decent Holograms. This has been decided on as Holographic Displays is no longer in active development, and continued support of a dead project will cause additional development time.

We will be looking to add CMI in as an option in the future.

If you must run Holographic Displays, please stay to version 1.3.8

Switch to 1.21 as the base plugin

Bazaar should continue to work with older versions, but now specifically targets 1.21 in its build.

If you have any trouble with Bazaar in a previous version, please let me know via Discord and I'll provide an earlier copy.
----------, Jul 30, 2024

Change Log

Bazaar is now supported for 1.21

Holographic Displays is NOT supported moving forward as the plugin development has ceased.

Holographic Displays 3.0.4 (the final version) works with this version of Bazaar, however, it throws a warning into console from Holographic Displays when creating a hologram. Please transition to Decent Holograms for further support
----------, Jul 26, 2024

Change Log

This update has a few behind the scenes changes to try and improve upon the DecentHolograms integration, and a fix to creating the shared Ibex database table by removing the collation.

This fix to database removes the collation, which was causing issues for older versions of MariaDb
----------, Mar 22, 2024

Change Log 1.3.5

This update addresses two bug fixes

1) When no sell price was entered, the | after the buy price was still shown
2) Configuration issues were preventing the shop targeting timer to be properly set up

No config changes required.
----------, Nov 27, 2023

Change Log 1.3.4

This update addresses a bug that causes an error message to be shown for first time users who don't already have a Bazaar config folder.
----------, Nov 25, 2023

Change Log 1.3.3

This update adds several new features, and addresses several bugs

Log Transaction To Console

If you wish to record all transactions directly to the console, you can now do so by adding a new flag in config.yml

Code (YAML):
log_sales_to_console : true
And the following to lang.yml

Code (YAML):
console_log_player_shop_buy : "<%buyer%> bought <%amount%> of <%itemname%> for <%price%> from the shop at <%location%> belonging to <%owner%>"
    console_log_player_clan_buy
: "<%buyer%> bought <%amount%> of <%itemname%> for <%price%> from the clan shop at <%location%> belonging to <%clan%>"
    console_log_player_admin_buy
: "<%buyer%> bought <%amount%> of <%itemname%> for <%price%> from the admin shop at <%location%>"
    console_log_player_server_buy
: "<%buyer%> bought <%amount%> of <%itemname%> for <%price%> from the server shop at <%location%>"
    console_log_player_shop_sell
: "<%seller%> sold <%amount%> of <%itemname%> for <%price%> to the shop at <%location%> belonging to <%owner%>"
    console_log_player_clan_sell
: "<%seller%> sold <%amount%> of <%itemname%> for <%price%> to the clan shop at <%location%> belonging to <%clan%>"
    console_log_player_admin_sell
: "<%seller%> sold <%amount%> of <%itemname%> for <%price%> to the admin shop at <%location%>"
    console_log_player_server_sell
: "<%seller%> sold <%amount%> of <%itemname%> for <%price%> to the server shop at <%location%>"
Use local translations for items and enchantments (1.17+ ONLY)

You can now pull the local names for items and enchantments that are being sold, so do so, add the following line to config.yml

Code (YAML):

use_local_translate
: true
 
Define Shop target time

In some modes, holograms are hidden unless looking directly at the shop, this has up until now been checked every 20 ticks (1 second) - you can now modify this in the config. Minimum is 5 ticks.

Code (YAML):

shop_target_ticks
: 20
 
Show hologram icon, but hide just text

You can now show the icon for the shop and only display the text when targeting the shop by adding the following to the hologram section of your config.yml

Code (YAML):
hologram :
  # If true, the icon will always show, and the text will only show if targeted when show_only_if_targeted is true
  show_icon_always_text_if_targeted
: true
Command Aliases

You can now add a command alias to use instead of /shop. To do so, add the following to your config.yml

Code (YAML):
# This section of the config allows you to create an alias (language specific or otherwise) to replace
# the /shop command and any of the included arguments.  Leaving the entry as a blank string like "" will
# prevent that argument being aliased at all.
commands
:
  shop
:
    # Alias is the command that will replace /shop - If blank, no aliasing will be done
    alias
: ""
    # Create is the '/shop create' alias
    create
: ""
    # Create_admin is the 'admin' alias used in /shop create -admin
    create_admin
: ""
    # Create_server is the 'server' alias used in /shop create -server
    create_server
: ""
    # Create_clan is the 'clan' alias used in /shop create -clan
    create_clan
: ""
    # Create_cooldown is the 'c' (cooldown) alias used in /shop create -c
    create_cooldown
: ""
    # Remove is the '/shop remove' alias
    remove
: ""
    # Cancel is the '/shop cancel' alias
    cancel
: ""
    # Debug is the '/shop debug' alias
    debug
: ""
    # Help is the '/shop help' alias
    help
: ""
    # Reload is the '/shop reload' alias
    reload
: ""
    # Version is the '/shop version' alias
    version
: ""
    # Transfer_to_database is the '/shop transfer_to_database' alias
    transfer_to_database
: ""
    # Transfer_to_file is the '/shop transfer_to_file' alias
    transfer_to_file
: ""
Bugs Squashed

Languages not loading correctly
When using sell price only, price was not showing
----------, Nov 22, 2023

Change Log 1.3.0

A pretty big update on this one - Holographic Displays is no longer the supported hologram plugin for Bazaar. I have moved the default over to (the excellent) Decent Holograms
https://www.spigotmc.org/resources/decentholograms-1-8-1-20-2-papi-support-no-dependencies.96927

The reasoning behind this is the ProtocolLib requirement for changes in visibility, as well as update issues with with Holographic Displays. It will still work, however, it will not be supported at this time.

I've also added in MySQL support for those that have asked for it, with more details on that below.

Changes:

Moved a lot of internal code into a shaded utility plugin, reducing duplicating code across projects

Added Decent Holograms support and uses it as default

Rewrite of existing Holographic Displays code

Holograms will always show within x blocks by default, change the config option hologram.show_only_if_targeted = true to change this behavior

Added config section for hologram support, including showing out of stock messages, and showing/hiding the price line of holograms if out of stock

Code (YAML):
hologram :
    # This is your choice of hologram plugin.  Currently, only DecentHolograms is supported due
    # to the issues of getting updates for HolographicDisplays, as well as the ProtocolLib
    # requirement for showing when targeted.  HolographicDisplays should still work (<1.20), but will
    # not be supported.  Support may return depending on updates.
    # Additional hologram plugins may be added in the future.
    # Valid entries:
    # 0 = None
    # 1 = DecentHolograms (recommended - https://www.spigotmc.org/resources/decentholograms-1-8-1-20-2-papi-support-no-dependencies.96927/)
    # 2 = HolographicDisplays (currently unsupported as no update past 1.20.0 is available)
    # The selected plugin MUST be installed
    plugin
: 1
    # If true, when the item is out of stock, an Out of Stock message will be added to the hologram
    show_out_of_stock
: true
    # If true, the price line will show when out of stock
    show_price_out_of_stock
: true
    # If true, shows whatever enchantments the item has
    show_enchantments
: true
    # If true, the holograms will only show if the shop is targeted
    # This may cause performance issues for large servers as it has to loop through all online players
    # Defaults to false so holograms show at all times.
    show_only_if_targeted
: false
Added MySQL support, with included config changes:

Code (YAML):
    # If you wish to save to MySQL database instead of file, make sure to fill this section in with the appropriate
    # information, and set use = true
    # If you have use set to true, your MySQL database MUST be accessible or Bazaar will error out
    # If you do not wish to use MySQL, leave use = false, and the shop data will be saved in your data folder
    mysql
:
    # If true, Bazaar will attempt to use the database
    use
: false
    # Your hostname/IP address
    host
: "your_host"
    # Your MySQL port (default is 3306)
    port
: 3306
    # Your database name, defaults to "ibex" but can be any existing database
    # Database MUST exist before running
    database
: "ibex"
    # Your username and password must have permission to your database
    username
: "your_username"
    password
: "your_password"
 
If switching from File > MySQL or MySQL > File, it is preferred that you recreate your shops, however, there are two unsupported commands:
Both commands REQUIRE you to be in MySQL mode to run, and can only be run from console. Please note these commands are UNSUPPORTED - back everything up before you use them.

The database used is a generic database to be used by all Ibex plugins, if you wish to access the database, be sure to include WHERE plugin_name = 'bazaar'

Below are some useful queries for the database

Code (Text):
    # Creating the ibex database
    CREATE DATABASE `ibex` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

    # Creating the ibex_plugin table
    CREATE TABLE `ibex_plugin` (
       `ibex_id` int NOT NULL AUTO_INCREMENT,
       `plugin_name` varchar(45) NOT NULL,
       `key_type` varchar(50) NOT NULL,
       `ibex_key` varchar(255) NOT NULL,
       `ibex_value` varchar(255) DEFAULT NULL,
    PRIMARY KEY (`ibex_id`)
    ) ENGINE=InnoDB AUTO_INCREMENT=104 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

    # Rekeying the ibex_plugin table
    # Should only be needed if you get close to the ibex_id max int value (which is unlikely)
   
    CREATE TABLE IF NOT EXISTS `temp_ibex_plugin` (`ibex_id` int NOT NULL AUTO_INCREMENT,`plugin_name` varchar(45) NOT NULL,`key_type` varchar(50) NOT NULL,`ibex_key` varchar(255) NOT NULL,`ibex_value` varchar(255) DEFAULT NULL, PRIMARY KEY (`ibex_id`)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
    INSERT INTO temp_ibex_plugin (plugin_name, key_type, ibex_key, ibex_value) SELECT plugin_name, key_type, ibex_key, ibex_value FROM ibex_plugin;
    TRUNCATE TABLE ibex_plugin;
    INSERT INTO ibex_plugin (plugin_name, key_type, ibex_key, ibex_value) SELECT plugin_name, key_type, ibex_key, ibex_value FROM temp_ibex_plugin;
    DROP TABLE temp_ibex_plugin;
 
The config option display_out_of_stock has been deprecated and replaced with hologram.show_out_of_stock

Please add the following to your lang.yml files

Code (YAML):
console_only : "&cERROR &f- Command can only be run in console"
mysql_only
: "&cERROR &f- This action can only be run if using MySQL"
file_only
: "&cERROR &f- This action can only be run if using file storage"
transfer_success
: "&aSUCCESS &f- Transfer complete"
transfer_error
: "&cERROR &f- Transfer failed"
----------, Oct 13, 2023

Change Log 1.2.3

This update adds some API calls to Bazaar so you can hook into it and get some information as well as modify existing shops

API calls are as follows:

Code (Java):
    /**
     * Gets a set of all shop locations
     * @return Set of shop locations
     */

    Set <Location > getAllShopLocations ( )

    /**
     * Gets a set of all shop locations owned by the player specified
     * @param uuid Player unique identifier
     * @return Set of shop locations
     */

    Set <Location > getPlayerShopLocations (UUID uuid )

    /**
     * Gets a set of all admin shop locations
     * @return Set of admin shop locations
     */

    Set <Location > getAdminShopLocations ( )

    /**
     * Gets a set of all server shop locations
     * @return Set of server shop locations
     */

    Set <Location > getServerShopLocations ( )

    /**
     * Gets a set of all clan shop locations for the clan tag provided
     * @param tag Clan tag
     * @return Set of clan shop locations
     */

    Set <Location > getClanShopLocations ( String tag )

    /**
     * Removes all the shop locations owned by the player specified
     * @param uuid Player unique identifier
     */

    void removeAllPlayerShops (UUID uuid )

    /**
     * Gets a shop at the specified location
     * @param location Location of shop
     * @return Shop object - null if not found
     */

    Shop getShop (Location location )

    /**
     * Replaces the shop at the specified location
     * @param location Location of shop
     * @param shop Shop object
     */

    void putShop (Location location, Shop shop )
----------, Oct 9, 2023

Change Log 1.2.2

Various bug fixes around buying from shops
----------, Mar 7, 2022

Change Log 1.2.1

This update corrects a potential issue with the /shop command if you do not have Domain installed.
----------, Jan 14, 2022

Change Log 1.2.0

This is a fairly significant update from Bazaar 1.1.1 and includes a lot of new code, a lot of rewriting, a lot of simplification and reworking. Changes cover the following:
  • Java 16+ now required
  • Spigot/Paper 1.18 now supported
  • Removed sqllite support
  • Now hooks into Domain instead of Domain hooking into Bazaar
  • WorldGuard integration added
  • New command: /shop cancel
  • Added transaction logging
  • Added ability to flip buy/sell to left/right click
  • Added invalid_items for shops
  • Added Server shops
  • Added sounds to failed buy/sell
  • Implemented shop limits by permission
  • Rewritten command handling
  • Buying from shop code rewritten and simplified
  • Item/Location/String functions switched out for standardized
  • New configuration file reader implemented
  • Internal changes moving from work.torp.bazaar to com.ibexmc.bazaar
  • Internal changes changing 'Chest' nomenclature to 'Shop'
  • Moved all shop specific code to a new Shop manager
  • Many, many bug fixes and improvements
Please feel free to swing by Discord ( https://discord.gg/7a47xSX) if you'd like more information, or if you're interested in a trial copy.
----------, Jan 6, 2022

Change Log 1.1.1

This changes addresses a bug that could cause some shop owners to not be charged when selling to their shop.
----------, Oct 6, 2021

Change Log 1.1.0

This update upgrades Bazaar to being 1.17 friendly, adds in some shop creation checks and a few minor bug fixes.

CAUTION:
When using for 1.17, please note that as of today, the officially released versions of Holographic Displays and ProtocolLib are NOT supported, you will need the most recent development builds.

Holographic Displays - Version 2.4.8 build

ProtocolLib - Version 4.70

Not using the most recent development copies will cause errors that will not be supported.

If upgrading from a prior copy, and you wish to translate please add the following to your lang.yml file

Code (YAML):
sell_failed_invalid_item : "&cUnable to sell item to shop, you must be holding the correct item"
sell_failed_qty
: "&cUnable to sell item to shop.  Insufficient quantity"
buy_unavailable
: "&cShop is not buying from players at this time"
sell_unavailable
: "&cShop is not selling to players at this time"
shop_create_min_amt
: "&cERROR &f- You must allow at least 1 item"
shop_create_min_buy
: "&cERROR &f- Buy price cannot be negative"
shop_create_min_sell
: "&cERROR &f- Sell price cannot be negative"
----------, Jun 25, 2021

Change Log 1.0.11

Update addresses an issue that could impact the number of items purchased from a store.
----------, Jul 8, 2020

Change Log 1.0.10

This update provides support for Spigot/Paper 1.16

Please be sure to update the Holographic Displays and ProtocolLib plugins.
----------, Jul 2, 2020

Change Log 1.0.9

Fix for a bug that stops chests being used as new shops, though barrels were unaffected.
----------, Apr 29, 2020

Change Log 1.0.8

This update corrects an issue that could cause an informational exception from spamming the console.

No feature updates this time around.
----------, Nov 7, 2019

Change Log 1.0.7

Corrects an issue when reloading the server via the console that would try to send a message to the player (which doesn't exist in console)
----------, Oct 28, 2019

No change log - this is a reupload of version 1.0.6 due to Spigot issues causing a 0 bytes file to be uploaded
----------, Sep 25, 2019

Change Log 1.0.6

A few new features/bug fixes:
  • If you install ProtocolLib, the text of the shop holograms will only show when you're looking at the shop, and only for the player looking. This eliminates the holograms being visible all the time. If you choose not to install ProtocolLib, the holograms will continue to show all the time as normal.
  • A shop limit feature has been added. To limit the number of shops a player can create, apply the bazaar.limit.<number> permission.
  • For example, if you want a particular group to have a maximum of 3 shops, give the group the permission bazaar.limit.3
    If there is no bazaar.limit permission at all, there is no limit.
  • Sneaking while left clicking or right clicking the shop will now display a message explaining what will happen on left/right click (for those players that forget which they should do)
  • Items with a single enchantment will now list the enchantment name in the hologram
  • Capitalization of items with custom colors now capitalizes correctly
  • Enchantment level on single enchantment items or single enchantment books will now display the level of the enchantment in roman numerals
Any questions, please let me know!

Note: For 1.14 - use the dev build of ProtocolLib ( https://www.spigotmc.org/resources/protocollib.1997/) or you may receive an error similar to:

Code (Text):
java.lang.NoClassDefFoundError: org/apache/commons/lang3/Validate at com.comphenix.protocol.injector.netty.ChannelInjector.invokeSendPacket(ChannelInjector.java:651) ~[?:?]
----------, Sep 24, 2019

Change Log 1.0.6

A few new features/bug fixes:
  • If you install ProtocolLib, the text of the shop holograms will only show when you're looking at the shop, and only for the player looking. This eliminates the holograms being visible all the time. If you choose not to install ProtocolLib, the holograms will continue to show all the time as normal.
  • A shop limit feature has been added. To limit the number of shops a player can create, apply the bazaar.limit.<number> permission.
  • For example, if you want a particular group to have a maximum of 3 shops, give the group the permission bazaar.limit.3
    If there is no bazaar.limit permission at all, there is no limit.
  • Sneaking while left clicking or right clicking the shop will now display a message explaining what will happen on left/right click (for those players that forget which they should do)
  • Items with a single enchantment will now list the enchantment name in the hologram
  • Capitalization of items with custom colors now capitalizes correctly
  • Enchantment level on single enchantment items or single enchantment books will now display the level of the enchantment in roman numerals
Any questions, please let me know!

Note: For 1.14 - use the dev build of ProtocolLib ( https://www.spigotmc.org/resources/protocollib.1997/) or you may receive an error similar to:

Code (Text):
java.lang.NoClassDefFoundError: org/apache/commons/lang3/Validate at com.comphenix.protocol.injector.netty.ChannelInjector.invokeSendPacket(ChannelInjector.java:651) ~[?:?]
----------, Sep 24, 2019

Change Log 1.0.4

Corrects a few minor bugs
----------, Sep 22, 2019

Change Log 1.0.3

You can now disable the /shop command and instead use /bazaar - This is to try and prevent Bazaar from causing conflicts with other plugins. If you do not have another shop plugin, I would recommend leaving /shop alone.

To block /shop from running in Bazaar, add the following to your config file:

Code (YAML):
disable_shop_command : true
----------, Sep 17, 2019

Change Log 1.0.2

Some minor bug fixes
----------, Sep 16, 2019

Change Log 1.0.1

Various bug fixes from submission date to today
----------, Sep 8, 2019

Resource Information
Author:
----------
Total Downloads: 113
First Release: Sep 7, 2019
Last Update: Nov 20, 2024
Category: ---------------
All-Time Rating:
9 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings