mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-27 04:55:25 +01:00
Include arena in ArenaKillEvent.
This commit is contained in:
parent
2b5291b593
commit
0b6a017c32
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user