use of org.spongepowered.common.item.inventory.observer.InventoryEventArgs in project SpongeCommon by SpongePowered.
the class AbstractLens method addChild.
protected void addChild(Lens<TInventory, TStack> lens, InventoryProperty<?, ?>... properties) {
checkNotNull(lens, "Attempted to register a null lens");
this.children.add(lens, properties);
this.availableSlots.addAll(lens.getSlots());
if (lens instanceof ObservableLens) {
((ObservableLens<TInventory, TStack>) lens).addObserver(this);
}
this.raise(new InventoryEventArgs(Type.LENS_ADDED, this));
}
Aggregations