Console error

Discussion in 'Plugin Development' started by Sgt05, Aug 31, 2014.

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

    Sgt05

  2. Offline

    Lactem

    It says you have unresolved compilation problems. Don't you see red lines underneath some code in your IDE?
     
    hintss likes this.
  3. Offline

    SkyleTyler1337

    this is wrong because you got a space in the label below
    Code:java
    1. if (cmd.getName().equalsIgnoreCase("NV enable")) {
    2. if (player.hasPermission("av.nightvison")) {
    3. if (args.length == 0) {
    4. player.sendMessage("Not enough arguments");
    5. }

    use this
    Code:java
    1. if (cmd.getName().equalsIgnoreCase("NV")) {
    2. if (player.hasPermission("av.nightvison")) {
    3. if (args.length < 1) {
    4. player.sendMessage("Not enough arguments");
    5. return true;
    6. }
    7.  
    8. if (args[0].equalsIgnoreCase("enable")) {
    9. if (args.length == 1) {
    10. player.addPotionEffect(new PotionEffect(
    11. PotionEffectType.NIGHT_VISION,
    12. Integer.MAX_VALUE, 1));
    13. return true;
    14. }
    15. }
    16. }


    Sgt05 and you need to insert one of the "}" in your class body.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 10, 2016
  4. Offline

    Sgt05

  5. Offline

    SkyleTyler1337

    Sgt05 can i see you current code that your using now?
     
  6. Offline

    es359

    How is any of this even compiling? What IDE are you using....? Sgt05
     
Thread Status:
Not open for further replies.

Share This Page