Fix Essentials version display

This commit is contained in:
KHobbits 2013-03-11 02:01:00 +00:00
parent e60c65cfc5
commit 664fe18bbe
2 changed files with 8 additions and 2 deletions

View file

@ -351,7 +351,7 @@ public class Essentials extends JavaPlugin implements IEssentials
}
// New mail notification
if (user != null && !getSettings().isCommandDisabled("mail") && !commandLabel.equals("mail") && user.isAuthorized("essentials.mail"))
if (user != null && !getSettings().isCommandDisabled("mail") && !command.getName().equals("mail") && user.isAuthorized("essentials.mail"))
{
final List<String> mail = user.getMails();
if (mail != null && !mail.isEmpty())
@ -360,6 +360,12 @@ public class Essentials extends JavaPlugin implements IEssentials
}
}
//Print version even if admin command is not available
if (command.getName().equals("essentials"))
{
sender.sendMessage("This server is running Essentials " + getDescription().getVersion());
}
// Check for disabled commands
if (getSettings().isCommandDisabled(commandLabel))
{
@ -613,6 +619,7 @@ public class Essentials extends JavaPlugin implements IEssentials
{
return this.getScheduler().runTaskAsynchronously(this, run);
}
@Override
public BukkitTask runTaskLaterAsynchronously(final Runnable run, final long delay)
{

View file

@ -66,7 +66,6 @@ public class Commandessentials extends EssentialsCommand
//If you do not supply an argument this command will list 'overridden' commands.
private void run_disabled(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
sender.sendMessage("Essentials " + ess.getDescription().getVersion());
sender.sendMessage("/<command> <reload/debug>");
final StringBuilder disabledCommands = new StringBuilder();