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()
  • Constructor Details

  • 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()