Improved the AbstractMoudule.

This commit is contained in:
Erik C. Thauvin 2019-04-09 02:28:09 -07:00
parent 8c2c351222
commit d85624b067
2 changed files with 7 additions and 13 deletions

View file

@ -106,7 +106,11 @@ public abstract class AbstractModule {
* @return <code>true</code> or <code>false</code>
*/
public boolean isEnabled() {
return true;
if (hasProperties()) {
return isValidProperties();
} else {
return true;
}
}
/**

View file

@ -44,10 +44,8 @@ import java.security.SecureRandom;
* @since 1.0
*/
public final class Dice extends AbstractModule {
/**
* The dice command.
*/
public static final String DICE_CMD = "dice";
// The dice command.
private static final String DICE_CMD = "dice";
/**
* The default constructor.
@ -100,12 +98,4 @@ public final class Dice extends AbstractModule {
bot.send(sender, "To roll the dice:");
bot.send(sender, bot.helpIndent(bot.getNick() + ": " + DICE_CMD));
}
/**
* {@inheritDoc}
*/
@Override
public boolean isEnabled() {
return true;
}
}