mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
Revert "SPIGOT-5515: Add basic validation against creating non-item itemstacks"
This reverts commit e5ce128c45
.
By: md_5 <git@md-5.net>
This commit is contained in:
parent
b9ce15ca0c
commit
51a4c2f4b2
@ -68,7 +68,6 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
@Deprecated
|
||||
public ItemStack(@NotNull final Material type, final int amount, final short damage, @Nullable final Byte data) {
|
||||
Validate.notNull(type, "Material cannot be null");
|
||||
Validate.isTrue(type.isItem(), "Material must be an item: ", type);
|
||||
this.type = type;
|
||||
this.amount = amount;
|
||||
if (damage != 0) {
|
||||
@ -117,7 +116,6 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
@Utility
|
||||
public void setType(@NotNull Material type) {
|
||||
Validate.notNull(type, "Material cannot be null");
|
||||
Validate.isTrue(type.isItem(), "Material must be an item: ", type);
|
||||
this.type = type;
|
||||
if (this.meta != null) {
|
||||
this.meta = Bukkit.getItemFactory().asMetaFor(meta, type);
|
||||
|
Loading…
Reference in New Issue
Block a user