People have done a great job of allowing developers to manipulate the Minecraft brightness level in their plug-ins. Following a suggestion from DoreK, I used this tool, called LightAPI, to make lasers light up the darkest rooms.
So from this version on, if you put LightAPI.jar in your /plugins/ folder, you will see that lasers are finally emitting light.
It is possible to set the brightness level of each light component. That is, the laser transmitters and receivers. To do this, you will find, in the configuration menu of these two types of components, a small button that opens a dedicated menu.
Since you may already be using LightAPI for other plugins, but do not want LasersEnigma to use it (for performance reasons), you can disable this feature through a line in config.yml:
At the same place, you can also set the default brightness level that will be registered in each new component (until it is changed through the menu explained previously):
As usual, restart the server twice so that the translations are taken into account.
The API is therefore enhanced with a new event allowing to deny an administrator the possibility to modify the brightness level of a component:
And as always, it is possible to directly change the brightness level of a component by using the following instruction:
((ILightComponent)Areas.getInstance() .getAreaFromLocation(loc) .getComponentFromLocation(loc)) .setLightLevel(12);
Or for all components in an area:
Areas.getInstance() .getAreaFromLocation(loc) .getComponents() .stream() .filter(c -> c instanceof ILightComponent) .forEach(c -> ((ILightComponent)c).setLightLevel(12));
From now on, the only monsters that will appear in your puzzle rooms are those that you have consciously chosen to place there.
As usual, you will find this new version here.
And to benefit from this new feature, don’t forget to add LightAPI as well.
Finally, if you would like to donate a few euros to finance the project the patreon page is here.