UUIDSolver API

UUIDSolver API

Features

  • Find a player by UUID
  • Find the online UUID of a player (for online-mode servers)
  • Find the offline UUID of a player (for offline-mode servers)

Command

The main command is: /uuidsolver

The subcommands are:

  • "player" to find a player from an UUID
  • "offlineuuid" to find an offline UUID from a player
  • "onlineuuid" to find an online UUID from a player

API

public OfflinePlayer getPlayer(String uuid){
	return Bukkit.getOfflinePlayer(UUID.fromString(uuid));
}
	
public UUID getOfflineUUID(String player){
	return UUID.nameUUIDFromBytes(player.getBytes());
}
	
public UUID getOnlineUUID(String player){
	UUID uuid = null;
	for(OfflinePlayer offlineplayer:Bukkit.getOfflinePlayers()){
		if(offlineplayer.getName() == player){
			uuid = offlineplayer.getUniqueId();
		}
	} for(Player onlineplayer:Bukkit.getOnlinePlayers()){
		if(onlineplayer.getName() == player){
			uuid = onlineplayer.getUniqueId();
		}
	} return uuid;
}

Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    87934
  • Created
    Dec 20, 2014
  • Last Released File
    Dec 20, 2014
  • Total Downloads
    403
  • License

Categories

Members

Recent Files