Hey ho! If you need help setting up one of my Projects, join the Discord server at https://discord.gg/Cf6sspj

SimpleSync/Exports

From Lemon
Jump to navigation Jump to search

Time

getTimeSyncMode

  • Return Type: int
  • Parameters:
    • This function does not take any parameters.

Gets the current Time synchronization mode. 0 is Dynamic, 1 is Static and 2 is Real.

setTimeSyncMode

  • Return Type: bool
  • Parameters:
    • mode (int): The Time synchronization mode to set.

Sets a specific Time synchronization mode. Returns true if the Sync Mode is valid, false otherwise.

setTime

  • Return Type: null
  • Parameters:
    • hour (int): The value of the hours.
    • minute (int): The value of the minutes.

Sets a specific Time and sends it to everyone on the server. Does nothing if the Time Sync mode is set to Dynamic.

getHours

  • Return Type: int
  • Parameters:
    • This function does not take any parameters.

Gets the current Hours.

getMinutes

  • Return Type: int
  • Parameters:
    • This function does not take any parameters.

Gets the current Minutes.

getNextTimeFetch

  • Return Type: int
  • Parameters:
    • This function does not take any parameters.

Gets the next time where the time will be increased. The value is in milliseconds of game time.

Weather

getWeatherSyncMode

  • Return Type: int
  • Parameters:
    • This function does not take any parameters.

Gets the current Weather synchronization mode. 0 is Dynamic, 1 is Static and 2 is Real.

setWeatherSyncMode

  • Return Type: bool
  • Parameters:
    • mode (int): The Time synchronization mode to set.

Sets a specific Weather synchronization mode. Returns true if the Sync Mode is valid, false otherwise.

getWeather

  • Return Type: string
  • Parameters:
    • This function does not take any parameters.

Gets the current weather in the server.

setWeather

  • Return Type: bool
  • Parameters:
    • mode (string): The Weather to set.

Sets a specific Weather. Returns true if the weather was applied, false otherwise. This does nothing if the Weather Mode is set to Real.

getTransitionWeather

  • Return Type: string
  • Parameters:
    • This function does not take any parameters.

Returns the destination Weather during a transition. You can call #getWeatherTransitionFinish to see if there is a transition in progress.

getNextWeatherFetch

  • Return Type: long
  • Parameters:
    • This function does not take any parameters.

Gets the next time where the Weather will be changed or synchronized. The value is in milliseconds of game time.

getWeatherTransitionFinish

  • Return Type: long
  • Parameters:
    • This function does not take any parameters.

Gets the time where the Weather transition will finish. The value is in milliseconds of game time. If this is zero, there is no transition in progress.

Lights

getLightsSyncMode

  • Return Type: int
  • Parameters:
    • This function does not take any parameters.

Gets the current Lights synchronization mode. 0 is Dynamic, 1 is Static and 2 is Real.

Introduced in version 1.2.

setLightsSyncMode

  • Return Type: bool
  • Parameters:
    • mode (int): The Time synchronization mode to set.

Sets a specific Lights synchronization mode. Returns true if the Sync Mode is valid, false otherwise.

Introduced in version 1.2.

areLightsEnabled

  • Return Type: bool
  • Parameters:
    • This function does not take any parameters.

Gets a Boolean representing if the artificial lights on the world map are enabled or disabled. True means lights enabled, False means total Blackout.

setLights

  • Return Type: null
  • Parameters:
    • enabled (bool): If the Lights should be enabled or not.

Enables or Disables the Artificial Lights.