|
|
@ -112,13 +112,14 @@ public class UserDataCommand extends Command implements TabProvider {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Delete user data by specified UUID
|
|
|
|
// Delete user data by specified UUID and clear their data cache
|
|
|
|
final UUID version = optionalUuid.get();
|
|
|
|
final UUID version = optionalUuid.get();
|
|
|
|
if (!plugin.getDatabase().deleteSnapshot(user, version)) {
|
|
|
|
if (!plugin.getDatabase().deleteSnapshot(user, version)) {
|
|
|
|
plugin.getLocales().getLocale("error_invalid_version_uuid")
|
|
|
|
plugin.getLocales().getLocale("error_invalid_version_uuid")
|
|
|
|
.ifPresent(executor::sendMessage);
|
|
|
|
.ifPresent(executor::sendMessage);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
plugin.getRedisManager().clearUserData(user);
|
|
|
|
|
|
|
|
|
|
|
|
plugin.getLocales().getLocale("data_deleted",
|
|
|
|
plugin.getLocales().getLocale("data_deleted",
|
|
|
|
version.toString().split("-")[0],
|
|
|
|
version.toString().split("-")[0],
|
|
|
|