parent
72556acfef
commit
f9f74b5b10
|
@ -52,12 +52,20 @@ public class PlayerListen implements Listener {
|
|||
String clickName = ci.getItemMeta().getDisplayName();
|
||||
switch (clickName) {
|
||||
case InvUtils.Create:
|
||||
if (!LuckLottery.economy.hasAccount(p)
|
||||
|| !LuckLottery.economy.has(p, LotteryUtils.getPrice())) {
|
||||
ChatUtils.sendMessage(p, ChatColor.GOLD
|
||||
+ "你没有足够的金钱购买彩票,每张彩票" + ChatColor.RED
|
||||
+ LotteryUtils.getPrice() + ChatColor.GOLD + "元!");
|
||||
p.closeInventory();
|
||||
return;
|
||||
}
|
||||
List<String> lottery = InvUtils.getLotteryNumber(inv);
|
||||
LotteryUtils.addLottery(p, lottery);
|
||||
ChatUtils.sendMessage(p, "§6您当前购买的彩票号码为: " + ChatColor.GREEN
|
||||
+ lottery.toString());
|
||||
ChatUtils.howToShow(p);
|
||||
LuckLottery.economy.withdrawPlayer(p, 200);
|
||||
LuckLottery.economy.withdrawPlayer(p, LotteryUtils.getPrice());
|
||||
p.closeInventory();
|
||||
break;
|
||||
case InvUtils.ReSet:
|
||||
|
|
|
@ -13,7 +13,8 @@ import org.bukkit.inventory.meta.ItemMeta;
|
|||
|
||||
public class InvUtils {
|
||||
|
||||
public static final String InvName = "§6[§3§l彩票系统§6]§c点击选取号码";
|
||||
public static final String InvName = "§6[§3§l彩票系统§6]§c点击选取号码 §a§l"
|
||||
+ LotteryUtils.getPrice() + "元一份";
|
||||
|
||||
public static final String Normal1 = "§6§l1";
|
||||
public static final String Normal2 = "§6§l2";
|
||||
|
@ -62,7 +63,7 @@ public class InvUtils {
|
|||
|
||||
public static final String WEB = "§c请选取=>§6橙色普通号码§r§l|§b蓝色特殊号码";
|
||||
public static final String ReSet = "§4§l重新选取";
|
||||
public static final String Create = "§a§l生成彩票 §c§l200元一份";
|
||||
public static final String Create = "§a§l生成彩票";
|
||||
public static final String CantCreate = "§c§l请选取§66个普通号码§b1个特殊号码§a生成彩票";
|
||||
|
||||
// private static final ItemStack L0 = new
|
||||
|
|
Loading…
Reference in New Issue