Skip to content

Autosort

tom2208 edited this page Jun 23, 2021 · 3 revisions

Description

This feature allows you to automatically sort an inventory when you close it (click "e" or "esc"). It uses the Players Categories and Pattern and falls back to the server defaults if the player hasn't overwritten them.

There is a default autosort toggle for the server, but with the correct permission, players may overwrite the autosort toggle for themself.

Autosorting a Inventory

Commands

  • /sortingconfig autosort
    • get the currently configured autosort toggle of the player performing the command. Falls back to the default toggle if not set.
  • /sortingconfig autosort <true/false>
    • Sets the autosort toggle of the player performing this command. It will not affect other players.
  • /sortingadmin autosort
    • get the currently configured autosort toggle for the server.
  • /sortingadmin autosort <true/false>
    • Sets the autosort toggle for the server. It will affect every player that hasn't overwritten the toggle for themself.

Permissions

Only Server OPs have these permissions by default.

  • chestcleaner.cmd.sortingconfig.autosort

    • allow player to overwrite the toggle for themself.
  • chestcleaner.cmd.admin.config

    • allow player to change the autosort toggle for the server.

Config

  • the server toggle is saved/configured in config.yml
default:
  autosort: false
  • the player toggles are saved/configured in playerdata.yml
<player id>:
  autosort: true