Tabnine Logo
Player.getPriorityTimeLeft
Code IndexAdd Tabnine to your IDE (free)

How to use
getPriorityTimeLeft
method
in
mage.players.Player

Best Java code snippets using mage.players.Player.getPriorityTimeLeft (Showing top 4 results out of 315)

origin: magefree/mage

@Override
public void endGame() {
  Game game = getGame();
  for (MatchPlayer matchPlayer : this.players) {
    Player player = game.getPlayer(matchPlayer.getPlayer().getId());
    if (player != null) {
      // get the left time from player priority timer
      if (game.getPriorityTime() > 0) {
        matchPlayer.setPriorityTimeLeft(player.getPriorityTimeLeft());
      }
      if (player.hasQuit()) {
        matchPlayer.setQuit(true);
      }
      if (player.hasWon()) {
        matchPlayer.addWin();
      }
    }
  }
  if (game.isADraw()) {
    addDraw();
  }
  checkIfMatchEnds();
  game.fireGameEndInfo();
  gamesInfo.add(createGameInfo(game));
}
origin: magefree/mage

this.isActive = (player.getId().equals(state.getActivePlayerId()));
this.hasPriority = player.getId().equals(state.getPriorityPlayerId());
this.priorityTimeLeft = player.getPriorityTimeLeft();
this.timerActive = (this.hasPriority && player.isGameUnderControl())
    || (player.getPlayersUnderYourControl().contains(state.getPriorityPlayerId()))
origin: magefree/mage

Player player = game.getState().getPlayer(playerId);
if (player != null) {
  timer = createPlayerTimer(event.getPlayerId(), player.getPriorityTimeLeft());
} else {
  throw new MageException("RESUME_TIMER: player can't be null");
origin: magefree/mage

if (priorityTime > 0 && player.getPriorityTimeLeft() == Integer.MAX_VALUE) {
  initTimer(player.getId());
mage.playersPlayergetPriorityTimeLeft

Javadoc

Returns seconds left to play the game.

Popular methods of Player

  • getId
  • getHand
  • getName
  • getLife
  • getLibrary
  • hasLeft
  • hasWon
  • getCounters
  • hasLost
  • copy
  • damage
  • declareAttacker
  • damage,
  • declareAttacker,
  • getGraveyard,
  • getPlayersUnderYourControl,
  • activateAbility,
  • canLose,
  • choose,
  • declareBlocker,
  • gainLife,
  • getAttachments

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now