EnchantmentAPI
Overview
EnchantmentAPI brings customization to enchantments. Change how common enchantments are, turn specific ones off, change the max levels, or create your own!
Requirements
Features
- Customize Vanilla enchantments
- Allow enchantments to be naturally obtained on normally unenchantable items (like steaks!)
- Use SkillAPI's skill editor to create your own enchantments
- Code your own custom skills using a simple API
- Allow enchantments to be merged above their normal max levels
- Reach enchantment levels not normally possible (custom enchantment level 5403? sure!)
- Control how many enchantments can be obtained on a single item
- View fancy graphs of enchantment probabilities in game!
- Start off with 50 custom enchantments by getting EnchantmentPack
More Details
For more information, view the wiki on GitHub
Support
I am not active on this site. For support, head over to the Spigot page.
Older Versions
Unforunately, to keep this project maintainable, versions of Bukkit/Spigot before 1.12 will not be supported. To use this plugin on those versions, use builds released before the recoded release.
-
View User Profile
-
Send Message
Posted Jul 23, 2013@Eniripsa96
Hey! :P
I think I found the problem
I created a scenario where I gave myself lvl 500 (vanilla level, as in I gave myself xp to repair)
When you do anvil actions, it removes the level twice (the level cost)
I.E When you enchant an item and it would cost 13 levels, it would remove it twice (13 + 13 = 26 levels) If you have level 25 or lower (13+13 = 26) The item would vanish If your level is greater than that (26+ as 13+13 = 26) it will not vanish
So far all actions take cost level x 2 on the anvil
EDIT: (The first cost is removed once you drag the item out the ''result'' box. It wil immediatly remove the cost to do that. The second cost is removed when you hear the anvil sound effect.)
-
View User Profile
-
Send Message
Posted Jul 23, 2013@BrightDanny
Ok, I looked into books and those should be fixed. Also, I added in the base cost of an item for repairing so the cost issue should be fixed. As for the item disappearing, I still haven't found the problem for that just yet. The only lead I had dealt with permissions but when I disabled all of my permissions and repaired items, nothing went wrong so this bug is just stumping me haha. Well, the changes I've made so far will be posted with v4.12
-
View User Profile
-
Send Message
Posted Jul 21, 2013@Eniripsa96
The maximum level for protection is 5 in my case(that's what I set in the settings)
I can't combine any books
I.E Wither I + Wither I becomes Wither I
Power 1 + power 1 = Power 1
It is true that a NORMAL diamond sword costs 1 to 3 levels. I am talking about a heavy ENCHANTED sword here (tested it on a normal vanilla server and vanilla single player. I am 100% sure about this)
It is crucial for me to have the anvil take enchants into account like in normal vanilla minecraft as it adds a certain cap on wich items can be repaired and wich cannot, forcing people to choose enchants rather than put all on one.
EDIT:
(Items still disappearing sometimes, can't figure out why (BUKKIT SERVER))
I was able to bypass the book combination problem by adding BOOK to the item list of all enchants. True that they can now combine books too with every enchant, but at least they can combine books now :P
-
View User Profile
-
Send Message
Posted Jul 21, 2013@Stacelin
Alright, thank you for your help and I do hope it is something small such as that haha
@BrightDanny
Original Post: Alright, I guess the solution would be to make a Spigot version, although this would not be for awhile as I'm quite busy, sorry :(
First Edit: Is that a problem? Fixing a diamond sword with a diamond costs at most 3 levels in vanilla as well.
Second Edit: I think the checks i have require both items to be damaged rather than just the first. I can modify that quickly and fix that issue. You should be able to use a slightly damaged unenchanted sword to repair the enchanted one though as of now. I'll get it fixed as soon as possible though :)
Third Edit: Protection only goes up to level 4 unless you have changed it. If that's the case, books can't combine to higher than the maximum level.
-
View User Profile
-
Send Message
Posted Jul 20, 2013@Eniripsa96
Both the book or secondary item as well as the primary item disappear. (PS: I switched to craftbukkit instead of spigot, I've repaired and enchanted a few things. They don't seem to vanish now. I'm not sure if it stays this way, though) EDIT:
http://i40.tinypic.com/2nlck6d.png
That is what I mean with low anvil repair cost (I switched to craftbukkit serverm same results)
I have no other plugins that override anvil behaviour
EDIT2:
I also can't repair an enchanted sword with a normal unenchanted sword. (I.E cannot combine the 2) I believe this was possible in vanilla, unless I'm wrong (It seems it does work if I minimize and maximize the screen, I really don't get this, haha. Console has no errors whatsoever, perhaps this is because I use spigot? I will try a regular bukkit server to see if it acts normal then)
I tried with craftbukkit server. Same results. :(
EDIT3:
I forgot to mention, I am unable to stack books (i.e protect 4 + protect 4 = protect 5 book. Is this intentional?)
I really love this plugin. It is without doubt one of the best enchantment plugins. This plugin gives so much freedom with enchantments.
-
View User Profile
-
Send Message
Posted Jul 20, 2013@Eniripsa96
I've gone through logs and can't seem to find any errors. I'll continue to search, but so far nada. I'll let you know if anything pops up. Hopefully it will end up to be a silly little thing with permissions and wouldn't cause too many headaches :)
-
View User Profile
-
Send Message
Posted Jul 20, 2013@Ordrox
Yes, I do not use spigot and therefore haven't tested it at all, and when I checked the line number the stack trace points to, it just pointed to a comment so I couldn't quite figure anything out with that error you posted.
@BrightDanny
What do you mean by items disappearing? Do you mean both disappearing as a bug or the secondary item being consumed like in vanilla mechanics?
Also, the costs right now are based completely on vanilla mechanics and I haven't added configurable values to it. I can certainly add that in time although I am quite busy at the moment so expect it to take some time.
-
View User Profile
-
Send Message
Posted Jul 20, 2013I was wondering
Is there a way to not make items dissappear when I want to enchant/upgrade them at an anvil?
Also, can I change the cost to repair items at an anvil? 3 levels to add 25% durability on a near perfect sword makes no sense IMO :(
-
View User Profile
-
Send Message
Posted Jul 20, 2013@Eniripsa96
Did you take a look at my problem down here ? @Ordrox
-
View User Profile
-
Send Message
Posted Jul 19, 2013<<reply 1647894="">>
Deleting the files fixed it, thanks! :)
-
View User Profile
-
Send Message
Posted Jul 19, 2013@Kitten_Tails
This can occur when you are using an outdated suffix.yml file without the suffix groups. You could try deleting, or renaming the file (if you changed it) and the error should be gone.
-
View User Profile
-
Send Message
Posted Jul 19, 2013I get this error when enchanting an item.
19.07 17:28:55 [Server] INFO ... 15 more
19.07 17:28:55 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
19.07 17:28:55 [Server] INFO at java.lang.reflect.Method.invoke(Unknown Source)
19.07 17:28:55 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
19.07 17:28:55 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
19.07 17:28:55 [Server] INFO at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
19.07 17:28:55 [Server] INFO at com.rit.sucy.enchanting.EListener.onEnchant(EListener.java:341)
19.07 17:28:55 [Server] INFO at com.rit.sucy.EnchantmentAPI.getSuffix(EnchantmentAPI.java:241)
19.07 17:28:55 [Server] INFO Caused by: java.lang.NullPointerException
19.07 17:28:55 [Server] INFO at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
19.07 17:28:55 [Server] INFO at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419)
19.07 17:28:55 [Server] INFO at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486)
19.07 17:28:55 [Server] INFO at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226)
19.07 17:28:55 [Server] INFO at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:590)
19.07 17:28:55 [Server] INFO at net.minecraft.server.v1_6_R2.DedicatedServerConnection.b(SourceFile:30)
19.07 17:28:55 [Server] INFO at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37)
19.07 17:28:55 [Server] INFO at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:118)
19.07 17:28:55 [Server] INFO at net.minecraft.server.v1_6_R2.NetworkManager.b(NetworkManager.java:296)
19.07 17:28:55 [Server] INFO at net.minecraft.server.v1_6_R2.Packet108ButtonClick.handle(SourceFile:19)
19.07 17:28:55 [Server] INFO at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:1455)
19.07 17:28:55 [Server] INFO at net.minecraft.server.v1_6_R2.ContainerEnchantTable.a(ContainerEnchantTable.java:167)
19.07 17:28:55 [Server] INFO at us.Myles.PWP.FakePluginManager.callEvent(FakePluginManager.java:87)
19.07 17:28:55 [Server] INFO at us.Myles.PWP.FakePluginManager.fireEvent(FakePluginManager.java:101)
19.07 17:28:55 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
19.07 17:28:55 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
19.07 17:28:55 [Server] INFO org.bukkit.event.EventException
19.07 17:28:55 [Server] SEVERE Could not pass event EnchantItemEvent to EnchantmentAPI v4.11
-
View User Profile
-
Send Message
Posted Jul 19, 2013@Stacelin
Thank you for the information, I will look into the permission settings and see what I can do. Also, if there are any errors popping up in the console, please share those as they can help tracking down the problem.
@Ordrox
@Zuri3L
Similar to Stacelin, if there are any errors in the console window when this problem happens, please share that as it can help locate the issue. I'm trying to find out what is causing it.
@tanjx
Hmm, that is strange. That seems to be pointing to the ID for a door, and apparently Bukkit cannot create metadata for a door according to that error stack trace. I'll fool around with metadata and see if there's a way around that.
-
View User Profile
-
Send Message
Posted Jul 19, 2013@Eniripsa96
ohh ok thnx, btw, hope you fix the bug soon too :)
-
View User Profile
-
Send Message
Posted Jul 17, 2013I seem to be having the same issue as Zuri3L.
Though it also seems to be maybe a Permission error. As I (being OP) can enchant anything I like with books and said item in an anvil, but other players who are not OP seem to lose the items + book.
Edit: With the restrictions we have (example, you can only get prot 1&2 via enchantment table), if a player tries to enchant, say, a chestpiece with prot 3 or 4, they lose the chest piece and book. But if they were to use a prot 1 or 2 book, it'll work okay.
-
View User Profile
-
Send Message
Posted Jul 16, 2013@Zuri3L
Players reported me that they lost the (enchanted) item they wanted to repair too.
-
View User Profile
-
Send Message
Posted Jul 16, 2013Is there something wrong with the anvil repair/ enchant books system? when I do it they both disappear and I lose the book and the item :( same with repairing with iron ingots.
-
View User Profile
-
Send Message
Posted Jul 16, 2013I had a suggestion, Could we have colored names based on tiers and maybe the tier name in the lore? I think this would add a lot to the experience
-
View User Profile
-
Send Message
Posted Jul 16, 2013Hello there, i have an issue with Spigot and EnchantmentAPI, i only use this plugin + Enchantmentpack to modify the enchants in the game and i asked on spigot forum, a guy told me the problem come from the plugin "EEchanttable", i think he means EnchantmentAPI.
Can you take a look please and tell me if i can do something to resolve it?
http://pastebin.com/tqNL6DaV
-
View User Profile
-
Send Message
Posted Jul 15, 2013an error report Could not pass event PlayerInteractEvent to EnchantmentAPI v5.0 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:363) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:31) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:479) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:464) at org.bukkit.craftbukkit.v1_5_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:189) at net.minecraft.item.ItemInWorldManager.func_73078_a(ItemInWorldManager.java:541) at net.minecraft.network.NetServerHandler.func_72472_a(NetServerHandler.java:874) at net.minecraft.network.packet.Packet15Place.func_73279_a(SourceFile:58) at net.minecraft.network.TcpConnection.func_74428_b(TcpConnection.java:442) at net.minecraft.network.NetServerHandler.func_72570_d(NetServerHandler.java:222) at net.minecraft.network.NetworkListenThread.func_71747_b(NetworkListenThread.java:53) at net.minecraft.server.dedicated.DedicatedServerListenThread.func_71747_b(SourceFile:30) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:847) at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:320) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:716) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:600) at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573) Caused by: java.lang.ArrayIndexOutOfBoundsException: 324 at org.bukkit.craftbukkit.v1_5_R3.inventory.CraftItemFactory.getItemMeta(CraftItemFactory.java:48) at org.bukkit.craftbukkit.v1_5_R3.inventory.CraftItemFactory.getItemMeta(CraftItemFactory.java:44) at org.bukkit.craftbukkit.v1_5_R3.inventory.CraftItemStack.getItemMeta(CraftItemStack.java:307) at org.bukkit.craftbukkit.v1_5_R3.inventory.CraftItemStack.getItemMeta(CraftItemStack.java:302) at com.rit.sucy.enchanting.EListener.getValidEnchantments(EListener.java:379) at com.rit.sucy.enchanting.EListener.onInteract(EListener.java:183) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:361) ... 17 more