meraki-analytics / orianna

A Java framework for the Riot Games League of Legends API (http://developer.riotgames.com/).
MIT License
182 stars 56 forks source link

isInGame() always true #88

Closed rawora closed 6 years ago

rawora commented 6 years ago

Hey, isInGame() seems to always return true, even if the summoner is not in a game.

I made an if-statement: if (summoner.isInGame()) { System.out.println("is"); } else { System.out.println("is not"); } and no matter which summoner I choose, it says they all are in a game.

Thank you

BillyD73 commented 6 years ago

Deleted my previous response before it was verified. After trying and verifying on the Discord the correct way to do this is:

Orianna.currentMatchForSummoner(summoner).get();

If you get a 403 "Not found" response then the Summoner isn't in a game, else if the line above returns not null they are :)

robrua commented 6 years ago

Hey, sorry for the delay. This should be fixed with ce42468 and should now be in the latest SNAPSHOT. Will be included in next release.