#Checking curios slots / give items to curios slot
5 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
bump? anyone?
I learned it from elsewhere
/**
* Check if the player has a certain item
* @param {Internal.ServerPlayer} player
* @param {Internal.ItemStack_} itemStack
*/
const $CuriosApi = Java.loadClass('top.theillusivec4.curios.api.CuriosApi');
function hasCurios(player, itemStack) {
let curiosInventory = $CuriosApi.getCuriosInventory(player).resolve().get();
return curiosInventory.equippedCurios.allItems.some((item) => item == itemStack);
}
It works ! thanks !