All day or all of the night

All day or all of the night

What it does

All day or all of the night allows servers to set worlds to only run in a specified part of the day. You can make it always day, or always night.

Features

  • Enable/disable on per world basis
  • Set the start and end times the world stays within
  • Configure how often the plugin checks the time
  • Created in response to this request: NoNight, and because I wasn't happy with the supplied and somewhat limited solution...

I'm content to be with you in the daytime
Girl I want to be with you all of the time
The only time I feel alright is by your side
Girl I want to be with you all of the nighttime
All day or all of the night
All day or all of the night
All day or all of the night

 

Installation

Add the AllDayAlNight.jar file to your server's plugins directory and start up the server. A config file will be created automatically with the default values. Use the in-game or console commands to enable worlds and change settings.

How it works

  1. Once a world is enabled in the config, time switching occurs automatically
  2. The default settings allow the day to run as normal, then at dusk (12000 ticks) it automatically sets the time to dawn (0 ticks)
  3. To make it always night, set dawn to 12500 and dusk to 23500

 

Commands

  • /adan toggle [world] [true|false] - turns AllDayAlNight on or off for the specified world
  • /adan dawn [world] [time] - sets the lower time limit in the specified world
  • /adan dusk [world] [time] - sets the upper time limit in the specified world
  • /adan check_every [time] - sets how often the plugin checks to see what the time is

 

Permissions

alldayallnight.admin - allows a player to edit the AllDayAllNight config - default: OP

 

Config

There is one main configuration section:

worlds:

Within the worlds configuration is a list of world names (these are automatically generated when the plugin starts up). A world section looks like:

worlds:
    allday:
        enabled: true
        dawn: 0
        dusk: 12000
    allnight:
        enabled: true
        dawn: 12500
        dusk: 23500
  • enabled can be true or false
  • dawn is a number between 0 and 24000, where 0 is dawn, 6000 midday, 12000 dusk, 12500 night and 18000 midnight
  • dusk is a number between 0 and 24000, where 0 is dawn, 6000 midday, 12000 dusk, 12500 night and 18000 midnight

There is also a config key for how often the plugin checks to see whether it should change the time

check_every: 1200

The default is 1200 ticks or every minute. The plugin will only change the time if the current time falls outside of the range specified in the world config settings (dawn/dusk)

 

Change log

v1.0.1

  • compiled against Bukkit 1.7.2

v1.0

  • Initial release

 

Source code

GitHub repository


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    48208
  • Created
    Dec 7, 2012
  • Last Released File
    Aug 11, 2018
  • Total Downloads
    8,230
  • License

Categories

Members