4
4
import cn .handyplus .lib .util .BaseUtil ;
5
5
import cn .handyplus .lib .util .MessageUtil ;
6
6
import cn .handyplus .menu .PlayerMenu ;
7
- import org .black_ixx .playerpoints .PlayerPoints ;
8
7
import org .bukkit .entity .Player ;
9
8
10
9
/**
@@ -22,12 +21,12 @@ public class PlayerPointsUtil {
22
21
*/
23
22
public static boolean buy (Player player , int price ) {
24
23
// 点券是否加载
25
- if (! PlayerMenu .PLAYER_POINTS ) {
24
+ if (PlayerMenu .PLAYER_POINTS == null ) {
26
25
MessageUtil .sendMessage (player , BaseUtil .getMsgNotColor (HookPluginEnum .PLAYER_POINTS .getFailMsg ()));
27
26
return false ;
28
27
}
29
28
// 扣除点券
30
- return PlayerPoints . getInstance () .getAPI ().take (player .getUniqueId (), price );
29
+ return PlayerMenu . PLAYER_POINTS .getAPI ().take (player .getUniqueId (), price );
31
30
}
32
31
33
32
/**
@@ -41,12 +40,12 @@ public static void give(Player player, int price) {
41
40
return ;
42
41
}
43
42
// 点券是否加载
44
- if (! PlayerMenu .PLAYER_POINTS ) {
43
+ if (PlayerMenu .PLAYER_POINTS == null ) {
45
44
MessageUtil .sendMessage (player , BaseUtil .getMsgNotColor (HookPluginEnum .PLAYER_POINTS .getFailMsg ()));
46
45
return ;
47
46
}
48
47
// 给予点券
49
- PlayerPoints . getInstance () .getAPI ().give (player .getUniqueId (), price );
48
+ PlayerMenu . PLAYER_POINTS .getAPI ().give (player .getUniqueId (), price );
50
49
}
51
50
52
51
/**
@@ -56,10 +55,10 @@ public static void give(Player player, int price) {
56
55
* @return 玩家点券
57
56
*/
58
57
public static int getPlayerPoints (Player player ) {
59
- if (! PlayerMenu .PLAYER_POINTS || player == null ) {
58
+ if (PlayerMenu .PLAYER_POINTS == null || player == null ) {
60
59
return 0 ;
61
60
}
62
- return PlayerPoints . getInstance () .getAPI ().look (player .getUniqueId ());
61
+ return PlayerMenu . PLAYER_POINTS .getAPI ().look (player .getUniqueId ());
63
62
}
64
63
65
64
}
0 commit comments