Package dev.cwhead.GravesX.graveutils
Class GraveProtectionRole
java.lang.Object
dev.cwhead.GravesX.graveutils.GraveProtectionRole
Utility class for determining a player's role relative to a grave.
Supports both Java and Bedrock players via Floodgate/Floodgate UUID normalization. Provides methods to get the player's role as an enum for internal plugin logic or API usage.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum representing the role of a player relative to a grave. -
Constructor Summary
ConstructorsConstructorDescriptionGraveProtectionRole(Graves plugin) Constructs a new GraveProtectionRole utility with the plugin instance. -
Method Summary
Modifier and TypeMethodDescriptionDetermines the role of a player for a given grave, using their normalized UUID.Convenience method to determine a player's role relative to a grave.
-
Constructor Details
-
GraveProtectionRole
Constructs a new GraveProtectionRole utility with the plugin instance.- Parameters:
plugin- the main Graves plugin instance
-
-
Method Details
-
getRole
Determines the role of a player for a given grave, using their normalized UUID.This method handles Floodgate UUID normalization if required. The role can be OWNER, KILLER, OTHER, MISSING_OWNER, or MISSING_OTHER.
- Parameters:
grave- the grave to checkplayerId- the normalized UUID of the player- Returns:
- the
GraveProtectionRole.GraveRolerepresenting the player's role relative to the grave
-
getRole
Convenience method to determine a player's role relative to a grave.Automatically normalizes the player's UUID if Floodgate is present.
- Parameters:
player- the player to checkgrave- the grave to check- Returns:
- the
GraveProtectionRole.GraveRolerepresenting the player's role relative to the grave
-