{"comment":{"position":null,"created_at":"2011-12-07T14:43:02Z","commit_id":"9f9e5f7c1391c1478ec086d68ad447c893d941f0","updated_at":"2011-12-07T14:43:02Z","user":{"gravatar_id":"2d68cf07610fdeec0f19a47ae3b30d70","id":817982,"url":"https://api.github.com/users/garbagemule","login":"garbagemule","avatar_url":"https://secure.gravatar.com/avatar/2d68cf07610fdeec0f19a47ae3b30d70?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"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.\r\n\r\nThe 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:\r\nhttps://github.com/garbagemule/MobArena/commit/7e30c425105f7a685af1df614f4dee928c293c95\r\n\r\nThe 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\r\n\r\nAt 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 :)\r\n\r\nAgain, 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 :(","id":775937,"path":null,"line":null,"html_url":"https://github.com/JmannDriver/MobArena/commit/9f9e5f7c13#commitcomment-775937","url":"https://api.github.com/repos/JmannDriver/MobArena/comments/775937"}}