/*
 * Copyright 2016 Ali Moghnieh
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.blurengine.blur.events.players;

import com.google.common.base.Preconditions;

import com.blurengine.blur.events.session.BlurSessionEvent;
import com.blurengine.blur.session.BlurPlayer;
import com.blurengine.blur.session.BlurSession;

import javax.annotation.Nonnull;

/**
 * Represents a {@link BlurPlayer} event.
 */
public abstract class BlurPlayerEvent extends BlurSessionEvent {

    protected final BlurPlayer blurPlayer;
    
    public BlurPlayerEvent(@Nonnull BlurPlayer blurPlayer) {
        this(Preconditions.checkNotNull(blurPlayer, "blurPlayer cannot be null."), blurPlayer.getSession());
    }

    public BlurPlayerEvent(BlurPlayer blurPlayer, @Nonnull BlurSession session) {
        super(Preconditions.checkNotNull(session, "session cannot be null."));
        this.blurPlayer = blurPlayer;
    }

    public BlurPlayer getBlurPlayer() {
        return blurPlayer;
    }
}

@@ -1030,20 +1030,16 @@
 Player;%0A
-    
 %0A    pub
@@ -1406,32 +1406,387 @@
 rPlayer;%0A    %7D%0A%0A
+    /**%0A     * Returns the primary %7B@link BlurPlayer%7D involved in this event. Subclass events will have delegate methods that represent what this primary%0A     * player is.%0A     * %3Cp /%3E%0A     * E.g. %7B@link PlayerDamagePlayerEvent%7D returns the damager. %7B@link PlayerKilledEvent%7D returns the player that was killed.%0A     * @return primary blur player%0A     */%0A
     public BlurP

Document BlurPlayerEvent further.