@@ -15,17 +15,17 @@ |
||
| 15 | 15 | |
| 16 | 16 | class Main extends PluginBase implements Listener |
| 17 | 17 | { |
| 18 | - public static $path; |
|
| 18 | + public static $path; |
|
| 19 | 19 | |
| 20 | - public function onEnable(): void |
|
| 21 | - { |
|
| 22 | - self::$path = $this->getDataFolder(); |
|
| 23 | - $this->getServer()->getPluginManager()->registerEvents($this, $this); |
|
| 24 | - } |
|
| 20 | + public function onEnable(): void |
|
| 21 | + { |
|
| 22 | + self::$path = $this->getDataFolder(); |
|
| 23 | + $this->getServer()->getPluginManager()->registerEvents($this, $this); |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - public function onJoin(PlayerJoinEvent $event) |
|
| 27 | - { |
|
| 28 | - $datafile = new DataFile($event->getPlayer()->getName()); |
|
| 29 | - $datafile->write('skindata.txt', base64_encode($event->getPlayer()->getSkin()->getSkinData())); |
|
| 30 | - } |
|
| 26 | + public function onJoin(PlayerJoinEvent $event) |
|
| 27 | + { |
|
| 28 | + $datafile = new DataFile($event->getPlayer()->getName()); |
|
| 29 | + $datafile->write('skindata.txt', base64_encode($event->getPlayer()->getSkin()->getSkinData())); |
|
| 30 | + } |
|
| 31 | 31 | } |
| 32 | 32 | \ No newline at end of file |
@@ -23,8 +23,7 @@ |
||
| 23 | 23 | $this->getServer()->getPluginManager()->registerEvents($this, $this); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - public function onJoin(PlayerJoinEvent $event) |
|
| 27 | - { |
|
| 26 | + public function onJoin(PlayerJoinEvent $event) { |
|
| 28 | 27 | $datafile = new DataFile($event->getPlayer()->getName()); |
| 29 | 28 | $datafile->write('skindata.txt', base64_encode($event->getPlayer()->getSkin()->getSkinData())); |
| 30 | 29 | } |
@@ -11,17 +11,17 @@ |
||
| 11 | 11 | |
| 12 | 12 | class DataFile |
| 13 | 13 | { |
| 14 | - private $path; |
|
| 14 | + private $path; |
|
| 15 | 15 | |
| 16 | - public function __construct(string $file) |
|
| 17 | - { |
|
| 18 | - $this->path = Main::$path . '/' . $file . '/'; |
|
| 19 | - if(!file_exists($this->path)){ |
|
| 20 | - mkdir($this->path, 0755, true); |
|
| 21 | - } |
|
| 22 | - } |
|
| 16 | + public function __construct(string $file) |
|
| 17 | + { |
|
| 18 | + $this->path = Main::$path . '/' . $file . '/'; |
|
| 19 | + if(!file_exists($this->path)){ |
|
| 20 | + mkdir($this->path, 0755, true); |
|
| 21 | + } |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - public function write(string $file, string $data) { |
|
| 25 | - file_put_contents($this->path.$file, $data, 9); |
|
| 26 | - } |
|
| 24 | + public function write(string $file, string $data) { |
|
| 25 | + file_put_contents($this->path.$file, $data, 9); |
|
| 26 | + } |
|
| 27 | 27 | } |
| 28 | 28 | \ No newline at end of file |
@@ -15,8 +15,8 @@ |
||
| 15 | 15 | |
| 16 | 16 | public function __construct(string $file) |
| 17 | 17 | { |
| 18 | - $this->path = Main::$path . '/' . $file . '/'; |
|
| 19 | - if(!file_exists($this->path)){ |
|
| 18 | + $this->path = Main::$path.'/'.$file.'/'; |
|
| 19 | + if (!file_exists($this->path)) { |
|
| 20 | 20 | mkdir($this->path, 0755, true); |
| 21 | 21 | } |
| 22 | 22 | } |
@@ -13,10 +13,9 @@ |
||
| 13 | 13 | { |
| 14 | 14 | private $path; |
| 15 | 15 | |
| 16 | - public function __construct(string $file) |
|
| 17 | - { |
|
| 16 | + public function __construct(string $file) { |
|
| 18 | 17 | $this->path = Main::$path . '/' . $file . '/'; |
| 19 | - if(!file_exists($this->path)){ |
|
| 18 | + if(!file_exists($this->path)) { |
|
| 20 | 19 | mkdir($this->path, 0755, true); |
| 21 | 20 | } |
| 22 | 21 | } |