Where do i find the event that adds players to the online player list [TAB]?

Discussion in 'Plugin Development' started by Wonderjunk, Nov 9, 2011.

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

    Wonderjunk

    Sorry if my 'Java' language is a little off, still java newbie. I've been searching everywhere in the player login function i cannot find where it adds the player name to the online list.

    Edit:
    This is my code so far. I cannot seem to get the hang of eclipse but please help me to learn.
    Code:
    package com.test.testplugin;
    
    import org.bukkit.command.Command;
    import org.bukkit.entity.*;
    import org.bukkit.command.CommandSender;
    import org.bukkit.configuration.file.FileConfiguration;
    import org.bukkit.plugin.java.JavaPlugin;
    import org.bukkit.event.player.*;
     
    public class FakeOnlineUsers extends JavaPlugin {
        protected FileConfiguration config;
    
        public void onEnable() {
            config = getConfig();
        }
        public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
            if(cmd.getName().equalsIgnoreCase("login")){
                if (args.length < 3) {
                    return false;
                }
                setPlayerListName(args);
                return true;
            }
            return false;
        }
     
        public void onDisable() {
    
        }
    }

    Thanks tehbeard for the info.
     
  2. Offline

    stelar7

    there is none, the client pings the server for that info, I dont think there's a way to change it...
     
  3. Offline

    Wonderjunk

    Last edited by a moderator: May 21, 2016
  4. Offline

    nisovin

    You need to call that method on a Player object, not on its own.
     
  5. Offline

    Wonderjunk

    I'm still confuzzled, may i have an example?
     
Thread Status:
Not open for further replies.

Share This Page