Tested Minecraft Versions:
The official home page of TokenEnchant can be found at here.
NOTE: version 5.x.x contains a new option for explosive enchants. If you specify "use_explode_event: true" under explosive enchants such as "Explosive", "Excavation", "Sphered", "Disk", and "Tile", it will not generate BlockBreakEvent for each exploded blocks result in much better performance. However, this option might not work with other plugins like AutoSell, EZBlocks if they do not support this new BlockExplodeEvent.
Note: "invalid_in_region:" option is not appropriate for some custom enchantments. Please check the appropriateness of the use of "invalid_in_region:". This is for the performance reason. In order to make this option work for all effect, the plugin would need to keep track of all player movement, which is usually very costly operation.
NOTE: To use full custom naming for vanilla enchantment, you need ProtocolLib plugin.
Capability of TokenEnchant is featured in SSundee's latest Faction Series Youtube video. (Ofc, they have loads of (over 100 new) custom enchantments programmed using TokenEnchantAPI).
https://youtu.be/WGvqf0mCZbY
This plugin provides an Enchantment Sign, which a player would right-click to enchant an item he is holding. A player would need in-plugin tokens to enchant an item. You can specify what sort of enchantments you wish to provide, and which enchantment should be applied to what type of items in a config.yml.
You can also specify how cost of enchantment at different level will increase. At the moment there are two increment scheme:
The ability to merge enchantments using an anvil is available on the spigot version 1.9 and above. This is because org.bukkit.event.inventory.PrepareAnvilEvent was introduced in 1.9.
Command Alias:
Test Server:
Usage:
Once you set the configuration, you just need to create an enchant sign:
NOTE: Sound enum IDs have been changed in 1.9. If you get errors saying Sound enum IDs you have in your config is not found, please use Sound enum ID from spigot version you're using. You can look up 1.8 Sound enum IDs at here
Custom naming:
All custom effects supports "alias:" option so that you can use your own name (including color) for all effects (even vanilla enchantments!!)
The following example shows Efficiency level 13 and Excavation level 1 has been customised using "alias:" option. With this option, Efficiency 13 will not show as "Efficiency enchantment.level.13" and you can control how you want it to show up!
For Developers:
You can access TokenEnchant's token management methods through its public methods:
- 1.13
The official home page of TokenEnchant can be found at here.
NOTE: version 5.x.x contains a new option for explosive enchants. If you specify "use_explode_event: true" under explosive enchants such as "Explosive", "Excavation", "Sphered", "Disk", and "Tile", it will not generate BlockBreakEvent for each exploded blocks result in much better performance. However, this option might not work with other plugins like AutoSell, EZBlocks if they do not support this new BlockExplodeEvent.
Note: "invalid_in_region:" option is not appropriate for some custom enchantments. Please check the appropriateness of the use of "invalid_in_region:". This is for the performance reason. In order to make this option work for all effect, the plugin would need to keep track of all player movement, which is usually very costly operation.
NOTE: To use full custom naming for vanilla enchantment, you need ProtocolLib plugin.
Capability of TokenEnchant is featured in SSundee's latest Faction Series Youtube video. (Ofc, they have loads of (over 100 new) custom enchantments programmed using TokenEnchantAPI).
https://youtu.be/WGvqf0mCZbY
This plugin provides an Enchantment Sign, which a player would right-click to enchant an item he is holding. A player would need in-plugin tokens to enchant an item. You can specify what sort of enchantments you wish to provide, and which enchantment should be applied to what type of items in a config.yml.
You can also specify how cost of enchantment at different level will increase. At the moment there are two increment scheme:
- Constant: cost = base-cost
- Linear: cost = base-cost + (level * base-cost)
- Exponential: cost = base-cost + base-cost*level^exponent
The ability to merge enchantments using an anvil is available on the spigot version 1.9 and above. This is because org.bukkit.event.inventory.PrepareAnvilEvent was introduced in 1.9.
Command Alias:
- With new Token Alias Commands, you can use external plugins like Backpack plugin and use Tokens to give those features to players!
Test Server:
- testserver.vk2gpz.com.
Usage:
Once you set the configuration, you just need to create an enchant sign:
- to place "Enchant" sign, you need to write !Enchant! in the 1st line, the placeholder "{ench_cost}" will be used to automatically display an appropriate cost.
- to place "Exchange" sign, you need to write !Exchange! in the 1st line
- to place "Withdraw" sign, you need to write !Withdraw! in the 1st line and the exchange rate placeholder "{ex_rate}" will be replaced by the exchange rate you defined in the config.yml.
- to place "ExpExchange" sign, you need to write !ExpExch! in the 1st line and the exp exchange rate placeholder "{exp_rate}" will be replaced by the EXP exchange rate you defined in the config.yml.
- to place "Repair" sign, you need to write !Repair! in the 1st line
NOTE: Sound enum IDs have been changed in 1.9. If you get errors saying Sound enum IDs you have in your config is not found, please use Sound enum ID from spigot version you're using. You can look up 1.8 Sound enum IDs at here
Custom naming:
All custom effects supports "alias:" option so that you can use your own name (including color) for all effects (even vanilla enchantments!!)
The following example shows Efficiency level 13 and Excavation level 1 has been customised using "alias:" option. With this option, Efficiency 13 will not show as "Efficiency enchantment.level.13" and you can control how you want it to show up!
For Developers:
You can access TokenEnchant's token management methods through its public methods:
Code:
import com.vk2gpz.tokenenchant.TokenEnchant;
...
public TokenEnchant getTokenEnchant() {
Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin("TokenEnchant");
if ((plugin == null) || (!(plugin instances TokenEnchant))) {
return null;
}
return (TokenEnchant)plugin;
}
....
TokenEnchant te = getTokenEnchant();
....
double token = te.getTokens(player); //player can be OfflinePlayer
te.setTokens(player, amount); // current = amount
te.addTokens(player, amount); // current = current +amount
te.removeTokens(player, amount);// current = current - amount
String balance = te.getTokensInString(player); // token value in beautified string.
...