Optimize compass
Splitted if into multiple lines
Merge pull request #60 from mc-server/Compass

Optimize compass