!! If updating from a Dev Build and using a database type other than 'files', convert back to files before updating.
Minor changes have been done to the mysql and sqlite tables, so after converting to files, please delete the database file, or drop the mysql bags table.
Added: Major database rework.
You can now specify how HavenBags should store bag data, whether it should use files, MySQL or SQLite.
Code (YAML):
# How should HavenBags store the bag data? # 'files' - Store each bag as individual files. # 'sqlite' - Store all data in a database file. # 'mysql' - Store all data in an external database. # 'mysqlplus' - Store all bags on an external database, loading/saving directly to the database. Can be used to use bags across servers. save-type: 'sqlite'
What should you do? Absolutely nothing, the database will default to "files", and you can use the new in-game command to convert to a new database type.
"/havenbags convertdatabase <type>"
Files are not actually converted when changing database, the database is simply saved as the new type.
Old bag data files do not get removed when converting, but are not loaded.
Added: Soulbound feature, keep and prevent bags from dropping on death.
This may be incompatible with plugins like GravesX and AngelChest. Disabled by default.
Added: You can now define the material of a bag when setting CustomModelData: "/bags modeldata <value> [material]"
[] = Optional
Added: You can now define how many bags a player can create with the new permission "havenbags.max.X"
If you want to set the create limit per rank, you can give the new permission "havenbags.max.10" to set their limit to 10.
Added: PlaceholderAPI placeholders:
-
%havenbags_bags_current% - How many bags the player owns.
-
%havenbags_bags_max% - How many bags the player can own.
-
%havenbags_bags_items_MATERIAL% - How many items of a specific material, are in all the player's bags. (Does not count ownerless bags)
-
%havenbags_bags_inv_items_MATERIAL% - How many items of a specific material, are in all the player's bags in their inventory. (Counts all bags)
-
%havenbags_player_has_bag% - Returns true or false, depending if a player owns a bag or not.
-
%havenbags_carry% - How many bags the player is carrying.
-
%havenbags_carry_max% - How many bags the player can carry at once.
-
%havenbags_bags_slots_total% - Total amount of slots of all bags in the player's inventory.
-
%havenbags_bags_slots_used% - How many slots are used in all bags in the player's inventory.
-
%havenbags_bags_slots_free% - How many slots are free in all bags in the player's inventory.
-
%havenbags_bags_others% - Returns true or false, if the player has a bag they can't use.
Added: Internal lore placeholders:
-
%slots_used% - How many slots in the given bag are used.
-
%slots_free% - How many slots in the given bag are free.
Changed: Minor update to the AdminGUI.
-
Changed: When inside restore/preview, heads now have a white text instead of italic yellow.
-
Fixed: Ownerless wont show up in restore/preview, if no ownerless bags exist.
Changed: Updated some parts of the database to improve performance.
Fixed: When upgrading to 1.21.4 where bags containing items with "FoodEffect" couldn't be loaded.
FoodEffect is now removed from the item, in order to load the bag correctly. FoodComponent.FoodEffect was removed and replaced with ConsumableComponent, which I'm unable to serialize.
Removed: Minecraft 1.17 Support.
May still work, but the plugin wont be developed with 1.17 in mind anymore. In truth, hasn't been for a while now, but no errors were reported.