I can't update sign

Discussion in 'Plugin Development' started by Zenok, Jan 1, 2014.

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

    Zenok

    I have stored the poster that the last user click with a HashMap, and trying to finish the game update the poster, but not updated. However in the course of the game if that I've been able to update the poster.
    I call the CheckWaves function from the EntityDeathEvent. I think that it will be for this reason, although I can't find a solution

    Can that be?


    Code:java
    1. Map<Integer, Sign> Signs = new HashMap<Integer, Sign>();


    Code:java
    1. //-----------------------------------------------------------------------------------------------------------------------
    2. public void CheckWaves(int game) {
    3.  
    4. if(VILLAGE_VILLAGERS[game] == 0) {
    5. for(Player player : Bukkit.getOnlinePlayers()) {
    6. if(GamePlayers[game].contains(player.getName())) {
    7. player.teleport(new Location(player.getWorld(), SPAWN[0], SPAWN[1], SPAWN[2]));
    8.  
    9.  
    10. VILLAGE_PLAYERS[game] = 0;
    11.  
    12. //UPDATE SIGN
    13. System.out.println(Signs.get(game).getLine(0));
    14. Signs.get(game).setLine(1, ChatColor.GREEN + "Lobby");
    15. Signs.get(game).setLine(2, ChatColor.GREEN + "" + VILLAGE_PLAYERS[game] + "/" + VILLAGE_MAX_PLAYERS + " players");
    16. Signs.get(game).update();
    17.  
    18. player.sendMessage("[VILLAGE] You have not saved the villagers");
    19. }
    20. }
    21.  
    22. } else if(VILLAGE_ZOMBIES[game] == 0) {
    23. VILLAGE_WAVE[game]++;
    24. startWave(game);
    25. }
    26. }
     
Thread Status:
Not open for further replies.

Share This Page