Solved Bukkit.getPlayer("MiniDigger") == null ?!

Discussion in 'Plugin Development' started by MiniDigger, Jan 3, 2014.

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

    MiniDigger

    Hi guys,
    I have a problem. Bukkit.getPlayer("MiniDigger") does always return null. I tried using different bukkit versions and other methods like Bukkit.getPlayerExact or getServer().getPlayer() but all returning null. And yes I am shure that the plugin is enabled and that I am connected to that server.
     
  2. Offline

    Forseth11

    MiniDigger Before you do something with it make sure it is not null. I think it is case sensitive. Try this.getServer().getPlayer("NAME") and if that does not work try looping through all the players and checking their names.
     
  3. Offline

    ccrama

    If he isnt online, do Bukkit.getOfflinePlayer("MiniDigger")
     
  4. Offline

    MiniDigger

    ccrama he is online
    But after some changings to other parts of the plugin its now working. Strange...
     
  5. Offline

    ccrama

    MiniDigger hmm, strange. At least you now have it working!
     
  6. Offline

    MiniDigger

Thread Status:
Not open for further replies.

Share This Page