Server Read Playerfile?!

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
noliVe
Filter Inserter
Filter Inserter
Posts: 327
Joined: Tue May 24, 2016 7:46 am
Contact:

Server Read Playerfile?!

Post by noliVe »

how is it possible to archive a playerlist
consolecommand
/players

give out a nice list of players
how about "lastlogin" would be very interesting

and how can you have a log from it ? cannot find anything on the forum or guides

NoPantsMcDance
Filter Inserter
Filter Inserter
Posts: 478
Joined: Fri Jul 17, 2015 6:56 pm
Contact:

Re: Server Read Playerfile?!

Post by NoPantsMcDance »

Use rcon https://bukkit.org/threads/admin-rcon-m ... ers.70910/

then simply use a script to get the players and do w/e you want with it. If you wanted to know last login you'd have to put data into a file or database then add the times to it.

Code: Select all

#!/bin/bash
while true; do
	#Get online players and send them to the online.players file
	./mcrcon -p <password> -P 4444 -H sugaming.us /players | grep "(online)" | cut -d " " -f3 > /var/www/vanilla.online
sleep 60
done
Not the best solution because it doesn't keep an active connection to rcon, instead it slopily just reconnects and sends /players command once a min. Much better ways to do it but it works.
Looking for a multiplayer server? Check out my servers Vanilla Server

Post Reply

Return to “Technical Help”