@@ -33,23 +33,32 @@ public void addProvider(ItemProvider provider, String... type) {
3333 }
3434 }
3535
36- private ItemKey normalizeKey (@ NotNull ItemKey key ) {
37- String type = key .type ();
38- type = aliases .getOrDefault (normalize (type ), type );
39- return new ItemKey (normalize (type ), key .id ());
36+ public Collection <String > getTypes () {
37+ return Collections .unmodifiableCollection (providerMap .keySet ());
4038 }
4139
42- public Collection <String > getPossibleTypes () {
43- Set <String > types = new HashSet <>();
44- types .addAll (providerMap .keySet ());
45- types .addAll (aliases .keySet ());
46- return types ;
40+ public Collection <String > getAliases () {
41+ return Collections .unmodifiableCollection (aliases .keySet ());
4742 }
4843
4944 public Collection <ItemProvider > getProviders () {
5045 return Collections .unmodifiableCollection (providers );
5146 }
5247
48+ public @ Nullable String getType (String alias ) {
49+ return aliases .get (normalize (alias ));
50+ }
51+
52+ public @ Nullable ItemProvider getProvider (String type ) {
53+ return providerMap .get (normalize (type ));
54+ }
55+
56+ private ItemKey normalizeKey (@ NotNull ItemKey key ) {
57+ String type = key .type ();
58+ type = aliases .getOrDefault (normalize (type ), type );
59+ return new ItemKey (normalize (type ), key .id ());
60+ }
61+
5362 @ Override
5463 public boolean isValidKey (@ NotNull ItemKey key ) {
5564 key = normalizeKey (key );
0 commit comments