Plugin category: Admin Tools Minecraft version: 1.10.2 Suggested name: ItemStorage What I want: A plugin can save items in file with all properties (name, lore, enchants, flags..) and can retrieve them in game with command (like the ItemStorage command in the NBTEditor plugin). Ideas for commands: - /ist give <player> <name> <amount> - /ist save <name> # Save the current item in hand to file - /ist list # See the list of created items Ideas for permissions: Permissions for each commands When I'd like it by: Anytime Thank a lot to accept this request
@9UjtOAtcBA Seems not that hard too @DarkNight197 Why does using a kit doesn't work? If there is nothing suiting your needs out there, I will most likely make you one.
Good point. You should just make kits with one item I'm sure there are many different kit plugins out there
A simple kit plugin is not the good way to do what I want I need these commands to give 1 or more special item to specified player and can be editable by files It's used to give rewards to players with special events, many people need this plugin. If it's possible to add configuration to the give command: /ist give <player> <name> <amount> where amount can be random between 2 values (ex: 1-5 can give 1, 2,.. or 5 items to player randomly).
@DarkNight197 Editable by files? It would be saved in a not so nice way for a human to modify. At least you need to be extremly careful.
@I Al Istannen May not be editable files @9UjtOAtcBA Because I need to not repeat the /give command, if I modify the Item I need to edit in all plugins where I use it
@DarkNight197 Protip: click the "Tahg user" button, rather than adding an @ and a link, lol There are a few solutions to this that don't require a new plugin to be made, but I do believe a plugin for this explicit purpose would be useful.
@9UjtOAtcBA @DarkNight197 I will finish the navigation plugin first. Then I can do this. If anybody else wants to do this before that, go ahead.
@DarkNight197 @I Al Istannen OP Could also get this, and add the following lines to the commands.yml, if you're not going to make the plugin public. I see no point in making a plugin for a single person when that feature can already be done with another plugin: if you're going to upload it to bukkit and so forth, then it makes sense. Code: 'ItemStorage-give': command: /ist-give type: RUN_CONSOLE runcmd: - '/give $arg1 $arg2' register: true permission-node: nbtstorage.give permission-required: true permission-error: &cNo permission. 'ItemStorage-save': command: /ist-save type: RUN_CONSOLE runcmd: - '/mycmd-variables create $arg1' - '/mycmd-variables set $arg1 $multiargs' register: true permission-node: nbtstorage.save permission-required: true permission-error: &cNo permission. Then just use /ist-save to create an item, e.g: Code: /ist-save OpChestplate diamond_chestplate 1 0 {ench:[{id:0,lvl:10}]} Then use the following command in any plugin or ingame to give that item: Code: /ist-give <player> OpChestplate
I already use this plugin and I had this idea but its too complicated in the way I use it. Is it possible to add one ore more commands for a specified item on right or left click ? Like: /ist addcmd <name> <command> (Features like the ServerSigns plugin) Thank
@DarkNight197 CommandItems mechanic provided by CraftBook are the de facto standard in executing commands from items, but I believe mycmd has a listener and functionality catering for command-items as well. Here are the instructions on how to operate Mycmd's own command items. Should be noted that CraftBook provides more functionality to command items, for example executing commands passively when an item is in inventory or worn, rather than MyCmd's Leftclick/Rightclick. Here is an example of CraftBook commanditem entry in configuration: Code: LightningRod: item: "369|Lightning Rod" commands: - "strike" permission-node: "lightningrod.use" run-as: PLAYER click-type: CLICK_RIGHT delay: 0 delayed-commands: [] cooldown: 10 cancel-action: true Here are all available triggers for the command to be executed: Code: CLICK_LEFT - Performs the action on left click. CLICK_RIGHT - Performs the action on right click. CLICK_EITHER - Performs the action on either click. CLICK_LEFT_BLOCK - Performs the action on left click of a block. CLICK_RIGHT_BLOCK - Performs the action on right click of a block. CLICK_EITHER_BLOCK - Performs the action on either click of a block. CLICK_LEFT_AIR - Performs the action on left clock of air. CLICK_RIGHT_AIR - Performs the action on right click of air. CLICK_EITHER_AIR - Performs the action on either click of air. ENTITY_RIGHT - Performs the action when an entity is right clicked. ENTITY_LEFT - Performs the action when an entity is hit. ENTITY_PROJECTILE - Performs the action when an entity is hit by an arrow (Or other projectile) ENTITY_EITHER - Performs the action when an entity is either right clicked or hit. BLOCK_BREAK - Performs the action when a block has been broken. BLOCK_PLACE - Performs the action when a block has been placed. BLOCK_PROJECTILE_AIR - Performs the action when a projectile stops moving, but is in air. BLOCK_PROJECTILE_BLOCK - Performs the action when a projectile hits a block. BLOCK_PROJECTILE_EITHER - Performs the action when a projectile stops. BLOCK_EITHER - Performs the action when a block has been either placed or broken. ITEM_CONSUME - Performs the action when an item is consumed (eaten/drunk). ITEM_DROP - Performs the action when an item is dropped. ITEM_BREAK - Performs the action when an item breaks due to durability. ITEM_PICKUP - Performs the action when an item is picked up. ITEM_CLICK_LEFT - Performs the action when an item is left clicked in the inventory. ITEM_CLICK_RIGHT - Performs the action when an item is right clicked in the inventory. ITEM_CLICK_EITHER - Performs the action when an item is clicked either way in the inventory. PLAYER_DEATH - Performs the action when the player dies. PLAYER_CHAT - Performs the action when the player sends a chat message. PASSIVE - Performs the action every half second. Using cooldowns it is possible to delay this. (Cooldown messages aren't displayed for Passive events) Passive is also called for equipped armour as well as held item. ANY - Performs the action when any of the above criteria have been met. Here is full documentation on craftbook commanditems. Regarding your ServerSigns related request, Mycmd has the BlockSet feature, which allows you to bind any command to any block, which will be triggered on left/rightclick. See here. Whilst mycommand is an excellent utility and incredibly powerful, it's only that at what it does: making commands. For item-triggered commands, I recommend you use CraftBook CommandItems.
It's not important to edit files @9UjtOAtcBA Where can I found the Craftbook CommandItem download link ?
@I Al Istannen If i were to when i save the item like this. By adding it to the first slot in an inventory then convert that inventory to base64. Then when i load i would convert it back from base64 to an Inventory then take the first slot again. Would this be extensive on the server? And this would save all the attributes and stuff too right? This is not me making it I'm just asking since i was wondering
@JanTuck ItemStack implements ConfigurationSerializable. Using FileConfiguration#set(String path, <itemstack>) is enough to save it. And the user can edit it to a degree. Or if you want to do more pointless work, save basic data (durability and material) and the NBT tag (convert it to base64 to save it in a text file or write it directly to a file).
@DarkNight197 It comes with CraftBook. Just enable it in the mechanic configuration section. ("enabled-mechanics").
When I use Craftbook CommandItems I have this message: Inventory became out of sync during usage of command-items! I solved it ! Commands consume items
As i said i was playing around with it before i stopped, but here was what i managed to create https://github.com/JanSTuck/ItemStorage Might be fucked up with classes since it was in eclipse and stuff.. idk
@DarkNight197 I've made a quick plugin. But it requires my Core Lib to be used: https://dev.bukkit.org/bukkit-plugins/ct-core/ Plugin download: https://crytec.net/development/itemstorage/ItemStorage.jar Permissions: ist.give ist.delete ist.save Commands: /ist save <name> /ist list - Opens a Interface, right click a item in the interface to delete. /ist give <player> <name/id> <amount>