コード例 #1
0
  @EventHandler
  public void onEntityDeath(EntityDeathEvent event) {
    /*
    This exploded players when an admin killed them:

    if (event.getEntity() instanceof Player && event.getEntity().getKiller() instanceof Player)
    	if (event.getEntity().getKiller().hasPermission("customplugin.megakill")) {
    		Location loc = event.getEntity().getLocation();
    		event.getEntity().getWorld().createExplosion(loc.getX(), loc.getY(), loc.getZ(), (float) 3, false, false);
    	}
    */
    spawnerSwitch.onEntityDeath(event);
    if (topPvPers != null) topPvPers.onPlayerDeathEvent(event);
  }