
用于时间管理与显示 Bukkit 插件
时间管理功能
为每个世界定义起始时间和速度倍率。根据你的服务器性能设置合适的刷新频率。
速度可以提高或降低最多 10 倍,或者将 UTC 时间与本地时间进行偏移匹配。
白天和黑夜可以设置为不同的速度值,这非常适合 RPG 或某些小游戏。
世界列表会在每次服务器启动和重载时更新,计时器也会同步。
可以通过游戏内命令修改时间和速度,或在手动更改后通过重载生效。
睡眠可以被允许、禁止或与某些其他世界关联。
可以为每个玩家定义特定的时间偏移量。
TimeManager 可以调度在 cmds.yml 文件中指定时间运行的命令。调度的命令可以使用下方描述的占位符({tm_player} 除外)。
本插件会覆盖原版的 '/time' 命令。用于更改单个世界计时器的命令是 '/tm set time [ticks|daypart|HH:mm:ss] [world]'。
玩家命令 /now <display> <world>
使用单一命令即可显示包含时间、日期、经过的天数或周数,或其他许多占位符的自定义消息。
/now 消息支持多语言,并且可以根据 lang.yml 文件中提供的任何玩家的区域设置自动调整。
利用权限,你可以允许玩家选择显示参数和/或世界参数,也可以都不允许。
显示参数可以是:'msg'、'title' 或 'actionbar'。
下界(Nether)和末地(The End)世界可以拥有特定的消息。
YAML 文件中使用十六进制颜色代码。
占位符
可用的占位符如下:
- {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_weekday} : 显示一年中的星期几。(1 → 7)
- {tm_yearweek} : 显示一年中的第几周。(1 → 52)
- {tm_week} : 显示经过的周数。(1 → ∞)
- {tm_monthname} : 基于 lang.yml 文件中的条目显示当前月份名称。
- {tm_dd} : 以两位数字显示日期的日部分。
- {tm_mm} : 以两位数字显示日期的月部分。
- {tm_yy} : 以两位数字显示日期的年部分。
- {tm_yyyy} : 以四位数字显示日期的年部分。
请注意,这些占位符区分大小写。
它们可以在 lang 和 cmds YAML 文件中使用,也可以用于告示牌、书籍、聊天消息和命令中。
依赖项
TimeManager 可以通过 PlaceholderAPI 和 MVdWPlaceholderAPI 显示其占位符。你只需将 API 放入你的插件文件夹,并在 TimeManager config.yml 文件中将相关节点设置为 'true'。
管理员命令 /tm
/tm checkConfig 管理员和控制台可以显示 config.yml 和 lang.yml 文件的摘要。
/tm checkSql 根据 config.yml 文件中提供的值检查 MySQL 服务器的可用性。这仅检查 IP 地址和端口是否正确打开。
/tm checkTime [all|server|world] 管理员和控制台可以显示调试/管理消息,其中显示服务器启动时的时间、当前服务器时间以及特定世界(或所有世界)的当前时间、起始时间和速度。
/tm checkUpdate [bukkit|curse|spigot|github] 搜索所选服务器上是否存在该插件的新版本。(仅限 MC 1.8.8+)
/tm help [cmd] [<subCmd>] 帮助提供目标命令和子命令的正确用法及简短描述。
/tm now [msg|title|actionbar] [player|all|world] 向特定玩家、特定世界中的所有玩家或所有在线玩家发送 '/now'(聊天、标题或动作栏)消息。
/tm reload [all|config|lang|cmds] 此命令允许你在手动修改后从 YAML 文件重新加载数据。所有计时器将立即重新同步。
/tm resync [all|world] 此命令将根据服务器启动时间、经过的时间和当前速度倍率,重新同步单个或所有世界的计时器。
/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 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' 刻,请注意过小的值可能会导致服务器卡顿。
/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',daySpeed 和 nightSpeed 的值可以互不相同。
/tm set start [ticks|daypart|HH:mm:ss|timeShift] [all|world] 定义指定世界(或所有世界)在服务器启动时的时间。默认情况下,所有世界都将从刻 #0 开始。计时器将立即重新同步。
如果世界使用实时速度,start 值将确定 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|curse|spigot|github] 定义更新搜索的源服务器。(仅限 MC 1.8.8+)
/tm set useCmds [true|false] §r设置为 true 以启用自定义命令调度器。有关详细信息,请参阅 cmds.yml 文件。
命令和参数简要列表
- 对于玩家:
/now <msg|title|actionbar> <world>
- 对于管理员:
/tm checkConfig
/tm checkSql
/tm checkTime [all|world]
/tm checkUpdate [bukkit|spigot|github]
/tm help [cmd] [<subCmd>]
/tm now [msg|title|actionbar] [all|player|world]
/tm reload [all|config|lang|cmds]
/tm resync [all|world]
/tm set date [today|yyyy-mm-dd] [all|world]
/tm set debugMode [true|false]
/tm set defLang [true|false]
/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.now.*
- timemanager.now.cmd
- timemanager.now.display
- timemanager.now.world
timemanager.admin: 提供或拒绝访问带有所有参数的 /tm 子命令。
timemanager.now: 提供或拒绝访问带有或不带参数的 /now 子命令。
教程
兼容性
v1.8.2: MC 1.8.8 至 1.20.4
待办事项
命令:为 /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'(暂停)。
占位符:添加一个占位符,用于显示当前是星期几。
颜色:添加十六进制颜色识别功能。
占位符:允许玩家在聊天消息中使用占位符。
占位符:允许外部命令使用占位符。
- 命令:允许玩家显示占位符列表。
- 占位符:添加七个星期名称的新占位符。
- 占位符:创建占位符持续刷新的告示牌。
- 玩家物品:创建自定义物品(以及相关权限和选项),用于使用
/now 命令。

Bukkit plugin for time management and display
TIME MANAGING 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 10 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.
Time and speed can be modified with in-game commands or reloading after manually changes.
Sleep can be authorized, forbidden or linked with some other worlds.
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]'.
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.
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_weekday} : Displays the number of the day in the year. (1 → 7)
- {tm_yearweek} : Displays the number of the week in the year. (1 → 52)
- {tm_week} : Displays the number of elapsed weeks. (1 → ∞)
- {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.
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.
DEPEDENCIES
TimeManager can display its placeholders through PlaceholderAPI and MVdWPlaceholderAPI. 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 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|curse|spigot|github] Search if a newer version of the plugin exists on the chosen server. (MC 1.8.8+ only)
/tm help [cmd] [<subCmd>] Help provides you the correct usage and a short description of targeted command and subcommand.
/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 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 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 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|curse|spigot|github] Define the source server for the update search. (MC 1.8.8+ only)
/tm set useCmds [true|false] §rSet 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>
- For Admins:
- /tm checkConfig
- /tm checkSql
- /tm checkTime [all|world]
- /tm checkUpdate [bukkit|spigot|github]
- /tm help [cmd] [<subCmd>]
- /tm now [msg|title|actionbar] [all|player|world]
- /tm reload [all|config|lang|cmds]
- /tm resync [all|world]
- /tm set date [today|yyyy-mm-dd] [all|world]
- /tm set debugMode [true|false]
- /tm set defLang [true|false]
- /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.now.*
- timemanager.now.cmd
- timemanager.now.display
- timemanager.now.world
timemanager.admin: provide or deny access to /tm subcommands with all arguments.
timemanager.now: provide or deny access to /now subcommands with or without arguments.
TUTORIALS
COMPATIBILITY
v1.8.2: MC 1.8.8 to 1.20.4
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.
Placeholder: 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 current number of the day in the week.
Colors: Add hexadecimal color recognition.
Placeholder: Permit players to use placeholders in chat messages.
Placeholder: Permit external commands to use placeholders.
- Command: Allow players to display the list of placeholders.
- Placeholder: Add new placeholders for the names of the seven days of the week.
- Placeholder: Create signs where the placeholders constantly refresh.
- Player Item: Create a custom item (and associated permissions and options) to use the '/now' command.
评论 0
登录后参与评分
还没有评论,来抢沙发吧