Solved Problem

Discussion in 'Plugin Development' started by ItsLeandro, Feb 4, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    ItsLeandro

    Fixed it myself.
     
  2. Offline

    thomasb454

    I didn't look at your issue, but noticed some inefficient code..
    Code:java
    1. if (args.length == 2) {
    2. if(!sender.hasPermission("tophealer.heal.others")){
    3. sender.sendMessage(ChatColor.DARK_RED + "You don't have permission for this command!");
    4. return true;
    5. }


    could become

    Code:java
    1. if (args.length == 2) {
    2. if(!sender.hasPermission("tophealer.heal.others")){
    3. sender.sendMessage(ChatColor.DARK_RED + "You don't have permission for this command!");
    4. return true;
    5. } else {
    6. //heal other player.
    7. }

    I know I didn't help with your issue, but yeh:p
     
  3. Offline

    ItsLeandro

    Please just dont reply if you aren't even helping me. You can code like in 1000 of ways, and I don't see what is so efficient from your code thingy.
     
  4. Offline

    idontcare1025

    You don't need an else statement if you return...
     
  5. Offline

    ItsLeandro

    Nvm, fixed it myself. It was just a stupid brackets mistake...
     
  6. Offline

    thomasb454


    My mistake, forgot to remove the return statement.
    @ItsLeandro
    I'm teaching him to do some more efficiently. Plus you contradicted you self, telling my not to reply unless helping, I don't see you helping.
     
  7. Offline

    idontcare1025

    I never said that, someone else did.
     
  8. Offline

    thomasb454

    Ooops^ Knew I tagged the wrong people. :D
     
Thread Status:
Not open for further replies.

Share This Page