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

Method getData

src/main/java/org/bukkit/inventory/ItemStack.java:121–127  ·  view source on GitHub ↗

Gets the MaterialData for this stack of items @return MaterialData for this item

()

Source from the content-addressed store, hash-verified

119 * @return MaterialData for this item
120 */
121 public MaterialData getData() {
122 if (Material.getMaterial(getTypeId()).getData() != null) {
123 data = Material.getMaterial(getTypeId()).getNewData((byte) this.durability);
124 }
125
126 return data;
127 }
128
129 /**
130 * Sets the MaterialData for this stack of items

Callers

nothing calls this directly

Calls 4

getMaterialMethod · 0.95
getTypeIdMethod · 0.95
getNewDataMethod · 0.80
getDataMethod · 0.65

Tested by

no test coverage detected