
用于时间管理与显示的 Spigot 插件
时间管理功能
为每个世界定义开始时间和速度修正值。根据服务器的性能设置合适的刷新率。
速度可以增加或减少至多 20 倍,或者通过偏移量将 UTC 时间与本地时间匹配。
白天和黑夜可以设置为不同的速度值,这对于 RPG 或某些小游戏非常有用。
服务器每次启动和重载时,世界列表会更新,计时器会同步。
计时器和速度可以通过游戏内命令进行修改,或在手动更改后重新同步。
可以为每位玩家定义特定的时间偏移量。
TimeManager 可以调度命令,这些命令会在 cmds.yml 文件中指定的时间运行。调度的命令可以使用下面描述的占位符,但 {tm_player} 除外。
此插件覆盖了原版的 "/time" 命令。更改单个世界计时器的命令是 "/tm set time [ticks|daypart|HH:mm:ss] [world]"。
季节引擎 — 昼夜长度随一年中的日期变化。提供六种类似纬度的预设(赤道、地中海、温带、亚北极、北极、自定义),支持半球切换,至点之间进行正弦波扫描,可配置的一年长度。
管理员 GUI:包含三个页面的管理员面板,带有点击反馈(支持 10 种语言)。
睡眠管理功能
TimeManager 允许你管理睡眠:所需玩家数量、跳过夜晚时的动画、醒来时世界间的同步等。
睡眠可以被允许、禁止或与某些其他世界关联。
还可以使用单独的权限。
玩家命令 /now<display> <world>
使用单一命令显示带有时间、日期、经过的天数或周数或其他许多占位符的自定义消息。
/now 消息支持多语言,并可以根据 lang.yml 文件中可用的任何玩家的区域设置自动调整。
使用权限,你可以允许玩家选择 display 和/或 world 参数,或者两者都不选。
Display 参数可以是:'msg'、'title' 或 'actionbar'。
Nether 和 End 世界可以有特定的消息。
可以在 YAML 文件中使用十六进制颜色。
玩家命令 /now <season suffix>
当启用季节时,在聊天中显示作为后缀的季节名称(仅限主世界)。
占位符
可用的占位符如下:
- {tm_player} : 显示玩家名称。
- {tm_world} : 显示世界名称。
- {tm_tick} : 显示当前刻数。
- {tm_time12} : 以 hh:mm:ss 格式显示当前时间。(1 → 12)
- {tm_time24} : 以 HH:mm:ss 格式显示当前时间。(0 → 23)
- {tm_hours12} : 以两位数字显示当前小时值。(1 → 12)
- {tm_hours24} : 以两位数字显示当前小时值。(0 → 23)
- {tm_minutes} : 以两位数字显示当前分钟值。
- {tm_seconds} : 以两位数字显示当前秒数值。
- {tm_ampm} : 显示当前上午或下午部分。
- {tm_daypart} : 显示当前一天中的时段名称,共有四种,每种语言均有对应。
- {tm_currentday} : 显示当前天数。(1 → ∞)
- {tm_elapseddays} : 显示经过的天数。(0 → ∞)
- {tm_dayname} : 基于 lang.yml 文件中的条目显示当前日期的名称。
- {tm_yearday} : 显示一年中的第几天。(1 → 365)
- {tm_serverday} : 跨服务器的经过天数计数器,重启后依然存在。
- {tm_week} : 显示经过的周数。(1 → ∞)
- {tm_yearweek} : 显示一年中的第几周。(1 → 52)
- {tm_monthname} : 基于 lang.yml 文件中的条目显示当前月份的名称。
- {tm_dd} : 以两位数字显示日期的日部分。
- {tm_mm} : 以两位数字显示日期的月部分。
- {tm_yy} : 以两位数字显示日期的年部分。
- {tm_yyyy} : 以四位数字显示日期的年部分。
- {tm_season} : 玩家所在世界的当前季节 — WINTER / SPRING / SUMMER / FALL(当季节引擎禁用时为 "off")。
- {tm_season_preset} : 激活的季节预设 — TEMPERATE / ARCTIC / CUSTOM / 等。
- {tm_season_dayofyear} : 季节年的第几天,从 0 到年长度减 1。
- {tm_season_daylight} : 该 MC 日的日照比例,格式化为带百分号的字符串,例如 `47%`。
- {tm_season_hemisphere} : `north` 或 `south`。
请注意,这些占位符区分大小写。
它们可以用于 lang 和 cmds YAML 文件,也可以用于告示牌、书籍、聊天消息和命令中。
依赖项
TimeManager 可以通过 PlaceholderAPI 显示其占位符。你只需将 API 放入你的插件文件夹,并在 TimeManager 的 config.yml 文件中将相关节点设置为 'true'。
管理员命令 /tm
/tm animation [<world>] [on|off|toggle|instant] 管理员和控制台可以显示 config.yml 和 lang.yml 文件的摘要。
/tm checkConfig 管理员和控制台可以显示 config.yml 和 lang.yml 文件的摘要。
/tm checkSql 根据 config.yml 文件中提供的值检查 MySQL 服务器的可用性。这仅检查 IP 地址和端口是否正确开放。
/tm checkTime [all|server|world] 管理员和控制台可以显示调试/管理消息,显示服务器启动时的时间、当前服务器时间以及特定世界(或所有世界)的当前时间、开始时间和速度。
/tm checkUpdate [bukkit|spigot|github] 在所选服务器上搜索是否存在该插件的新版本。(仅限 MC 1.8.8+)
/tm gui 打开管理员图形界面。
/tm help [cmd] [<subCmd>] 帮助功能会为你提供目标命令和子命令的正确用法及简短描述。
/tm hud [on|off] 为可选的 ActionBar HUD 提供按玩家切换的功能。玩家可使用此选项退出(例如,他们希望保持操作栏空白以用于其他插件)。
/tm lock <world> [time|here|realtime] & /tm unlock <world> 在不编辑配置文件的情况下动态切换锁定状态。
/tm now [msg|title|actionbar] [player|all|world] 向特定玩家、特定世界中的所有玩家或所有在线玩家发送 '/now'(聊天、标题或操作栏)消息。
/tm nowitem [player] 给予一个自定义的 CLOCK 物品,右键点击时执行 '/now'。
/tm placeholders 列出该插件暴露的所有占位符。
/tm reload [all|config|lang|cmds] 此命令允许你在手动修改后从 yaml 文件重新加载数据。所有计时器将立即重新同步。
/tm resync [all|world] 此命令将根据服务器启动时间、经过的时间和当前速度修正系数,重新同步单个或所有世界的计时器。
/tm season [status|enable|disable|preset<NAME>|year<days>|apply|list] 处理所有季节相关功能。
/tm set date [today|yyyy-mm-dd] [all|world] 设置指定世界(或所有世界)的当前日期。可以是 today 或任何 yyyy-mm-dd 格式的日期。月份长度与现实一致,但二月始终为 28 天。因此一年始终为 365 天。
/tm set debugMode [true|false] 设置为 true 可在控制台中启用带颜色的详细消息。有助于理解该插件的一些机制。
/tm set defLang [lg_LG] 选择当玩家的区域设置不存在于 lang.yml 中或当 'useMultiLang' 为 false 时要使用的翻译。
/tm set duration [00d-00h-00m-00s] [all|world] 根据所需持续时间而非速度倍率来设置世界的速度。
/tm set durationDay [00d-00h-00m-00s] [all|world] & /tm set durationNight [00d-00h-00m-00s] [all|world] 白天和夜晚的长度可以分别定义。
/tm set elapsedDays [0 → ∞] [all|world] 设置指定世界(或所有世界)当前经过的天数。可以是介于 0 和 无穷大(或接近无穷大)之间的整数。将其设置为 0 将使世界回到第 一 天。
/tm set firstStartTime [default|previous|start] [all|world] 强制设定服务器启动时世界的起始时间。'default' 值允许在启动时进行通常的重新同步。'start' 值强制世界从世界中 'start' 节点指定的时间开始。'previous' 值返回服务器关闭前世界中的时间。
/tm set initialTick [ticks|HH:mm:ss] 修改服务器的初始刻。
/tm set multiLang [true|false] 设置为 true 或 false 以使用自动翻译来处理 /now 命令。
/tm set playerOffset [-23999 → 23999] [all|player] 相对于世界时间在玩家客户端上定义特定的偏移量(世界速度仍然有效)。设置为 '0' 以取消。
/tm set playerTime [ticks|daypart|HH:mm:ss|reset] [all|player] 在玩家客户端上定义特定的时间(世界速度仍然有效)。使用 'reset' 参数以取消。
/tm set refreshRate [ticks] 设置在实际更新速度拉伸/扩展效果之前的延迟(以刻为单位)。必须是介于 2 和 20 之间的整数。默认值为 10 ticks,请注意过小的值可能导致服务器卡顿。
/tm set sleep [true|false|linked] [all|world] 定义玩家是否可以在指定世界(或所有世界)中睡眠以进入第二天。默认情况下,除非世界的计时器设置为实时模式(此时必须设为 false),否则所有世界都会以 true 作为参数启动。如果您希望允许睡眠同时保持多个世界的时间同步,可以使用 'linked' 功能,该功能允许一组世界共同度过夜晚。
/tm set speed [0.0 → 10.0] [all|world] 小数参数将乘以世界的时间速度。使用 0.0 冻结时间,0.1 到 0.9 之间的数字用于减速时间,1.0 为正常速度,1.1 到 10.0 之间的数字用于加速时间。将此值设置为 24.0 或 realtime 可使世界时间与现实时间同步。
/tm set speedDay [0.0 → 10.0] [all|world] & /tm set speedNight [0.0 → 10.0] [all|world] 在 0.0 到 10.0 之间,白天速度和夜间速度的值可以彼此不同。
/tm set start [ticks|daypart|HH:mm:ss|timeShift] [all|world] 定义服务器启动时为指定世界(或所有世界)设置的时间。默认情况下,所有世界都从刻 #0 开始。计时器将立即重新同步。如果世界使用实时速度,起始值将决定 UTC 时间偏移量,并接受 +1 或 -1 等值。
/tm set sync [true|false] [all|world] 定义速度失真方法是否会增加/减少世界的实际刻数,还是基于服务器的理论刻数值进行调整。默认情况下,所有世界都以 false 作为参数启动。基于实时和冻结的世界不使用此选项,但另一方面,它会影响具有正常速度的世界。
/tm set time [ticks|daypart|HH:mm:ss] [all|world] 设置指定世界(或所有世界)的当前时间。建议改用原版 /time 命令。Tab 补全还提供了方便的预设,如 "day"(白天)、"noon"(正午)、"night"(夜晚)、"midnight"(午夜)等。
/tm set update [none|bukkit|spigot|github] 定义更新搜索的源服务器。(仅限 MC 1.8.8+)
/tm set useCmds [true|false] 设为 true 以启用自定义命令调度器。有关详细信息,请参阅 cmds.yml 文件。
命令与参数简表
- 玩家可用:
- /now <msg|title|actionbar> <world>
- /now <season suffix>
- 管理员可用:
- /tm animation [<world>] [on|off|toggle|instant]
- /tm checkConfig
- /tm checkSql
- /tm checkTime [all|world]
- /tm checkUpdate [bukkit|spigot|github]
- /tm gui
- /tm help [cmd] [<subCmd>]
- /tm hud [on|off]
- /tm lock <world> [time|here|realtime]
- /tm unlock <world>
- /tm now [msg|title|actionbar] [all|player|world]
- /tm nowitem [player]
- /tm placeholders
- /tm reload [all|config|lang|cmds]
- /tm resync [all|world]
- /tm season [status|enable|disable|preset|year|apply|list]
- /tm set date [today|yyyy-mm-dd] [all|world]
- /tm set debugMode [true|false]
- /tm set defLang [true|false]
- /tm set duration [00d-00h-00m-00s] [all|world]
- /tm set durationDay [00d-00h-00m-00s] [all|world]
- /tm set durationNight [00d-00h-00m-00s] [all|world]
- /tm set elapsedDays [0 → ∞] [all|world]
- /tm set firstStartTime [default|previous|start] [all|world]
- /tm set initialTick [ticks|HH:mm:ss]
- /tm set multiLang [lg_LG]
- /tm set playerOffset [-23999 → 23999] [all|player]
- /tm set playerTime [ticks|daypart|HH:mm:ss|reset] [all|player]
- /tm set refreshRate [ticks]
- /tm set sleep [true|false] [all|world]
- /tm set speed [multiplier] [all|world]
- /tm set speedDay [multiplier] [all|world]
- /tm set speedNight [multiplier] [all|world]
- /tm set start [ticks|daypart|HH:mm:ss] [all|world]
- /tm set sync [true|false] [all|world]
- /tm set time [ticks|daypart|HH:mm:ss] [all|world]
- /tm set update [none|bukkit|spigot|github]
- /tm set useCmds [true|false]
权限节点
- timemanager.*
- timemanager.admin
- timemanager.hud.toggle
- timemanager.now.*
- timemanager.now.cmd
- timemanager.now.display
- timemanager.now.world
-
timemanager.now-item.use
- timemanager.placeholders
- timemanager.signs.create
- timemanager.sleep.*
- timemanager.sleep.allowed
- timemanager.sleep.counted
timemanager.admin:提供或拒绝访问带有所有参数的 /tm 子命令。
timemanager.hud.toggle:通过 /tm hud 切换个人 ActionBar HUD。
timemanager.now:提供或拒绝访问带或不带参数的 /now 子命令。
timemanager.now-item.use:允许右键点击怀表(/now 物品)。
timemanager.placeholders:定义玩家是否被允许在聊天中使用不同的占位符。
timemanager.signs.create:允许创建 [tm] 刷新告示牌。
timemanager.placeholders:允许在聊天中使用占位符。
timemanager.sleep.allowed:指定玩家是否允许进入床(但保存出生点仍然可行)。
timemanager.sleep.counted:指定玩家是否被计入跳过夜晚的统计中。
YAML 文件
完整说明可在各个文件的头部找到。
config.yml
该文件主要包含有关每个世界的信息以及常规选项,例如参考刻数、SQL 数据库使用、占位符激活等。
lang.yml
该文件包含不同的翻译内容。可以对其进行修改并添加新的语言。还可以根据每位玩家的区域设置激活自动翻译功能。
cmds.yml
该文件允许您在特定时间和日期安排命令的执行,并可根据所选周期重复执行。
参考时间和日期可以是任何世界的时间,也可以是实际时间。
signs.yml
该文件会自动保存显示内容不断刷新的告示牌的位置。
管理界面截图
教程
兼容性
- v1.12.x:MC 1.9.4 至 1.21.10
- v2.0.0:MC 1.21.11 至 26.1.2
API
尽管本插件并非旨在作为 API 使用,但您可以通过在 Java 代码中导入 PlaceholdersHandler 类来使用各种占位符:
import net.vdcraft.arvdc.timemanager.mainclass.PlaceholdersHandler
然后使用以下任一方法,将任意字符串中的一个或多个占位符进行转换:
String replaceAllPlaceholders(String msg, String world, String lang, Player p)
String replaceAllPlaceholders(String msg, String world, String lang)
String replaceAllPlaceholders(String msg, World w, String lang, Player p)
String replaceAllPlaceholders(String msg, World w, String lang)
可以通过导入以下类来获取客户端语言:
import net.vdcraft.arvdc.timemanager.mainclass.PlayerLangHandler
然后使用以下任一方法:
String setLangToUse(CommandSender sender)
String setLangToUse(Player p)
待办事项
命令:为 '/tm checktime' 添加 [all|world] 参数,以显示单个世界的详细信息。
命令:创建 '/tm checkconfig' 命令,用于显示当前配置的摘要(除世界详情外的所有内容)。
命令:创建 '/tm set initialtick' 命令。
命令:允许在 '/ tm set start'、'/ tm set time' 和 '/ tm set initialtick' 的第一个参数中使用 'HH:mm:ss' 格式。
命令:制作更新消息及相关命令。
昼夜:为白天和夜晚设置不同的速度倍率。
日历:创建新的占位符,以显示经过的天数以及 yyyy-mm-dd 格式的日期。
调度器:创建一个调度器,允许在特定时间执行命令。
睡眠/同步:提供将某个世界同步到指定世界的能力,并在有人睡觉后检测新一天的到来。
Tab 补全:尝试改进当前处理世界名称中空格的管理方式。(适用于 MC 1.12.2 及更早版本)
命令:允许玩家单独设置自己的时间。
世界:在列表中包含 _nether_ 和 _the end_,或将其链接到对应的参考世界。
世界:为服务器启动时计时器的行为添加按世界设置的选项。
占位符:允许在书和告示牌中使用占位符。
cmds.yml 文件:允许在命令行之间使用 'pause'(暂停)。
占位符:添加一个占位符以显示当前是一周中的第几天。
颜色:支持十六进制颜色识别。
占位符:允许玩家在聊天消息中使用占位符。
占位符:允许外部命令使用占位符。
命令:添加 '/tm set duration' 命令,支持 00d-00h-00m-00s 格式。
占位符:添加用于显示一周七天名称的新占位符。
睡眠:增加一些管理睡眠的功能,因为该插件与大多数睡眠管理插件配合不佳。
命令:允许玩家显示占位符列表。
占位符:创建占位符会持续刷新的告示牌。
玩家物品:创建一个自定义物品(以及相关的权限和选项),用于执行 '/now' 命令。
睡眠:改进睡眠动画期间显示的粒子效果。
向后兼容:由于新的游戏规则 'ADVANCE_TIME' 取代了 'DAYLIGHT_CYCLE',因此开发一个不向后兼容的 2.0 版本。
日 & 夜:创建一个逼真的季节系统,自动调整白天和夜晚的长度。
GUI:创建一个图形用户界面,说明插件的各项功能。
如果您希望获得特定功能的改进或遇到任何错误,请在 GitHub 上提交 Issue。

Spigot plugin for time management and display
TIME MANAGEMENT FUNCTIONALITIES
Define a start time and a speed modifier per world. Set a suitable refresh rate for the performance of your server.
Speed could be increased/decreased up to 20 times or match UTC time with offset to local time.
Day and night can be set to different speed values, which can be great for RPG or some mini-games.
Worlds list is actualized and timers are synchronized on each server startup and reload.
Timers and speeds can be modified or re-synchronize with in-game commands or reloading after manually changes.
A specific time offset can be defined for each player.
TimeManager can schedule commands that run at a time specified in the cmds.yml file. Scheduled commands can use the placeholders described below, with the exception of {tm_player}.
This plugin override the vanilla "/time" command. The command to change a single world timer is "/tm set time [ticks|daypart|HH:mm:ss] [world]".
Seasons engine — day and night length sweep through the year. Six latitude-style presets (Equatorial, Mediterranean, Temperate, Subarctic, Arctic, Custom), hemisphere switch, sinusoidal sweep between solstices, configurable year length.
Admin GUI : three-page admin panel with click feedback (10 languages).
SLEEP MANAGEMENT FUNCTIONALITIES
TimeManager allows you to manage sleep: number of players required, animation during night skip, synchronization between worlds when waking up, etc.
Sleep can be authorized, forbidden or linked with some other worlds.
individual permissions can also be used.
PLAYER COMMAND /now<display> <world>
A single command is used to display a custom message with the time, the date, the number of elapsed days or weeks, or many other placeholders.
/now messages support multi-language and could automatically be accorded to any player's locale available in the lang.yml file.
Using the permissions, you can permit players to choose the display and/or the world argument or neither of the two.
Display argument can be : 'msg', 'title' or 'actionbar'.
Nether and the End worlds could have a specific message.
Hexadecimal colors can be used in the YAML files.
PLAYER COMMAND /now <season suffix>
Displays the season as suffix in chat when seasons are enabled (overworld only).
PLACEHOLDERS
The available placeholders are as follows :
- {tm_player} : Displays the name of the player.
- {tm_world} : Displays the name of the world.
- {tm_tick} : Displays the current tick.
- {tm_time12} : Displays the current time in hh:mm:ss format. (1 → 12)
- {tm_time24} : Displays the current time in HH:mm:ss format. (0 → 23)
- {tm_hours12} : Displays the current hour value in 2 digits. (1 → 12)
- {tm_hours24} : Displays the current hour value in 2 digits. (0 → 23)
- {tm_minutes} : Displays the current minutes value in 2 digits.
- {tm_seconds} : Displays the current seconds value in 2 digits.
- {tm_ampm} : Displays the current AM or PM part of the day.
- {tm_daypart} : Displays the name of the current part of the day, among the four existing ones, in each of the languages.
- {tm_currentday} : Displays the number of the current day. (1 → ∞)
- {tm_elapseddays} : Displays the number of elapsed day(s). (0 → ∞)
- {tm_dayname} : Displays the name of current day, based on entries in the lang.yml file.
- {tm_yearday} : Displays the number of the day in the year. (1 → 365)
- {tm_serverday} : Server-wide elapsed day counter that survives restarts.
- {tm_week} : Displays the number of elapsed weeks. (1 → ∞)
- {tm_yearweek} : Displays the number of the week in the year. (1 → 52)
- {tm_monthname} : Displays the name of current month, based on entries in the lang.yml file
- {tm_dd} : Displays the day part of the date in 2 digits.
- {tm_mm} : Displays the month part of the date in 2 digits.
- {tm_yy} : Displays the year part of the date in 2 digits.
- {tm_yyyy} : Displays the year part of the date in 4 digits.
- {tm_season} : Current season for the player's world — WINTER / SPRING / SUMMER / FALL (or "off" when the seasons engine is disabled).
- {tm_season_preset} : Active season preset — TEMPERATE / ARCTIC / CUSTOM / etc.
- {tm_season_dayofyear} : Day of the season-year, 0 to year-length minus 1.
- {tm_season_daylight} : Daylight share for this MC day formatted with a percent sign, e.g. `47%`
- {tm_season_hemisphere} : `north` or `south`.
Please note that these placeholders are case sensitive.
They can be used in lang and cmds YAML files, but also in signs, books, chat messages and commands.
Dependencies
TimeManager can display its placeholders through PlaceholderAPI. You just need to place the API in your plugin folder and set the related node to 'true' in the TimeManager config.yml file.
ADMIN COMMAND /tm
/tm animation [<world>] [on|off|toggle|instant] Admins and console can display a summary of the config.yml and lang.yml files.
/tm checkConfig Admins and console can display a summary of the config.yml and lang.yml files.
/tm checkSql Check the availability of the mySql server according to the values provided in the config.yml file. This only checks the ip address and the correct port opening.
/tm checkTime [all|server|world] Admins and console can display a debug/managing message, who displays the startup server's time, the current server's time and the current time, start time and speed for a specific world (or for all of them).
/tm checkUpdate [bukkit|spigot|github] Search if a newer version of the plugin exists on the chosen server. (MC 1.8.8+ only)
/tm gui Opens an admin GUI.
/tm help [cmd] [<subCmd>] Help provides you the correct usage and a short description of targeted command and subcommand.
/tm hud [on|off] Per-player toggle for the optional ActionBar HUD. Players use this to opt out (e.g. they prefer to keep the action bar clear for other plugins).
/tm lock <world> [time|here|realtime] & /tm unlock <world> Toggle a lock at runtime without editing config.
/tm now [msg|title|actionbar] [player|all|world] Send the '/now' (chat, title or action bar) message to a specific player, all players in a specific world, or all online players.
/tm nowitem [player] gives a custom CLOCK item that runs '/now' on right-click.
/tm placeholders List every placeholder the plugin exposes.
/tm reload [all|config|lang|cmds] This command allows you to reload datas from yaml files after manual modifications. All timers will be immediately resynchronized.
/tm resync [all|world] This command will re-synchronize a single or all worlds timers, based on the startup server's time, the elapsed time and the current speed modifier.
/tm season [status|enable|disable|preset<NAME>|year<days>|apply|list] Handles all the season functions.
/tm set date [today|yyyy-mm-dd] [all|world] Sets current date for the specified world (or all of them). Could be today or any yyyy-mm-dd date. The length of the months corresponds to reality, with the exception of February which always lasts 28 days. A year therefore always lasts 365 days.
/tm set debugMode [true|false] Set true to enable colored verbose messages in the console. Useful to understand some mechanisms of this plugin.
/tm set defLang [lg_LG] Choose the translation to use if player's locale doesn't exist in the lang.yml or when 'useMultiLang' is false.
/tm set duration [00d-00h-00m-00s] [all|world] Sets the speed of the world based on the desired duration rather than with a speed multiplier.
/tm set durationDay [00d-00h-00m-00s] [all|world] & /tm set durationNight [00d-00h-00m-00s] [all|world] The length of day and night can be defined separately.
/tm set elapsedDays [0 → ∞] [all|world] Sets current number of elapsed days for the specified world (or all of them). Could be an integer between 0 and infinity (or almost). Setting this to 0 will bring the world back to day one.
/tm set firstStartTime [default|previous|start] [all|world] Forces the time at which a world starts when starting the server. The value 'default' allows the usual resynchronization at startup. The value 'start' forces the world to start at the time specified in the world's 'start' node. The value 'previous' returns the time in the world before the server was shut down.
/tm set initialTick [ticks|HH:mm:ss] Modify the server's initial tick.
/tm set multiLang [true|false] Set true or false to use an automatic translation for the /now command.
/tm set playerOffset [-23999 → 23999] [all|player] Define a specific offset relative to the world time on player's client (the world speed will be still active). Set to '0' to cancel.
/tm set playerTime [ticks|daypart|HH:mm:ss|reset] [all|player] Define a specific time on player's client (the world speed will be still active). Use the 'reset' argument to cancel.
/tm set refreshRate [ticks] Set the delay (in ticks) before actualizing the speed stretch/expand effect. Must be an integer between 2 and 20. Default value is 10 ticks, please note that a too small value can cause server lags.
/tm set sleep [true|false|linked] [all|world] Define if players can sleep until the next day in the specified world (or in all of them). By default, all worlds will start with parameter true, unless their timer is in real time who will be necessary false. If you want to both allow sleep and keep the same time in multiple worlds, you can use the 'linked' function which allows a group of worlds to spend the night together.
/tm set speed [0.0 → 10.0] [all|world] The decimal number argument will multiply the world(s) speed. Use 0.0 to freeze time, numbers from 0.1 to 0.9 to slow time, 1.0 to get normal speed and numbers from 1.1 to 10.0 to speed up time. Set this value to 24.0 or realtime to make the world time match the real speed time.
/tm set speedDay [0.0 → 10.0] [all|world] & /tm set speedNight [0.0 → 10.0] [all|world] From 0.0 to 10.0, the values of daySpeed and nightSpeed can be different from each other.
/tm set start [ticks|daypart|HH:mm:ss|timeShift] [all|world] Define the time at server startup for the specified world (or all of them). By default, all worlds will start at tick #0. The timer(s) will be immediately resynchronized. If a world is using the real time speed, the start value will determine the UTC time shift and values like +1 or -1 will be accepted.
/tm set sync [true|false] [all|world] Define if the speed distortion method will increase/decrease the world's actual tick, or fit the theoretical tick value based on the server one. By default, all worlds will start with parameter false. Real time based worlds and frozen worlds do not use this option, on the other hand this will affect even the worlds with a normal speed.
/tm set time [ticks|daypart|HH:mm:ss] [all|world] Set current time for the specified world (or all of them). Consider using this instead of the vanilla /time command. The tab completion also provides handy presets like "day", "noon", "night", "midnight", etc.
/tm set update [none|bukkit|spigot|github] Define the source server for the update search. (MC 1.8.8+ only)
/tm set useCmds [true|false] Set true to enable a custom commands scheduler. See the cmds.yml file for details.
SHORT LIST OF COMMANDS AND ARGS
- For Players:
- /now <msg|title|actionbar> <world>
- /now <season suffix>
- For Admins:
- /tm animation [<world>] [on|off|toggle|instant]
- /tm checkConfig
- /tm checkSql
- /tm checkTime [all|world]
- /tm checkUpdate [bukkit|spigot|github]
- /tm gui
- /tm help [cmd] [<subCmd>]
- /tm hud [on|off]
- /tm lock <world> [time|here|realtime]
- /tm unlock <world>
- /tm now [msg|title|actionbar] [all|player|world]
- /tm nowitem [player]
- /tm placeholders
- /tm reload [all|config|lang|cmds]
- /tm resync [all|world]
- /tm season [status|enable|disable|preset|year|apply|list]
- /tm set date [today|yyyy-mm-dd] [all|world]
- /tm set debugMode [true|false]
- /tm set defLang [true|false]
- /tm set duration [00d-00h-00m-00s] [all|world]
- /tm set durationDay [00d-00h-00m-00s] [all|world]
- /tm set durationNight [00d-00h-00m-00s] [all|world]
- /tm set elapsedDays [0 → ∞] [all|world]
- /tm set firstStartTime [default|previous|start] [all|world]
- /tm set initialTick [ticks|HH:mm:ss]
- /tm set multiLang [lg_LG]
- /tm set playerOffset [-23999 → 23999] [all|player]
- /tm set playerTime [ticks|daypart|HH:mm:ss|reset] [all|player]
- /tm set refreshRate [ticks]
- /tm set sleep [true|false] [all|world]
- /tm set speed [multiplier] [all|world]
- /tm set speedDay [multiplier] [all|world]
- /tm set speedNight [multiplier] [all|world]
- /tm set start [ticks|daypart|HH:mm:ss] [all|world]
- /tm set sync [true|false] [all|world]
- /tm set time [ticks|daypart|HH:mm:ss] [all|world]
- /tm set update [none|bukkit|spigot|github]
- /tm set useCmds [true|false]
PERMISSIONS NODES
- timemanager.*
- timemanager.admin
- timemanager.hud.toggle
- timemanager.now.*
- timemanager.now.cmd
- timemanager.now.display
- timemanager.now.world
-
timemanager.now-item.use
- timemanager.placeholders
- timemanager.signs.create
- timemanager.sleep.*
- timemanager.sleep.allowed
- timemanager.sleep.counted
timemanager.admin: Provide or deny access to /tm subcommands with all arguments.
timemanager.hud.toggle: Toggle the personal ActionBar HUD via /tm hud.
timemanager.now: Provide or deny access to /now subcommands with or without arguments.
timemanager.now-item.use: Allow to right-clickwith the pocket-watch (/now item).
timemanager.placeholders: Defines whether a player is allowed to use the different placeholders in the chat.
timemanager.signs.create: Allow to create [tm] refreshing signs.
timemanager.placeholders: Allows the use of placeholders in chat.
timemanager.sleep.allowed: Specifies whether the player is allowed to enter a bed (but saving the spawn point is still possible).
timemanager.sleep.counted: Specifies whether the player is counted for the night skip.
YAML FILES
Full descriptions can be found in the respective file headers.
config.yml
This file mainly contains information concerning each world as well as general options such as the reference tick, SQL database usage, placeholder activation, etc.
lang.yml
This file contains the different translations. It is possible to modify them and add new languages. It is also possible to activate automatic translation depending on each player's locale.
cmds.yml
This file allows you to schedule the execution of commands at specific times and dates, with the possibility of repeating them according to the chosen cycle.
The reference time and date can be that of any world, or the actual time.
signs.yml
This file automatically saves the positions of the signs whose display is constantly refreshed.
ADMIN GUI SCREENSHOTS
TUTORIALS
COMPATIBILITY
- v1.12.x: MC 1.9.4 to 1.21.10
- v2.0.0: MC 1.21.11 to 26.1.2
API
Although the plugin is not intended to be an API, it is possible to use the different placeholders by importing the PlaceholdersHandler class in your Java code :
import net.vdcraft.arvdc.timemanager.mainclass.PlaceholdersHandler
Then use one of the following methods to transform one or more placeholders in any string :
String replaceAllPlaceholders(String msg, String world, String lang, Player p)
String replaceAllPlaceholders(String msg, String world, String lang)
String replaceAllPlaceholders(String msg, World w, String lang, Player p)
String replaceAllPlaceholders(String msg, World w, String lang)
It is possible to retrieve the client language by importing the following class :
import net.vdcraft.arvdc.timemanager.mainclass.PlayerLangHandler
Then use one of the following of the following methods :
String setLangToUse(CommandSender sender)
String setLangToUse(Player p)
TODO
Command: Add to '/tm checktime' an argument [all|world] to display the details for a single world.
Command: Create a '/tm checkconfig' command that can display the summary of the current config (All the rest except the worlds details).
Command: Create a '/tm set initialtick' command.
Command: Permit 'HH:mm:ss' format for '/ tm set start', '/ tm set time' and '/ tm set initialtick' first argument.
Command: Make an update message and associated commands.
Day & Night : Make a different speed multiplier for the day and the night.
Calendar: Create new placeholders to display a count of elapsed days and the date in yyyy-mm-dd format.
Scheduler: Create a scheduler allowing commands to be executed at specific times.
Sleep/Sync: Provide the ability to synchronize a world to a specified one, detecting the coming of a new day after someone has slept.
Tab completer: Try to improve the current hack that manages the spaces in worlds name. (Usefull until MC 1.12.2)
Command: Allow players to individually set their time.
Worlds: Include _nether_ and _the end_ in the world list or link them to their reference world.
Worlds: Add an per world option, for the behavior of timers when starting the server.
Placeholders: Allow the use of placeholders in books and signs.
cmds.yml file: Permit to use a 'pause' between commands lines.
Placeholder: Add a placeholder to show the number of the current day in the week.
Colors: Add hexadecimal colors recognition.
Placeholders: Permit players to use placeholders in chat messages.
Placeholders: Permit external commands to use placeholders.
Command: Add a '/tm set duration' command with a 00d-00h-00m-00s format.
Placeholders: Add new placeholders for the names of the seven days of the week.
Sleep: Add some features to manage sleep as the plugin doesn't work well with most sleep management plugins.
Command: Allow players to display the list of placeholders.
Placeholders: Create signs where the placeholders constantly refresh.
Player Item: Create a custom item (and associated permissions and options) to use the '/now' command.
Sleep: Improve particles displayed during sleep animation.
Backward compatibility: Make a 2.0 version with no backward compatibility, because of the new gamerule 'ADVANCE_TIME' that replace 'DAYLIGHT_CYCLE'.
Day & Night : Create a realistic seasons system that automatically adjusts the length of day and night.
GUI : Create a GUI explaining the plugin's features.
Please open an issue on GitHub if you want a specific improvement or encounter any bugs.
评论 0
登录后参与评分
还没有评论,来抢沙发吧