mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-12-26 20:27:38 +01:00
Fixed null materials
This commit is contained in:
parent
2942f57528
commit
4640a0cae4
@ -6,6 +6,7 @@ import com.willfp.ecoenchants.util.Registerable;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
@ -30,6 +31,7 @@ public class EnchantmentTarget implements Registerable {
|
||||
*/
|
||||
public EnchantmentTarget(String name, Set<Material> materials) {
|
||||
this.name = name;
|
||||
materials.removeIf(Objects::isNull);
|
||||
this.materials = materials;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user