Fix Error with /b bind, added Torrent ice revert effect (#647)

This commit is contained in:
Sobki 2016-11-05 12:03:31 +10:00 committed by Christopher Martin
parent 51e2226f09
commit f4e684bb76
2 changed files with 6 additions and 2 deletions

View file

@ -60,7 +60,11 @@ public class BindCommand extends PKCommand {
// bending bind [ability] [#]
if (args.size() == 2) {
bind(sender, args.get(0), Integer.parseInt(args.get(1)));
try {
bind(sender, args.get(0), Integer.parseInt(args.get(1)));
} catch (NumberFormatException ex) {
sender.sendMessage(ChatColor.RED + wrongNumber);
}
}
}

View file

@ -120,7 +120,7 @@ public class Torrent extends WaterAbility {
if (isTransparent(player, block) && block.getType() != Material.ICE) {
TempBlock tblock = new TempBlock(block, Material.ICE, (byte) 0);
FROZEN_BLOCKS.put(tblock, player);
FROZEN_BLOCKS_DELAY.put(tblock, System.currentTimeMillis());
FROZEN_BLOCKS_DELAY.put(tblock, System.currentTimeMillis() + (new Random().nextInt((500 + 500) + 1) - 500));
playIcebendingSound(block.getLocation());
}
}