Bukkit.getPlayer() detects pieces of my Name.

Discussion in 'Spigot Plugin Development' started by ScienceCodeDE, Jul 26, 2018.

  1. Hey Guys.

    The Title says all. It detects pieces of my Name, but also the full.

    So I coded on my SkyPvP-System and I want to make players can show stats of other players.

    Now: I [With main Acc] make /stats and see full Name. But if I make /stats ScienceCod instead of ScienceCode, because ScienceCode is my full name it works and didnt say the people is not online. I tryed to check it with if (!(target == null)) and if (target.isOnline), but not that I would.

    Funny: if I join with Sec. Acc and try to make /stats ScienceCod or Sci so it will say the player is offline.

    Sorry for my bad english. I'm from Austria. :3
     
  2. Try using Bukkit#getPlayerExact("name");
     
    • Agree Agree x 1
  3. Dont work, because I need to get args[1].

    Code (Java):
    Player target = Bukkit.getPlayer(args[1]);
     
     
  4. Ohh. Yeah now I checked it wait. I try Bukkit.getPlayerExact(args[0).