
Server Utilities
Features a number of utilities for data pack creators including a player ID system, function tags for detecting server events, inventory clearing and restoring system, systems for maintaining player data across username changes, and more!
- Загрузки
- 1K
- Подписчики
- 12
- Обновлён
- 1 июля 2025 г.
- Лицензия
- GPL-3.0-only
Опубликован 17 июля 2023 г.
Server Utilities
Server Utilities (or Server Utils for short) is a Minecraft data pack with a number of utilities for data pack creators. It tracks a number of events regarding players on a server including players joining for the first time, players joining the server and players leaving the server.
The most recent version of the pack is made for Minecraft 1.18-1.21.8.
Documentation
The Wiki contains all the necessary documentation on how to utilise the features of Server Utilities.
Feature Overview
- Each player is given a numeric scoreboard ID
- Each player is assigned a marker entity for storing data across username changes
- Detects when a player joins the server
- Detects when a player leaves the server
- Tracks the world's spawn point
- Inventory clearing and restoring system
- Function macros for updating text components to newer versions
Optional features (configurable):
- Command loops for 1 second, 10 seconds and 1 minute
- Player registration system when a new player joins the server
- Triggers to display players' usernames and IDs
Player registration level and player ID are also carried over when a player changes their username.
Ченджлог
2.2.2Релиз1.21.6, 1.21.7, 1.21.8 · 1 июля 2025 г.
Updated to pack format 81 for Minecraft 1.21.7.
2.2.1Релиз1.21.4, 1.21.5, 1.21.6 · 18 июня 2025 г.
Changes
Updated pack format to 80 for Minecraft 1.21.6.
Notes
Because click event commands with elevated permissions now require the player to go through a confirmation screen, the configuration menu has become significantly more cumbersome to use. A fix will be implemented soon, sorry for the inconvenience.
2.2.0Релиз1.21.3, 1.21.4, 1.21.5 · 19 мая 2025 г.
Changes
- Now compatible with 1.21.5.
- Moved all internal functions to an
internalfolder, so that player-accessible functions can be more easily accessed. - Added text fixing macros to update text components stored in NBT.
Text-fixing macros
Minecraft's text component format received a considerable update in 1.21.5. Minecraft's "Data Fixer-Upper" is generally useful for updating NBT fields that the game knows to interpret as text components. But if you have stored JSON text components in custom NBT locations, these will not be updated automatically.
Therefore, I have developed function macros (available only on 1.21.5+) to fix older stored text.
server_utils:fix_text/block
Updates JSON text components in block NBT. It runs at the current block location (~ ~ ~).
Usage: function server_utils:fix_text/block {path:"foo.bar"}
Where foo.bar is the NBT path.
server_utils:fix_text/entity
Updates JSON text components in entity NBT. It runs as the current entity (@s).
Usage: function server_utils:fix_text/entity {path:"foo.bar"}
Where foo.bar is the NBT path.
server_utils:fix_text/storage
Updates JSON text components in storage NBT.
Usage: function server_utils:fix_text/storage {path:"foo.bar",storage:"namespaced:id"}
Where foo.bar is the NBT path and namespaced:id is the ID of a command storage.
Issues
While there was an attempt, I ultimately decided not to properly support snapshot 25w02a. This should not affect most players.
2.1.4Релиз1.21.2, 1.21.3, 1.21.4 · 10 декабря 2024 г.
Updated pack format to 61 for Minecraft 1.21.4.
2.1.3Релиз1.21.1, 1.21.2, 1.21.3 · 26 октября 2024 г.
Updated pack format to 57 for 1.21.2/3.
2.1.2Релиз1.20.6, 1.21, 1.21.1 · 14 июня 2024 г.
- Updated to Minecraft 1.21
- Re-added support for 1.18-1.20.4
If you are already running the pack and do not need to update to 1.21, you do not need to install this version as it is functionally identical to v2.1.0 and v2.1.1.
2.1.1Релиз1.20.5, 1.20.6 · 24 апреля 2024 г.
Updated to Minecraft 1.20.5. Note: This version ONLY works on 1.20.5 and 1.20.6. For 1.18.1-1.20.4, use v2.1.0.
2.1.0Релиз1.20.2, 1.20.3, 1.20.4 · 18 июля 2023 г.
Changes from unstable v2.0.x releases
- Fixed an issue where function
server_utils:spawn_loaded(which runs tag#server_utils:spawn_loaded) was still not running correctly in Minecraft 1.19.4. Now, running the pack in 1.19.4 will wait one second before runningserver_utils:spawn_loaded(as older versions do). - Improved ticking performance by running all the new player mechanisms within the player joining mechanism (i.e. they now only run when a player actually joins the server instead of running constantly).
- Removes the now unused
player_count(from v1.2.x) andspawn_marker_count(from v2.0.3 and v2.0.4) scoreboard objectives upon loading. - Fixed an issue where forcing off player registration did not work.
Changes from v2.1.0
New features
- Player usernames are stored in player-tracking markers under the data tag
data.usernameas a raw JSON text component- Players who have not logged on since v2.1.0 will have their marker's
data.usernameset to'"Unknown"'
- Players who have not logged on since v2.1.0 will have their marker's
- Triggers which can be turned on or off by running the function
server_utils:configget_username: Gets the username of the player whose ID matches the trigger value (i.e./trigger get_username set 3will get the username of the player with ID 3)list_ids: List the IDs and usernames of all online playerslist_all_ids: Lists a page of ten IDs and the usernames of those players, even if they are offline. Pages can be navigated using the chat message or by setting the trigger value to the page number.
Fixes
- Fixed an issue where new players since v2.0.5 were getting their IDs set to zero
- Fixed an issue where function tag
#server_utils:spawn_changedwas running every tick after uninstalling if the pack failed to disable
Комментарии
Загружаем…