Plugin Help Welcome message like The Archon

Discussion in 'Plugin Help/Development/Requests' started by ricke9984, Dec 20, 2014.

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

    ricke9984

    Is there any plugin that allows me to have a visit counter in the welcome message like The Archon has? รครถ.JPG
     
  2. Offline

    TheDiamondGuy

    Are you looking for code aswell? If so:
    Code:
    private HashMap <String, Integer> map = new HashMap<String, Integer>();
    Then add them when they join.
    Code:
    @EventHandler
    public void onJoin(PlayerJoinEvent e) {
    
    map.put("joinedplayers", + 1);
    So now the HashMap shows the amount of players joined, then just display it when they login:
    Code:
    @EventHandler
    public void onJoin(PlayerJoinEvent e) {
    
    if (!(e.getPlayer().hasPlayedBefore())); //Have not player.
    Bukkit.broadcastMessage(map.size() + " people have joined!");
    Enjoy.
     
Thread Status:
Not open for further replies.

Share This Page