Scoreboard change and breaking blocks.

This commit is contained in:
William Burns 2015-12-11 16:55:15 +00:00
parent 1dcbf5f7fd
commit 6456d7bd66

View File

@ -4,6 +4,7 @@ import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
@ -24,7 +25,6 @@ import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityShootBowEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.inventory.ItemStack;
import net.minecraft.server.v1_8_R3.PacketPlayOutAnimation;
@ -108,6 +108,10 @@ public class Gladiators extends SoloGame
DontAllowOverfill = true;
EnableTutorials = false;
BlockBreakAllow.add(Material.SUGAR_CANE_BLOCK.getId());
BlockBreakAllow.add(Material.GRASS.getId());
BlockBreakAllow.add(Material.LONG_GRASS.getId());
registerStatTrackers(
new BrawlerTracker(this),
//new UntouchableTracker(this),
@ -1039,4 +1043,26 @@ public class Gladiators extends SoloGame
((Player)e.GetEvent().getEntity()).sendMessage(F.main("Game", "Your killer had " + C.cRed + new DecimalFormat("#").format(killer.getHealth()) + "" + C.cGray + " left."));
}
}
@EventHandler
public void scoreboardEnd(GameStateChangeEvent e)
{
if (e.GetState() != GameState.End)
return;
Scoreboard.Reset();
Scoreboard.WriteBlank();
Scoreboard.Write(C.cGreen + C.Bold + "Status");
Scoreboard.Write(C.cWhite + "Ended");
Scoreboard.WriteBlank();
Scoreboard.Write(C.cAqua + C.Bold + "Matches Left");
Scoreboard.Write(C.cWhite + "0");
Scoreboard.WriteBlank();
Scoreboard.Write(C.cYellow + C.Bold + "Players");
if (getWinners() != null && !getWinners().isEmpty())
Scoreboard.Write(C.cWhite + getWinners().get(0).getName());
Scoreboard.Draw();
}
}