From 8db9c69ed0d1ea36f07bd10ad82e1a0a97535e5f Mon Sep 17 00:00:00 2001 From: Xephi Date: Sat, 14 Jun 2014 02:13:12 +0200 Subject: [PATCH] Fix RoyalAuth Command --- src/main/java/fr/xephi/authme/commands/AdminCommand.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/xephi/authme/commands/AdminCommand.java b/src/main/java/fr/xephi/authme/commands/AdminCommand.java index 8a180b7e6..aa6ddd522 100644 --- a/src/main/java/fr/xephi/authme/commands/AdminCommand.java +++ b/src/main/java/fr/xephi/authme/commands/AdminCommand.java @@ -566,8 +566,12 @@ public class AdminCommand implements CommandExecutor { sender.sendMessage("Usage : /authme switchantibot on/off"); return true; } else if (args[0].equalsIgnoreCase("royalauth")) { - new RoyalAuthConverter(plugin); - sender.sendMessage("[AuthMe] RoyalAuth database has been imported correctly"); + Converter converter = new RoyalAuthConverter(plugin); + try { + Bukkit.getScheduler().runTaskAsynchronously(plugin, converter); + } catch (Exception e) { + sender.sendMessage("Error while importing RoyalAuth data, check your logs"); + } return true; } else if (args[0].equalsIgnoreCase("getip")) { if (args.length < 2) {