EnchantPeek
EnchantPeek 0.9.9 - BETA
I got tired of waiting for an update to Thebombzen's EnchantView mod. So I went ahead and made my own enchantment previewer.
This plugin does not require a client mod!
How it works.
Barely... Getting to the relevant data and using it in any manner was quite a hassle. MC normally generates the enchantments on an item in the last possible moment, i.e. when you click on the button. To circumvent this i had to pre-generate the enchanted item when you plug it in the table, save the pregenerated items and then override the enchanting process. (Believe me, it's not pretty.) The enchantment values are then (temporarily) added to the the item's Lore which enables the client to display them in the item tooltip.
But how do I use it?
Easy, just plug the .jar in the plugin directory and give yourself and anybody else you want to access it the permission "enchantpeek.allow"
. Ops are allowed per default.
If you put an enchantable item on an enchanting table, the tooltip will be updated with 3 rows showing you what you get for the listed price.
Known problems
- The lore sometimes seems to stay in the tooltip until you close the enchantment table.
- There might be some caveats with books, those weren't tested very well.
Screenshots
And here is a small screenshot "tutorial" which visually explains how this works.
What word do I need use, if I want everyone use this? (In the enchantpeek.allow)
FYI, craftbukkit-1.7.9-R0.2.jar
[11:07:36 ERROR]: [EnchantPeek] Plugin EnchantPeek v0.9.9 has failed to register events for class net.mended_drum.EnchantPeek.EnchantListener because net/minecr aft/server/v1_7_R1/ItemStack does not exist.
(Note: works with craftbukkit-1.7.2-R0.3.jar)
Bug for my 1.7.2 server: [EnchantPeek] Plugin EnchantPeek v0.9.9 has failed to register events for class net.mended_drum.EnchantPeek.EnchantListener because net/minecraft/server/v1_7_R1/ItemStack does not exist.
This does not work on Spigot but on normal craftbukkit it works.
Very keen to see this updated to work on 1.7.9, it has been one of my most popular mods for quite a while.
I love this plugin, but in my 1.7.4 server it doesn't work. This is the error:
[14:09:43 ERROR]: Could not load 'plugins/EnchantPeek.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: net/mended_drum/EnchantPeek/EnchantPeek : Unsupported major.minor version 51.0 at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:137) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:313) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:236) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugins(CraftServer.java:350) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.craftbukkit.v1_7_R1.CraftServer.<init>(CraftServer.java:312) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.PlayerList.<init>(PlayerList.java:63) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.java:126) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:424) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] Caused by: java.lang.UnsupportedClassVersionError: net/mended_drum/EnchantPeek/EnchantPeek : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) [?:1.6.0_65] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) [?:1.6.0_65] at java.lang.ClassLoader.defineClass(ClassLoader.java:621) [?:1.6.0_65] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [?:1.6.0_65] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) [?:1.6.0_65] at java.net.URLClassLoader.access$000(URLClassLoader.java:58) [?:1.6.0_65] at java.net.URLClassLoader$1.run(URLClassLoader.java:197) [?:1.6.0_65] at java.security.AccessController.doPrivileged(Native Method) [?:1.6.0_65] at java.net.URLClassLoader.findClass(URLClassLoader.java:190) [?:1.6.0_65] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:77) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at java.lang.ClassLoader.loadClass(ClassLoader.java:306) [?:1.6.0_65] at java.lang.ClassLoader.loadClass(ClassLoader.java:247) [?:1.6.0_65] at java.lang.Class.forName0(Native Method) [?:1.6.0_65] at java.lang.Class.forName(Class.java:249) [?:1.6.0_65] at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:40) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks] ... 9 more
I hope you'll fix this as soon as possible.
Hi, the permission isn't working properly. I am using PEX and 0.9.9 Beta of EP
I denied enchantpeek.allow for normal users but they are still able to use it.
Been setting up my first server, Where exactly would i set the enchantpeek.allow permission for all normal users?
EDIT: NVM i figured it out lol, nice plugin btw
@Senophoe
That is a Client mod, not a Server mod. (until the modding api comes out) Server mods cannot change the GUI of the client (without using texturepacks...).
@jinkstjb
Thanks jinks! :P I know how to "get it" from the "files" page lol.
@uvbeenzaned
Already uploaded and awaiting approval.
@all
I'm not supposed to link to unapproved files, but the file number is "5". (If you're smart enough to figure out how to get it, it's your own damn fault 8) .)
Can you update for the new enchantments in 1.7.2? Our server needs this plugin badly. I can't seem to update myself this time.
@Senophoe
Definitely not. The Plugin is server-side and the server doesn't even know where your mouse pointer is.
If you like the way Thebombzen's mod does it, just use that. The functionality is basically the same, just that his mod has access to more stuff and can therefore look prettier.
You think it's somehow possible to make the enchantments show when you hover the mouse over the enchant options like Thebombzen's mod, instead of showing it in the item description?
@jinkstjb
Ok thanks! If you all want to download it for 1.6.4 before his official one is available, you can here: dw.networkery.co/bukkitdev/EnchantPeek/EnchantPeek.jar jinkstjb, if you ever want me to take the link down, let me know.
@uvbeenzaned
Sure, it is. The Apache License allows you to do almost anything with the plugin. :)
@all
I uploaded an untested version for 1.6.4, as long as mojang doesn't change enchantments this should continue to work. (I actually had this done the same day EvilSeph announced CB-1.6.4 but dev.bukkit.org took ages to make 1.6.4 available as target version for uploads ad then i got distracted, sorry about that.)
Is it okay if I post a link to a fixed version of this plugin for 1.6.4? Or no? Let me know thanks.
Hello, i have this plugin but only ops can use it. i tried giving the permission to everone but still wont work
@PhatMale
You should be able to get your active java version by typing "java -version" into a terminal. Your error message sounds suspiciously like you're running java 6. (Oracle doesn't support Java6 anymore since Feb'13, but I think Apple still provides patches.) Java7 seems to be available for OS X 10.6+ but I'm not familiar with installation procedures on MacOS.
It *should* be possible to build EnchantPeek against Java 6, I just don't have the the setup to try it right now (and it might be several weeks until I do). If you can get a Java dev environment running, you could try building it yourself from source. You'd need the JDK and maven, then it's just one "mvn package" away.
Edit: A Class VersionCheck tells me, that one of the classes does in fact use Java 7 features, so making it compatible to older versions would probably involve some code changes.
@jinkstjb
My server has been up for several months, other plugins I have on my craftbukkit dev build 2818 server are world edit, world guard, autosaveworld, permissionsex, and few others that are up to date and run perfectly fine. It's running on a Mac, which I believe has java 7 installed.
What do I need to look for in openjdk 7?
I've also recently tried to add plugin betterTP and get the same sort of issue.
@PhatMale
Check if you have access to java/openjdk 7 on your server.
I haven't used Java6 for several years now, and at the moment I couldn't even test if EP builds on old Java versions.