onSignChange help

Discussion in 'Plugin Development' started by XxFuNxX, Apr 10, 2011.

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

    XxFuNxX

    I have made a little test plugin for myself with the onSignChange, but when i place a sign (wall sign)
    and typing [WHO] it give you your ip and display name, and its working,
    but when i type like "Hello" its still pops up, this is the code

    Code:
        public void onSignChange(SignChangeEvent event) {
            Player player = event.getPlayer();
            if (event.getBlock().getType() == Material.WALL_SIGN)
    
            {
                if (event.getLine(0).equalsIgnoreCase("[WHO]") && config.getString("who_enabled_sign").equals("true"));
    
                {
                    player.sendMessage(ChatColor.DARK_BLUE + "Your IP Is:"    + ChatColor.DARK_RED + player.getAddress());
                    player.sendMessage(ChatColor.DARK_GREEN + "Your Display Name is:" + ChatColor.RED + player.getDisplayName());
                }
            }
     
            }
    Please help :)
     
Thread Status:
Not open for further replies.

Share This Page