duration - Ventana de tiempo en minutos (opcional, por defecto: 180)
Respuesta:
La API devuelve un objeto JSON:
voted - El jugador ha votado dentro de la duración especificada
nickname - Apodo del jugador si se proporcionó durante el voto
voted_at - Marca de tiempo del voto
PHP Example (3 hours verification):
<?php
$vote_verif = file_get_contents('https://hytale-servers.best/api/vote-verification?server_id=YOUR_SERVER_ID&ip=127.0.0.1&duration=180');
if($vote_verif == 1) {
echo "Player has voted in the last 3 hours";
} else if($vote_verif == 0) {
echo "Player has not voted in the last 3 hours";
}
?>
Contador de jugadores con Query Mod
Para mostrar el número de jugadores en línea en la lista de servidores, debes instalar el Query Mod de Hytale.
Este mod permite a nuestro sitio recuperar el número de jugadores conectados a tu servidor en tiempo real mediante el protocolo HYQUERY.