MCPcopy Create free account
hub / github.com/Bukkit/Bukkit / deserialize

Method deserialize

src/main/java/org/bukkit/inventory/ItemStack.java:232–246  ·  view source on GitHub ↗
(Map<String, Object> args)

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 2

getMaterialMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected