BlockUsage
WNBlockUsage is simple bukkit plugin for showing number of blocks or percentage of blocks in selected areas. Text is formated onto signs.
NOTE: Everything is done in server thread, do not select areas bigger than 500k blocks!
Setup
- Download latest version of BlockUsage into your `plugins/` directory.
- For selecting areas and creating WNBU signs, you need OP or permission `wnbu.create`. For breaking these signs, you need permission `wnbu.break`
- Get wooden axe and select area (like when creating Residences or selecting area with WorldEdit - first point by left-clicking on block, second point by right-clicking on another block). You should get message: `[WNBU] 1/2. Point was selected at: X:_, Y:_, Z:_`, additionaly ending with size of current selected area
- Create sign wherever you want. One line (only) must starts with `[WNBU]` (editable in config - `default_settings.prefix`). You can use colors `&_` or few built-in variables, like:
- `$fb` - Number of full blocks in selected area (not AIR)
- `$mb` - Number of maximum blocks
- `$pb` - Percentage of blocks
- `$cb` - Color corresponding to current percentage (See also `default_settings.dynamic` values in `config.yml`)
Config
Default config:
default_settings: prefix: '[WNBU]' # Whatever you want to type first into signs rate: 5000 # Refresh rate dynamic: # $cb depent colors 90: '&2' # If percentage is equal or bigger than 90, return &2 - green color 60: '&a' 30: '&e' 10: '&c' # If percentage is equal or bigger than 10 and smaller than 30, return &c - red 0: '&4' # If percentage is equal or bigger than 0 and smaller than 10, return &4 - dark red
Examples
Blocks / Maximum
[WNBU] $fb / $mb - -
Would be displayed as
- 7 / 9 - -
Colored Blocks / Maximum
[WNBU] $cb $fb &7/ $mb - -
Would be displayed as
- (light green)7 (light gray)/ 9 - -
where (light green) color is automatic changed.
Colored example with colored text
[WNBU] &4Mining $cb $pb % -
Would be displayed as
- (red)Mining (light green)68 % -
where (light green) color is automatic changed.
All in one
[WNBU] $cb $fb / $cb $mb &bMines! $cb $pb %
Would be displayed as
Comments