Include arena in ArenaKillEvent.

This commit is contained in:
garbagemule 2013-08-06 23:58:42 +02:00
parent 2b5291b593
commit 0b6a017c32
2 changed files with 14 additions and 2 deletions

View File

@ -513,7 +513,7 @@ public class ArenaListener
}
private void callKillEvent(Player killer, Entity victim) {
ArenaKillEvent event = new ArenaKillEvent(killer, victim);
ArenaKillEvent event = new ArenaKillEvent(arena, killer, victim);
plugin.getServer().getPluginManager().callEvent(event);
}

View File

@ -1,5 +1,6 @@
package com.garbagemule.MobArena.events;
import com.garbagemule.MobArena.framework.Arena;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
@ -11,14 +12,25 @@ import org.bukkit.event.HandlerList;
public class ArenaKillEvent extends Event {
private static final HandlerList handlers = new HandlerList();
private Arena arena;
private Player killer;
private Entity victim;
public ArenaKillEvent(Player killer, Entity victim) {
public ArenaKillEvent(Arena arena, Player killer, Entity victim) {
this.arena = arena;
this.killer = killer;
this.victim = victim;
}
/**
* Get the arena the event happened in.
*
* @return an arena
*/
public Arena getArena() {
return arena;
}
/**
* Get the killer.
*