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 TypeMethodDescriptionbooleanGet whether names that have no UUID equivalent (i.e.voidmigrate()Execute the migration.protected voidmigrate(RegionDatabase store)Called for all the worlds in the driver.protected voidCalled after migration has successfully completed.voidsetKeepUnresolvedNames(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:MigrationExecute the migration.- Specified by:
migratein interfaceMigration- Throws:
MigrationException- thrown if the migration fails
-