11/*
2- * This file is part of MimicAPI .
2+ * This file is part of Mimic .
33 * Copyright (C) 2020 Osip Fatkullin
44 * Copyright (C) 2020 EndlessCode Group and contributors
55 *
6- * MimicAPI is free software: you can redistribute it and/or modify
6+ * Mimic is free software: you can redistribute it and/or modify
77 * it under the terms of the GNU Lesser General Public License as published by
88 * the Free Software Foundation, either version 3 of the License, or
99 * (at your option) any later version.
1010 *
11- * MimicAPI is distributed in the hope that it will be useful,
11+ * Mimic is distributed in the hope that it will be useful,
1212 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1313 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414 * GNU Lesser General Public License for more details.
1515 *
1616 * You should have received a copy of the GNU Lesser General Public License
17- * along with MimicAPI . If not, see <http://www.gnu.org/licenses/>.
17+ * along with Mimic . If not, see <http://www.gnu.org/licenses/>.
1818 */
1919
20- package ru.endlesscode.mimic
20+ package ru.endlesscode.mimic.items
2121
22- /* * Service for getting items by theirs ID. Also can be used to match id with item. */
22+ import ru.endlesscode.mimic.MimicService
23+
24+ /* * Service for getting items by theirs ID. Also can be used to match ID with item. */
2325interface ItemsRegistry <ItemStackT : Any > : MimicService {
2426
2527 /* * Returns all known item IDs. */
@@ -32,15 +34,15 @@ interface ItemsRegistry<ItemStackT : Any> : MimicService {
3234 /* * Returns `true` if item with given [itemId] exists. */
3335 fun isItemExists (itemId : String ): Boolean
3436
35- /* * Returns id that represents given [item], or `null` if the id not found. */
37+ /* * Returns ID representing given [item], or `null` if the ID not found in this registry . */
3638 fun getItemId (item : ItemStackT ): String?
3739
38- /* * Returns item by given [itemId], or `null` if id not found. */
40+ /* * Returns item by given [itemId], or `null` if the ID not found in this registry . */
3941 @JvmDefault
4042 fun getItem (itemId : String ): ItemStackT ? = getItem(itemId, amount = 1 )
4143
4244 /* *
43- * Returns specified item stack with specified [amount] by given [itemId], or `null` if id not found.
45+ * Returns item stack with specified [amount] by given [itemId], or `null` if ID not found in this registry .
4446 *
4547 * If given [amount] is greater than maximum possible, will use maximum possible amount.
4648 * Amount shouldn't be less than `1`.
0 commit comments