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.username
as a raw JSON text component- Players who have not logged on since v2.1.0 will have their marker's
data.username
set 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:config
get_username
: Gets the username of the player whose ID matches the trigger value (i.e./trigger get_username set 3
will 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_changed
was running every tick after uninstalling if the pack failed to disable
Server Utilities v2.0.4
- Fixed an issue where excess spawn-tracking markers were being summoned in Minecraft 1.19.4 due to MC-261024. This fix will also remove any excess spawn-trackers that currently exist in your world.
- Fixed an issue where players joining from older versions (Player ID 1.x.x) were being reassigned IDs.
Notes
Function tag #server_utils:spawn_loaded
still does not function properly in Minecraft 1.19.4 in this version of Server Utilities.
Uploaded for archival purposes.
Server Utilities v2.0.2
New features
- World spawn tracker
- Tag entities with
spawnlocked
to ensure they stay at world spawn - Functions with the tag
#server_utils:spawn_changed
will run when spawn changes
- Tag entities with
- Function tag
#server_utils:spawn_loaded
runs when spawn is loaded, this has two implementations depending on version:- 1.18-1.19.3: The data pack waits one second after it has loaded
- 1.20+: The data pack checks when spawn is loaded using
execute if loaded
- Config menu. Run
function server_utils:config
to turn on/off some optional features - Loops
- 1 second, 10 second and 1 minute loops available, which run functions in
#server_utils:1_sec_loop
,#server_utils:10_sec_loop
and#server_utils:1_min_loop
, respectively. - Can be forcefully enabled by data packs that require them
- 1 second, 10 second and 1 minute loops available, which run functions in
- Registration level system
- Registration system now has levels, which can be increased in the config menu
- When a player's registration level is below current, the function tag
#server_utils:register_player
will run. Then, their registration level will be updated.
- Player-tracking markers
- A marker is spawned for each player that joins the server
- Allows for player ID and registration level to be transferred if a player changes their username.
- Functions with the tag
#server_utils:player_changed_name
are run if this occurs
- Functions with the tag
- Inventory clearing and restoration system
- Run
function server_utils:clear_inventory
as a player to temporarily clear their inventory - Run
function server_utils:restore_inventory
to restore it
- Run
- Functions with the tag
#server_utils:load
will load after Server Utilities - Running
function server_utils:uninstall
will uninstall Server Utilities
Changes
- Namespace changed to
server_utils
(fromplayer_id
)- Tags
#player_id:player_join
,#player_id:player_leave
are now#server_utils:player_leave
and#server_utils:player_join
- Tags
- Player ID system now uses scoreholder called
#counter
instead ofcounter
to store the next ID - Player joining can now handle multiple players joining in the same tick
#server_utils:player_leave
will now run for every player that leaves in the tick as their corresponding marker.- Tag
#player_id:new_player
has been removed and is replaced by#server_utils:register_player
pack_format
updated to 10, for Minecraft 1.19-1.19.3 (should still work for all versions 1.18-1.20.1 except 1.19.4).
Note for older versions
When running in versions prior to Minecraft 1.19.4, the server's console will complain that the file server_utils:check_spawn_loaded
could not be loaded. This is perfectly fine as this file uses commands introduced in 1.19.4 and the data pack is designed to still function properly without it.
Uploaded for archival purposes.