Update Main.php

Removed unnecessary event register, fixed if player error, fixed spacing