Skip to content

Commit

Permalink
Add check before loading class containing jfx
Browse files Browse the repository at this point in the history
Should help users running on headless Java runtimes.

refs #279
  • Loading branch information
kylestev committed Aug 2, 2016
1 parent 0aedece commit 9a2ee78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/dekk/pw/pokemate/tasks/ConsoleGUIUpdate.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.pokegoapi.api.player.PlayerLevelUpRewards;
import com.pokegoapi.exceptions.LoginFailedException;
import com.pokegoapi.exceptions.RemoteServerException;
import dekk.pw.pokemate.Config;
import dekk.pw.pokemate.Context;
import dekk.pw.pokemate.PokeMate;
import dekk.pw.pokemate.PokeMateUI;
Expand Down Expand Up @@ -63,9 +64,8 @@ private String header() {

if (curLevel > lastLevel) {
PlayerLevelUpRewards rewards = context.getProfile().acceptLevelUpRewards(curLevel - 1);
if (rewards.getStatus() == PlayerLevelUpRewards.Status.NEW) {
String levelUp = "New level: " + curLevel;
levelUp += convertItemAwards(rewards.getRewards());
if (rewards.getStatus() == PlayerLevelUpRewards.Status.NEW && Config.isShowUI()) {
final String levelUp = "New level: " + curLevel + convertItemAwards(rewards.getRewards());
PokeMateUI.toast(levelUp, "Level Up", "icons/items/backpack.png");
}
lastLevel = curLevel;
Expand Down

0 comments on commit 9a2ee78

Please sign in to comment.