Package org.bukkit.damage
Interface DamageSource.Builder
- Enclosing interface:
- DamageSource
public static interface DamageSource.Builder
Utility class to make building a 
DamageSource easier. Only a
 DamageType is required.- 
Method SummaryModifier and TypeMethodDescriptionbuild()Create a newDamageSourceinstance using the supplied parameters.withCausingEntity(Entity entity) Set theEntitythat caused the damage.withDamageLocation(Location location) Set theLocationof the source of damage.withDirectEntity(Entity entity) Set theEntitythat directly inflicted the damage.
- 
Method Details- 
withCausingEntitySet theEntitythat caused the damage.- Parameters:
- entity- the entity
- Returns:
- this instance. Allows for chained method calls
- See Also:
 
- 
withDirectEntitySet theEntitythat directly inflicted the damage.- Parameters:
- entity- the entity
- Returns:
- this instance. Allows for chained method calls
- See Also:
 
- 
withDamageLocationSet theLocationof the source of damage.- Parameters:
- location- the location where the damage occurred
- Returns:
- this instance. Allows for chained method calls
- See Also:
 
- 
buildCreate a newDamageSourceinstance using the supplied parameters.- Returns:
- the damage source instance
 
 
-