Skip to content

Commit

Permalink
LightAPI: bukkit-backward-support: Return empty chunk list
Browse files Browse the repository at this point in the history
* To avoid NullPointerException

Change-Id: Ia408bba229d098144b9db71c3874cf6e4a54805c
  • Loading branch information
BeYkeRYkt committed Jan 24, 2022
1 parent 9512b23 commit bddc86f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,11 @@ public static List<ChunkInfo> collectChunks(Location location, ru.beykerykt.ligh

public static List<ChunkInfo> collectChunks(World world, int x, int y, int z,
ru.beykerykt.lightapi.LightType lightType, int lightLevel) {
List<ChunkInfo> list = new CopyOnWriteArrayList<>();
if (!isBackwardEnabled()) {
log(Bukkit.getServer().getConsoleSender(), DEPRECATED_MSG);
return null;
return list;
}
List<ChunkInfo> list = new CopyOnWriteArrayList<>();
IBukkitExtension ext = (IBukkitExtension) ru.beykerykt.minecraft.lightapi.common.LightAPI.get().getExtension();
IHandler handler = ext.getHandler();
int lightTypeNew = LightFlag.BLOCK_LIGHTING;
Expand Down

0 comments on commit bddc86f

Please sign in to comment.