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

How to use
getUserData
method
in
mage.players.Player

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

origin: magefree/mage

@Override
public synchronized void setUseFirstManaAbility(UUID playerId, boolean useFirstManaAbility) {
  Player player = state.getPlayer(playerId);
  if (player != null) {
    player.getUserData().setUseFirstManaAbility(useFirstManaAbility);
  }
}
origin: magefree/mage

TournamentPlayerView(TournamentPlayer tournamentPlayer) {
  this.name = tournamentPlayer.getPlayer().getName();
  StringBuilder sb = new StringBuilder(tournamentPlayer.getState().toString());
  String stateInfo = tournamentPlayer.getStateInfo();
  if (!stateInfo.isEmpty()) {
    sb.append(" (").append(stateInfo).append(')');
  }
  sb.append(tournamentPlayer.getDisconnectInfo());
  this.state = sb.toString();
  this.points = tournamentPlayer.getPoints();
  this.results = tournamentPlayer.getResults();
  this.quit = !tournamentPlayer.isInTournament();
  this.history = tournamentPlayer.getPlayer().getUserData().getHistory();
  this.flagName = tournamentPlayer.getPlayer().getUserData().getFlagName();
}
origin: magefree/mage

@Override
public synchronized void setManaPaymentMode(UUID playerId, boolean autoPayment) {
  Player player = state.getPlayer(playerId);
  if (player != null) {
    player.getUserData().setManaPoolAutomatic(autoPayment);
    player.getManaPool().setAutoPayment(autoPayment);
  }
}
origin: magefree/mage

@Override
public synchronized void setManaPaymentModeRestricted(UUID playerId, boolean autoPaymentRestricted) {
  Player player = state.getPlayer(playerId);
  if (player != null) {
    player.getUserData().setManaPoolAutomaticRestricted(autoPaymentRestricted);
    player.getManaPool().setAutoPaymentRestricted(autoPaymentRestricted);
  }
}
origin: magefree/mage

public UserData getControllingPlayersUserData(Game game) {
  if (!isGameUnderControl()) {
    Player player = game.getPlayer(getTurnControlledBy());
    if (player.isHuman()) {
      return player.getUserData();
    }
  }
  return this.userData;
}
origin: magefree/mage

public SeatView(Seat seat) {
  if (seat.getPlayer() != null) {
    this.playerId = seat.getPlayer().getId();
    this.playerName = seat.getPlayer().getName();
    if (seat.getPlayer().getUserData() == null) {
      this.flagName = UserData.getDefaultFlagName();
      this.history = "";
      this.generalRating = 0;
      this.constructedRating = 0;
      this.limitedRating = 0;
    } else {
      this.flagName = seat.getPlayer().getUserData().getFlagName();
      this.history = seat.getPlayer().getUserData().getHistory();
      this.generalRating = seat.getPlayer().getUserData().getGeneralRating();
      this.constructedRating = seat.getPlayer().getUserData().getConstructedRating();
      this.limitedRating = seat.getPlayer().getUserData().getLimitedRating();
    }
  } else {
    // Empty seat
    this.playerName = "";
    this.flagName = "";
    this.history = "";
    this.generalRating = 0;
    this.constructedRating = 0;
    this.limitedRating = 0;
  }
  this.playerType = seat.getPlayerType();
}
origin: magefree/mage

    ? player.getLibrary().getFromTop(game) : null;
this.topCard = cardOnTop != null ? new CardView(cardOnTop) : null;
if (player.getUserData() != null) {
  this.userData = player.getUserData();
} else {
  this.userData = UserData.getDefaultUserDataView();
mage.playersPlayergetUserData

Javadoc

Get data from the client Preferences (e.g. avatarId or showAbilityPickerForce)

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 post requests using okhttp
  • compareTo (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getResourceAsStream (ClassLoader)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top plugins for WebStorm
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