Minecraft Data Packs / Server Utility

log-in/out detection

  • check_circle Advancements
  • check_circle Functions
  • check_circle Loot Tables
  • check_circle Predicates
  • 251 views, 5 today
  • 12 downloads, 0 today
  • 2
  • 0
  • 5
Leinad677YT's Avatar Leinad677YT
Level 1 : New Explorer
0
ENG:
Datapack tool made to detect when a player enters/leaves the word.

Works both in singleplayer and multiplayer.

Also has a pin system which can be enabled by removing 3 commented lines specified in the .txt file.


ESP:


Herramienta para detectar cuando un jugador entra o sale del mundo.

Funciona tanto en singleplayer como en multiplayer.

Incluye sistema de pin como contraseña que puede habilitarse eliminando el comentario en 3 comandos especificados en el archivo .txt.



IMPORTANT:

This datapack was created to be used inside another project which was bigger. Because of that there could be initial bugs caused by extracting it by bruteforce.

Este datapack fue creado para utilizarse en otro proyecto más grande, por lo que pueden existir bugs inicialmente debido a que he tenido que extraerlo del original.

This datapack doesn't have the texts made with translation keys and IT WON'T HAVE THEM. I simply cannot take the time to modify it because it's main functionality is the leaving detection. I'm sorry for the majority of you that don't speak spanish, but it would take a lot of time and I need to focus on the original project.
CreditThe MinecraftCommandsDiscord for their help related to bugfixing
CompatibilityMinecraft 1.21 pre-release
Tags

Create an account or sign in to comment.

HumanBean0123
05/21/2024 2:56 am
Level 1 : New Miner
HumanBean0123's Avatar
How do you see the log in/out info?
1
Leinad677YT
05/21/2024 1:38 pm
Level 1 : New Explorer
Leinad677YT's Avatar
The datapack does commands when a player leaves and when a player enters, using their nickname, you don't get the info directly. When a player enters it starts by executing the function

login:player_enters

as the player who just entered. When a player leaves, it detects the playercount changing and then it goes through a "algorythm" that checks the list of players that were online at that moment, if it doesn't detect a player online, it then executes another function with the nickname of the player that left:

login:store_data

I thought this would be harder to explain, but that's basically it.

If your doubt was about the pin stored into a player, you can see each individual digit via scoreboards ("pin_n_stored")
1
HumanBean0123
05/26/2024 6:58 am
Level 1 : New Miner
HumanBean0123's Avatar
How do I look at the info saved by login:store_data?
1
Leinad677YT
05/26/2024 5:08 pm
Level 1 : New Explorer
Leinad677YT's Avatar
by default it doesn't store anything, the name comes from it's original purpose which was storing overworld coords
in the database (data storage leinad:playerdata)

you can check every specific playerdata by specifying the path players[{name:$(name)}] inside every command that you include in that function

in case you still don't understand, my discord is @leinad677yt
if you want DM me
1
Leinad677YT
05/20/2024 8:50 am
Level 1 : New Explorer
Leinad677YT's Avatar
To understand correctly how to implement the commands/functions after a player leaves you'll need to search inside the "login" namespace, there is a lot of simultaneous functions that makes it very difficult to explain without just modifying all of it.
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome