1. Welcome to the Brawl website! Feel free to look around our forums. Join our growing community by typing /register in-game!

Idea Tracker Name Recognition

Discussion in 'Raid' started by MrWaffleman, Nov 10, 2015.

Thread Status:
Please be aware that this thread is more than 30 days old. Do not post unless the topic can still be discussed. Read more...
  1. MrWaffleman

    MrWaffleman The negligence of time's end is man's downfall

    Joined:
    Jun 12, 2014
    Messages:
    3,007
    Ratings:
    +650
    Soo, I'm introducing a very simple idea to tracking, name recognition. To those who don't know, if you don't complete someone's name, you can enter in the first few words of their name and press Tab to complete it. It shows the possible names (and you can switch to each one by keep on pressing Tab) if there are multiple matches for the letters you typed.

    Well, this should be implemented in tracking, usually when you type a command that's supposed to be for players (Ex: you do '/msg' then after that you enter in a few letters then press Tab to autocomplete it to find the player's name) it autocompletes. But when I type '/track' and enter in a few letters and press Tab, it does nothing. I'm pretty sure this is due to the plugin not expecting player names to be put in for some reason. I suggest that this should be added, the plugin SHOULD accept player names as inputs resulting in easy autocomplete.

    This is for lazy people, but easy to fix and could be really helpful for tracking people with confusing names and such :v.
     
    • Like Like x 2
    • Agree Agree x 1
  2. bassmaster6

    bassmaster6 Well-Known Member

    Joined:
    Nov 7, 2013
    Messages:
    890
    Ratings:
    +174
    Easy ways around this are typing the first 3 or 4 letters of the ign. You also can tab the name and then put /track in front of it.
     
    • Like Like x 1
  3. supercraft002

    supercraft002 Well-Known Member

    Joined:
    Oct 24, 2014
    Messages:
    225
    Ratings:
    +64
    • Informative Informative x 1
  4. MrWaffleman

    MrWaffleman The negligence of time's end is man's downfall

    Joined:
    Jun 12, 2014
    Messages:
    3,007
    Ratings:
    +650
    Hm, thanks for info. I listen for the argument to be a player name, and I do tab and it works fine :v. But I'm guessing TabComplete looks for arguments, like there was an "if{}" for different arguments you press Tab and it auto-completes it. Nevermind I'm startin' to confuse myself. So basically I want it to autocomplete teh name.
     
    • Funny Funny x 1
  5. 0racle

    0racle Former Raid and Reports Manager

    Joined:
    Oct 24, 2014
    Messages:
    2,051
    Ratings:
    +744
    If you just use the previous message (if it was /track name) then it shouldn't be too much of an issue.
     
  6. MrWaffleman

    MrWaffleman The negligence of time's end is man's downfall

    Joined:
    Jun 12, 2014
    Messages:
    3,007
    Ratings:
    +650
    What if you're tracking different people :v, I mainly use it at spawn so I still think this could be useful.
     
  7. supercraft002

    supercraft002 Well-Known Member

    Joined:
    Oct 24, 2014
    Messages:
    225
    Ratings:
    +64
    Sorry but this made my day.

    I was so kind to do the coders' work. :V
    Code:
    @Override
        public List<String> onTabComplete(CommandSender sender, Command cmd, String arg, String[] args) {
            List<String> ret = new ArrayList<String>();
            if (sender instanceof Player) {
                if (cmd.getLabel().equalsIgnoreCase("track")) {
                    if (args.length > 0) {
                        for (Player p : Bukkit.getOnlinePlayers()) {
                            if (p.getName().toLowerCase().contains(args[0].toLowerCase())) {
                                ret.add(p.getName());
                            }
                        }
                    }
                }
            }
            return ret;
        }
     
    • Like Like x 1
  8. MrWaffleman

    MrWaffleman The negligence of time's end is man's downfall

    Joined:
    Jun 12, 2014
    Messages:
    3,007
    Ratings:
    +650
    1 Minute of their lives not wasted, thank you supercraft. We shall praise you...
     
  9. supercraft002

    supercraft002 Well-Known Member

    Joined:
    Oct 24, 2014
    Messages:
    225
    Ratings:
    +64
    It were probably one or two more cus I ****ed someth up and tested it too. :V
     
Loading...
Thread Status:
Please be aware that this thread is more than 30 days old. Do not post unless the topic can still be discussed. Read more...