Example #1
0
 @Override
 public void run() {
   Game module = Minigames.getMinigames().getMinigame();
   if (module == null) {
     return;
   }
   module.getScoreboard().setTitle(colorScroller.next());
 }
Example #2
0
 @SuppressWarnings(value = "unused")
 @EventHandler
 public void onBlockLand(EntityChangeBlockEvent event) {
   if (event.getEntity() instanceof FallingBlock) {
     FallingBlock fallingBlock = (FallingBlock) event.getEntity();
     if (event.getBlock().getType() == Material.AIR) {
       new BukkitRunnable() {
         @Override
         public void run() {
           fallingBlock.getLocation().getBlock().setType(Material.AIR);
           // Effect effect = new ItemLaunchEffect(new ItemStack(fallingBlock.getMaterial()),
           //        fallingBlock.getLocation(),2D);
           // effect.perform();
         }
       }.runTaskLater(Minigames.getMinigames().getPlugin(), 1L);
     }
   }
 }