public ArrayList<Event> getPlayerEvents(String playerName,
			ArrayList<Event> events) {
		ArrayList<Event> playerEvents = new ArrayList<Event>();
		// Get all events that are performed by, or on a specific player.
		for (int i = 0; i < events.size(); i++) {
			Event currentEvent = events.get(i);
			if (currentEvent.getEventType() == EventTypes.KILL) {
				KillEvent kill = (KillEvent) currentEvent;
				// Determine if the desired player killed or was a victim.
				if (kill.getKiller().equalsIgnoreCase(playerName) || kill.getVictim().equalsIgnoreCase(playerName)) {
					playerEvents.add(currentEvent);
				}
			} else if (currentEvent.getEventType() == EventTypes.DEFEND) {
				DefendEvent defend = (DefendEvent) currentEvent;
				if (defend.getDefender().equalsIgnoreCase(playerName)) {
					playerEvents.add(currentEvent);
				}
			} else if (currentEvent.getEventType() == EventTypes.CAPTURE) {
				CaptureEvent capture = (CaptureEvent) currentEvent;
				String[] capturingPlayers = capture.getCapturingPlayers();
				for (int j = 0; j < capturingPlayers.length; j++) {
					if (capturingPlayers[j].trim().equalsIgnoreCase(playerName)) {
						playerEvents.add(currentEvent);

					}
				}
			}
		}
		return playerEvents;
	}