We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45fad38 commit 02aae14Copy full SHA for 02aae14
functions.php
@@ -6,7 +6,11 @@ function minecraftcache($username) {
6
$data = json_decode(file_get_contents("https://api.mojang.com/users/profiles/minecraft/$username"));
7
$uuid = $data->id;
8
$data = '$mcuuid[\''.$username.'\'] = "'. $uuid .'";';
9
- file_put_contents("query/cron/cache/minecraft.php", $data . "\n", FILE_APPEND);
+ if (!file_exists("query/cron/cache/minecraft.php")) {
10
+ file_put_contents("query/cron/cache/minecraft.php", "<?php\n".$data."\n", FILE_APPEND);
11
+ } else {
12
+ file_put_contents("query/cron/cache/minecraft.php", $data . "\n", FILE_APPEND);
13
+ }
14
return $uuid;
15
} else {
16
return $mcuuid[$username];
0 commit comments