JmannDriver/MobArena — comment on commit 9f9e5f7c1391c1478ec086d68ad447c893d941f0
File:  line 0
By garbagemule:

Thanks for the pull request, but I'm guessing you haven't actually tested it out. First of all (and I'm quite ashamed to say this) the ItemParser class is never actually used in MobArena xD It's a "work in project" class that was meant to remove the responsibility from the ball of mud that is MAUtils. Second of all, the regexes aren't at fault, since they just check if the strings are numbers or not, and will cover all potions just fine. The big problem is the byte data type to which the data subtypes are cast.

The issue is that before the newer CraftBukkit builds (the ones that support Minecraft 1.0), the damage/data subtype/durability parameter in ItemStack was actually a byte, so I just followed the API. In the newer builds, it is a short. The fix was quite simply to first check if the material was either wool or ink sack, in which case nothing had to be altered, but if not, change the data type from byte to short. See this commit on the dev branch and its parent for details:
https://github.com/garbagemule/MobArena/commit/7e30c425105f7a685af1df614f4dee928c293c95

The latest CraftBukkit RB is still 1337, which means that's where the master branch will stay until a new RB is out. The master branch follows the RB's, but the dev branch always contains the newest source code, so for future reference, please look in that branch :3

At the moment I'm trying to refactor all of the command-handling code, so MACommands isn't such a big blob of hard-to-read code. After that, I'll move on to refactoring stuff like item parsing and underlying data types :)

Again, thanks for taking your time to actually look into the code to find a solution! It's more than what can be said about many other users, who seem to just bark "error!" or "halp!" when something unexpected happens. I'm sorry your effort was "wasted", though :(