Features
- Adds a sort button to storage boxes
- Allows sorting by item name or category
- Automatically consolidates separate stacks of the same item when sorting
- Allows restricting sorting ability to container owner and teammates/friends/clanmates

Permissions
This plugin uses the permission system. To assign a permission, use oxide.grant <user or group> <name or steam id> <permission>. To remove a permission, use oxide.revoke <user or group> <name or steam id> <permission>.- sortbutton.use - Allows players to see the sort button and use all features of the plugin
Commands
This plugin provides both chat and console commands using the same syntax. When using a command in chat, prefix it with a forward slash: `/`.- sortbutton - Enable/Disable Sort Button.
- sortbutton <sort | type> - change sort type.
Configuration
The settings and options can be configured in the SortButton file under the config directory. The use of an editor and validator is recommended to avoid formatting issues and syntax errors.Default configuration:
- Default enabled (true or false) -- While true, the sort button will be enabled for players by default. Players can toggle the sort button with the sortbutton command.
- Default sort by category (true or false) -- While true, the sort button will use category mode by default. Players can toggle the mode with the sortbutton <sort | type> command.
- Check ownership (true or false) -- While true, players can only sort containers owned by them or teammates/friends/clanmates (if those settings are enabled). Regardless of this setting, all players can sort unowned containers such as vehicle containers.
- Use Clans (true or false) -- While true, players can sort containers owned by their clanmates while Check ownership is enabled.
- Use Friends (true or false) -- While true, players can sort containers owned by their friends while Check ownership is enabled.
- Use Teams (true or false) -- While true, players can sort containers owned by their teammates while Check ownership is enabled.
- Chat steamID icon -- Determines the icon that will be printed in chat when the player uses the sortbutton command.
- Chat command -- Determines which commands players can use to change sort button functionality. By default, only the "sortbutton" command is available, but you can add more such as "sb" if you want.
- Containers by short prefab name -- This section allows you to configure whether the sort button will be enabled for each type of container, as well as where the button will be positioned.
- Enable (true or false) -- While true, the sort button will appear for this type of container, as long as the player has the sort button enabled.
- OffsetX -- Determines where the sort button will be horizontally positioned (relative to the center of the screen). The vertical position is determined automatically based on the type of container and its capacity.
- Containers by skin ID -- This section works like Containers by short prefab name, but allows you to override the behavior for containers with specific skin IDs. This is useful for special containers managed by other plugins, as long as they have a consistent skin or range of skins.