geforkt von Mirrors/Paper
SPIGOT-5534: ItemStack copy constructor can cause legacy layer to load
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
902b81e2dd
Commit
b0cb90fa04
@ -101,7 +101,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
|||||||
Validate.notNull(stack, "Cannot copy null stack");
|
Validate.notNull(stack, "Cannot copy null stack");
|
||||||
this.type = stack.getType();
|
this.type = stack.getType();
|
||||||
this.amount = stack.getAmount();
|
this.amount = stack.getAmount();
|
||||||
|
if (this.type.isLegacy()) {
|
||||||
this.data = stack.getData();
|
this.data = stack.getData();
|
||||||
|
}
|
||||||
if (stack.hasItemMeta()) {
|
if (stack.hasItemMeta()) {
|
||||||
setItemMeta0(stack.getItemMeta(), type);
|
setItemMeta0(stack.getItemMeta(), type);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren