Returning An Internal Error

Discussion in 'Spigot Plugin Help' started by CoreyplaysYT, May 6, 2017.

  1. This Code

    Code (Text):
    if ((Label.equalsIgnoreCase("HelpOP"))
                 && args[0] != null){
    Is Returning Internal Error When /HelpOP Is Performed but /helpop <argument> Works???

    Please Help
     
    • Funny Funny x 2
  2. Hmmm I'm so rusty lately with development but... maybe add in an else statement so if they use /helpop without an arugement it sends a message to the player stating they derp'd out and didnt include an arguement? Just to see if that even executes or not?
     
  3. I Did that and The Same things happened "Interal Error"
     
  4. Wow... wtf then :/ guess we'll wait for a more qualified person to answer, sorry :(
     
  5. Dont be sorry :)
     
    • Like Like x 1
  6. Code (Text):
    if ((Label.equalsIgnoreCase("HelpOP"))
                 && args.length > 0){
     
  7. You sniped me

    Tapatalkkal küldve az én LG-K120 eszközömről
     
  8. didint work ????? Can u pls help me better
     
  9. Then post your whole code and the full error message.
     
  10. The Code is Private
     
  11. Ok, your problem is private.
     
    • Winner Winner x 1
  12. Omg Just make a string ex:
    String arg;
    arg = args[1];
    Instead of returning it to a Null value
     
  13. Still not working Why is this not Working! nothings working
     
  14. BUMP I cant fix this proplem
     
  15. now in game i do /helpop And i get it returned back it says "/helpop"
     
  16. show all of your code + the thrown error
     
  17. its not saying internal error now its returning the command
     
  18. return true :p to fix it.
     
  19. Honestly, why do you even ask for help then say your code is private? Also, you'd better start off learning java.

    Tapatalkkal küldve az én LG-K120 eszközömről
     
  20. Just to help your lazy ass:
    Code (Text):

    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
      if(args.length < 1) {
        sender.sendMessage("Usage: /helpop <message>");
      return true;
      }
      Bukkit.broadcast(Joiner.on(' ').join(args), "helpop.see");
    }