Dear very kind Plugin makers, Plugin category: Admin-tools Suggested name: Console Enchant What I want: I want a plugin that add a command (To the console) that can enchant player's Items (The item that they're holding) and i need the console to be able to enchant to a Very high enchant level I want in the config to be: None, i dont need to have something in the config Ideas for commands: /cench {player} {enchant} {enchant level} Example: /cench Sw_aG UNBREAKING 60 Specific ask: i need the plugin to be able to enchant levels from 1-127 (Or higher) And i need the plugin to NOT HAVE ANY MESSAGES if the console is enchanting Player's item the player wont get any message! When I'd like it by: ASAP Version: 1.7.2 R3 Thanks In the advance!
I am thinking of doing this, but do you have to do the enchantment type in text? Can I do it in id? If not, its still fine but I will need to go through loads of stuff like: Code:java switch (enchType): Code:java [FONT=verdana] case "UNBREAKING":[/FONT][FONT=verdana] // do stuff[/FONT][FONT=verdana] break;[/FONT][FONT=verdana] case /* Other Enchantment */:[/FONT][FONT=verdana] // do stuff[/FONT][FONT=verdana] break;[/FONT][FONT=verdana]// and if not a valid type[/FONT][FONT=verdana] default:[/FONT][FONT=verdana] // do stuff[/FONT][FONT=verdana] break;[/FONT][FONT=verdana][/FONT] And also, can it send a message to the console if it is valid/successful or not? The player still doesn't get it though. Kind Regards, Matthew Sanetra. [EDIT] Sorry I am a begginner with forums. I don't get BBCode that much as Java yet.
CATspellsDOG Enum.valueOf(String.toUpperCase()) Check if the value is null before doing anything else.
Its ok that the console will have a message and its ok using enchant id (Example: SHARPNESS 16) And thanks a lot mate, i'm apperciate your support!
Sw_aG <Edit by Moderator: Redacted mediafire url> Supports aliase enchant names such as sharpness or fireprot
[quote uid=90875889 name="Onlineids" post=2682963]Sw_aG <Edit by Moderator: Redacted mediafire url> Supports aliase enchant names such as sharpness or fireprot[/quote] Thanks a lot mate, i'm appreciate it
Hi Onlineids i'm sorry for the inconvenience but can you please fix the plugin? The Problem: when i'm running the plugin's command (From the console) its not enchanting the player's holding item and Its showing me that log: [14:37:16] [Server thread/WARN]: Unexpected exception while parsing console command "cenchant Sw_aG 34 60" org.bukkit.command.CommandException: Unhandled exception executing command 'cenchant' in plugin ConsoleEnchant v1.0 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-18-g071d500-b2935jnks] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-18-g071d500-b2935jnks] at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:542) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-18-g071d500-b2935jnks] at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchServerCommand(CraftServer.java:529) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-18-g071d500-b2935jnks] at net.minecraft.server.v1_7_R1.DedicatedServer.aw(DedicatedServer.java:286) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-18-g071d500-b2935jnks] at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:251) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-18-g071d500-b2935jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:535) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-18-g071d500-b2935jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:447) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-18-g071d500-b2935jnks] at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-18-g071d500-b2935jnks] Caused by: java.lang.NoClassDefFoundError: net/minecraft/server/v1_7_R3/Material at me.online.ConsoleEnchant.Main.onCommand(Main.java:54) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-18-g071d500-b2935jnks] ... 8 more Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_7_R3.Material at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:70) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-18-g071d500-b2935jnks] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-18-g071d500-b2935jnks] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_51] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_51] at me.online.ConsoleEnchant.Main.onCommand(Main.java:54) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-18-g071d500-b2935jnks] ... 8 more
Sw_aG Imported the wrong material, sorry for inconvenience. <Edit by Moderator: Redacted mediafire url>