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.