Sueta
[A

[Archived] Items

3.1.3

Save items, change them in-game or in yml. Attach commands and limit their usage.

·Plugin

Items

Plugin for custom item handling. Save items, change them in-game or in yml. Attach commands and limit their usage.

Features

  • Edit items in-game with simple-to-use commands and full tab completion
  • Parameters supported for editing: NBT, Enchants, Lore, Display name, Material, Item Flags (HideFlags)

  • Add custom-made parameters (aka 'item extra' ) to items to prevent players crafting with, placing or stacking items

  • Save items under a name to storage, give them to a player, or drop them somewhere in the world

  • Attach commands to items with 'attributes'
  • Supports different clicks - right click, left click and both when sneaking (shifting)

  • You can use PlaceholderAPI placeholders in items that are parsed when given to a player

Dependencies

  • Optional: PlaceholderAPI for placeholders in items (lore and displayname) and in attribute commands

Commands

- All commands have a full tab completer.

<> = required argument 
 (   )  = optional argument 
 
Items  :  
- alias   :  /i, /item 

/items - Help page. 
/items reload - Reload the plugin. 

/items list - List saved items. 
/items detail <name> - Get information about a saved item. 
/items remove <name> - Remove item by name. 
/items save <name> - Save item in hand, or update it. 
/items load  (  name  )  - Load  all  , or an individual item from items.yml. 
/items give <name>  (  playerName  )   (  amount  )   (  -r  )  - Give a player / yourself an item, or a raw version of it  (  unparsed placeholders  )  by -r. 
/items drop <name> <worldName;x;y;z>  (  amount  )  - Drop an item on location.  (  ex. /items drop item-one world;0;100;0 1  )  
 
Attributes  :  
- alias   :  /att, /atts  
- available actions   :  right_click, left_click, shift_left_click, shift_right_click 

/attributes - Help page. 
/attributes list  (  hand/h  )  - List loaded attributes or attributes on item in hand. 
/attributes add <name> <action> - Add an attribute on action to item in hand. 
/attributes remove <name> - Remove attribute or attribute saved on action from item in hand. 
/attributes clear - Clear  all  attributes from item in hand. 
 
Utility   : 
 
/detail - Get information about item in hand. 

/setname <displayName> - Set a display name for item in hand. 
/settype <material> - Change the material of an item in hand, keep everything else. 

/lore - Display lore. 
/lore add <line> - Add a line to the lore. 
/lore remove <index> - Remove a line by index. 
/lore clear - Clear the whole lore. 

/enchants - Display enchants on item. 
/enchants add <enchantment>  (  level  )  - Add an enchant to item. 
/enchants remove <enchantment> - Remove an enchant. 
/enchants clear - Clear  all  enchants from item. 

/flags - List flags. 
/flags add <flag> - Add a flag to item. 
/flags remove <flag> - Remove a flag from item. 
/flags clear - Clear  all  flags from item. 

/nbt - List nbt. 
/nbt add <key> <value> - Add an NBT entry to item. 
/nbt remove <key> - Remove NBT from item. 
/nbt clear - Clear  all  NBT from item, except vanilla properties. 

/itemextra unplace  (  true/false  )  - Players won't be able to place the item  (  block  )  . 
/itemextra uncraft  (  true/false  )  - Players won't be able to use the item in crafting. 
/itemextra unstack  (  true/false  )  - Item won't stack with anything else.

Configuration

- attributes.yml - attributes you can assign to an item
- You can find the default file here

# Attribute Configuration for Items  
 #  
 # Version: 3.0.1  

 # Attribute name   
attribute-one   : 
    # Commands to run when the item is used  
   # No prefix - command ran by console  
   # p! - commands ran as player  
   # op! - executed as player with OP  
   # random! - randomly picks one command from marked, you can use above modifiers. (random has to be the first one.)   
  commands   : 
     - 'random! say Woooohoo!' 
    - 'random! say  No  Wooohoo for u.' 
    - 'random! p! me I say. Wooohoo!' 
    - 'p! say Woooohooo! indeed.' 
    - 'op! pl' 
    - 'say Hello world!' 
   # Item cooldown in seconds  
   # No cooldown when not specified   
  cooldown   :  5 
   # How many times can this item be used before being consumed.  
   # Unlimited when 0 or not specified   
  use-limit   :  1  
the-second-attribute  :  
  commands   : 
     - 'give  %player% diamond 1'  
   # Messages can be either one line, or multiple.  
   # Send to the player only.   
  inform   :  '&7You used an item with the Second Attribute! gj!' 
   # Broadcasted to the server.   
  broadcast   : 
     - '&e&m        &8 Item used' 
    - '&7--> &8Attribute fired'

Permissions
- You can find them here .

TO-DO

  • Allow saving items to different files and folders (like BossShopPro)
  • Optional "transaction" logger
  • Add support for WorldGuard - disable some items in a region
  • Add the ability to re-parse placeholders on an item
  • Json chat item editing
  • Add Item Control ( for lobbies, lock an item in place, or just deny "losing it" )
  • Use item tracking ( you'll be able to update items already given to players )
  • Redesign commands ( just colors and styling )
  • Allow multiple attributes on one action

Submit suggestions and bug reports on this discord server , or here in discussion.

Similar projects

Plugin →