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

Method clone

src/main/java/org/bukkit/inventory/ItemStack.java:293–311  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

291 }
292
293 @NotNull
294 @Override
295 public ItemStack clone() {
296 try {
297 ItemStack itemStack = (ItemStack) super.clone();
298
299 if (this.meta != null) {
300 itemStack.meta = this.meta.clone();
301 }
302
303 if (this.data != null) {
304 itemStack.data = this.data.clone();
305 }
306
307 return itemStack;
308 } catch (CloneNotSupportedException e) {
309 throw new Error(e);
310 }
311 }
312
313 @Override
314 @Utility

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.65

Tested by

no test coverage detected