private void ignite(Block block) { if (block.getType() != Material.AIR) { if (FireMethods.canFireGrief()) { if (WaterMethods.isPlant(block)) new Plantbending(block); } else if (block.getType() != Material.FIRE) { replacedBlocks.put(block.getLocation(), block.getState().getData()); } } block.setType(Material.FIRE); ignitedblocks.put(block, this.player); ignitedtimes.put(block, System.currentTimeMillis()); }
public FireStream(Location location, Vector direction, Player player, int range) { this.range = FireMethods.getFirebendingDayAugment(range, player.getWorld()); this.player = player; origin = location.clone(); this.location = origin.clone(); this.direction = direction.clone(); this.direction.setY(0); this.direction = this.direction.clone().normalize(); this.location = this.location.clone().add(this.direction); time = System.currentTimeMillis(); instances.put(idCounter, this); this.id = idCounter; idCounter = (idCounter + 1) % Integer.MAX_VALUE; }