2016-07-21 22:01:57 +08:00
|
|
|
<?php
|
|
|
|
|
2016-08-28 10:05:21 +08:00
|
|
|
namespace App\Http\Controllers;
|
2016-07-21 22:01:57 +08:00
|
|
|
|
2016-08-29 14:25:24 +08:00
|
|
|
use Event;
|
2016-09-04 15:35:12 +08:00
|
|
|
use Option;
|
|
|
|
use Storage;
|
|
|
|
use Response;
|
|
|
|
use Minecraft;
|
2016-10-30 11:57:26 +08:00
|
|
|
use Carbon\Carbon;
|
2016-09-04 15:35:12 +08:00
|
|
|
use App\Models\User;
|
|
|
|
use App\Models\Player;
|
|
|
|
use App\Models\Texture;
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
use App\Events\GetSkinPreview;
|
|
|
|
use App\Events\GetAvatarPreview;
|
|
|
|
use App\Exceptions\PrettyPageException;
|
2016-10-23 11:41:52 +08:00
|
|
|
use App\Services\Repositories\UserRepository;
|
2016-07-21 22:01:57 +08:00
|
|
|
|
2016-09-04 15:35:12 +08:00
|
|
|
class TextureController extends Controller
|
2016-07-21 22:01:57 +08:00
|
|
|
{
|
2016-09-04 15:35:12 +08:00
|
|
|
/**
|
|
|
|
* Return Player Profile formatted in JSON.
|
|
|
|
*
|
|
|
|
* @param string $player_name
|
|
|
|
* @param string $api
|
|
|
|
* @return \Illuminate\Http\Response
|
|
|
|
*/
|
2016-07-21 22:01:57 +08:00
|
|
|
public function json($player_name, $api = "")
|
|
|
|
{
|
2016-10-16 18:16:15 +08:00
|
|
|
$player = $this->getPlayerInstance($player_name);
|
2016-07-28 16:25:20 +08:00
|
|
|
|
2016-08-13 22:14:01 +08:00
|
|
|
if ($api == "csl") {
|
2016-10-30 11:57:26 +08:00
|
|
|
$content = $player->getJsonProfile(Player::CSL_API);
|
2016-08-13 22:14:01 +08:00
|
|
|
} else if ($api == "usm") {
|
2016-10-30 11:57:26 +08:00
|
|
|
$content = $player->getJsonProfile(Player::USM_API);
|
2016-08-13 22:14:01 +08:00
|
|
|
} else {
|
2016-10-30 11:57:26 +08:00
|
|
|
$content = $player->getJsonProfile(Option::get('api_type'));
|
2016-07-21 22:01:57 +08:00
|
|
|
}
|
2016-10-30 11:57:26 +08:00
|
|
|
|
|
|
|
return Response::rawJson($content, 200, [
|
2017-08-07 13:38:46 +08:00
|
|
|
'Last-Modified' => Carbon::createFromTimestamp(
|
|
|
|
$player->getLastModified()
|
|
|
|
)->format('D, d M Y H:i:s \G\M\T')
|
2016-10-30 11:57:26 +08:00
|
|
|
]);
|
2016-07-21 22:01:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public function jsonWithApi($api, $player_name)
|
|
|
|
{
|
2016-08-29 15:28:20 +08:00
|
|
|
return $this->json($player_name, $api);
|
2016-07-21 22:01:57 +08:00
|
|
|
}
|
|
|
|
|
2016-08-28 20:33:35 +08:00
|
|
|
public function texture($hash) {
|
|
|
|
if (Storage::disk('textures')->has($hash)) {
|
2016-09-25 11:40:50 +08:00
|
|
|
return Response::png(Storage::disk('textures')->get($hash), 200, [
|
|
|
|
'Last-Modified' => Storage::disk('textures')->lastModified($hash),
|
|
|
|
'Accept-Ranges' => 'bytes',
|
|
|
|
'Content-Length' => Storage::disk('textures')->size($hash),
|
|
|
|
]);
|
2016-08-28 20:33:35 +08:00
|
|
|
} else {
|
2017-11-17 07:40:29 +08:00
|
|
|
return abort(404);
|
2016-08-28 20:33:35 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public function textureWithApi($api, $hash) {
|
|
|
|
return $this->texture($hash);
|
|
|
|
}
|
|
|
|
|
2016-08-13 22:14:01 +08:00
|
|
|
public function skin($player_name, $model = "")
|
|
|
|
{
|
2016-10-16 18:16:15 +08:00
|
|
|
$player = $this->getPlayerInstance($player_name);
|
2016-07-28 16:25:20 +08:00
|
|
|
|
2016-09-25 11:40:50 +08:00
|
|
|
$model_preference = ($player->getPreference() == "default") ? "steve" : "alex";
|
|
|
|
$model = ($model == "") ? $model_preference : $model;
|
2016-09-04 15:35:12 +08:00
|
|
|
|
2016-09-25 11:40:50 +08:00
|
|
|
return $player->getBinaryTexture($model);
|
2016-08-13 22:14:01 +08:00
|
|
|
}
|
2016-07-21 22:01:57 +08:00
|
|
|
|
2016-09-04 15:35:12 +08:00
|
|
|
public function skinWithModel($model, $player_name)
|
2016-08-13 22:14:01 +08:00
|
|
|
{
|
2016-09-04 15:35:12 +08:00
|
|
|
return $this->skin($player_name, $model);
|
|
|
|
}
|
2016-08-07 17:09:34 +08:00
|
|
|
|
2016-09-04 15:35:12 +08:00
|
|
|
public function cape($player_name)
|
|
|
|
{
|
2016-10-16 18:16:15 +08:00
|
|
|
$player = $this->getPlayerInstance($player_name);
|
2016-07-28 16:25:20 +08:00
|
|
|
|
2016-09-25 11:40:50 +08:00
|
|
|
return $player->getBinaryTexture('cape');
|
2016-08-13 22:14:01 +08:00
|
|
|
}
|
2016-07-21 22:01:57 +08:00
|
|
|
|
2017-11-17 07:40:29 +08:00
|
|
|
public function avatar($base64_email, UserRepository $users, $size = 128)
|
2016-08-13 22:14:01 +08:00
|
|
|
{
|
2016-10-23 11:41:52 +08:00
|
|
|
$user = $users->get(base64_decode($base64_email), 'email');
|
2016-08-29 14:25:24 +08:00
|
|
|
|
2016-10-23 11:41:52 +08:00
|
|
|
if ($user) {
|
2016-08-29 14:25:24 +08:00
|
|
|
$tid = $user->getAvatarId();
|
|
|
|
|
|
|
|
if ($t = Texture::find($tid)) {
|
|
|
|
if (Storage::disk('textures')->has($t->hash)) {
|
2017-11-17 07:40:29 +08:00
|
|
|
$responses = event(new GetAvatarPreview($t, $size));
|
2016-08-30 10:10:11 +08:00
|
|
|
|
|
|
|
if (isset($responses[0]) && $responses[0] instanceof \Symfony\Component\HttpFoundation\Response) {
|
2017-11-17 07:40:29 +08:00
|
|
|
return $responses[0]; // @codeCoverageIgnore
|
2016-08-30 10:10:11 +08:00
|
|
|
} else {
|
2017-11-17 07:40:29 +08:00
|
|
|
$filename = config('filesystems.disks.textures.root').'/'.$t->hash;
|
2016-08-29 14:25:24 +08:00
|
|
|
|
2016-09-04 15:35:12 +08:00
|
|
|
$png = Minecraft::generateAvatarFromSkin($filename, $size);
|
2017-11-17 07:40:29 +08:00
|
|
|
ob_start();
|
2016-08-30 10:10:11 +08:00
|
|
|
imagepng($png);
|
|
|
|
imagedestroy($png);
|
2017-11-17 07:40:29 +08:00
|
|
|
$image = ob_get_contents();
|
|
|
|
ob_end_clean();
|
2016-08-30 10:10:11 +08:00
|
|
|
|
2017-11-17 07:40:29 +08:00
|
|
|
return Response::png($image);
|
2016-08-30 10:10:11 +08:00
|
|
|
}
|
2016-08-29 14:25:24 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-07 13:38:46 +08:00
|
|
|
$png = imagecreatefromstring(base64_decode(static::getDefaultAvatar()));
|
2017-11-17 07:40:29 +08:00
|
|
|
ob_start();
|
2016-08-29 14:25:24 +08:00
|
|
|
imagepng($png);
|
|
|
|
imagedestroy($png);
|
2017-11-17 07:40:29 +08:00
|
|
|
$image = ob_get_contents();
|
|
|
|
ob_end_clean();
|
2016-08-29 14:25:24 +08:00
|
|
|
|
2017-11-17 07:40:29 +08:00
|
|
|
return Response::png($image);
|
2016-08-13 22:14:01 +08:00
|
|
|
}
|
2016-07-21 22:01:57 +08:00
|
|
|
|
2016-10-23 11:41:52 +08:00
|
|
|
public function avatarWithSize($size, $base64_email, UserRepository $users)
|
2016-07-21 22:01:57 +08:00
|
|
|
{
|
2017-11-17 07:40:29 +08:00
|
|
|
return $this->avatar($base64_email, $users, $size);
|
2016-07-21 22:01:57 +08:00
|
|
|
}
|
|
|
|
|
2016-08-13 22:14:01 +08:00
|
|
|
public function preview($tid, $size = 250)
|
|
|
|
{
|
|
|
|
// output image directly
|
2016-08-29 14:25:24 +08:00
|
|
|
if ($t = Texture::find($tid)) {
|
|
|
|
if (Storage::disk('textures')->has($t->hash)) {
|
2017-11-17 07:40:29 +08:00
|
|
|
$responses = event(new GetSkinPreview($t, $size));
|
2016-08-30 10:10:11 +08:00
|
|
|
|
|
|
|
if (isset($responses[0]) && $responses[0] instanceof \Symfony\Component\HttpFoundation\Response) {
|
2017-11-17 07:40:29 +08:00
|
|
|
return $responses[0]; // @codeCoverageIgnore
|
2016-08-30 10:10:11 +08:00
|
|
|
} else {
|
2017-11-17 07:40:29 +08:00
|
|
|
$filename = config('filesystems.disks.textures.root').'/'.$t->hash;
|
2016-08-30 10:10:11 +08:00
|
|
|
|
|
|
|
if ($t->type == "cape") {
|
2016-09-04 15:35:12 +08:00
|
|
|
$png = Minecraft::generatePreviewFromCape($filename, $size);
|
2017-11-17 07:40:29 +08:00
|
|
|
ob_start();
|
2016-08-30 10:10:11 +08:00
|
|
|
imagepng($png);
|
|
|
|
imagedestroy($png);
|
2017-11-17 07:40:29 +08:00
|
|
|
$image = ob_get_contents();
|
|
|
|
ob_end_clean();
|
2016-08-30 10:10:11 +08:00
|
|
|
} else {
|
2018-01-04 10:00:15 +08:00
|
|
|
$png = Minecraft::generatePreviewFromSkin($filename, $size, false, false, 4, $t->type == 'alex');
|
2017-11-17 07:40:29 +08:00
|
|
|
ob_start();
|
2016-08-30 10:10:11 +08:00
|
|
|
imagepng($png);
|
|
|
|
imagedestroy($png);
|
2017-11-17 07:40:29 +08:00
|
|
|
$image = ob_get_contents();
|
|
|
|
ob_end_clean();
|
2016-08-30 10:10:11 +08:00
|
|
|
}
|
|
|
|
|
2017-11-17 07:40:29 +08:00
|
|
|
return Response::png($image);
|
2016-08-30 10:10:11 +08:00
|
|
|
}
|
2016-07-21 22:01:57 +08:00
|
|
|
}
|
|
|
|
}
|
2016-08-29 14:25:24 +08:00
|
|
|
|
2017-08-07 13:38:46 +08:00
|
|
|
$png = imagecreatefromstring(base64_decode(static::getBrokenPreview()));
|
2017-11-17 07:40:29 +08:00
|
|
|
ob_start();
|
2016-08-29 14:25:24 +08:00
|
|
|
imagepng($png);
|
|
|
|
imagedestroy($png);
|
2017-11-17 07:40:29 +08:00
|
|
|
$image = ob_get_contents();
|
|
|
|
ob_end_clean();
|
2016-08-29 14:25:24 +08:00
|
|
|
|
2017-11-17 07:40:29 +08:00
|
|
|
return Response::png($image);
|
2016-08-13 22:14:01 +08:00
|
|
|
}
|
2016-07-21 22:01:57 +08:00
|
|
|
|
|
|
|
public function previewWithSize($size, $tid)
|
|
|
|
{
|
2016-09-03 21:04:34 +08:00
|
|
|
return $this->preview($tid, $size);
|
2016-07-21 22:01:57 +08:00
|
|
|
}
|
|
|
|
|
2016-07-27 18:52:46 +08:00
|
|
|
public function raw($tid) {
|
|
|
|
if ($t = Texture::find($tid)) {
|
2016-08-16 22:58:21 +08:00
|
|
|
|
2016-08-29 14:25:24 +08:00
|
|
|
if (Storage::disk('textures')->has($t->hash)) {
|
2016-08-30 10:10:11 +08:00
|
|
|
return Response::png(Storage::disk('textures')->get($t->hash));
|
2016-08-16 22:58:21 +08:00
|
|
|
} else {
|
2017-11-17 07:40:29 +08:00
|
|
|
return abort(404, trans('general.texture-deleted'));
|
2016-08-16 22:58:21 +08:00
|
|
|
}
|
2016-07-27 18:52:46 +08:00
|
|
|
} else {
|
2017-11-17 07:40:29 +08:00
|
|
|
return abort(404, trans('skinlib.non-existent'));
|
2016-07-27 18:52:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-08-07 13:38:46 +08:00
|
|
|
protected function getPlayerInstance($player_name)
|
2016-10-16 18:16:15 +08:00
|
|
|
{
|
|
|
|
$player = Player::where('player_name', $player_name)->first();
|
|
|
|
|
2018-02-10 12:55:10 +08:00
|
|
|
if ($player->isBanned()) {
|
|
|
|
abort(403, trans('general.player-banned'));
|
|
|
|
}
|
2016-10-16 18:16:15 +08:00
|
|
|
|
|
|
|
return $player;
|
|
|
|
}
|
|
|
|
|
2017-08-07 13:38:46 +08:00
|
|
|
public static function getDefaultAvatar()
|
|
|
|
{
|
|
|
|
return "iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAIAAABMXPacAAACSElEQVR4nO3csUpbcQBGca/epBDTFio0KCLiC/QNRJBCod10LkUwfQq7uYhDKa5Ondri4NLRoX2GLl1EVGqhQcVEiYnSZ/jAy8lwfvN3r5LDf7lXU7yYfzqWGNzdR/vaxHil9x8Oh9E+VZZlpffPPh09OAPADAAzAMwAMAPADAAzAMwAMAPADAAzAMwAMAPADAAr0+fvqarfH0w1G9E+1eneVnp/TwDMADADwAwAMwDMADADwAwAMwDMADADwAwAMwDMADADwOI/ft9afxftG416+iNGyr/Lq2i/+flLtPcEwAwAMwDMADADwAwAMwDMADADwAwAMwDMADADwAwAMwCs+LrRji5o1B5F++tBv9L7n12cR/uFmVa0P/z9K9qnPAEwA8AMADMAzAAwA8AMADMAzAAwA8AMADMAzAAwA8AMACvT5++vNz5F+5XFrWi/9vIk2qfP93f2n0f7vR/b0f7bh/fR3hMAMwDMADADwAwAMwDMADADwAwAMwDMADADwAwAMwDMALBit/0quuBxay7ap+8bvh/8jPap1TfL0T79/4A/nU609wTADAAzAMwAMAPADAAzAMwAMAPADAAzAMwAMAPADAAzAKz4+HYpuqBeFNH+6Lgb7UfN9OxktO/2etHeEwAzAMwAMAPADAAzAMwAMAPADAAzAMwAMAPADAAzAMwAsPL0b/b9+71+9j5gZqoW7VOX3dto/+xJM9rf3Ayiffr7eAJgBoAZAGYAmAFgBoAZAGYAmAFgBoAZAGYAmAFgBoAZAPYfTCpLwD1OEBAAAAAASUVORK5CYII=";
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function getBrokenPreview()
|
|
|
|
{
|
|
|
|
return "iVBORw0KGgoAAAANSUhEUgAAAJYAAACFCAMAAACOnfHlAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFU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1j82PAL+YvPv655qfNy76uprzrHI8cfvM55PfGm/K3O233vuO+638e9H5ko/ED+UPPR+mPHp9BP9z7nfP78L/eE8/sl0p8zAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMAUExURQAAAFNTUwICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEhISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdHR0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpaWltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGV
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default steve skin, base64 encoded.
|
|
|
|
*
|
|
|
|
* @see https://minecraft.net/images/steve.png
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public static function getDefaultSkin()
|
|
|
|
{
|
|
|
|
return "iVBORw0KGgoAAAANSUhEUgAAAEAAAAAgCAYAAACinX6EAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKTWlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN3WJP3Fj7f92UPVkLY8LGXbIEAIiOsCMgQWaIQkgBhhBASQMWFiApWFBURnEhVxILVCkidiOKgKLhnQYqIWotVXDjuH9yntX167+3t+9f7vOec5/zOec8PgBESJpHmomoAOVKFPDrYH49PSMTJvYACFUjgBCAQ5svCZwXFAADwA3l4fnSwP/wBr28AAgBw1S4kEsfh/4O6UCZXACCRAOAiEucLAZBSAMguVMgUAMgYALBT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