void is an invalid type for the variable

Discussion in 'Plugin Development' started by GamerzKing, Aug 9, 2015.

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

    GamerzKing

    Hello everyone!

    So I have been working on this minigame, but currently, I am working on a scoreboard for the lobby, however I am having a couple of issues involving my events and variables.

    Please help meh down below.

    Code:
        @EventHandler
                public void onPlayerJoin(PlayerJoinEvent event) {
                    Player player = event.getPlayer();
                    // create a new scoreboard with title
                    SimpleScoreboard scoreboard = new SimpleScoreboard("§a§lFeatures:");
                    // text with custom score
                    scoreboard.add("§lCustom scores ->", 1337);
                    // also supports blank lines (up to 23 of them!)
                    scoreboard.blankLine();
                    scoreboard.add("§cBLANK LINES");
                    scoreboard.blankLine();
                    // if you dont specify a score it will display them in the order you add them in
                    scoreboard.add("lines");
                    scoreboard.add("§bin");
                    scoreboard.add("§edescending");
                    scoreboard.add("§2order");
                    scoreboard.add(":)");
                    scoreboard.blankLine();
                    // the text can be up to 48 characters long (including color codes)
                    scoreboard.add("and long lines with up to §l48 characters");
                    // call this to create the scoreboard, nothing will happen if you forget to call this
                    scoreboard.build();
                    // send the scoreboard to the player(s), takes an array
                    scoreboard.send(player);
                }
            }
        }
    }
    
     
    Last edited: Aug 10, 2015
  2. Offline

    MisterErwin

    @GamerzKing If you need help, you maybe want to say what isn't working ;)
     
Thread Status:
Not open for further replies.

Share This Page