}
}
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onBlockIgnite(BlockIgniteEvent event) {
FlagPermissions perms = Residence.getPermsByLocForPlayer(event.getBlock().getLocation(), event.getPlayer());
IgniteCause cause = event.getCause();
if (cause == IgniteCause.SPREAD) {
if (!perms.has("firespread", true)) {
event.setCancelled(true);
}
} else if (cause == IgniteCause.FLINT_AND_STEEL) {
Player player = event.getPlayer();
if (player != null && !perms.playerHas(player.getName(), player.getWorld().getName(), "ignite", true) && !Residence.isResAdminOn(player)) {
event.setCancelled(true);
player.sendMessage(ChatColor.RED+Residence.getLanguage().getPhrase("NoPermission"));
}
} else {
if(!perms.has("ignite", true)){
event.setCancelled(true);
}
}
}