Filled Console Enchant (console plugin request)

Discussion in 'Archived: Plugin Requests' started by Sw_aG, Jul 21, 2014.

  1. Offline

    Sw_aG

    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! :rolleyes:
     
  2. Offline

    CATspellsDOG

    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
    1. switch (enchType):
    Code:java
    1.  
    2. [FONT=verdana] case "UNBREAKING":[/FONT]
    3. [FONT=verdana] // do stuff[/FONT]
    4. [FONT=verdana] break;[/FONT]
    5. [FONT=verdana] case /* Other Enchantment */:[/FONT]
    6. [FONT=verdana] // do stuff[/FONT]
    7. [FONT=verdana] break;[/FONT]
    8. [FONT=verdana]// and if not a valid type[/FONT]
    9. [FONT=verdana] default:[/FONT]
    10. [FONT=verdana] // do stuff[/FONT]
    11. [FONT=verdana] break;[/FONT]
    12. [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.
     
    Sw_aG likes this.
  3. Online

    timtower Moderator Moderator

    CATspellsDOG Enum.valueOf(String.toUpperCase())
    Check if the value is null before doing anything else.
     
  4. Offline

    Sw_aG

    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!
     
  5. Offline

    Onlineids

    Sw_aG <Edit by Moderator: Redacted mediafire url>
    Supports aliase enchant names such as sharpness or fireprot
     
    Last edited by a moderator: Nov 1, 2016
    Sw_aG likes this.
  6. Offline

    Sw_aG

    [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 :)
     
    Last edited by a moderator: Nov 1, 2016
  7. Offline

    Sw_aG

    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
     
  8. Offline

    Onlineids

    Sw_aG Imported the wrong material, sorry for inconvenience. <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 1, 2016
  9. Offline

    Sw_aG

    Onlineids It works great! Thanks mate :D i'm apperciate your help
     

Share This Page