package in.twizmwaz.cardinal.module.modules.kit;

import in.twizmwaz.cardinal.GameHandler;
import in.twizmwaz.cardinal.event.CardinalSpawnEvent;
import in.twizmwaz.cardinal.module.Module;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;

public class KitApplier implements Module {

    @Override
    public void unload() {
        HandlerList.unregisterAll(this);
    }

    @EventHandler
    public void onPgmSpawn(CardinalSpawnEvent event) {
        if (event.getSpawn().getKit() != null && GameHandler.getGameHandler().getMatch().isRunning())
            event.getSpawn().getKit().apply(event.getPlayer());
    }

}

@@ -513,12 +513,151 @@
 null
- && 
+) %7B%0A            if (event.getTeam().isObserver()) %7B%0A                event.getSpawn().getKit().apply(event.getPlayer());%0A            %7D else if (
 Game
@@ -709,32 +709,36 @@
 ())%0A            
+    
 event.getSpawn()
@@ -769,21 +769,31 @@
 tPlayer());%0A
+        %7D%0A
     %7D%0A%0A%7D%0A

Apply kits to observers, fixes #467