Changed Optional map to ifPresent because return value is not needed.

This commit is contained in:
tastybento 2018-02-06 14:05:48 -08:00
parent 8743ac50ef
commit 28b88763e6

View File

@ -86,7 +86,7 @@ public class FlyingMobEvents implements Listener {
plugin.getLogger().info("Flying mobs " + e.getEventName()); plugin.getLogger().info("Flying mobs " + e.getEventName());
} }
// Store where this mob originated // Store where this mob originated
plugin.getIslands().getIslandAt(e.getLocation()).map(island->mobSpawnInfo.put(e.getEntity(),island)); plugin.getIslands().getIslandAt(e.getLocation()).ifPresent(island->mobSpawnInfo.put(e.getEntity(),island));
} }
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)