OfflinePlayer.getName
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.bukkit.OfflinePlayer.getName(Showing top 15 results out of 315)

origin: Bukkit/Bukkit

private static String offlinePlayerSetToString(Set<OfflinePlayer> set) {
  StringBuilder string = new StringBuilder();
  String lastValue = null;
  for (OfflinePlayer value : set) {
    string.append(lastValue = value.getName()).append(", ");
  }
  string.delete(string.length() - 2, Integer.MAX_VALUE);
  if (string.length() != lastValue.length()) {
    string.insert(string.length() - lastValue.length(), "and ");
  }
  return string.toString();
}
origin: Bukkit/Bukkit

  @Override
  public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
    Validate.notNull(sender, "Sender cannot be null");
    Validate.notNull(args, "Arguments cannot be null");
    Validate.notNull(alias, "Alias cannot be null");

    if (args.length == 1) {
      List<String> completions = new ArrayList<String>();
      for (OfflinePlayer player : Bukkit.getBannedPlayers()) {
        String name = player.getName();
        if (StringUtil.startsWithIgnoreCase(name, args[0])) {
          completions.add(name);
        }
      }
      return completions;
    }
    return ImmutableList.of();
  }
}
origin: Bukkit/Bukkit

List<String> completions = new ArrayList<String>();
for (OfflinePlayer player : Bukkit.getOfflinePlayers()) {
  String name = player.getName();
  if (StringUtil.startsWithIgnoreCase(name, args[1]) && !player.isWhitelisted()) {
    completions.add(name);
List<String> completions = new ArrayList<String>();
for (OfflinePlayer player : Bukkit.getWhitelistedPlayers()) {
  String name = player.getName();
  if (StringUtil.startsWithIgnoreCase(name, args[1])) {
    completions.add(name);
origin: Bukkit/Bukkit

result.append(player.getName());
origin: Bukkit/Bukkit

  addedPlayers.add(offlinePlayer.getName());
if (team != null) {
  team.removePlayer(offlinePlayer);
  left.add(offlinePlayer.getName());
} else {
  noTeam.add(offlinePlayer.getName());
origin: Bukkit/Bukkit

  @Override
  public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
    Validate.notNull(sender, "Sender cannot be null");
    Validate.notNull(args, "Arguments cannot be null");
    Validate.notNull(alias, "Alias cannot be null");

    if (args.length == 1) {
      List<String> completions = new ArrayList<String>();
      for (OfflinePlayer player : Bukkit.getOperators()) {
        String playerName = player.getName();
        if (StringUtil.startsWithIgnoreCase(playerName, args[0])) {
          completions.add(playerName);
        }
      }
      return completions;
    }
    return ImmutableList.of();
  }
}
origin: GlowstoneMC/Glowstone

@Override
@Deprecated
public boolean hasPlayer(OfflinePlayer player)
  throws IllegalArgumentException, IllegalStateException {
  return players.contains(player.getName());
}
origin: GlowstoneMC/Glowstone

@Override
public Team getPlayerTeam(OfflinePlayer player) throws IllegalArgumentException {
  checkNotNull(player, "Player cannot be null");
  return entryTeams.get(player.getName());
}
origin: GlowstoneMC/Glowstone

@Override
@Deprecated
public Score getScore(OfflinePlayer player)
  throws IllegalArgumentException, IllegalStateException {
  checkNotNull(player, "Player cannot be null");
  return getScore(player.getName());
}
origin: webbukkit/dynmap

@Override
public String getDisplayName() {
  if(player != null)
    return player.getDisplayName();
  else
    return offplayer.getName();
}
@Override
origin: GlowstoneMC/Glowstone

@Override
public Set<Score> getScores(OfflinePlayer player) throws IllegalArgumentException {
  checkNotNull(player, "Player cannot be null");
  return getScores(player.getName());
}
origin: GlowstoneMC/Glowstone

@Override
@Deprecated
public void addPlayer(OfflinePlayer player)
  throws IllegalStateException, IllegalArgumentException {
  players.add(player.getName());
}
origin: GlowstoneMC/Glowstone

@Override
public void resetScores(OfflinePlayer player) throws IllegalArgumentException {
  checkNotNull(player, "Player cannot be null");
  resetScores(player.getName());
}
origin: webbukkit/dynmap

@Override
public String getName() {
  return offplayer.getName();
}
@Override
origin: GlowstoneMC/Glowstone

@Override
@Deprecated
public boolean removePlayer(OfflinePlayer player)
  throws IllegalStateException, IllegalArgumentException {
  return players.remove(player.getName());
}
org.bukkitOfflinePlayergetName

Javadoc

Returns the name of this player

Names are no longer unique past a single game session. For persistent storage it is recommended that you use #getUniqueId() instead.

Popular methods of OfflinePlayer

  • getUniqueId
    Returns the UUID of this player
  • isOnline
    Checks if this player is currently online
  • getPlayer
    Gets a Player object that this represents, if there is one If the player is online, this will return
  • getLastPlayed
    Gets the last date and time that this player was witnessed on this server. If the player has never p
  • hasPlayedBefore
    Checks if this player has played on this server before.
  • isOp
  • setOp
  • getBedSpawnLocation
    Gets the Location where the player will spawn at their bed, null if they have not slept in one or th
  • setWhitelisted
    Sets if this player is whitelisted or not
  • getFirstPlayed
    Gets the first date and time that this player was witnessed on this server. If the player has never
  • isBanned
    Checks if this player is banned or not
  • isWhitelisted
    Checks if this player is whitelisted or not
  • isBanned,
  • isWhitelisted,
  • getUUID,
  • setBanned

Popular classes and methods

  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • SortedMap (java.util)
    A Map that further provides a total ordering on its keys. The map is ordered according to the Compar
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JTextField (javax.swing)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)