EnchantShops - buy enchantments through signs!
Notice
Sorry for the delayed update! D: Currently i am working on allowing enchants to buy purchasable though money and/or xp, but the Bukkit API is very unstable with changing the xp. Will have the update ASAP.
Description
What is EnchantShops? EnchantShops makes getting enchantments easier! Instead of having to battle hundreds of Zombie Pigman to get experience, then having to craft an Enchantment Table, and going though the trouble of building a room, you can simply buy them though signs! EnchantShops allows users to right-click signs and buy the enchantment specified on the sign.
Features
- Configurable enchantment aliases
- Option for using economy through vault or an Item Economy
- Configurable tags and color-codes used in declaring EnchantShops
- Option for disabling and enabled certain enchantments
Commands
/listenchants - list enchantments and their start levels and max levels. For a complete list on the enchantments and the items they enchant, please visit this page.
/enchant-alias <enchantment> - get the alias for an enchantment (not case sensitive).
/enchant-shoptag - get the shop tag required at the top of the EnchantShop.
Permissions
enchantshop.buy - allows users to buy enchantments from signs.
enchantshop.getalias - gives users rights to use '/enchant-alias <enchantment>'.
enchantshop.getshoptag - gives users rights to use '/enchant-shoptag'.
enchantshop.shop.create - gives users rights to build EnchantShops.
enchantshop.shop.delete - gives user rights to remove EnchantShops.
Config
- properites:
- permissions: false - enable permissions
- useVault: true - if true it will use the economy provided through vault, otherwise use Items as the economy
- materialID: 266 - the material id used for the Item Economy
- item-alias: Gold Bar - the alias used for the item for the Item Economy
- shop-tag: [EnchantShop] - the shop tag required at the top of an EnchantShop
- shop-colorcode: '3' - the color code used for coloring the shop-tag on an EnchantShop
- enchant-aliases:
- ARROW_KNOCKBACK: ARROW_KB
- ARROW_INFINITE: ARROW_I
- DAMAGE_UNDEAD: DAMAGE_U
- LOOT_BONUS_BLOCKS: LT_BS_BLOCKS
- LOOT_BONUS_MOBS: LT_BS_MOBS
- PROTECTION_ENVIRONMENTAL: PROT_ENV
- PROTECTION_EXPLOSIONS: PROT_EXP
- PROTECTION_FALL: PROT_FL
- PROTECTION_PROJECTILE: PROT_PROJ
- PROTECTION_FIRE: PROT_FIRE
- DAMAGE_ARTHROPODS: DAMAGE_APODS
- WATER_WORKER: WATER_WKR
- enchant-states
- DURABILITY: true
- PROTECTION_ENVIRONMENTAL: true
- LOOT_BONUS_BLOCKS: true
- PROTECTION_FIRE: true
- DIG_SPEED: true
- PROTECTION_FALL: true
- SILK_TOUCH: true
- PROTECTION_EXPLOSIONS: true
- PROTECTION_PROJECTILE: true
- OXYGEN: true
- WATER_WORKER: true
- ARROW_INFINITE: true
- DAMAGE_UNDEAD: true
- ARROW_FIRE: true
- DAMAGE_ALL: true
- ARROW_KNOCKBACK: true
- KNOCKBACK: true
- ARROW_DAMAGE: true
- DAMAGE_ARTHROPODS: true
- LOOT_BONUS_MOBS: true
- FIRE_ASPECT: true
How to create EnchantShops
Creating an EnchantShop is easy. Simply put the shop-tag (declared in the config and obtainable in-game via command '/enchant-shoptag') on the first line. On the second line, put the enchantment's alias if provided, otherwise put the enchantment's name. On the third line, put the level associated with the enchantment (declared in the config and obtainable in-game via command '/enchant-alias <enchantment>'). Then finally on the fourth line, put the price of the enchantment.
Amazing plugin! Thanks for making this :-)
Dear Randude,
Since you don't have a ticket system available, I'll post this here. I'm using v0.1.4 of your plugin with Vault 1.2.16, iConomy 6.0.9b, and CraftBukkit 2246. I attempted a switch from iConomy to Craftconomy 2.3.5, which resulted in repeated errors matching the one below:
[WARNING] Task of 'EnchantShops' generated an exception java.lang.StringIndexOutOfBoundsException: String index out of range: 2 at java.lang.String.substring(Unknown Source) at me.greatman.Craftconomy.Craftconomy.format(Craftconomy.java:355) at net.milkbowl.vault.economy.plugins.Economy_Craftconomy.format(Economy_Craftconomy.java:109) at com.randude14.enchantshop.economy.VaultEconomy.format(VaultEconomy.java:27) at com.randude14.enchantshop.EnchantShop.format(EnchantShop.java:250) at com.randude14.enchantshop.shop.Shop.formatPrice(Shop.java:107) at com.randude14.enchantshop.shop.Shop.updateSign(Shop.java:41) at com.randude14.enchantshop.shop.ShopManager.updateShopSigns(ShopManager.java:84) at com.randude14.enchantshop.EnchantShop.run(EnchantShop.java:300)
Any assistance you can offer would be greatly appreciated. Thank you.
Hello. Is it possible to add all the enchantments that are possible to a weapon with /enchant? what is the command? I am owner.
Can u apply the Efficiency Enchant? :)
is it only for me it dosent work? it randomly stoped working some days ago, when i start the server it says: Could not load 'plugins\EnchantShops.jar' in folder 'plugins'
i have tryed to redownload the plugin some times. help?
I want to use WATER_WORKER on my bow but cant.. I want to use sharpness level 127 on my sword but I cant.. Can you unlock and allow extreme echantsments and enchantments that comes from EnchantMore?
Hello,
works great, but how can i add enchentments? I tried sharpness, unbreaking, efficiency and other found on the MineCraft Wiki, but i can't figure out how to implement them?
Can you add the possibility to buy with exp not only money?
As messangza said (below, on Feb 29), setting 'permissions: true' makes it so everyone gets 'You do not have permission' messages (despite setting enchantshop.buy: true (or any of the other options). Works great if you set ES to not use permissions....but then all my users would have all the enchants for free cause they could make the signs : (
Adding the option to use +1 for the enchant lvl would be realy cool too. I have SO MANY (currently broken) signs.
Batfasturd, anyway you can post yours or is that against the rules?
I want one where you can just upgrade instead of needing a crap load of signs posted everywhere lol
I tried editing the source to allow for enchantment upgrades and all I did was break all signs on my server. Once you buy level 1 of an Enchantment you cannot go higher. To reduce signs and allow for upgrades can you allow for a sign that just does +1 to level each time you pay the price on the sign? Or at least can you fix the code to allow the upgrade to a higher level of Enchantment. Thank you, Keep up the great work on the plugin.
EDIT Never mind, I fixed the source to allow for upgrading of enchantments as well as if the level is set to 0 on the sign it allows for level +1 enchanting of items. If you want the source/diff I would be happy to email or however you want it. (Not that it is that complicated)
@Randude14
Money:Experience would be a great way of doing it, and if you leave the before or after blank, have it just be that the sign doesn't accept that payment? So, if you have ":1500" it costs 1500 xp, and doesn't accept money payments? or if you have "1500:" or just "1500" it costs money, and doesn't accept xp?
Looking forward to it! =D
Is it possible to make it so you can only buy the enchantment for a sword or bow... because i use the plugin enchantmore and some of the enchantments (infinity chestplate and more) are overpowered
Still waiting for this to be updated.
Doesn't load up for The Beta Build, Build # 2034
ERROR: 17:51:54 [SEVERE] Could not load 'plugins\EnchantShops.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.VerifyError: class com.randu de14.enchantshop.EnchantShop overrides final method getName.()Ljava/lang/String;
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j ava:150) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager. java:287) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager .java:211) at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:207) at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:183) at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigur ationManager.java:53) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:156) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490) Caused by: java.lang.VerifyError: class com.randude14.enchantshop.EnchantShop ov errides final method getName.()Ljava/lang/String; at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j ava:139) ... 8 more
@Randude14
Yep it doesnt D:
@rtcabooservb
Does it not work?
Plugin needs an update for CB 2032/ minecraft 1.2.3.
FOUND a MAJOR problem. Break a sign, sometimes all the shops nearby are deactivated. And sometimes, if you right click when near a sign, it will try to enchant your item. This includes placing another sign..... Bug or Intended?
Sweet holy notches, this is the plugin that I was teaching myself Java in order to create. The ability to set different prices for different levels of enchantment is key in my opinion. Thanks for beating me to the punch, Randude14!
Two suggestions: 1) Is it possible to make the '[EnchantShop]' a customizable string? This might be useful for folks trying to keep a specific theme on a server. 2) As others have mentioned, is it possible to shorten the enchantment names to something that will fit on a single line and still be easy for players to understand?
Two bug observations: 1) Looks like permissions aren't working correctly or could use some more documentation. When I have 'permissions: true', I'm told 'You do not have permission' when attempting to place a sign. If I temporarily set permissions to 'false', I can place signs. And if I set permissions back to 'true', I get a permissions warning when using the shop but can still get the enchantment. 2) Looks like some bounds checking is missing when multiple signs are present. When clicking on one sign, I also get the enchantment a second sign with a different enchantment. I haven't tested it beyond two signs as yet.
Very excited about this plugin. Keep up the good work!