Item Exchange: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
reword |
Majori rewrite |
||
Line 1:
ItemExchange ([https://github.com/CivMC/ItemExchange source]) is a first-party civ plugin that facilitates asynchronous trade without sacrificing physicality or raidability.
==
Shops chests<ref>Shops can, by default, be made with chests, trapped chests, barrels, dispensers, and droppers.
Find out what containers are supported using the <code>/ieinfo shopblocks</code> command.</ref> are created when they contain Exchange Rules: encoded buttons which specify the rules of an exchange. Exchanges are made of pairs of inputs and outputs<ref>Donation 'exchanges' only require an input rule.</ref>. Bulk exchange rules are a single encoded button which contains within it one or more pairs of Exchange Rules. Players can view and cycle through a shop's available exchanges by punching a shop chest, preferably with an empty hand. If the player then punches the chest again on a given exchange with a matching input, and the shop chest is stocked, then the exchange is transacted.
ItemExchange differs from other market and trade plugins in that it functions on a series of rules and criteria, rather than selling specific items. An Exchange Rule that ONLY specifies that the output is a Diamond Pickaxe will be able to output ANY Diamond Pickaxe, enchanted or not, used or not, repaired or not, named or not, etc.
<u>'''<big>MAKE SURE TO [[Reinforcement|REINFORCE]] YOUR CHESTS!</big>'''</u>
== Creating an Exchange Rule ==
There are three ways to create an Exchange Rule, each via the <code>/iecreate</code> command (<code>/iec):</code>
* <code>/iecreate <input/output></code> while holding an item in your main hand will create a rule with its criteria as close to matching that item as possible.
* <code>/iecreate <nowiki><input/output></nowiki> <material> [amount]</code> will create a barebones rule of just the material and the amount, which defaults to 1 if not specified. See [https://jd.papermc.io/paper/1.18/org/bukkit/Material.html Paper's Material list] for reference.
* <code>/iecreate</code> while looking at a chest (or other supported container) containing one or two stacks will add a corresponding input and output rule for those items. If the container is reinforced, you must have the required permissions for this command to function.
== Modifying an Exchange Rule ==
Exchange Rules can be modified using the <code>/ieset</code> command (<code>/ies</code>) while holding the button:
* <code>/ieset material <material></code> will update the material. See [https://jd.papermc.io/paper/1.18/org/bukkit/Material.html Paper's Material list] for reference.
* <code>/ieset amount <amount></code> will update the amount, which must be higher than zero.
* <code>/ieset switchio</code> will flip the exchange rule from an input to an output, and vice versa.
Exchange Rules can also contain Modifiers, which are additional bits of criteria that can increase the specificity of an exchange.
* <code>/ieset durability [damage]</code> will update how damaged the item should be. Not specifying the damage (or inputting "ANY") will cause the Exchange Rule to ignore durability altogether; inputting "USED" will cause the Exchange Rule to only accept damaged items.
* <code>/ieset repair [level]</code> will update the repair level of the item. This is useful if you wish to assure your customers that you're not selling them 33-level repair tools. Not specifying the repair level will cause the Exchange Rule to ignore repair levels altogether. If you specify a level with a proceeding "@" (eg: "@9") then the Exchange Rule will only accept items with a repair level of exactly 9; otherwise just specifying "9" will cause the Exchange Rule to accept items with a repair level 9 or lower.
* <code>/ieset ignoreenchants</code> will cause the Exchange Rule to ignore enchantments altogether.
* <code>/ieset allowenchants</code> will cause the Exchange Rule to ignore unspecified enchantments.<code>/ieset denyenchants</code> will do the opposite, ensuring that only the specified enchants are allowed.
* <code>/ieset enchant <+/?/-><enchantment>[level]</code> will [re]set enchantment requirements for the Exchange Rule. See [https://jd.papermc.io/paper/1.18/org/bukkit/enchantments/Enchantment.html Paper's Enchantment list] for reference. You can add a required enchantment like so <code>/ieset enchant +DURABILITY3</code> where the level is optional: not including the level will mean any level is adequate to meet the requirement. You can also add an excluded enchantment like so <code>/ieset enchant -DURABILITY</code> meaning that the item must NOT be enchanted with DURABILITY to meet the requirement. You can then reset an enchantment rule via <code>/ieset enchant ?DURABILITY</code>
* <code>/ieset ignoredisplayname</code> will cause the Exchange Rule to ignore display names.
* <code>/ieset displayname [name]</code> will set the required display name. Not specifying a name will cause the Exchange Rule to ignore display names.
* <code>/ieset ignorelore</code> will cause the Exchange Rule to ignore item lore.
* <code>/ieset lore [lore]</code> will set the required item lore. Not specifying any lore will cause the Exchange Rule to ignore item lore. You can set multiple lines by [https://en.wikipedia.org/wiki/Delimiter delimiting] each line with a semicolon like so <code>/ieset lore First Line;Second Line</code>
* <code>/ieset group [group]</code> will set the required [[NameLayer|NameLayer group]] the player must have the necessary permissions on to use the exchange. Not specifying the group will cause the Exchange Rule to ignore group requirements. Group requirements only function on input rules.
== Relays ==
|