Block Dyer
Block Dyer
Features
Allows a player to right-click a block of wool, glass (including panes), hardened clay, or carpet with a dye in hand to apply it to the block, consuming the dye (or a portion thereof) in the process. Also allows a player to right-click a "Stained" block (glass or clay) to de-stain it, consuming the water (or a portion thereof) in the process.
Note: All dyeing is at a one dye to one block ratio.
Note 2: There are no commands, nor are there ever planned to be any.
Permissions
The following is a quick summary of permission nodes in BlockDyer. More details here or click the header.
blockdyer.use
- Allows using plugin at all.blockdyer.redye
- Allows re-dyeing stained glass.blockdyer.noconsume
- (Default denied) Allows using plugin without consuming materials.blockdyer.overridewg
- (Default denied) Dangerous - Skips this plugin's check for permission to modify blocks in an area.
Config
The config can be used to adjust the mode of consumption of dyes and water bottles, as well as how much of a dye/bottle each block takes up. Details here or click the header.
License
All rights reserved: This plugin currently contains known deprecated code, as non-deprecated workarounds have not been introduced yet. Hopefully, this plugin is set to automatically switch over once those workarounds are introduced, and once the deprecated code can be removed, the plugin will be open sourced.
The deprecated methods are
MaterialData.getData()
andMaterialData.setData()
, which I still need to use since Glass, Glass Panes, Carpets, and Stained Clay aren't part of Colorable yet.Edit: Oh gee thanks Markdown for parsing that Reply syntax. XD
What methods are deprecated? Isn't it possible to just check if the dye the player holds in his hand can be used on the block they click and if the block they clicked isnt already the color of the dye?
@LB1
Nice! Maybe I could take a little from this. (Actually, I ended up doing just that)
I don't think it'd take too long - all they'd have to do is create StainedGlass, StainedThinGlass, and StainedClay classes all implementing Colorable. What would make this harder is if they don't do it that way, but my plugin is set to switch over automatically if they do.
Hi, I just thought you might be interested in my plugin DyeSmear which does something similar to yours - it's open source and the code is public domain. Mine does not do wool or carpet by design, however.
I also had to use deprecated methods in mine. I think it will be a long time until the proper interfaces exist, unfortunately.