Class PreLookupProfileEvent
java.lang.Object
org.bukkit.event.Event
com.destroystokyo.paper.event.profile.PreLookupProfileEvent
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.isAsynchronous()
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProfileProperties
(@NotNull Set<ProfileProperty> properties) Adds any properties currently missing to the pre-populated properties set, replacing any that already were set.static @NotNull HandlerList
getName()
getUUID()
If this value is leftnull
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 aLookupProfileEvent
void
setProfileProperties
(@NotNull Set<ProfileProperty> properties) Clears any existing pre-populated properties and uses the supplied properties Any property in this Set will be automatically prefilled on this Profilevoid
Sets the UUID for this player name.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PreLookupProfileEvent
-
-
Method Details
-
getName
- Returns:
- Name of the profile
-
getUUID
If this value is leftnull
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 aLookupProfileEvent
- Returns:
- The UUID of the profile if it has already been provided by a plugin
-
setUUID
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 ornull
to reset
-
getProfileProperties
- Returns:
- The currently pending pre-populated properties. Any property in this Set will be automatically prefilled on this Profile
-
setProfileProperties
Clears any existing pre-populated 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
Adds any properties currently missing to the pre-populated 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
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-