Skip to content
emanondev edited this page Mar 24, 2023 · 11 revisions

How to install

  1. Get the jar file from spigot resource page
  2. Place the file on your plugins folder of your server
  3. Restart your server

Commands

All the commands provide tab complete support and most of feedback messages are also clickable and hoverable

  • /ItemEdit (/ie)
    Edit the item in your hand

  • /ServerItem (/si)
    Keep a registry of items, saved items are accessible to any player with permission to use this command and also to console

  • /ItemStorage (/is)
    Keep a private registry of items, saved items are accessible only to the owner

  • /ItemEditReload
    Reload the configuration files without reloading the whole server

  • /ItemEditImport
    Import items saved on other plugins (for migration purpose)

  • /ItemEditInfo
    Shows information abouth the plugin and platform (for bug report purpose)

External Plugins support

  • Vault
    When Vault is installed with an economy provider /serveritem command allow to sell/buy registered items with /si sell, /si buy and /si sellall

  • PlaceholderApi
    Items given to players with /si give or /si sell commands also replace any placeholder inside item name or lore

You can also use ItemEdit placeholders to display how many items of a kind the player has on a specific slot or inside inventory / equipment
%itemedit_amount_<{itemid}>_[{slot}]_[{player}]%
<{itemid}> for item id on serveritem
[{slot}] for the slot where the item should be counted, by default inventory
(Allowed values: inventory, equip, inventoryandequip, hand, offhand, head, chest, legs, feet)
[{player}] for the player, by default self
examples:
%itemedit_amount_{my_item_id}% -> shows how many of "my_item_id" i have inside of my inventory (equipment excluded)
%itemedit_amount_{special_sword}_{offhand}% -> shows how many of "special_sword" i have on my offhand
%itemedit_amount_{newton_apple}_{head}_{newton}% -> shows how many of "newton_apple" the player newton has on his head equipment slot

  • ShopGuiPlus
    You can set ServerItem items on ShopGuiPlus shops, put serveritem: <your serveritem id> inside your shop file as on this example
    1:
      type: item
      item:
        serveritem: <my_serveritem_id>
        quantity: 1
      buyPrice: 80
      sellPrice: 20
      slot: 34
  • MythicMobs
    You can use ServerItem(s) inside as Drops on both mobs and drop tables or on skill to drop the item
    Drop sintax:
- 'serveritem{id=<your_id>;amount=[amount=1]} <amount> <chance>'

Skill sintax:

- 'dropserveritem{id=<your_id>;amount=[amount=1],chance=[chance=1],amountmax=[maximus amont=amount}} @targeter{options=value} ~onTrigger =/</> HealthModifier

Example of drop:
- 'serveritem{id=gold;amount=2} 1 1'

Example of skill:

- 'dropserveritem{id=gold;amount=5,chance=0.5,amountmax=[maximus amont=amount}} @Self ~onDamaged <50%'

API

Hooking into ItemEdit

If you use Maven put the following text into your pom.xml file:

  <repositories>
	<repository>
	    <id>jitpack.io</id>
	    <url>https://jitpack.io</url>
	</repository>
  </repositories>
  <dependencies>
	<dependency>
	    <groupId>com.github.emanondev</groupId>
	    <artifactId>ItemEdit</artifactId>
	    <version>2.17</version>
	    <scope>provided</scope>
	</dependency>
  </dependencies>  

If you use Gradle put the following text into your gradle.build file:

repositories {
    maven { url = 'https://jitpack.io' }
}

dependencies {
    compileOnly 'com.github.emanondev:ItemEdit:2.17'
}

JitPack link

You can get Server Items provider with ItemEdit.get().getServerStorage() where all serveritems are stored ServerStorage.java

Links

Clone this wiki locally