diff --git a/Changelog.txt b/Changelog.txt index 81e4250fc..eaa2fb5ca 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -12,6 +12,7 @@ Version 1.3.06-dev + Added API functions for obtaining offline profiles & profiles via player names + Changed Archery's Daze to deal 4 DMG on proc (2 Hearts) + Changed /addlevel command to work for offline users + = Fixed mmoupdate not being useable from console ! Changed PlayerProfile constructor to always take a boolean ! Changed getPlayerProfile function to work for online & offline users diff --git a/src/main/java/com/gmail/nossr50/commands/general/MmoupdateCommand.java b/src/main/java/com/gmail/nossr50/commands/general/MmoupdateCommand.java index 4d91aefb9..5361adbdb 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/MmoupdateCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/general/MmoupdateCommand.java @@ -16,24 +16,24 @@ import com.gmail.nossr50.runnables.SQLConversionTask; public class MmoupdateCommand implements CommandExecutor { @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { - if (!(sender instanceof Player)) { - sender.sendMessage("This command does not support console useage."); //TODO: Needs more locale. + Player player = null; + + if(sender instanceof Player) { + player = (Player)sender; + } + + if (sender instanceof Player && !mcPermissions.getInstance().admin(player)) { + sender.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission")); return true; } - - Player player = (Player) sender; - - if (!mcPermissions.getInstance().admin(player)) { - player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission")); - return true; - } - player.sendMessage(ChatColor.GRAY + "Starting conversion..."); //TODO: Needs more locale. + + sender.sendMessage(ChatColor.GRAY + "Starting conversion..."); //TODO: Needs more locale. Users.clearUsers(); convertToMySQL(); for (Player x : Bukkit.getServer().getOnlinePlayers()) { Users.addUser(x); } - player.sendMessage(ChatColor.GREEN + "Conversion finished!"); //TODO: Needs more locale. + sender.sendMessage(ChatColor.GREEN + "Conversion finished!"); //TODO: Needs more locale. return true; }