#vulnerable code 
                                public void broadcast(String message) {
        for (User user : this.getOnlineMembers()) {
            user.getPlayer().sendMessage(message);
        }
    } 
                            #location 3 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                public void broadcast(String message) {
        for (User user : this.getOnlineMembers()) {
            if (user.getPlayer() == null) {
                continue;
            }
            
            user.getPlayer().sendMessage(message);
        }
    }