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"