classpublicPriority 3
ResourceFilter
com.hypixel.hytale.server.core.inventory.container.filter.ResourceFilter
implements ItemSlotFilter
2
Methods
2
Public Methods
1
Fields
1
Constructors
Constructors
public
ResourceFilter(ResourceQuantity resource)Methods
Public Methods (2)
public
ResourceQuantity getResource()public
boolean test(Item item)@Override
Fields
Private/Package Fields (1)
private
ResourceQuantity resourceInheritance
Parent
Current
Interface
Child
Use mouse wheel to zoom, drag to pan. Click nodes to navigate.
Related Classes
Used By
Source Code
package com.hypixel.hytale.server.core.inventory.container.filter;
import com.hypixel.hytale.server.core.asset.type.item.config.Item;
import com.hypixel.hytale.server.core.inventory.ResourceQuantity;
import javax.annotation.Nullable;
public class ResourceFilter implements ItemSlotFilter {
private final ResourceQuantity resource;
public ResourceFilter(ResourceQuantity resource) {
this.resource = resource;
}
@Override
public boolean test(@Nullable Item item) {
return item == null || this.resource.getResourceType(item) != null;
}
public ResourceQuantity getResource() {
return this.resource;
}
}