Update AgilityPlugin.java

This commit is contained in:
zeruth
2019-04-29 20:11:33 -04:00
parent de0f9a9de6
commit 7c3808b9a8

View File

@@ -447,8 +447,7 @@ public class AgilityPlugin extends Plugin
for (Obstacle nearbyObstacle : getObstacles().values())
{
AgilityShortcut shortcut = nearbyObstacle.getShortcut();
if (Arrays.stream(shortcut.getObstacleIds()).anyMatch(i -> i == entryId))
{
if (shortcut != null && Arrays.stream(shortcut.getObstacleIds()).anyMatch(i -> i == entryId)) {
MenuEntry entry = menuEntries[menuEntries.length - 1];
int level = shortcut.getLevel();
Color color = level <= getAgilityLevel() ? Color.GREEN : Color.RED;