mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-01-30 14:09:58 +08:00
fix clearing textures of player, close #31
This commit is contained in:
parent
889dfad9fa
commit
e1525cfad4
@ -131,14 +131,7 @@ class PlayerController extends BaseController
|
||||
|
||||
public function clearTexture()
|
||||
{
|
||||
$this->player->model->preference = "default";
|
||||
$this->player->model->tid_steve = "";
|
||||
$this->player->model->tid_alex = "";
|
||||
$this->player->model->tid_cape = "";
|
||||
|
||||
$this->player->model->last_modified = Utils::getTimeFormatted();
|
||||
|
||||
$this->player->model->save();
|
||||
$this->player->clearTexture();
|
||||
|
||||
View::json('角色 '.$this->player->model->player_name.' 的材质已被成功重置', 0);
|
||||
}
|
||||
|
@ -73,6 +73,12 @@ class Player
|
||||
return $this->model->save();
|
||||
}
|
||||
|
||||
public function clearTexture()
|
||||
{
|
||||
$this->setPreference('default');
|
||||
$this->setTexture(['tid_steve' => 0, 'tid_alex' => 0, 'tid_cape' => 0]);
|
||||
}
|
||||
|
||||
public function getBinaryTexture($type)
|
||||
{
|
||||
if ($this->getTexture($type) != "") {
|
||||
|
Loading…
Reference in New Issue
Block a user