This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
[WIP] MaterialMatchers: match material(data) to given condition (f.e. all wooden stairs) #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While the Material enum grows and grows, there's the need for some kind of grouping Materials.
For now, we have to stick to EnchantmentTarget, however, this solution can't be extended for other purposes like to check for (Wooden)Stairs or even plugin-custom filters.
So (especially with the new updates for MC with more and more blocks) I started writing this little classes, to easily group Materials. It can also be used for some MaterialData (f.e. checking for salmon/pufferfish/clownfish) or any other object, f.e. ItemStack (there could be Matchers for finding ItemStacks containing max amount(64/16/1), durability (deterioration, data, ...)) and so on.
This adds just some features to the Bukkit-API, no plugin breaking nor must it be used with Glowstone.
It's not finished yet (only a few Material-Matcher in Materials), but I'd like to get some feedback before I (or everyone who likes) continues this.