Package com.destroystokyo.paper.event.profile

# Class PreLookupProfileEvent

java.lang.Object
org.bukkit.event.Event
com.destroystokyo.paper.event.profile.PreLookupProfileEvent

public class PreLookupProfileEvent extends Event
Allows a plugin to intercept a Profile Lookup for a Profile by name At the point of event fire, the UUID and properties are unset. If a plugin sets the UUID, and optionally the properties, the API call to look up the profile may be skipped. No guarantees are made about thread execution context for this event. If you need to know, check event.isAsync()

## Nested Class Summary

## Nested classes/interfaces inherited from class org.bukkit.event.Event

`Event.Result`

## Constructor Summary

Constructors
Constructor
Description
`PreLookupProfileEvent(@NotNull String name)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addProfileProperties(@NotNull Set<ProfileProperty> properties)`
Adds any properties currently missing to the prepopulated properties set, replacing any that already were set.
`static @NotNull HandlerList`
`getHandlerList()`
`@NotNull HandlerList`
`getHandlers()`
`@NotNull String`
`getName()`
`@NotNull Set<ProfileProperty>`
`getProfileProperties()`
`@Nullable UUID`
`getUUID()`
If this value is left null by the completion of the event call, then the server will trigger a call to the Mojang API to look up the UUID (Network Request), and subsequently, fire a `LookupProfileEvent`
`void`
`setProfileProperties(@NotNull Set<ProfileProperty> properties)`
Clears any existing prepopulated properties and uses the supplied properties Any property in this Set will be automatically prefilled on this Profile
`void`
`setUUID(@Nullable UUID uuid)`
Sets the UUID for this player name.

### Methods inherited from class org.bukkit.event.Event

`callEvent, getEventName, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PreLookupProfileEvent

public PreLookupProfileEvent(@NotNull @NotNull String name)

## Method Details

### getName

@NotNull public @NotNull String getName()

Returns:
  Name of the profile

### getUUID

@Nullable public @Nullable UUID getUUID()
If this value is left null by the completion of the event call, then the server will trigger a call to the Mojang API to look up the UUID (Network Request), and subsequently, fire a `LookupProfileEvent`

Returns:
  The UUID of the profile if it has already been provided by a plugin

### setUUID

public void setUUID(@Nullable @Nullable UUID uuid)
Sets the UUID for this player name. This will skip the initial API call to find the players UUID. However, if Profile Properties are needed by the server, you must also set them or else an API call might still be made.

Parameters:
  `uuid` - the UUID to set for the profile or null to reset

### getProfileProperties

@NotNull public @NotNull Set<ProfileProperty> getProfileProperties()

Returns:
  The currently pending prepopulated properties. Any property in this Set will be automatically prefilled on this Profile

### setProfileProperties

public void setProfileProperties(@NotNull @NotNull Set<ProfileProperty> properties)
Clears any existing prepopulated properties and uses the supplied properties Any property in this Set will be automatically prefilled on this Profile

Parameters:
  `properties` - The properties to add

### addProfileProperties

public void addProfileProperties(@NotNull @NotNull Set<ProfileProperty> properties)
Adds any properties currently missing to the prepopulated properties set, replacing any that already were set. Any property in this Set will be automatically prefilled on this Profile

Parameters:
  `properties` - The properties to add

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Specified by:
  `getHandlers` in class `Event`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()