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_GET = 'userdataprovider.ffapvp.get ' ;
20
- public const FFAPVP_ADD_COUNT = 'userdataprovider.ffapvp.addcount ' ;
21
- public const FFAPVP_GET_RANKING_BY_KILL = 'userdataprovider.ffapvp.getrankingbykill ' ;
22
- public const FFAPVP_GET_RANKING_BY_EXP = 'userdataprovider.ffapvp.getrankingbyexp ' ;
16
+ public const INIT = 'userdataprovider.ffapvp.init ' ;
17
+ public const REGISTER = 'userdataprovider.ffapvp.register ' ;
18
+ public const UNREGISTER = 'userdataprovider.ffapvp.unregister ' ;
19
+ public const GET = 'userdataprovider.ffapvp.get ' ;
20
+ public const ADD_COUNT = 'userdataprovider.ffapvp.addcount ' ;
21
+ public const GET_RANKING_BY_KILL = 'userdataprovider.ffapvp.getrankingbykill ' ;
22
+ public const GET_RANKING_BY_EXP = 'userdataprovider.ffapvp.getrankingbyexp ' ;
23
23
24
24
public function init (): void
25
25
{
26
- $ this ->connector ->executeGeneric (self ::FFAPVP_INIT );
26
+ $ this ->connector ->executeGeneric (self ::INIT );
27
27
}
28
28
29
29
/**
@@ -35,7 +35,7 @@ public function init(): void
35
35
*/
36
36
public function register (IPLayer $ player , ?callable $ onInserted = null , ?callable $ onError = null ): void
37
37
{
38
- $ this ->connector ->executeInsert (self ::FFAPVP_REGISTER , [$ player ->getname ()], $ onInserted , $ onError );
38
+ $ this ->connector ->executeInsert (self ::REGISTER , [$ player ->getname ()], $ onInserted , $ onError );
39
39
40
40
}
41
41
@@ -48,7 +48,7 @@ public function register(IPLayer $player, ?callable $onInserted = null, ?callabl
48
48
*/
49
49
public function unregister (IPLayer $ player , ?callable $ onSuccess = null , ?callable $ onError = null ): void
50
50
{
51
- $ this ->connector ->executeChange (self ::FFAPVP_UNREGISTER , [$ player ->getName ()], $ onSuccess , $ onError );
51
+ $ this ->connector ->executeChange (self ::UNREGISTER , [$ player ->getName ()], $ onSuccess , $ onError );
52
52
}
53
53
54
54
/**
@@ -60,7 +60,7 @@ public function unregister(IPLayer $player, ?callable $onSuccess = null, ?callab
60
60
*/
61
61
public function get (IPlayer $ player , callable $ onSuccess = null , ?callable $ onError = null ): void
62
62
{
63
- $ this ->connector ->executeSelect (self ::FFAPVP_GET , [$ player ->getName ()], $ onSuccess , $ onError );
63
+ $ this ->connector ->executeSelect (self ::GET , [$ player ->getName ()], $ onSuccess , $ onError );
64
64
}
65
65
66
66
/**
@@ -73,7 +73,7 @@ public function get(IPlayer $player, callable $onSuccess = null, ?callable $onEr
73
73
*/
74
74
public function add (IPlayer $ player , int $ kill = 0 , int $ death = 0 , int $ exp = 0 )
75
75
{
76
- $ this ->connector ->executeChange (self ::FFAPVP_ADD_COUNT , [$ player ->getName (), $ kill , $ death , $ exp ]);
76
+ $ this ->connector ->executeChange (self ::ADD_COUNT , [$ player ->getName (), $ kill , $ death , $ exp ]);
77
77
}
78
78
79
79
/**
@@ -118,7 +118,7 @@ public function addExp(IPlayer $player,int $exp)
118
118
*/
119
119
public function getRankingByKill (int $ limit , ?callable $ onSelect = null , ?callable $ onError = null ): void
120
120
{
121
- $ this ->connector ->executeSelect (self ::FFAPVP_GET_RANKING_BY_KILL , [$ limit ], $ onSelect , $ onError );
121
+ $ this ->connector ->executeSelect (self ::GET_RANKING_BY_KILL , [$ limit ], $ onSelect , $ onError );
122
122
}
123
123
124
124
/**
@@ -130,6 +130,6 @@ public function getRankingByKill(int $limit, ?callable $onSelect = null, ?callab
130
130
*/
131
131
public function getRankingByExp (int $ limit , ?callable $ onSelect = null , ?callable $ onError = null ): void
132
132
{
133
- $ this ->connector ->executeSelect (self ::FFAPVP_GET_RANKING_BY_EXP , [$ limit ], $ onSelect , $ onError );
133
+ $ this ->connector ->executeSelect (self ::GET_RANKING_BY_EXP , [$ limit ], $ onSelect , $ onError );
134
134
}
135
135
}
0 commit comments