Vault not getting any players in a group

Discussion in 'Plugin Development' started by Pacothegint, Dec 11, 2014.

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

    Pacothegint

    Code:java
    1. for(OfflinePlayer offlineplayer:Bukkit.getOfflinePlayers()){
    2. Player player =offlineplayer.getPlayer();
    3. String group = Main.permission.getPrimaryGroup(worldname, offlineplayer);
    4. if(group.equalsIgnoreCase(event.getLine(1))){
    5.  

    for some reason the player is returning null any ideas?

    I should add on my personal server it works fine. Same plugins and all that jazz

    <Edited by bwfcwalshy: Merged posts, please use the edit button rather than double posting.>
     
    Last edited by a moderator: Dec 12, 2014
  2. Offline

    TheOatBaron

    OfflinePlayer.getPlayer() returns null if the player is not online.
     
  3. Offline

    Pacothegint

    @TheOatBaron
    But would this work then?
    Code:java
    1.  
    2. String group = Main.permission.getPrimaryGroup(worldname,offlineplayer);
    3.  
     
Thread Status:
Not open for further replies.

Share This Page