Class UUIDMigration
java.lang.Object
com.sk89q.worldguard.protection.managers.migration.UUIDMigration
- All Implemented Interfaces:
Migration
Migrates names to UUIDs for all the worlds in a region store.
-
Constructor Summary
ConstructorsConstructorDescriptionUUIDMigration
(RegionDriver driver, com.sk89q.worldguard.util.profile.resolver.ProfileService profileService, FlagRegistry flagRegistry) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get whether names that have no UUID equivalent (i.e.final void
migrate()
Execute the migration.protected void
migrate
(RegionDatabase store) Called for all the worlds in the driver.protected void
Called after migration has successfully completed.void
setKeepUnresolvedNames
(boolean keepUnresolvedNames) Set whether names that have no UUID equivalent (i.e.
-
Constructor Details
-
UUIDMigration
public UUIDMigration(RegionDriver driver, com.sk89q.worldguard.util.profile.resolver.ProfileService profileService, FlagRegistry flagRegistry) Create a new instance.- Parameters:
driver
- the storage driverprofileService
- the profile serviceflagRegistry
- the flag registry
-
-
Method Details
-
migrate
Called for all the worlds in the driver.- Parameters:
store
- the region store- Throws:
MigrationException
- on migration error
-
postMigration
protected void postMigration()Called after migration has successfully completed. -
getKeepUnresolvedNames
public boolean getKeepUnresolvedNames()Get whether names that have no UUID equivalent (i.e. name that is not owned) should be kept as names and not removed.- Returns:
- true to keep names
-
setKeepUnresolvedNames
public void setKeepUnresolvedNames(boolean keepUnresolvedNames) Set whether names that have no UUID equivalent (i.e. name that is not owned) should be kept as names and not removed.- Parameters:
keepUnresolvedNames
- true to keep names
-
migrate
Description copied from interface:Migration
Execute the migration.- Specified by:
migrate
in interfaceMigration
- Throws:
MigrationException
- thrown if the migration fails
-