Added: Auto-pickup filters can now be applied to unused bags, and will stay on the bag after being used.
Added: The "Quiver" feature can now be used with Crossbows.
Added: Command '/havenbags mod'.
This commands returns a link to the HavenBagsPreview mod for fabric.
Added: Semi AdvancedEnchants support.
Enabling AE's anvil.yml feature, would completely disable bag skins and upgrades from working.
Using the hidden config entry 'bag-event-monitor: true', HavenBags will watch the anvil event at the highest priority possible. Note: The event priority "MONITOR" is only meant to be used for debugging, so it is not recommended to use normally. ONLY use this if absolutely necessary.
Added: You can now allow specific item materials to be their own filters, with the new allow-specific config entry in filters.yml
Code (YAML):
# Whether specific items can be chosen as a custom filter. allow-specific: false
This feature automatically generates filters for each valid item material, and translates them to the defined language in config.yml. (See attached image, where da_dk was used as a test language)
Changed: Filters can now specify CustomModelData with both : and -.
Changed: When applying skins, the arrangement of the bag and skin is now irrelevant.
Fixed: If an open bag is removed from the player's inventory, a soft-locking error is no longer thrown, but instead the contents of the bag is still saved.
Additionally will a warning be sent.
I discovered this bug randomly, as a player of mine has a mod allowing them to use chat/commands while in an inventory. They could then use another command to move the bag outside of their inventory, which when the bag closed the error occurred, because HavenBags was unable to update the now missing (null) bag item.
Fixed: Bags can no longer be put into pots, or any block that requires right-clicking.
Fixed: AdminGUI should now correctly parse placeholders for the targetted player, instead of the admin using it.
TLDR: The gui code is a mess, and some mixup happened I just never figured out.
Internal: Reorganized some classes into new or other packages.
### Item/Block Weight # If you want to help create more realistic or better weights, # please post on the plugin github, what you think the weights should be like. :) # Note: These values are not validated, so if any are removed, they may cause issues. STONE: 2
## Want specific CustomModelData to have custom weight? # You can do MATERIAL-CMD, like: STONE-12345: 100
Added: Auto-pickup based on CustomModelData.
Code (YAML):
filters:
cmd-test:
displayname: 'ModelData Test'
items: ## Want specific CustomModelData to be picked up? # You can do MATERIAL-CMD, like: - STONE-11111
# Should bags be able to used as quivers? # Will prioritize offhand over inventory. quiver-bags: true
Added: Bags can now change texture based of how full they are.
This feature isn't compatible with skins.
Code (YAML):
# Should we change the bag's texture regarless of other settings, # based on how full the bag is? # NOTE: This function glitches if 'keep-bags' is set to false. capacity-based-textures:
enabled: false
# Defined capacities and their defined textures. # If a bag is over the capacity defined, they get the texture. textures:
'0': ''
'25': ''
'50': ''
'70': ''
'90': ''
'percent': 'texture'
Added: Command "/havenbags modeldata <value>".
Permission: "havenbags.modeldata" Set the CustomModelData of the bag you're currently holding. Like "/havenbags texture <value>", but for ITEM types.
Changed: Config validation has been moved to its own file, as it was flooding the other.
Fixed: Auto-pickup should no longer throw an "out of bounds" error when picking up items while empty.
Fixed: A bug where ModelData skin tokens were mistaken as Texture skin tokens.
Fixed: If the CustomModelData of a Skin Token is not defined in the config, it'll now correctly have the same as the skin itself.
If bag-type is ITEM.
If you're not running Minecraft 1.20.5 or higher, you don't have to update.
You have to update ValorlessUtils to v1.11.0.248, in order for this update to work.
Added: Following the NBT changes introduced back in 1.20.5, some items were unable to show their custom name in the Bag's lore.
Without removing support for 1.20.4 and lower, ValorlessUtils has been updated to grab the new components for HavenBags instead.
Added: You can now define the max amount of bags a player can create.
(This is bypassed with the permission "havenbags.bypass")
config.yml
Code (YAML):
# The max amount of bags a player can create. # Note that is they lose a bag, they'll need it restored, # or their max-bags would essentially be 8. (if 9) # (Ownerless bags do not count, set 0 for unlimited) max-bags: 9
lang.yml
Code (YAML):
# Message sent to the player when they've reached the bag limit. max-bags: '&cSorry, you cannot make
any more bags.'
Note: "max-bags" in the config file, will default to 0 for those updating the plugin, as to not force a limit on you.
Changed: Exiting a bag preview from the Admin GUI, will now return you to the list of bags, instead of all the way out.
Changed: Updated the default filters in filtering.yml.
!! Notice: Only personal backpacks with /ebp are elligible for conversion.
Added: You can now convert
EpicBackpacks into HavenBags using the hidden command "/havenbags convertepicbackpacks".
This requires both EpicBackpacks and HavenBags to be on the server at the same time, and for the user to be an Operator. Once converted, all players will receive their converted bag, the next time they log on the server. Do note that this "conversion" is really just copying the EpicBackpacks data and creating HavenBags from it.
How to use:
1. Make sure both EpicBackpacks and HavenBags are enabled on the server.
2. Use the command
/havenbags convertepicbackpacks 3. Stop the server to write the new data to the server, and remove the EpicBackpacks plugin.
4. Start the server back up, and enjoy your new bags.
Extra: Once all converted bags have been given out, the temporary files made in the conversion will be removed.
Important: Having both EpicBackpacks and Havenbags enabled at the same time should not cause either of them to stop working as intended. <3
-----
Fixed: Console error after converting and giving all Minepacks backpacks, has been fixed.
Fixed: An issue where Minepacks couldnt convert offline players correctly.
Fixed: Temporary files & folders from conversion are now correctly removed.
Found a minor issue with it
Added: You can now convert
Minepacks into HavenBags using the hidden command "/havenbags convertminepacks".
This requires both Minepack and HavenBags to be on the server at the same time, and for the user to be an Operator. Once converted, all players will receive their converted bag, the next time they log on the server. Do note that this "conversion" is really just copying the Minepacks data and creating HavenBags from it.
How to use:
1. Make sure both Minepacks and HavenBags are enabled on the server.
2. Use the command
/havenbags convertminepacks 3. Stop the server to write the new data to the server, and remove the Minepacks plugin.
4. Start the server back up, and enjoy your new bags.
Extra: Once all converted bags have been given out, the temporary files made in the conversion will be removed.
Important: Having both Minepacks and Havenbags enabled at the same time should not cause either of them to stop working as intended. <3
Added: You can now convert
Minepacks into HavenBags using the hidden command "/havenbags convertminepacks".
This requires both Minepack and HavenBags to be on the server at the same time, and for the user to be an Operator. Once converted, all players will receive their converted bag, the next time they log on the server. Do note that this "conversion" is really just copying the Minepacks data and creating HavenBags from it.
How to use:
1. Make sure both Minepacks and HavenBags are enabled on the server.
2. Use the command
/havenbags convertminepacks 3. Stop the server to write the new data to the server, and remove the Minepacks plugin.
4. Start the server back up, and enjoy your new bags.
Extra: Once all converted bags have been given out, the temporary files made in the conversion will be removed.
Important: Having both Minepacks and Havenbags enabled at the same time should not cause either of them to stop working as intended. <3
In collaboration with Mehboss, we've made
CustomRecipes and HavenBags support each other! ^^
Allowing you to create more advanced bag recipes, using custom ingredients, custom amounts, and more.
You can read more
here, about how to create bag recipes.
The old recipe system will remain, but will be marked as deprecated and removed later.
Changed: WORKBENCH has been added as a default allowed container, regardless of configuration.
Added: AutoPickup - You can now specify if specific filters require permissions to use/apply.
Code (YAML):
filters: # Filter name, as shown when typing the command. plants: # Display name, shown in the bag's lore. displayname: '&aPlants'
# Permission required to use/apply this filter. permission: node: havenbags.plants
# Does the player require this permission to apply the filter? # This way to can give bags with specific filters, that the player cant apply themselves. # They can still remove/change them though. apply: false
# Does the player require this permission to use the filter? use: true
# Items that this filter will pick up. items: - MATERIAL
Fixed: plugins.yml now correcly reloads with the command '/havenbags reload'.
Fixed: The following error when a non-upgrade token is put in the anvil alongside the bag.
Code (YAML):
Could not pass event PrepareAnvilEvent to HavenBags v1.21.0.1531
java.lang.IllegalStateException: We don't have CustomModelData! Check hasCustomModelData first!
Added: Using the Fabric mod "HavenBagsPreview", you can view the bag's content is a small GUI in the tooltip, when hovering over the bag.
https://modrinth.com/mod/havenbagspreview Special thanks to ArturoAtomCode/ArturoAtomplay for the mod!
Added: Config value in plugins.yml for the mod HavenBagsPreview.
Code (YAML):
mods:
HavenBagPreview:
enabled: true
You can disable this if you don't want it on your server, or if the NBT data becomes too large.
Fixed: blacklist.yml and plugins.yml weren't correctly validating.
!! NOTICE: This update requires ValorlessUtils v1.8.0.236
Added: Support for Minecraft 1.21
Changed: You can now Shift-click move bags inside your inventory, if you're already wearing a helmet.
Bags that are not of Material PLAYER_HEAD can be shift-click moved with no issue.
Fixed: PickupPrevention no longer causes errors for ownerless bags.
Added: Auto-Pickup will now put items in another bag of the same filter, if the first bag found is full.
Added: Skin Tokens can no longer be placed down.
Changed: Bag content is now cached to improve performance.
Fixed: The message "This bag is already open!", should no longer show when the bag is actually opened.
For some reason the event for opening bags was triggered twice, so the message was sent to the player.
Fixed: Skin tokens of type 'custommodeldata' can now be created.
Fixed: Bags should no longer lose their "content" lore when updated.
(Would only occur some times)
Fixed: A bug causing some functions to not apply to the bag item, such as Auto-Pickup and Trust.
While the data was stored correctly to the save file, it was never applied to the in-game item.
Huge thanks to ArturoAtomplay for helping me test and locate bugs!
Added: Skin Tokens.
Create tokens players can combine with their bag, to change the skin of their bag.
Code (YAML):
# Skin Token # Used to create a generic token, which you can edit in-game. # The rest of the data for the token is given when using the command. # You can create skins in the 'textures.yml' file. # Placeholders: # %skin% - Name of the skin, found in textures.yml. # (Works in name and lore) skin-token:
display-name: '&aSkin Token'
# If material is PLAYER_HEAD, the head's texture will be the same as the skin. material: PLAYER_HEAD
custommodeldata: 0
# 0 to ignore # Placeholders: # %skin% - Name of the skin, found in textures.yml. lore: - '&7Combine with a bag in an anvil to apply.'
- '&7Skin: &e%skin%' # You can add extra lore in-game, with things such as which skin it is.
Added: Command '/havenbags token <type> <value>'
Type is either 'texture' or 'custommodeldata'.
Added: CustomModelData per-size.
Works the same way as textures-per-size.
Added: 'bag-textures' validation.
If any textures are left empty, they will automatically be filled with the default texture.
This only runs when the plugin is being enabled, and not with '/havenbags reload'.
Added: EquipPrevention - Bags can no longer be equipped as a helmet.
Added: To prevent players bypassing the weight limit, you can no longer split stacks by dragging the mouse, while weight is enabled.
Only taking effect while inside a bag.
Added: If enabled, bags can only be picked up by their owners.
Code (YAML):
protect-bags-players: true
Added: Upgrading bags will now also increase their weight limit, if 'weight-per-size' is enabled.
Changed: Hotswapping prevention has been updated slightly, and should only affect bag items now.
Credit: ArturoAtomplay
Fixed: Bag's weight limit is now correctly stored and loaded from the data files.
Fixed: Open bags with an Auto-pickup filter, will not pick up items anymore.
This is to prevent unintended consequences.
Fixed: Ownerless bags should no longer bind to the player.
When the data was created, the player would still be bound, for some reason.
Fixed: Command 'give' now works when the config 'bag-textures' is enabled.
Due to a minor mistake, the sizes never aligned, and the item was never created, causing the error.
Fixed: Commands 'restore' and 'preview' should work correctly again.
Forcing it to use a new method of getting the bag's contents.
Fixed: Command 'weight' should now work correctly again.
Fixed: Deleting bags from the AdminGUI now also removes the cached data alongside the file.
Removed: Bag weight is no longer stored in the data file, as saving it is not needed.
Fixed: Converting from old to new bag data should now correctly load the old files.
A mishap on my end while fixing things, lead to .json files to be ignored. Apologies for the inconvenience.
Added: You can now use textures for individual bags.
Either use the Base64 value or one of the templates from textures.yml.
Added: Long awaited Bag Upgrades!
Using an Anvil and upgrade materials defined in config.yml, the player can upgrade their bag to the rank above it.
(from 9 to 18, and so on)
You can also define if the upgrade material requires a specific CustomModelData.
Added: textures.yml
File containing templates for '/havenbags texture <texture>'.
Added: Command '/havenbags texture <texture or base64>'.
Added: Permissions
Code (YAML):
A part of havenbags.player:
havenbags.upgrade.9:
description: Allows you to upgrade bags with a size of 9.
havenbags.upgrade.18:
description: Allows you to upgrade bags with a size of 18.
havenbags.upgrade.27:
description: Allows you to upgrade bags with a size of 27.
havenbags.upgrade.36:
description: Allows you to upgrade bags with a size of 36.
havenbags.upgrade.45:
description: Allows you to upgrade bags with a size of 45.
A part of havenbags.admin:
havenbags.texture:
description: Allows you to set textures of bags you own.
Note: havenbags.texture can be assigned to players of a specific rank, to allow them to change their bag's texture.
Changed: The console debug "Loaded Bags: X", has been moved to Info, and will show regardless of debug status.
Only triggered when loading bag data.
Changed: Updated '/havenbags help' to accommodate the new changes.
Fixed: '/havenbags info' should no longer error when the creator value is "null".
Fixed: Admin GUI should now ignore old data files.
NOTE: Ngl I've been a little stressed, so some minor changes might have been missed on this log.
Added: HUGE data storing update.
Bag data is now stored with all bag information, including creator, size, auto-pickup and content.
You can manually increase and lower bag size, but lowering will cause an error, the first time the bag is opened.
NOTE: If you've alter data files, and you encounter any problems, you will not receive any support for it.
Old data files are not removed, in case of conversion failure.
You can manually remove them if wished, to clear up space.
Added: Extra dupe prevention.
This wasn't required, but suddenly got the thought of adding it.
Added: Per-size bag textures.
(finally)
Code (YAML):
# Texture of the bag. Must be Base64 format. # You can get textures from https://minecraft-heads.com/ # The texture by default: https://minecraft-heads.com/custom-heads/decoration/1906-bag # At the bottom of the page there's a section called "For Developers". # Inside "For Developers" is a value based off of a large amount of random letters, numbers and symbols. That is the Base64 texture. bag-texture: 'eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGNiM2FjZGMxMWNhNzQ3YmY3MTBlNTlmNGM4ZTliM2Q5NDlmZGQzNjRjNjg2OTgzMWNhODc4ZjA3NjNkMTc4NyJ9fX0='
# Want textures per size instead? # You can fill these with the same method as above. # Existing bags are not updated. bag-textures:
enabled: false
size-9: ''
size-18: ''
size-27: ''
size-36: ''
size-45: ''
size-54: ''
size-ownerless-9: ''
size-ownerless-18: ''
size-ownerless-27: ''
size-ownerless-36: ''
size-ownerless-45: ''
size-ownerless-54: ''
Added: lang.yml entry 'bag-already-open'.
This is a part of the new dupe prevention.
Code (YAML):
# Message sent to the player if the bag is already open. bag-already-open: '&cThis bag is already open!'
Fixed: '/havenbags trust' and '/havenbags untrust' has been added to '/havenbags help'.
Fixed: The following error has been fixed:
Code (YAML):
[HavenBags
][]
Fixed: AdminGUI will no longer give you the "previous-" and "next page" buttons as items, when clicked on.
Added: Players can now trust other players to open their bound bags.
This is not yet shown on the bag item. Players can check who is trusted with '/havenbags untrust', as the tab-completion shows who's trusted.
Added: Config value 'trusting'.
Code (YAML):
# Can players trust other players with access to their bound bags? trusting: true
Added: Commands 'trust' & 'untrust'.
Added: Permission 'havenbags.trust'.
This is added to havenbags.player automatically.
Added: New config file 'plugins.yml', which contains settings for all plugins HavenBags support.
Added: PvPManager support.
Disable the usage of bags if the player has pvp enabled, or is tagged.
Added: Permissions 'havenbags.player' & 'havenbags.admin'.
Added: Permissions 'havenbags.open.x'
(Replace x with the size of the bag, by the power of 9) Allows server owners to define what ranks can open which sizes. 'havenbags.player' has all by default.
If you dont want players to be able to open bags of all sizes, please define these instead of using 'havenbags.player'.
Added: Encumbering.
Inside weight.yml you can now define if player's should get over-encumbered, when carrying a certain weight percent. Added: weight.yml config entry: 'over-encumber'.
Code (YAML):
# Can players become over-encumbered? over-encumber:
enabled: false
# At what weight % should we encumber players? percent: 80
# What effects should we give the player? # Format: EFFECT:LEVEL # https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html effects: - SLOWNESS:1
# Message sent to the player when they become over-encumbered. message: '&cYou feel over-encumbered.'
# Message sent to the player when they stop being over-encumbered. not: '&aYou feel lighter.'
Added: You can now set the inventory title per size.
Added: lang.yml config entries.
Code (YAML):
# Should the inventory title of the bag be per size? # if 'true' this will ignore 'bag-inventory-title' per-size-title: false
bag-inventory-title-9: ''
bag-inventory-title-18: ''
bag-inventory-title-27: ''
bag-inventory-title-36: ''
bag-inventory-title-45: ''
bag-inventory-title-54: ''
Changed: lang.yml comment on 'bag-cannot-use'.
Code (YAML):
# Message sent to the player if they attempt to open a bag bound to another player, # or doesn't have permission to open this size. bag-cannot-use: '&cYou cannot use this bag.'
Fixed: lang.yml entry 'bag-cannot-use' should now correctly parse colors and placeholders.
Removed: Permission 'havenbags.*'.
OPs already have this by default, and for admins you can now use 'havenbags.admin'.
Added: Bag data is now cached and periodically saved onto the server.
This should greatly increase performance, especially on servers with a lot of players.
Bags are loaded alongside the plugin and are stored in memory, and will never load again unless forced.
Bags will automatically be saved onto the server at intervals, which heavily increases performance compared to previous updates.
Players can now open and close bags, without ever having to force the server to read/write bag data.
This also means that Auto-Pickup should no longer cause high lag, on servers with many players.
Bonus: Only bags that have been changed are saved on auto-save to save resources.
Added: New command: '/havenbags reload force'.
Forcefully reload bag data.
Any unsaved bag data will be lost. * This command is hidden in tab-completion.
Fixed: Auto-Loot should no longer put equipped items into the bag, if those items are on the filter.
Fixed: AdminGUI should no longer create bags with a uuid.
Changed: All open bags are now closed, when '/havenbags reload' is used, to avoid issues.
Added: New config values.
Code (YAML):
# How often should we save bags onto the server? # In seconds. # Default: 1200 = 20min auto-save-interval: 1200
# Should HavenBags write in the console when saving? auto-save-message: true
# Should bag remain in the player's inventory when opened? # Keep this 'false' if bags-in-bags is 'true'. # Otherwise players can put the bag inside itself, and lose it. keep-bags: false
Added: Bag data is now cached and periodically saved onto the server.
This should greatly increase performance, especially on servers with a lot of players.
Bags are loaded alongside the plugin and are stored in memory, and will never load again unless forced.
Bags will automatically be saved onto the server at intervals, which heavily increases performance compared to previous updates.
Players can now open and close bags, without ever having to force the server to read/write bag data.
This also means that Auto-Pickup should no longer cause high lag, on servers with many players.
Bonus: Only bags that have been
changed are saved on auto-save to save resources.
Added: New command: '/havenbags reload force'.
Forcefully reload bag data. Any unsaved bag data will be lost. * This command is hidden in tab-completion.
Fixed: Auto-Loot should no longer put equipped items into the bag, if those items are on the filter.
Changed: All open bags are now closed, when '/havenbags reload' is used, to avoid issues.
Added: New config values.
Code (YAML):
# How often should we save bags onto the server? # In seconds. # Default: 1200 = 20min auto-save-interval: 1200
# Should HavenBags write in the console when saving? auto-save-message: true
# Should bag remain in the player's inventory when opened? # Keep this 'false' if bags-in-bags is 'true'. # Otherwise players can put the bag inside itself, and lose it. keep-bags: false
Added: Bag data is now cached and periodically saved onto the server.
This should greatly increase performance, especially on servers with a lot of players.
Bags are loaded alongside the plugin and are stored in memory, and will never load again unless forced.
Bags will automatically be saved onto the server at intervals, which heavily increases performance compared to previous updates.
Players can now open and close bags, without ever having to force the server to read/write bag data.
This also means that Auto-Pickup should no longer cause high lag, on servers with many players.
Bonus: Only bags that have been
changed are saved on auto-save to save resources.
Added: New command: '/havenbags reload force'.
Forcefully reload bag data. Any unsaved bag data will be lost. * This command is hidden in tab-completion.
Fixed: Auto-Loot should no longer put equipped items into the bag, if those items are on the filter.
Changed: All open bags are now closed, when '/havenbags reload' is used, to avoid issues.
Added: New config values.
Code (YAML):
# How often should we save bags onto the server? # In seconds. # Default: 1200 = 20min auto-save-interval: 1200
# Should HavenBags write in the console when saving? auto-save-message: true
# Should bag remain in the player's inventory when opened? # Keep this 'false' if bags-in-bags is 'true'. # Otherwise players can put the bag inside itself, and lose it. keep-bags: false
Added: The Auto-Pickup feature can now take items directly from your inventory, which allows compatibility with "Teleport Drops" effects, from plugins like
AdvancedEnchants and
EliteEnchants.
Added: Config value 'auto-pickup-inventory'. (Disabled by default)
Code (yml (Unknown Language)):
# Should Auto-Pickup put items from the inventory into the bag as well?
auto-pickup-inventory:
enabled: false
events:
onBlockBreak: true # For effect like "Teleport Drops" from AdvancedEnchants or EliteEnchants.
onItemPickup: true # To add existing items in the inventory to the bag.
Please take a backup of all bag data before updating! Just in case.
Upgraded: Auto-pickup has been rewritten, and should now correctly add items to the bag, without creating random stacks of different sizes, filling up the bag.
Before:
After:
Added: You can now remove auto-pickup filters on bags with '/havenbags autopickup none', or without defining a filter.
Fixed: HavenBags should no longer fail to enable on start, with the following error:
Code (YAML):
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at valorless.havenbags.Lang.Parse
(Lang.java:31
) ~
[HavenBags-1.10.5.1023-SNAPSHOT.jar:?
Note: Failed to parse placeholders using fallback variable, added additional fallback.
Fixed: '/havenbags autopickup' without the last parameter, should no longer cause errors.
Fixed: Changing the autopickup of a bag with an invalid owner (Unused or Unbound), no longer causes errors.
The message "This bag does not exist." will still be shown for now.
Fixed: '/havenbags info' no longer causes errors if the bag has no valid owner (Unused or Unbound).
The bag's weight was attempted to be fetched, but the bag had no valid contents to weigh.
Added: AdminGUI Overhaul.
You can now preview and restore ownerless bags.
GUIs are now paged, so if a player has more bags than the GUI can contain, you can now go to another page.
Added: Weight above the player's action bar, when auto-pickup picks up items.
Changed: Slight update to '/havenbags help'.
Changed: '/havenbags info' now shows pickup filter & weight.
Changed: The following Lang.yml entries have been changed:
Code (Text):
main-info-lore:
- '&7The Admin GUI does not allow restoration of ownerless bags,'
- '&7you have to do those manually with &e/bags restore&7.'
- ''
- '&7If a player has over 53 bags,'
- '&7you also have to manually restore them.'
- ''
Has been changed to:
Code (Text):
main-info-lore:
- '&7You can also restore bags of offline players,'
- '&7by using &e/bags gui restore <player-uuid>&7.'
Code (Text):
main-restore-lore:
- '&7Restore bags of online players.'
Has been changed to:
Code (Text):
main-restore-lore:
- '&7Restore bags of online players.'
- ''
- '&7Only the basic bag with it''s content will be restored.'
- '&7Things such as weight and auto-pickup filter, will not be restored.'
Added: Language "pl_pl" (Polish)
To use Polish, you must update ValorlessUtils to v1.5.7.217 or newer. Fixed: Bags can no longer auto-pickup items in blacklisted worlds.
Fixed: HavenBags should no longer duplicate item from the plugin ExecutableItems.
Added Feature: 'Weight Limits'
You can enable and define weight limits for bags. All existing bags will receive the default weight limit once enabled. Refer to weight.yml to enable this feature.
Added Command: '/havenbags weight <number>'
Sets the weight limit of the held bag. (Assosiated permission: 'havenbags.weight')
Added: Full support for PlaceholderAPI.
Added: Internal placeholders.
Refer to GitHub (lang.yml) to view all placeholders and their respected messages.
Added: The ability to customize the order of lore entries on bags.
Updated: How messages are parsed.
Changed: Lang.yml entries 'bound-to' and 'bag-size' no longer accept additional lines.
Please use the new 'bag-lore-add' for additional lines.
Fixed: AutoPickup would create a new stack, if the first found stack was full.
Fixed: AutoPickup wouldn't pick up, if there were only full stacks in the bag of the item.
Fixed: Ownerless bags could not have their names reset, with '/havenbags rename'.
Improved the help menu.
Commands are now mouseover, to show information regarding the command. (You can still use the old help menu, by changing the config value 'old-help-menu')
Picking up items with the Auto Pickup feature, will now show particles.
Particles are based on the dropped item, alongside a little smoke.
New Feature: Auto Pickup.
Bags can now automatically pick up items, when giving a filter with '/havenbags autopickup <filter>' You can edit and add these filters in the file 'filtering.yml' This feature is still very new, so if you experience any issues, please don't hesitate to contact me.
Added command '/havenbags empty', to quickly dump the currently held bag's content onto the ground.
Should you wish to quickly empty it, rather than taking item out one by one.
Added command '/havenbags help' to show a list of all commands, which you currently have access to.
If you have the permission 'havenbags.help', you'll get the entire list.
Fixed a new issue where bags couldn't be crafted, if they were given specific NBT data, while inside the crafting table.
NBT data such as owner and bag UUID, is now set when the item is crafted.
!!HavenBags has been updated to use some of the features from the newer version of ValorlessUtils, and therefore now require ValorlessUtils 1.5.3.173 or newer. HavenBags will now auto-disable if a lower version is found, rather than throw errors.
You can now preview bags in the AdminGUI.
Fixed an issue causing previewed bags to return and be saved, when the server shut down or reloaded.
Fixed an issue causing sound not to play when the bag is closed.
Lang.yml value 'bag-size-error' has been removed, as it is no longer used.
Size now clamps within 1-6, so even if you put 23 the size will be capped at 6.
Added PlaceholderAPI as softdepend.
SFX are done through ValorlessUtils now, instead of internally.
Primarily done to lower the size of the plugin, as it was added to ValorlessUtils.
You can now choose yourself, in which containers the player can interact with bags.
New config.yml value:
Code (YAML):
# Which containers are the player allowed to interact with bags? # Use this to prevent the player using bags in unintended ways, such as crafting. # Full list of InventoryTypes: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/inventory/InventoryType.html # Default: CRAFTING, HOPPER, PLAYER, CREATIVE allowed-containers: - CHEST
- ENDER_CHEST
- BARREL
- SHULKER_BOX
- MERCHANT
Fixed incorrect config comments on 'bags-in-shulkers' after the last update.
Regardless of this setting, hoppers cannot move bags.
To completely prevent incompatibility between bags and containers, such as bags of item type "SHULKER_BOX" cannot be placed through dispensers or alike, breaking the bag.
Bags are now only allowed to be moved in the following containers:
Chest
Ender Chest
Barrel
Creative
Player
Shulker Box
Merchant
Crafting (Player's inventory)
Hopper
In addition to avoid issues with this change, hoppers can no longer move bag items, regardless of config settings.
Changed how bags are written to the server, forcing character encoding to be "UTF_8".
This should prevent issues where non-english characters such as "ł ł ł" were saved as "? ? ?".
Bags can no longer be used in Crafting Tables, Furnaces, Smokers, or Blast Furnaces.
You can still burn fuel while attempting to smelt a bag. The start event for smelting is not cancellable.
In depth: - Crafting table: Bags can no longer be used as ingredients to craft an item. I.e if the bag was coal, and you tried to make a torch. - Smelters: as source: If you attempt to smelt a bag (i.e if the bag was raw_iron), the smelting would begin, but cannot finish. The event for "FurnaceStartSmeltEvent" is not a cancellable event, and I can therefore not prevent it. as fuel: If you attempt to use a bag as fuel, the furnace refuse to start.
Fixed a bug where bags could be placed, if held in offhand and were not bag-type 'HEAD'.
Turns out I missed an event cancellation in the placement blocker. But I've remade the code, and it works now.
Added
Admin GUI using '/bags gui'!
Do note, this gui is still in early access, and will be customizable at a later date. It may also throw some errors, but you can still use HavenBags like normal without the gui.
Fixed an issue causing the config value "bag-texture", to not be applied.
Fixed a warning that could occur, when closing bags.
Added permission 'havenbags.gui'.
Allows you to use /bags gui
Fixed an issue where Bags could get stuck inside Shulker Boxes and other bags, when disabled.
Bags are now checked for on InventoryClose, and will be returned to the player.
Stacked bags now split when the player's inventory is closed.
(The original bag will stay, but any split bags become new unbound/unused bags)
This should fix issues with plugins such as Crates, when multiple bags are awarded through the Crate, which are cloned bags. (They can only stack because they're exact duplicates. This update will split the duplicates when the player's inventory closes. Should there be issues, I'll add this function to multiple events.)
Fixed an issue causing "bag-bound-name" to not be parsed correctly.
!! The lang placeholder for "bag-bound-name" has been changed from %s to %player%.
Bags are now stored under the player's UUID instead of their username.
This should resolve issues when a player changes their username.
In addition, a conversion system has been created, converting existing bags to the new way of storing.
In case of any errors, please take a backup of the "../plugins/HavenBags" folder, so you can revert any issues that may occur.
A new config value has been added: "config-version"
Do not edit this, this is used to convert or update existing data with new updates. (Such as this update)
Another config value has been added, should you attempt to restore or preview a bag of a player which does not exist.
1. HavenBags now support PlaceholderAPI in some lore entries.
For now placeholders must be in
{ } instead of
% %, due to the current parsing system using %.
Example: {essentials_nickname} instead of %essentials_nickname%.
(I'm going to work towards upgrading the lang.yml parsing system, so that %s will be replaced with actual placeholders, such as %size% and %owner%)
- bag-bound-name
- bag-lore
- bound-to
- bag-size
ALL lore entries will support PlaceholderAPI in the next update, not just these 4.
I have to upgrade the base system first, and this is just a temporary solution to add PAPI.
2. Bag lore should no longer say "and more.." when content-preview-size is over 5 and there are over 5 times.
(Say preview-size is 9 and the bag has 6 items. Despite being way under the preview-size, it would still say "and more..")
3. You can now change the title of the bag GUI in lang.yml
Disclaimer: There are a few things you will have to update manually, since the plugin only adds missing config values, and does not replace your current ones.
- Bags can now be items/blocks instead of player heads, to allow usage of Custom Model Data.
- Lore entries "bound-to" and "bag-size" now support multiple lines.
(You add multiple lines the same way as described in the previous update)
- Crafting recipes have been given their own Custom Model Data entry, so you can have multiple bags with multiple looks.
- The update notifications no longer prompt you, if you're using a version higher than the latest.
(The Spigot API takes a little to update the versions, so if you update right after a release, the api still thinks the released version is older)
config.yml does not require you to manually update values, but lang.yml does, and recipes.yml if you wish to use Custom Model Data.
New/Updated config variables: config.yml
Code (YAML):
# Should the bags use heads or items? # HEAD - use Player Heads. # ITEM - use regular items. bag-type: HEAD
# Item material if the bag-type is 'ITEM' bag-material: ENDER_CHEST
# Custom Model Data if the bag-type is 'ITEM' bag-custom-model-data: 0
lang.yml
Code (YAML):
# Who the bag is bound to, if bound. # %s - Bag owner's name. bound-to: - '&7Bound to
%s'
# Bag size in slots. # %s - Bag size. bag-size:
- '&7Size: %s'
recipes.yml
Code (YAML):
# Custom Model Data # Leave 0 to ignore. custom-model-data: 0
NOTE: I've tested the bag-type ITEM the best I can.
If you discover any issues with it, please tell me in discussions or direct messages ^^
Fixed an issue causing malformed commands to throw errors in the console.
Both of the changes above will auto generate their required variables in lang.yml
Code (YAML):
# Message sent if the command is missing some args. # Some commands have their own messages. malformed-command: '&cUnknown command, are you missing some parameters?'
# Bag lore, always at the top before 'bound-to'. bag-lore: - '&fA well crafted bag, suited for carrying stuff.'
This update requires ValorlessUtils v1.3.0.130 in order to translate! Items listed in the bag's lore is now translated to the defined language.
You can request other languages added, I just did a few.
(Bag in the picture is translated to Japanese)
Code (YAML):
# Language used when translating material and item names. ## Supported languages: # English (US) --------- en_us # English -------------- en_gb # Danish --------------- da_dk # German --------------- de_de # Spanish -------------- es_es # French --------------- fr_fr # Turkish -------------- tr_tr # Dutch ---------------- nl_nl # Japenese ------------- ja_jp # Korean --------------- ko_kr # Chinese (Simplified) - zh_cn # Russian -------------- ru_ru language: 'en_us'
You can now blacklist worlds where bags cannot be used
config.yml
Code (YAML):
# Specify if bags should not work in specific worlds. # Worlds do not include _nether or _the_end. # You have to manually add those. blacklist: - world_name
- world_name_nether
- another_world
I've expanded on the crafting recipes, so you can decide if the ingredients should require a custom name, or a custom-model-data.
Do not that the recipes.yml will not update automatically, and can function without the new variables. You can either update the file manually using this template, or delete the file to auto-generate it again.
### NOTE: Do not use & in names for colors, use §. ### NOTE: custom-model-data at 0 will be ignored.
### Recipes for crafting custom bags enabled: false
# You can copy and paste more recipes for the different sizes. recipes: ### Unbound Bag unbound-1: # This bag will bind to any player using it. # Name of the item is specified in lang.yml. enabled: true
type: 'bound'
# Use this for custom bag textures, the same format as in config.yml. # Leave empty to use bag-texture from config.yml. bag-texture: ''
# Permission required to craft this specific bag. permission: havenbags.crafting.unbound
# Bag size, the number of slots is size*9. 1=9, 2=18. bag-size: 1
# How the recipe is layed out in the crafting table. # Use X for air/nothing. recipe: - LEL
- LCL
- LLL
ingredients:
L:
material: LEATHER
name: ''
custom-model-data: 0
C:
material: CHEST
name: ''
custom-model-data: 0
E:
material: EMERALD
name: ''
custom-model-data: 0
### Unused Bag ownerless-1: # This bag is ownerless and cannot bind. # Name of the item is specified in lang.yml. enabled: true
type: 'ownerless'
# Use this for custom bag textures, the same format as in config.yml. # Leave empty to use bag-texture from config.yml. bag-texture: ''
# Permission required to craft this specific bag. permission: havenbags.crafting.unused
# Bag size, the number of slots is size*9. 1=9, 2=18. bag-size: 1
# How the recipe is layed out in the crafting table. # Use X for air/nothing. recipe: - LLL
- LCL
- LLL
ingredients:
L:
material: LEATHER
name: ''
custom-model-data: 0
C:
material: CHEST
name: ''
custom-model-data: 0
In addition to the crafting updates, have I added an update checker, to notify you of new updates
You can disable it in config.yml.
This update requires you to update ValorlessUtils to v1.2.2.125 as well, due to new features.
Experimental Feature. Please report to me if you get any errors regarding the crafting. (I've never attempted to do custom crafting before)
You can now craft bags using custom recipes.
These recipes are customizable with permissions, ingredients, and even per-bag textures.
(I've made 2 recipes which are added by default, you can change or remove these.) (These recipes are disabled by default.) Custom recipes are found in
plugins/HavenBags/recipes.yml
### Recipes for crafting custom bags enabled: false
# You can copy and paste more recipes for the different sizes. recipes: ### Unbound Bag unbound-1: # This bag will bind to any player using it. # Name of the item is specified in lang.yml. enabled: false
type: 'bound'
# Use this for custom bag textures, the same format as in config.yml. # Leave empty to use bag-texture from config.yml. bag-texture: ''
# Permission required to craft this specific bag. permission: havenbags.crafting.unbound
# Bag size, the number of slots is size*9. 1=9, 2=18. bag-size: 1
# How the recipe is layed out in the crafting table. # Use X for air/nothing. recipe: - LEL
- LCL
- LLL
ingredients:
L:
material: LEATHER
C:
material: CHEST
E:
material: EMERALD
### Unused Bag ownerless-1: # This bag is ownerless and cannot bind. # Name of the item is specified in lang.yml. enabled: false
type: 'ownerless'
# Use this for custom bag textures, the same format as in config.yml. # Leave empty to use bag-texture from config.yml. bag-texture: ''
# Permission required to craft this specific bag. permission: havenbags.crafting.unused
# Bag size, the number of slots is size*9. 1=9, 2=18. bag-size: 1
# How the recipe is layed out in the crafting table. # Use X for air/nothing. recipe: - LLL
- LCL
- LLL
ingredients:
L:
material: LEATHER
C:
material: CHEST