mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2026-01-04 15:31:38 +00:00
Remove cached account
This commit is contained in:
@@ -191,6 +191,7 @@ public class RPGRegionsCommand extends BaseCommand {
|
||||
case 1: {
|
||||
if (player.hasPlayedBefore()) {
|
||||
plugin.getManagers().getStorageManager().clearDiscoveries(player.getUniqueId());
|
||||
if (!player.isOnline()) plugin.getManagers().getStorageManager().removeCachedAccount(player.getUniqueId());
|
||||
sender.sendMessage(ChatColor.GREEN + "Players discoveries has been cleared.");
|
||||
} else {
|
||||
sender.sendMessage(ChatColor.RED + "That player cannot be found.");
|
||||
@@ -203,6 +204,7 @@ public class RPGRegionsCommand extends BaseCommand {
|
||||
String regionId = args[1];
|
||||
if (plugin.getManagers().getRegionsCache().getConfiguredRegions().containsKey(regionId)) {
|
||||
plugin.getManagers().getStorageManager().clearDiscovery(player.getUniqueId(), regionId);
|
||||
if (!player.isOnline()) plugin.getManagers().getStorageManager().removeCachedAccount(player.getUniqueId());
|
||||
sender.sendMessage(ChatColor.GREEN + "Discovery cleared.");
|
||||
} else {
|
||||
sender.sendMessage(ChatColor.RED + "Region does not exist or is not configured.");
|
||||
|
||||
Reference in New Issue
Block a user