Security Craft

Security Craft

54M Downloads

Linked keycards with /give?

likl opened this issue ยท 1 comments

commented

Hello, is there a way to get already linked keycard with the /give command?

commented

Hi.

First of all, this is a bug tracker, not a place to get help. If you need support with the mod, please join our Discord server and ask in the #help channel.
As for your question, yes it is possible. You can set NBT on the card according to the settings you want it to have. This tag can have the following entries (entries marked with * are required):

linked* has to be 1b
ownerName* (string) the name of the owner of the keycard readers this keycard can open
ownerUUID* (string) the UUID of the owner of the keycard readers this keycard can open
signature* (integer) a number denoting which keycard readers this keycard works on (those of the card owner which have the same signature as the card)
limited (boolean) for saying whether the keycard is a limited use keycard, use 1b if so
uses (integer) for denoting how many times a limited use keycard can be used

Example command: /give @p securitycraft:keycard_lv1{"ownerName":"bl4ckscor3","ownerUUID":"452a535d-24a8-4c96-bf81-3d426bf4d29c","signature":43,"linked":1b}

As for how to use NBT with the give command, please see the Minecraft wiki: https://minecraft.fandom.com/wiki/Argument_types#item_stack