NicMcPhee/CraftBukkit — pull request #7 by mart2967 (2014-05-01 01:04:57+00:00)
Title: Changed large if-else to use a HashMap

We added a hashmap field to the class, that takes a DamageSource and returns a DamageCause. This HM is instantiated in a discrete method that is called on initialization. The HM eliminates the need for a lengthy if-else series, and simplifies the addition of new damage sources and causes.