Reverse engineered code from Nemesis213 at http://www.curse.com/bukkit-plugins/minecraft/ender-crystal-buffs