Moved CraftBukkit dependant code for easier updating.