Wie mache ich auf einem Minecraft server das Spieler auf dem server nach ner bestimmten zeit als afk angezeigt werden?
Ich würde das gerne ohne plugins machen da es auch mit commands gehen sollte und ich sonst keine plugins brauche aber ich weis nicht wie, hat jemand vielleicht ein YouTube video oder so etwas? das ganze soll auf der Java Version gehen.
1 Antwort
Du Erstellst einmal ein scoreboard: /scoreboard objectives add Walk minecraft.walk_one_cm
Und ein anderes scoreboard: /scoreboard objectives add AfkTime dummy
Ein repeating commandblock: /scoreboard players add @a AfkTime 1
Und ein anderer repeating commandblock: /execute as @a if entity @s[scores={Walk=1}] run scoreboard players reset @s AfkTime
Und noch ein anderer repeating commandblock: /execute as @a if entity @s[scores={Walk=1}] run scoreboard players reset @a Walk
Noch Ein repeating commandblock: /execute as @a if entity @s[scores={AfkTime=12000}] run " "
Bei " " fügst du jetzt ein was auch immer passieren soll wenn man 10 Minuten afk war, (z.b. tp)
Das ist jetzt, dass man nach 10 Minuten (gekickt) wird, wenn du länger/kürzer willst dann rechne das entweder selber aus (1Sek=20Ticks) oder rechne es auf dieser Seite aus.
Falls etwas nicht klappt sag bescheid.
Viel Spass :D