Bukkit/Bukkit — pull request #751 by MikeMatrix (2013-01-11 01:21:32+00:00)
Title:  Added negative id check to Material.getMaterial(int). Fixes BUKKIT-3414

Negative id values would try to access the array out of bounds and throw an java.lang.ArrayIndexOutOfBoundsException.

Adding a check for negative values fixes this issue, and makes the method behave as expected from the documentation.
I also updated the test case, to also check for negative out of bounds.

[BUKKIT-3414](https://bukkit.atlassian.net/browse/BUKKIT-3414)