Added Items#getCustomItems

This commit is contained in:
Auxilor
2021-07-16 19:49:41 +02:00
committed by Auxilor
parent 255bb4b38e
commit d830672795

View File

@@ -10,7 +10,9 @@ import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
@UtilityClass
@SuppressWarnings("deprecation")
@@ -86,4 +88,13 @@ public final class Items {
}
return false;
}
/**
* Get all registered custom items.
*
* @return A set of all items.
*/
public Set<CustomItem> getCustomItems() {
return new HashSet<>(REGISTRY.values());
}
}