Plugin category: Fun Suggested name: Speed Boots What I want: I want a plugin where you right click diamond boots if gives you speed boost and when you right click it again it turns it off Ideas for commands: No commands needed for this plugin. Ideas for permissions: SpeedBoost.Use - Can use the boots. When I'd like it by: Anytime.
Famous Guy So when you right click diamond boots you get a speed boost? Do the diamond boots go on you or do they stay where they are?
AndyMcB1 How would I add a configurable speed to Code:java e.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 10000000, 1)); I am not too good at coding yet.
Assuming you know how configs work.. Code:java #Config tier: 2 Then in your code (forgive me! I haven't done java in a while) Code:java if (getConfig("tier").equals("2") { //code } else if (equals("3") { //code } /*etc */
Your second piece of code is wrong. To get an integer from the config you'd do: Code:java getConfig().getInt("Key-Name")
@Famous_Guy https://www.dropbox.com/s/i8xeffwviqgnopb/SpeedBoots.jar I've tested this plugin, it will work.
Pluto_ Error: Code: 19:26:22 [SEVERE] Could not load 'plugins/SpeedBoots.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/pluto_/speedboots/SpeedBoots : Unsupported major.minor version 51.0 at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230) at org.bukkit.craftbukkit.v1_6_R3.CraftServer.loadPlugins(CraftServer.java:241) at org.bukkit.craftbukkit.v1_6_R3.CraftServer.<init>(CraftServer.java:219) at net.minecraft.server.v1_6_R3.PlayerList.<init>(PlayerList.java:56) at net.minecraft.server.v1_6_R3.DedicatedPlayerList.<init>(SourceFile:11) at net.minecraft.server.v1_6_R3.DedicatedServer.init(DedicatedServer.java:107) at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:393) at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583) Caused by: java.lang.UnsupportedClassVersionError: me/pluto_/speedboots/SpeedBoots : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:80) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:249) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173) ... 9 more
Famous Guy How weird. I just downloaded that same file and it worked perfectly fine for me. https://www.dropbox.com/s/i8xeffwviqgnopb/SpeedBoots.jar I re-exported it so you can try re-downloading it. But if you get the error again, please, PM me instead so I don't have to keep checking out this topic.
Pluto_ I thought that major.minor errors were caused by the server running an outdated version of Java (when compared to that of the compiler). What java version is the plugin compiled for? Famous Guy Since I am not sure if it's do to the server being outdated, mind if I ask what version of Java the server is running on?
Hey, guys, I have that plugin. It's only called "BoostBoots". Go to my plugins site and check it out if you like
Sure but make it so that you compile it using Java 6. And when you right click the boots you don't wear them
Famous Guy Actually you're going to have to use his, I can't make this right now sorry. Maybe I can later..
Famous Guy https://www.dropbox.com/s/i8xeffwviqgnopb/SpeedBoots.jar If it doesn't work again, I'll find some way to fix the adding the boots to your armor slot. Oh, you need a decompiler. I'll PM you the source if you need it.
Any decompiler would be fine. https://forums.bukkit.org/threads/decompiling-plugins.127603/ That topic has some decompilers on it.