(Map<String, Object> args)
| 230 | } |
| 231 | |
| 232 | public static ItemStack deserialize(Map<String, Object> args) { |
| 233 | Material type = Material.getMaterial((String)args.get("type")); |
| 234 | short damage = 0; |
| 235 | int amount = 1; |
| 236 | |
| 237 | if (args.containsKey("damage")) { |
| 238 | damage = (Short)args.get("damage"); |
| 239 | } |
| 240 | |
| 241 | if (args.containsKey("amount")) { |
| 242 | amount = (Integer)args.get("amount"); |
| 243 | } |
| 244 | |
| 245 | return new ItemStack(type, amount, damage); |
| 246 | } |
| 247 | } |
nothing calls this directly
no test coverage detected