• 0

[Resolvido] Dúvida - Comando /kit


ImPedro
 Share

Question

Olá galera.
Bem estou com um probleminha.
Fiz um código para um comando de /kit
Para meu servidor e fico bem grande.
Porem está dando um erro: aKcFlPJ.png
Não sei onde está esse erro.
Se alguem puder me ajudar agradeço.
Mas por favor não roube o Código =D
 


Por favor, registre-se ou entre para visualizar isso.

Share this post


Link to post
Share on other sites

12 answers to this question

Recommended Posts

  • faz assim

    if(args.length == 0 ){

                        if(label.equalsIgnoreCase("vip"))

                        {

                            

                        }

     

    like pela duvida he

    nao cara ele quer que seja: /kit vip

     

    é assim:

    Por favor, registre-se ou entre para visualizar isso.

    Resolvido?

    Edited by PedroJavax

    Share this post


    Link to post
    Share on other sites

    Após digitar o comando aparece isso:

     

    10.07 11:17:13 [server] INFO ... 15 more
    10.07 11:17:13 [server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO at net.wandnetwork.Main.onCommand(Main.java:584) ~[?:?]
    10.07 11:17:13 [server] INFO Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
    10.07 11:17:13 [server] INFO at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]
    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:560) [spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:657) [spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:367) [spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:718) [spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.SystemUtils.a(SystemUtils.java:19) [spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_45]
    10.07 11:17:13 [server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_45]
    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:970) [spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1135) [spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:642) ~[spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot2.jar:git-Spigot-f928e7a-e91aed8]
    10.07 11:17:13 [server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'kit' in plugin WandFullPvP v0.05
    10.07 11:17:13 [server] INFO [11:17:13 ERROR]: null

    Share this post


    Link to post
    Share on other sites

  • Após digitar o comando aparece isso:

     

    10.07 11:17:13 [server] INFO ... 15 more

    10.07 11:17:13 [server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO at net.wandnetwork.Main.onCommand(Main.java:584) ~[?:?]

    10.07 11:17:13 [server] INFO Caused by: java.lang.ArrayIndexOutOfBoundsException: 0

    10.07 11:17:13 [server] INFO at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]

    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:560) [spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:657) [spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:367) [spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:718) [spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.SystemUtils.a(SystemUtils.java:19) [spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_45]

    10.07 11:17:13 [server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_45]

    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:970) [spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1135) [spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:642) ~[spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot2.jar:git-Spigot-f928e7a-e91aed8]

    10.07 11:17:13 [server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'kit' in plugin WandFullPvP v0.05

    10.07 11:17:13 [server] INFO [11:17:13 ERROR]: null

    Qual é a linha 584 da main?

    Share this post


    Link to post
    Share on other sites

    if (cmd.getName().equalsIgnoreCase("kit")) {
            if(args.length == 0){
                p.sendMessage("§9Kits > §7Noob , Pedreiro , Engenheiro , §6VIP §7, §6VIP§cPlus§7.");
                p.sendMessage("§9Obs > §7Use letras Maiúsculas/Minúsculas");
            }                 << Linha 584

    Share this post


    Link to post
    Share on other sites

  • if (cmd.getName().equalsIgnoreCase("kit")) {

            if(args.length == 0){

                p.sendMessage("§9Kits > §7Noob , Pedreiro , Engenheiro , §6VIP §7, §6VIP§cPlus§7.");

                p.sendMessage("§9Obs > §7Use letras Maiúsculas/Minúsculas");

            }                 << Linha 584

    Ta com erro nessa linha! adicione um return! Pelo oq eu vi no erro do console tbm ta com erro no runnable!

    Edited by PedroJavax

    Share this post


    Link to post
    Share on other sites

    Nossa, como fui esquecer....

    Mesmo assim não vai, posso aproveitar para tirar mais uma dúvida?

     

    if(args[0] == "Vip" | args[0] == "vip")

     

    Esse código está certo?

    Pode ser usado assim?

     

    para /kit Vip

    Share this post


    Link to post
    Share on other sites

  • Nossa, como fui esquecer....

    Mesmo assim não vai, posso aproveitar para tirar mais uma dúvida?

     

    if(args[0] == "Vip" | args[0] == "vip")

     

    Esse código está certo?

    Pode ser usado assim?

     

    para /kit Vip

    Use: ||

    Share this post


    Link to post
    Share on other sites

    Nossa, como fui esquecer....

    Mesmo assim não vai, posso aproveitar para tirar mais uma dúvida?

     

    if(args[0] == "Vip" | args[0] == "vip")

     

    Esse código está certo?

    Pode ser usado assim?

     

    para /kit Vip

    faz assim

    if(args.length == 0 ){

                        if(label.equalsIgnoreCase("vip"))

                        {

                            

                        }

     

    like pela duvida he

    Share this post


    Link to post
    Share on other sites

    Use: ||

    Obrigado =D

     

    Like!

     

    faz assim

    if(args.length == 0 ){

                        if(label.equalsIgnoreCase("vip"))

                        {

                            

                        }

     

    like pela duvida he

    Agora to sabendo como usa heuhue Obrigado =D

     

    Like!

    Share this post


    Link to post
    Share on other sites

    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.