Class DomainInputResolver
java.lang.Object
com.sk89q.worldguard.protection.util.DomainInputResolver
- All Implemented Interfaces:
Callable<DefaultDomain>
Resolves input for a domain (i.e. "player1 player2 <uuid> g:group").
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The policy for locating users. -
Constructor Summary
ConstructorDescriptionDomainInputResolver
(com.sk89q.worldguard.util.profile.resolver.ProfileService profileService, String[] input) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptioncall()
com.google.common.base.Function<DefaultDomain,
DefaultDomain> createAddAllFunction
(DefaultDomain target) Deprecated.was only used for Future transformation.com.google.common.base.Function<DefaultDomain,
DefaultDomain> createRemoveAllFunction
(DefaultDomain target) Deprecated.was only used for Future transformation.Get the policy used for identifying users.static UUID
Try to parse a UUID locator from input.void
setLocatorPolicy
(DomainInputResolver.UserLocatorPolicy locatorPolicy) Set the policy used for identifying users.
-
Constructor Details
-
DomainInputResolver
public DomainInputResolver(com.sk89q.worldguard.util.profile.resolver.ProfileService profileService, String[] input) Create a new instance.- Parameters:
profileService
- the profile serviceinput
- the input to parse
-
-
Method Details
-
getLocatorPolicy
Get the policy used for identifying users.- Returns:
- the policy
-
setLocatorPolicy
Set the policy used for identifying users.- Parameters:
locatorPolicy
- the policy
-
call
- Specified by:
call
in interfaceCallable<DefaultDomain>
- Throws:
UnresolvedNamesException
-
createAddAllFunction
@Deprecated public com.google.common.base.Function<DefaultDomain,DefaultDomain> createAddAllFunction(DefaultDomain target) Deprecated.was only used for Future transformation. Can be replaced withregion.getOwners()::addAll
(or getMembers). -
createRemoveAllFunction
@Deprecated public com.google.common.base.Function<DefaultDomain,DefaultDomain> createRemoveAllFunction(DefaultDomain target) Deprecated.was only used for Future transformation. Can be replaced withregion.getOwners()::removeAll
(or getMembers). -
parseUUID
Try to parse a UUID locator from input.- Parameters:
input
- the input- Returns:
- a UUID or
null
if the input is not a UUID
-