Codota Logo
User.getUniqueId
Code IndexAdd Codota to your IDE (free)

How to use
getUniqueId
method
in
org.spongepowered.api.entity.living.player.User

Best Java code snippets using org.spongepowered.api.entity.living.player.User.getUniqueId (Showing top 17 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: IntellectualSites/PlotSquared

@Override public UUID getUUID() {
  return user.getUniqueId();
}
origin: games647/FlexibleLogin

public Optional<Account> getAccount(User player) {
  return Optional.ofNullable(cache.get(player.getUniqueId()));
}
origin: games647/FlexibleLogin

public Optional<Account> remove(User player) {
  return Optional.ofNullable(cache.remove(player.getUniqueId()));
}
origin: games647/FlexibleLogin

public Optional<Account> loadAccount(User player) {
  Optional<Account> optAcc = loadAccount(player.getUniqueId());
  optAcc.ifPresent(account -> cache.put(player.getUniqueId(), account));
  return optAcc;
}
origin: NucleusPowered/Nucleus

/**
 * Gets the {@link Home}s for the specified user, identified by their UUID.
 *
 * @param user The {@link UUID}
 * @return The homes.
 */
default List<Home> getHomes(User user) {
  return getHomes(user.getUniqueId());
}
origin: Valandur/Web-API

public CachedPlayer(User user) {
  super(null);
  this.uuid = UUID.fromString(user.getUniqueId().toString());
  this.name = user.getName();
  this.isOnline = false;
}
public CachedPlayer(Player player) {
origin: NucleusPowered/Nucleus

/**
 * Gets the user metadata for a player with the specified {@link User}.
 * @param user The {@link User}.
 * @return The {@link Result} if the user exists.
 */
default Optional<Result> getUserData(User user) {
  return getUserData(user.getUniqueId());
}
origin: NucleusPowered/Nucleus

/**
 * Gets the number of homes the player currently has.
 *
 * @param user The {@link User}
 * @return The number of homes.
 */
default int getHomeCount(User user) {
  return getHomeCount(user.getUniqueId());
}
origin: NucleusPowered/Nucleus

default Optional<Home> getHome(User user, String name) {
  return getHome(user.getUniqueId(), name);
}
origin: NucleusPowered/Nucleus

/**
 * Create a filter that restricts the mail to the senders provided.
 *
 * <p>
 *     Multiple player filters can be provided - this will return messages authored by all specified players.
 * </p>
 *
 * @param includeConsole If <code>true</code>, include the console/plugins in any returned mail.
 * @param player The {@link UUID}s of the players.
 * @return The {@link MailFilter}
 */
default MailFilter createSenderFilter(boolean includeConsole, final Collection<UUID> player) {
  return m -> m.getSender().map(x -> player.contains(x.getUniqueId())).orElse(includeConsole);
}
origin: NucleusPowered/Nucleus

default void modifyHome(Cause cause, User user, String name, Location<World> location, Vector3d rotation) throws NucleusException {
  modifyHome(cause, user.getUniqueId(), name, location, rotation);
}
origin: games647/FlexibleLogin

@Override
public Optional<Account> loadAccount(User player) {
  Optional<Account> optAcc = loadAccount(player.getName());
  optAcc.ifPresent(account -> cache.put(player.getUniqueId(), account));
  return optAcc;
}
origin: Valandur/Web-API

/**
 * Gets the passed user as a cached object. This method first tries to get the user from the cache, and if
 * it is not found uses the {@link #updatePlayer(User)} method to convert it into a cached object.
 * @param user The user which is returned in it's cached form.
 * @return The cached version of the specified user.
 */
public CachedPlayer getPlayer(User user) {
  Optional<CachedPlayer> p = getPlayer(user.getUniqueId());
  return p.orElseGet(() -> updatePlayer(user));
}
origin: games647/FlexibleLogin

@Override
public CommandResult execute(CommandSource src, CommandContext args) throws CommandException {
  User user = args.<User>getOne("user").get();
  String password = args.<String>getOne("password").get();
  uuidRegister(user.getUniqueId(), src, password);
  return CommandResult.success();
}
origin: games647/FlexibleLogin

@Override
public CommandResult execute(CommandSource src, CommandContext args) {
  User username = args.<User>getOne("user").get();
  UUID sender = null;
  if (src instanceof Identifiable) {
    sender = ((Identifiable) src).getUniqueId();
  }
  UUID finalSender = sender;
  CompletableFuture.supplyAsync(() -> plugin.getDatabase().loadAccount(username.getUniqueId()), asyncExecutor)
      .thenAcceptAsync(optAcc -> onAccLoaded(finalSender, optAcc.orElse(null)), syncExecutor);
  return CommandResult.success();
}
origin: games647/FlexibleLogin

@Override
public CommandResult execute(CommandSource src, CommandContext args) {
  User user = args.<User>getOne("user").get();
  String password = args.<String>getOne("password").get();
  //check if the account is a valid player name
  Task.builder()
      //Async as it could run a SQL query
      .async()
      .execute(new UUIDResetPwTask(plugin, src, password, user.getUniqueId()))
      .submit(plugin);
  return CommandResult.success();
}
origin: games647/FlexibleLogin

@Override
public CommandResult execute(CommandSource src, CommandContext args) {
  if (args.hasAny("a")) {
    Task.builder().execute(plugin.getDatabase()::clearTable).async().submit(plugin);
    src.sendMessage(settings.getText().getTableCleared());
    return CommandResult.success();
  }
  User user = args.<User>getOne("user").get();
  Task.builder()
      //Async as it could run a SQL query
      .async()
      .execute(new UnregisterTask(plugin, src, user.getUniqueId()))
      .submit(plugin);
  return CommandResult.success();
}
org.spongepowered.api.entity.living.playerUsergetUniqueId

Popular methods of User

  • getName
    Gets the player's last known username.
  • get
  • getPlayer
    Gets the related online Player if the player is in fact online.
  • hasPermission
  • isOnline
    Checks if this user is online or not.

Popular in Java

  • Start an intent from android
  • setRequestProperty (URLConnection)
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • Menu (java.awt)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • JButton (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now