public class BattleEndEvent extends BattleEvent
This is the recommended event for all end-of-battle listening due to its comprehensive information and its guaranteed execution regardless of what means the battle ends by.
| Modifier and Type | Field and Description | 
|---|---|
protected boolean | 
abnormal  | 
protected BattleEndCause | 
cause  | 
protected com.google.common.collect.ImmutableMap<BattleParticipant,BattleResults> | 
results  | 
battleController| Constructor and Description | 
|---|
BattleEndEvent(BattleController bc,
              BattleEndCause cause,
              boolean abnormal,
              java.util.HashMap<BattleParticipant,BattleResults> results)  | 
| Modifier and Type | Method and Description | 
|---|---|
BattleEndCause | 
getCause()
Gets the cause of the battle end 
 | 
java.util.List<net.minecraft.entity.player.ServerPlayerEntity> | 
getPlayers()
Gets a list of players that were involved in the battle 
 | 
java.util.Optional<BattleResults> | 
getResult(net.minecraft.entity.Entity entity)
Gets the battle result for the entity given
 Will return an empty optional of cannot find that entity/player 
 | 
java.util.Map<BattleParticipant,BattleResults> | 
getResults()
Gets the battle results per participant 
 | 
boolean | 
isAbnormal()
Checks if the battle end was "abnormal" 
 | 
getBattleControllerprotected final BattleEndCause cause
protected final boolean abnormal
protected final com.google.common.collect.ImmutableMap<BattleParticipant,BattleResults> results
public BattleEndEvent(BattleController bc, BattleEndCause cause, boolean abnormal, java.util.HashMap<BattleParticipant,BattleResults> results)
public BattleEndCause getCause()
public boolean isAbnormal()
public java.util.Map<BattleParticipant,BattleResults> getResults()
public java.util.Optional<BattleResults> getResult(net.minecraft.entity.Entity entity)
entity - The entity to search forpublic java.util.List<net.minecraft.entity.player.ServerPlayerEntity> getPlayers()