Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void start() {
- _running = true;
- _p1.openInventory(Inv);
- _p2.openInventory(Inv);
- new BukkitRunnable() {
- private int counter = 5;
- @Override
- public void run() {
- if (counter > 0 && _running) {
- int c = counter--;
- me.itzwam.shifumi.utils.Inventory.update(_p1, "Il reste " + c + "secondes");
- me.itzwam.shifumi.utils.Inventory.update(_p2, "Il reste " + c + "secondes");
- } else {
- if (_running) end();
- _p1.closeInventory();
- _p2.closeInventory();
- this.cancel();
- }
- }
- }.runTaskTimer(Main.instance, 20, 20);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement