Sueta
US

Useful Items

1.3

Create your own interactive items!

·Plugin

Useful Items

This plugin allows you to create custom items that will execute any command you want (or even batches!) when item is used.

Just drop down plugin to your plugins directory and start server to generate default configs.

Config examples

There are two main configs to store items and scripts, but if you want to make a lot items, you can create directories named "scripts" and "items" and divide your scripts/items by multiple configs. So, all configs in "scripts" directory will be treated as configs which contain scripts, same thing for items.

items.yml

test: #item ID
  material: "DIAMOND"  #Material name
  displayName: "&3test diamond"  #Display name
  lore: "this is\ntestdiamond"  #Item lore, as line separator use "\n"
  command: "tell {player} hi!"  #Command that will be executed when item is used
  persistent: true  #false if item will be consumed on use, either true
test2:
  material: "ARROW"
  displayName: "&5Useful arrow"
  permission: super.permission  #Permission that player needs to use this item
  command: "@script:test"  #If command looks like "@script:<string>", then <string> will be id of script
  cooldown: 10000  #Cooldown in milliseconds (1s = 1000ms), do not use it as long time cooldown, all cooldowns are refreshed after server restart

scripts.yml

test:  #Script ID
  delay: 10  #Delay between commands in ticks
  script:  #Commands list
    - "tell {player} hi!"
    - "tell {player} it's useful script!"
test2:
  delay: 10
  type: RANDOM  #Script type, RANDOM means that one random command will be executed, BATCH(default) means that all commands will be executed in corresponding order
  script:
    - "give {player} diamond"
    - "tell {player} Not today :("

Commands

  • usefulitems | usefulitem | ui - base cmd
    • item | i - manage items
      • list - list all items
      • show <id> - item info
      • get | give <item id> [<amount>] [<player name>] - give item
    • script | s - manage scripts
      • list - list all scripts
      • show <id> - script info
    • reload - reads all scripts and items from disk

Permissions

  • usefulitems.admin - for command usage
  • usefulitems.default - for item usage by default
  • usefulitems.bypasscooldown - to bypass cooldowns

Placeholders for commands

  • {player} - player nickname
  • {uuid} - player uuid

Similar projects

Plugin →