Sort Modes

Overview

ClickSort supports several sort modes, i.e. different methods of arranging items in an inventory. To change sort mode, players can either shift-left-click on any empty inventory slot, or use the /clicksort sort <id|name|group|value> command.

The available sort modes are:

ID

This mode sorts items by their numeric ID, as listed in http://www.minecraftwiki.net/wiki/Data_values

Name

This mode sorts items by their displayed name. Item metadata is accounted for, e.g. a written book titled Creepers I Have Known will be sorted under 'C'.

Group

This mode sorts items by a user-defined group. To define groups, edit the supplied plugins/ClickSort/groups.yml file. You will see that several sample groups have been defined. You are free to edit those groups, remove them, and/or add new groups. After editing the file, use /clicksort reload to reload the group data.

This is the sample groups.yml file:

# Adjust this as you wish to define sort groups that will be used when the
# player sort mode is GROUP.  You can add as many or as few groups as you
# please.
#
# You can use anything you like for the group names, but they are sorted
# alphabetically, so a numeric prefix as used below is recommended.
#
# You can use numeric material ID's or material names as defined in
# http://jd.bukkit.org/rb/apidocs/org/bukkit/Material.html.  You can also
# specify a data value if you want, e.g. '351:4' is a piece of a lapis.
# 
# See also the 'default_group_name' setting in config.yml for how to define
# a default group for any items not listed here.
#
010-tools: [ 256-258, 269-271, 273-275, 277-279, 284-286, 290-294, 259, 346 ]
020-weapons: [ 267, 268, 272, 276, 283, 261 ]
030-armour: [ 298-317 ]
040-ores: [ 14, 15, 16, 21, 56, 73, 129, 153 ]
050-gems: [ 264, '351:4', 388 ]
060-ingots: [ 265, 266 ]
070-food: [ 260, 282, 297, 319, 320, 335, 349, 350, 354, 357, 363-366, 391-394 ]

Any item which is not listed in the groups.yml file will be assigned to a default group defined by the 'default_group_name' config setting - "000-default" by default.

Items in the same group will be further "subsorted" by item ID.

If no grouping definitions are present (i.e. all deleted or commented out), then sorting by group will not be available to players.

Value

This mode sorts items by a user-defined "value" or item price. ClickSort currently uses two sources of item value information:

Essentials worth.yml

If you have Essentials installed, ClickSort can read the plugins/Essentials/worth.yml file to obtain value data. Note that the default worth.yml distributed with Essentials does not contain a comprehensive item database; the intention is that server admins set this file up to suit their server's local economy. To add information to this file, use the Essentials /setworth <item> <value> command, followed by /clicksort reload.

To load worth.yml, the ClickSort config setting use_essentials_worth must be set to true (which it is by default).

ClickSort values.yml

ClickSort also reads plugins/ClickSort/values.yml to obtain value information. Data in here will be merged with, and override, any data loaded from the Essentials worth.yml file described above.

By default the values.yml file distributed with ClickSort does not contain any definitions; you will need to add definitions yourself to suit your local server environment. After editing the file, use the /clicksort reload command to reload the value data.

This is the default values.yml file:

# ClickSort values.yml file; provide values for items for sorting by value.
#
# Format is:
#   MATERIAL: VALUE
# or
#   MATERIAL/DATA: VALUE
# 
# where MATERIAL is a Bukkit Material name as listed in http://jd.bukkit.org/rb/apidocs/org/bukkit/Material.html
# and DATA is a numeric data value
#
# Example:
#   COBBLESTONE: 1.0
#   IRON_BLOCK: 100.0
#   DIAMOND_BLOCK: 2000.0
# You can include data values with a "/" separator, e.g.:
#   INK_SACK/0: 1.0
#   INK_SACK/1: 2.0 
# 
# You can use upper or lower-case material names.
#

Items with the same value will be further "subsorted" by item ID.

If no value definitions are present (i.e. all deleted or commented out) and the Essentials worth.yml file is not present (or use_essentials_worth is set to false), then sorting by value will not be available to players.


Comments

Posts Quoted:
Reply
Clear All Quotes