This commit is contained in:
YuTian 2024-08-15 12:51:39 +08:00
parent 39e85f5c69
commit 6eaa298fb1
4 changed files with 12 additions and 8 deletions

Binary file not shown.

View File

@ -19,8 +19,16 @@ public class LuckyBlockEffect extends GameGiftEffect {
private static List<ItemStack> itemStacks = new ArrayList<>();
static {
itemStacks.add(new ItemStackBuilder(Material.TURTLE_HELMET).setDisplayName("§2§l绿帽子").addEnchant(Enchantment.PROTECTION, 2).build());
itemStacks.add(new ItemStackBuilder(Material.ENDER_PEARL).setAmount(16).build());
itemStacks.add(new ItemStackBuilder(Material.ENDER_EYE).setAmount(16).build());
itemStacks.add(new ItemStackBuilder(Material.ENDER_EYE).setAmount(16).build());
itemStacks.add(new ItemStackBuilder(Material.ENDER_EYE).setAmount(16).build());
itemStacks.add(new ItemStackBuilder(Material.ENDER_EYE).setAmount(16).build());
itemStacks.add(new ItemStackBuilder(Material.ENDER_EYE).setAmount(16).build());
itemStacks.add(new ItemStackBuilder(Material.ENDER_EYE).setAmount(16).build());
itemStacks.add(new ItemStackBuilder(Material.ENDER_EYE).setAmount(16).build());
itemStacks.add(new ItemStackBuilder(Material.ENDER_EYE).setAmount(16).build());
itemStacks.add(new ItemStackBuilder(Material.DIAMOND_BLOCK).setAmount(16).build());
itemStacks.add(new ItemStackBuilder(Material.DIAMOND).setAmount(64).build());

View File

@ -30,24 +30,20 @@ public class GameListener implements Listener {
EnderDragonWar.game.quitGame(event.getPlayer());
}
/*
* 死亡后游戏时间 +5分钟
* */
@EventHandler
public void onDeath(PlayerDeathEvent event) {
event.setDeathMessage(null);
Player p = event.getEntity();
Player player = event.getEntity();
new BukkitRunnable() {
private int i = 0;
public void run() {
if (i == 1) {
p.spigot().respawn();
player.spigot().respawn();
}
// 增加游戏时间5分钟
if (i == 3) {
EnderDragonWar.game.addLiveTime(5);
p.sendTitle("§4你嘎了", "§e加播5分钟");
player.sendTitle("§4你嘎了", "§e加播5分钟");
cancel();
}
i++;

View File

@ -1,7 +1,7 @@
name: EnderDragonWar
version: 1.0
api-version: 1.20
main: com.yaohun.enderdragonwar.Main
main: com.yaohun.enderdragonwar.EnderDragonWar
depend: [PixelLiveAPI]
commands:
enderdragonwar: