Skip to content

Commit

Permalink
[ADDED] Added deactivatePlayer() and isPlayerActive(IPlayer) to Secur…
Browse files Browse the repository at this point in the history
…ity.
  • Loading branch information
AODtorusan committed Jun 28, 2015
1 parent 71c304d commit 5ed23e7
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ public static void activatePlayer(final Player player) {
activePlayerTL.set( player );
}

public static void deactivatePlayer() {
activePlayerTL.set( null );
}

public static boolean isPlayerActive(final IPlayer player) {
return activePlayerTL.get() == player;
}

public static void activatePlayerRun(final Player currentPlayer, final Runnable job) {
checkArgument( currentPlayer.isCurrentPlayer(), "Cannot authenticate, player is not the current player: ", currentPlayer );

Expand Down

0 comments on commit 5ed23e7

Please sign in to comment.