MCPcopy Create free account
hub / github.com/Teneted/Tenet / getData

Method getData

src/main/java/org/bukkit/inventory/ItemStack.java:171–179  ·  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

169 * @return MaterialData for this item
170 */
171 @Nullable
172 public MaterialData getData() {
173 Material mat = Bukkit.getUnsafe().toLegacy(getType());
174 if (data == null && mat != null && mat.getData() != null) {
175 data = mat.getNewData((byte) this.getDurability());
176 }
177
178 return data;
179 }
180
181 /**
182 * Sets the MaterialData for this stack of items

Callers 1

isSimilarMethod · 0.95

Calls 6

getUnsafeMethod · 0.95
getTypeMethod · 0.95
getDataMethod · 0.95
getNewDataMethod · 0.95
getDurabilityMethod · 0.95
toLegacyMethod · 0.65

Tested by

no test coverage detected