Ejemplo n.º 1
0
 @EventHandler
 public void onEntityCombust(EntityCombustEvent event) {
   if (event.getEntity() instanceof Zombie) {
     if (!inGameWorld(event.getEntity())) return;
     event.setCancelled(true);
   }
 }
Ejemplo n.º 2
0
 @EventHandler(priority = EventPriority.NORMAL)
 public void onEntityCombust(EntityCombustEvent event) {
   if (event.isCancelled()) return;
   FlagPermissions perms = Residence.getPermsByLoc(event.getEntity().getLocation());
   if (!perms.has("burn", true)) {
     event.setCancelled(true);
   }
 }
	@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
	public void onEntityCombust(final EntityCombustEvent event)
	{
		if (event.getEntity() instanceof Player && ess.getUser(event.getEntity()).isGodModeEnabled())
		{
			event.setCancelled(true);
		}
	}
Ejemplo n.º 4
0
  @Override
  public void onEntityCombust(EntityCombustEvent event) {
    if (ignoreListener) return;

    removeDeadEntities();

    if (modifiedEntities.contains(event.getEntity())) {
      event.setCancelled(true);
    }
  }
Ejemplo n.º 5
0
  public void onEntityCombust(EntityCombustEvent event) {
    if (event.isCancelled()) return;

    if (event.getEntity() instanceof Player) {
      String playerName = ((Player) event.getEntity()).getName();
      if (AdminHandler.isGod(playerName)) {
        event.setCancelled(true);
        plugin
            .getServer()
            .getScheduler()
            .scheduleSyncDelayedTask(plugin, new douse((Player) event.getEntity()), 2);
      }
    }
  }
Ejemplo n.º 6
0
 @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
 public void onEntityCombust(EntityCombustEvent event) {
   Entity entity = event.getEntity();
   if (entity instanceof Player) {
     Player player = (Player) entity;
     ArenaPlayer ap = plugin.getArenaPlayer(player);
     if (ap != null) {
       Arena arena = ap.getArena();
       if (arena.isInLobby()) {
         player.setFireTicks(0);
         event.setCancelled(true);
       }
     }
   }
 }
Ejemplo n.º 7
0
 public void onEntityCombust(EntityCombustEvent event) {
   Entity entity = event.getEntity();
   if (entity instanceof Player) {
     Player player = (Player) entity;
     Team team = war.getPlayerTeam(player.getName());
     if (team != null && team.getSpawnVolume().contains(player.getLocation())) {
       // smother out the fire that didn't burn out when you respawned
       // Stop fire (upcast, watch out!)
       if (player instanceof CraftPlayer) {
         net.minecraft.server.Entity playerEntity = ((CraftPlayer) player).getHandle();
         playerEntity.fireTicks = 0;
       }
       event.setCancelled(true);
     }
   }
 }