Improved the AbstractMoudule.
This commit is contained in:
parent
8c2c351222
commit
d85624b067
2 changed files with 7 additions and 13 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue