|
13 | 13 |
|
14 | 14 | class FFAPvP extends TableBase |
15 | 15 | { |
16 | | - public const FFAPVP_INIT = 'userdataprovider.ffapvp.init'; |
17 | | - public const FFAPVP_REGISTER = 'userdataprovider.ffapvp.register'; |
18 | | - public const FFAPVP_UNREGISTER = 'userdataprovider.ffapvp.unregister'; |
19 | | - public const FFAPVP_ADD_COUNT = 'userdataprovider.ffapvp.addcount'; |
| 16 | + public const FFAPVP_INIT = 'userdataprovider.ffapvp.init'; |
| 17 | + public const FFAPVP_REGISTER = 'userdataprovider.ffapvp.register'; |
| 18 | + public const FFAPVP_UNREGISTER = 'userdataprovider.ffapvp.unregister'; |
| 19 | + public const FFAPVP_GET = 'userdataprovider.ffapvp.get'; |
| 20 | + public const FFAPVP_ADD_COUNT = 'userdataprovider.ffapvp.addcount'; |
20 | 21 | public const FFAPVP_GET_RANKING_BY_KILL = 'userdataprovider.ffapvp.getrankingbykill'; |
21 | | - public const FFAPVP_GET_RANKING_BY_EXP = 'userdataprovider.ffapvp.getrankingbyexp'; |
| 22 | + public const FFAPVP_GET_RANKING_BY_EXP = 'userdataprovider.ffapvp.getrankingbyexp'; |
22 | 23 |
|
23 | 24 | public function init(): void |
24 | 25 | { |
@@ -50,6 +51,18 @@ public function unregister(IPLayer $player, ?callable $onSuccess = null, ?callab |
50 | 51 | $this->connector->executeChange(self::FFAPVP_UNREGISTER, [$player->getName()], $onSuccess, $onError ); |
51 | 52 | } |
52 | 53 |
|
| 54 | + /** |
| 55 | + * プレイヤーの情報を取得します |
| 56 | + * |
| 57 | + * @param IPlayer $player |
| 58 | + * @param callable|null $onSuccess |
| 59 | + * @param callable|null $onError |
| 60 | + */ |
| 61 | + public function get(IPlayer $player, callable $onSuccess = null, ?callable $onError = null): void |
| 62 | + { |
| 63 | + $this->connector->executeSelect(self::FFAPVP_GET, [$player->getName()], $onSuccess, $onError); |
| 64 | + } |
| 65 | + |
53 | 66 | /** |
54 | 67 | * プレイヤーのそれぞれのカウントを増やします |
55 | 68 | * |
|
0 commit comments