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
Nested ClassesModifier and TypeClassDescriptionstatic classThe policy for locating users. -
Constructor Summary
ConstructorsConstructorDescriptionDomainInputResolver(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 UUIDTry to parse a UUID locator from input.voidsetLocatorPolicy(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:
callin 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
nullif the input is not a UUID
-