Package com.griefdefender.api
Interface Core
public interface Core
-
Method Summary
Modifier and TypeMethodDescriptioncanUseCommand(Object sender, TrustType trustType, @Nullable String claimIdentifier) Checks if the command sender can use the command at its location.deleteAdminClaimGroup(String group) Deletes an adminClaimGroup.booleanDeletes an adminClaimSnapshot.booleandeleteAdminClaimSnapshot(String group, String name) Deletes an adminClaimSnapshotin specified snapshot group.deletePlayerClaimGroup(UUID uuid, String group) Deletes a playerClaimGroup.booleanDeletes a publicClaimSnapshot.booleandeletePublicClaimSnapshot(String group, String name) Deletes a publicClaimSnapshotin specified snapshot group.Gets the current map view of adminClaimGroup's by name.Gets the current map view of adminClaimGroup's byUUID.Gets the current map view of adminClaimSnapshot's.Gets the adminUser.Gets an immutable list of allClaim's.getAllPlayerClaims(UUID playerUniqueId) Gets an immutable list of all playerClaim's.@Nullable ClaimGets the claim with uuid.@Nullable ClaimGets the claim with friendly identifier.@Nullable ClaimgetClaimAt(Object location) Gets the claim at location.@Nullable ClaimgetClaimAt(UUID worldUniqueId, int x, int y, int z) Gets the claim at location.Gets the claim block system used.@Nullable ClaimGroupgetClaimGroupByUUID(UUID uuid) Gets aClaimGroupassociated with uuid.@Nullable ClaimManagergetClaimManager(UUID worldUniqueId) Gets the claim manager of world.@Nullable ClanProviderGets theClanProvider.Gets the defaultinvalid reference
FlagDefinitionGroup.Gets the defaultinvalid reference
OptionDefinitionGroup.Gets the defaultSubject.Gets an unmodifiable map view of friendly claim identifiers.Gets theGroupwith identifier.getPlayerClaimGroupsByName(UUID playerUniqueId) Gets the current map view of playerClaimGroup's by name.getPlayerClaimGroupsByUUID(UUID playerUniqueId) Gets the current map view of playerClaimGroup's byUUID.@Nullable PlayerDatagetPlayerData(UUID worldUniqueId, UUID playerUniqueId) Gets the worldPlayerDatafor specifiedUUID.Gets the current map view of publicClaimSnapshot's.getSubject(String identifier) Gets theSubjectwith identifier.@Nullable UserGets the wildernessUser.@Nullable WorldEditProviderGets theWorldEditProvider.@Nullable UUIDgetWorldUniqueId(Object world) Gets theUUIDof world.booleanChecks if economy mode is enabled on server.booleanChecks if GriefDefender is enabled in world.booleanChecks if the protection module is enabled for flag.
-
Method Details
-
isEnabled
Checks if GriefDefender is enabled in world.- Parameters:
worldProperties- The world properties to check.- Returns:
- true if enabled, false if not
-
getClaimBlockSystem
ClaimBlockSystem getClaimBlockSystem()Gets the claim block system used.- Returns:
- The claim block system
-
isEconomyModeEnabled
boolean isEconomyModeEnabled()Checks if economy mode is enabled on server. -
isProtectionModuleEnabled
Checks if the protection module is enabled for flag.- Parameters:
flag- The claim flag to check- Returns:
- true if enabled, false if not
-
getPlayerData
Gets the worldPlayerDatafor specifiedUUID.- Parameters:
playerUniqueId- The player UUIDworldProperties- The world properties- Returns:
- The player data associated with uuid, if available
-
getClaim
Gets the claim with uuid.- Returns:
- The claim with uuid, if available
-
getClaim
Gets the claim with friendly identifier.
Note: UseAdminUserUUID for admin claims.
Note: UseWildernessUserUUID for wilderness claims.
Note: Use player UUID for player owned claims.- Parameters:
ownerUniqueId- The owner UUID of claimfriendlyIdentifier- The friendly name of claim- Returns:
- The claim with friendly identifier, if available
-
getClaimAt
Gets the claim at location.- Parameters:
location- The location- Returns:
- The claim, if available
-
getClaimAt
Gets the claim at location.- Parameters:
worldUniqueId- The world uuidx- The location block X coordy- The location block Y coordz- The location block Z coord- Returns:
- The claim, if available
-
getWorldUniqueId
Gets theUUIDof world.- Parameters:
world- The world object or identifier- Returns:
- The world UUID, if available
-
getFriendlyIdentifierMapView
Gets an unmodifiable map view of friendly claim identifiers.- Returns:
- The unmodifiable map view, empty map if none exist
-
getAllClaims
Gets an immutable list of allClaim's.- Returns:
- An immutable list of all claims, empty list if none were found
-
getAllPlayerClaims
Gets an immutable list of all playerClaim's.
Note: This will return an empty list if player has no claims.- Parameters:
playerUniqueId- The player UUID- Returns:
- An immutable list of all claims, empty list if none were found
-
getClaimManager
Gets the claim manager of world.- Parameters:
worldUniqueId- The world uuid- Returns:
- The claim manager of world
-
getDefaultSubject
Subject getDefaultSubject()- Returns:
- The default subject
-
getSubject
Gets theSubjectwith identifier.- Parameters:
identifier-- Returns:
- The subject
-
getAdminUser
User getAdminUser()- Returns:
- The admin user
-
getWildernessUser
User getWildernessUser()- Returns:
- The wilderness user
-
getUser
- Parameters:
uuid- The uuid- Returns:
- The user, if available
-
getDefaultFlagDefinitionGroup
Group getDefaultFlagDefinitionGroup()Gets the defaultinvalid reference
FlagDefinitionGroup.
Note: This group is used to apply default flag definition permissions to all users.- Returns:
- The default flag definition group
-
getDefaultOptionDefinitionGroup
Group getDefaultOptionDefinitionGroup()Gets the defaultinvalid reference
OptionDefinitionGroup.
Note: This group is used to apply default option definition permissions to all users.- Returns:
- The default option definition group
-
getGroup
Gets theGroupwith identifier.- Parameters:
identifier-- Returns:
- The subject
-
getClanProvider
@Nullable ClanProvider getClanProvider()- Returns:
- The clan provider, if available
-
getWorldEditProvider
@Nullable WorldEditProvider getWorldEditProvider()- Returns:
- The worldedit provider, if available
-
deleteAdminClaimSnapshot
Deletes an adminClaimSnapshot.- Parameters:
name- The name of snapshot to deletetype- The type of snapshot to delete- Returns:
- true if snapshot was deleted, false otherwise
-
deleteAdminClaimSnapshot
Deletes an adminClaimSnapshotin specified snapshot group.- Parameters:
group- The name of snapshot group to search inname- The name of snapshot to deletetype- The type of snapshot to delete- Returns:
- true if snapshot was deleted, false otherwise
-
deletePublicClaimSnapshot
Deletes a publicClaimSnapshot.- Parameters:
name- The name of snapshot to deletetype- The type of snapshot to delete- Returns:
- true if snapshot was deleted, false otherwise
-
deletePublicClaimSnapshot
Deletes a publicClaimSnapshotin specified snapshot group.- Parameters:
group- The name of snapshot group to search inname- The name of snapshot to deletetype- The type of snapshot to delete- Returns:
- true if snapshot was deleted, false otherwise
-
getAdminClaimSnapshots
Map<String,Map<String, getAdminClaimSnapshots()ClaimSnapshot>> Gets the current map view of adminClaimSnapshot's.- Returns:
- An unmodifiable map view of admin claim snapshots
-
getPublicClaimSnapshots
Map<String,Map<String, getPublicClaimSnapshots()ClaimSnapshot>> Gets the current map view of publicClaimSnapshot's.- Returns:
- An unmodifiable map view of public claim snapshots
-
getAdminClaimGroupsByName
Map<String,ClaimGroup> getAdminClaimGroupsByName()Gets the current map view of adminClaimGroup's by name.- Returns:
- An unmodifiable map view of admin claim groups
-
getAdminClaimGroupsByUUID
Map<UUID,ClaimGroup> getAdminClaimGroupsByUUID()Gets the current map view of adminClaimGroup's byUUID.- Returns:
- An unmodifiable map view of admin claim groups
-
getPlayerClaimGroupsByName
Gets the current map view of playerClaimGroup's by name.- Parameters:
playerUniqueId- The player uuid- Returns:
- An unmodifiable map view of player claim groups
-
getPlayerClaimGroupsByUUID
Gets the current map view of playerClaimGroup's byUUID.- Parameters:
playerUniqueId- The player uuid- Returns:
- An unmodifiable map view of player claim groups
-
getClaimGroupByUUID
Gets aClaimGroupassociated with uuid.- Parameters:
uuid- The claim group uuid to search for.- Returns:
- The claim group, if available
-
deleteAdminClaimGroup
Deletes an adminClaimGroup.
Note: This will automatically unjoin anyClaimcurrently joined to claim group. Use with caution.- Parameters:
group- The name of the claim group to delete- Returns:
- The permission result future
-
deletePlayerClaimGroup
Deletes a playerClaimGroup.
Note: This will automatically unjoin anyClaimcurrently joined to claim group. Use with caution.- Parameters:
uuid- The uuid of playergroup- The name of the claim group to delete- Returns:
- The permission result future
-
canUseCommand
Checks if the command sender can use the command at its location.- Parameters:
sender- The command sendertrustType- The trust typeclaimIdentifier- The claim identifier if check is for another claim- Returns:
- The command result
-