fix config file ...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
parent
543d145252
commit
e17022ab40
|
@ -6,7 +6,6 @@ import java.util.Map.Entry;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import cn.citycraft.LuckLottery.LuckLottery;
|
import cn.citycraft.LuckLottery.LuckLottery;
|
||||||
import cn.citycraft.LuckLottery.config.Config;
|
import cn.citycraft.LuckLottery.config.Config;
|
||||||
|
@ -32,6 +31,8 @@ public class LotteryReward implements Runnable {
|
||||||
}
|
}
|
||||||
ChatUtils.broadcastMessage(ChatColor.GOLD + "本轮彩票开奖: " + ChatColor.RED
|
ChatUtils.broadcastMessage(ChatColor.GOLD + "本轮彩票开奖: " + ChatColor.RED
|
||||||
+ LotteryUtils.getSystemLottery().toString());
|
+ LotteryUtils.getSystemLottery().toString());
|
||||||
|
ChatUtils.broadcastMessage(ChatColor.BLUE + "使用命令: " + ChatColor.RED
|
||||||
|
+ "/ll" + ChatColor.BLUE + " 或闹钟菜单可以购买彩票!");
|
||||||
for (Entry<String, List<List<String>>> players : LotteryUtils
|
for (Entry<String, List<List<String>>> players : LotteryUtils
|
||||||
.getPlayerLottery().entrySet()) {
|
.getPlayerLottery().entrySet()) {
|
||||||
OfflinePlayer p = Bukkit.getOfflinePlayer(players.getKey());
|
OfflinePlayer p = Bukkit.getOfflinePlayer(players.getKey());
|
||||||
|
@ -43,12 +44,16 @@ public class LotteryReward implements Runnable {
|
||||||
winprices = Config.getInstance().getInt("Reward." + win,
|
winprices = Config.getInstance().getInt("Reward." + win,
|
||||||
200);
|
200);
|
||||||
if (winprices > 0) {
|
if (winprices > 0) {
|
||||||
|
ChatUtils.broadcastMessage(ChatColor.GREEN + p.getName() +"的彩票: "
|
||||||
|
+ ChatColor.YELLOW + playerlottery.toString()
|
||||||
|
+ ChatColor.GREEN + "获得了" + ChatColor.GOLD
|
||||||
|
+ winprices + ChatColor.GREEN + "元!");
|
||||||
String message = ChatColor.GREEN + "您的彩票: "
|
String message = ChatColor.GREEN + "您的彩票: "
|
||||||
+ ChatColor.YELLOW + playerlottery.toString()
|
+ ChatColor.YELLOW + playerlottery.toString()
|
||||||
+ ChatColor.GREEN + "获得了" + ChatColor.GOLD
|
+ ChatColor.GREEN + "获得了" + ChatColor.GOLD
|
||||||
+ winprices + ChatColor.GREEN + "元!";
|
+ winprices + ChatColor.GREEN + "元!";
|
||||||
if (p.isOnline()) {
|
if (p.isOnline()) {
|
||||||
ChatUtils.sendMessage((Player) p, message);
|
//ChatUtils.sendMessage((Player) p, message);
|
||||||
} else {
|
} else {
|
||||||
OfflineDate.addMessage(p.getName(), message);
|
OfflineDate.addMessage(p.getName(), message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,20 +26,6 @@ public class LotteryUtils {
|
||||||
|
|
||||||
protected static int price;
|
protected static int price;
|
||||||
|
|
||||||
/**
|
|
||||||
* @return price
|
|
||||||
*/
|
|
||||||
public static int getPrice() {
|
|
||||||
return price;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param price 要设置的 price
|
|
||||||
*/
|
|
||||||
public static void setPrice(int price) {
|
|
||||||
LotteryUtils.price = price;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<List<String>> addLottery(Player player,
|
public static List<List<String>> addLottery(Player player,
|
||||||
List<String> lottery) {
|
List<String> lottery) {
|
||||||
List<List<String>> playerhas = playerLottery.get(player.getName());
|
List<List<String>> playerhas = playerLottery.get(player.getName());
|
||||||
|
@ -108,6 +94,14 @@ public class LotteryUtils {
|
||||||
LotteryUtils.systemLottery = systemLottery;
|
LotteryUtils.systemLottery = systemLottery;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int getPrice() {
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setPrice(int price) {
|
||||||
|
LotteryUtils.price = price;
|
||||||
|
}
|
||||||
|
|
||||||
public static Map<String, List<List<String>>> getPlayerLottery() {
|
public static Map<String, List<List<String>>> getPlayerLottery() {
|
||||||
return playerLottery;
|
return playerLottery;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#本文件为插件的主配置文件
|
#本文件为插件的主配置文件
|
||||||
version: 1.0
|
version: 1.1
|
||||||
#服务器名称
|
#服务器名称
|
||||||
servername: ''
|
servername: ''
|
||||||
#插件名称
|
#插件名称
|
||||||
|
@ -11,19 +11,19 @@ price: 200
|
||||||
#返现金额(红色球一个代表1点,蓝色球代表10点自行相加!)
|
#返现金额(红色球一个代表1点,蓝色球代表10点自行相加!)
|
||||||
#注意:请不要删除0这一行,配置错误将默认全部返还彩票价格的金钱.
|
#注意:请不要删除0这一行,配置错误将默认全部返还彩票价格的金钱.
|
||||||
Reward:
|
Reward:
|
||||||
0:0
|
0: 0
|
||||||
1: 50
|
1: 300
|
||||||
2: 100
|
2: 500
|
||||||
3: 300
|
3: 800
|
||||||
4: 500
|
4: 1000
|
||||||
5: 1000
|
5: 2000
|
||||||
6: 2000
|
6: 3000
|
||||||
10: 300
|
10: 500
|
||||||
11: 500
|
11: 800
|
||||||
12: 800
|
12: 1000
|
||||||
13: 1200
|
13: 2000
|
||||||
14: 2400
|
14: 3000
|
||||||
15: 3600
|
15: 4000
|
||||||
16: 5000
|
16: 5000
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue