k1lly0u
Supported Games
Night Lantern automatically turns ON lanterns/ovens/searchlights after sunset and then turns them OFF after sunrise.
Sunset and sunrise hours can be set in configuration file; default values are 7.5 and 18.5. These values determine when lights should be turned on and off.
Enable which light types you would like to have automated by changing "This type is enabled"
for the various types in the configuration.
Choose to make lights consume fuel, or run free of charge by changing "This type consumes fuel"
for the various light types in the configuration.
Allow players to toggle what types of lights they want to be automated by changing "This type can be toggled by the owner"
in the config. This only affects lights they have placed themselves.
Option to start cooking items in a oven when it is enabled by the plugin "This type starts cooking items when toggled by plugin"
. This is only used when "This type consumes fuel"
is disabled
Option to consume fuel if a player has toggled a light source during the automated period "This type consumes fuel when toggled by a player"
. If enabled and a player toggles the oven, then the oven will start consuming fuel
Option to require that only players with the correct permission can toggle their own lights type by changing "This type requires permission to be toggled by the owner"
in the configuration.
When a player toggles on/off a light type all of their lights of that type will also be turned on/off (if within the automation time span).
Has inbuilt support for No Fuel Requirements
Permissions
nightlantern.global
- Required to toggle auto-lights across the entire servernightlantern.campfire
- Required to toggle automation on campfires you ownnightlantern.firepit
- Required to toggle automation on firepits you ownnightlantern.fireplace
- Required to toggle automation on fireplaces you ownnightlantern.furnace
- Required to toggle automation on furnaces you ownnightlantern.largefurnace
- Required to toggle automation on large funacaes you ownnightlantern.lanterns
- Required to toggle automation on lanterns you ownnightlantern.jackolantern
- Required to toggle automation on jack'o'lanterns you ownnightlantern.tunalight
- Required to toggle automation on tuna can lamps you ownnightlantern.searchlight
- Required to toggle automation on searchlights you ownnightlantern.refinery
- Required to toggle automation on refineries you ownnightlantern.cursedcauldren
- Required to toggle automation on cursed cauldrens you ownnightlantern.chineselantern
- Required to toggle automation on chinese lanterns you own
Chat Commands
/lantern global
- Toggle lights and automation on/off across the whole server/lantern campfire
- Toggle automation on campfires you own/lantern firepit
- Toggle automation on firepits you own/lantern fireplace
- Toggle automation on fireplaces you own/lantern furnace
- Toggle automation on furnaces you own/lantern largefurnace
- Toggle automation on large funaces you own/lantern lanterns
- Toggle automation on lanterns you own/lantern jackolantern
- Toggle automation on jack'o'lanterns you own/lantern tunalight
- Toggle automation on tuna can lights you own/lantern searchlight
- Toggle automation on searchlights you own/lantern refinery
- Toggle automation on refineries you own/lantern cursedcauldren
- Toggle automation on cursed cauldrens you own/lantern chineselantern
- Toggle automation on chinese lanterns you own
Configuration
{
"Light Settings": {
"BBQ": {
"This type is enabled": true,
"This type consumes fuel": false,
"This type consumes fuel when toggled by a player": false,
"This type starts cooking items when toggled by plugin": false,
"This type can be toggled by the owner": true,
"This type requires permission to be toggled by the owner": true
},
"Campfire": {
"This type is enabled": true,
"This type consumes fuel": false,
"This type consumes fuel when toggled by a player": true,
"This type starts cooking items when toggled by plugin": true,
"This type can be toggled by the owner": true,
"This type requires permission to be toggled by the owner": true
},
"Firepit": {
"This type is enabled": true,
"This type consumes fuel": false,
"This type consumes fuel when toggled by a player": false,
"This type starts cooking items when toggled by plugin": false,
"This type can be toggled by the owner": true,
"This type requires permission to be toggled by the owner": true
},
"Fireplace": {
"This type is enabled": true,
"This type consumes fuel": false,
"This type consumes fuel when toggled by a player": false,
"This type starts cooking items when toggled by plugin": false,
"This type can be toggled by the owner": true,
"This type requires permission to be toggled by the owner": true
},
"Furnace": {
"This type is enabled": true,
"This type consumes fuel": false,
"This type consumes fuel when toggled by a player": false,
"This type starts cooking items when toggled by plugin": false,
"This type can be toggled by the owner": false,
"This type requires permission to be toggled by the owner": false
},
"JackOLantern": {
"This type is enabled": true,
"This type consumes fuel": false,
"This type consumes fuel when toggled by a player": false,
"This type starts cooking items when toggled by plugin": false,
"This type can be toggled by the owner": true,
"This type requires permission to be toggled by the owner": true
},
"Lanterns": {
"This type is enabled": true,
"This type consumes fuel": false,
"This type consumes fuel when toggled by a player": false,
"This type starts cooking items when toggled by plugin": false,
"This type can be toggled by the owner": true,
"This type requires permission to be toggled by the owner": true
},
"LargeFurnace": {
"This type is enabled": true,
"This type consumes fuel": false,
"This type consumes fuel when toggled by a player": false,
"This type starts cooking items when toggled by plugin": false,
"This type can be toggled by the owner": true,
"This type requires permission to be toggled by the owner": true
},
"Searchlight": {
"This type is enabled": true,
"This type consumes fuel": false,
"This type consumes fuel when toggled by a player": false,
"This type starts cooking items when toggled by plugin": false,
"This type can be toggled by the owner": true,
"This type requires permission to be toggled by the owner": true
},
"TunaLight": {
"This type is enabled": true,
"This type consumes fuel": false,
"This type consumes fuel when toggled by a player": false,
"This type starts cooking items when toggled by plugin": false,
"This type can be toggled by the owner": true,
"This type requires permission to be toggled by the owner": true
},
"Refinery": {
"This type is enabled": true,
"This type consumes fuel": false,
"This type consumes fuel when toggled by a player": false,
"This type starts cooking items when toggled by plugin": false,
"This type can be toggled by the owner": true,
"This type requires permission to be toggled by the owner": true
},
"CursedCauldren": {
"This type is enabled": true,
"This type consumes fuel": false,
"This type consumes fuel when toggled by a player": false,
"This type starts cooking items when toggled by plugin": false,
"This type can be toggled by the owner": true,
"This type requires permission to be toggled by the owner": true
},
"ChineseLantern": {
"This type is enabled": true,
"This type consumes fuel": false,
"This type consumes fuel when toggled by a player": false,
"This type starts cooking items when toggled by plugin": false,
"This type can be toggled by the owner": true,
"This type requires permission to be toggled by the owner": true
}
},
"Time autolights are disabled": 7.5,
"Time autolights are enabled": 18.5,
"Version": {
"Major": 2,
"Minor": 1,
"Patch": 0
}
}
For Developers
Hooks
object OnNightLanternToggle(BaseEntity entity, bool toggleOn) // Called prior to toggling a light
MIT License
Copyright (c) 2020 k1lly0u
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.