Interface IdentityHandle


public interface IdentityHandle
One applied mask, and the way to take it off again.

A handle is what IdentityService.mask(org.bukkit.plugin.Plugin, dev.itsharshxd.zentrix.api.game.ZentrixGame, org.bukkit.entity.Player, dev.itsharshxd.zentrix.api.identity.MaskedIdentity) hands back. Releasing it restores the player's real profile immediately; Zentrix releases it on its own when the match ends, the player leaves, the providing plugin is disabled or the server shuts down, so a caller that forgets can still not strand a player behind somebody else's face.

Releasing twice is harmless.

Since:
1.6.0
  • Method Summary

    Modifier and Type
    Method
    Description
    The face this handle applied.
    boolean
    Whether the mask is still on.
    @NotNull UUID
    The masked player.
    boolean
    Takes the mask off and puts the real profile back.
  • Method Details

    • playerId

      @NotNull @NotNull UUID playerId()
      The masked player.
    • identity

      @NotNull @NotNull MaskedIdentity identity()
      The face this handle applied.
    • isActive

      boolean isActive()
      Whether the mask is still on.
    • release

      boolean release()
      Takes the mask off and puts the real profile back.
      Returns:
      true when this call was the one that removed it