Don't expose extensions in BaseAbilityBot
This commit is contained in:
parent
b715f2a154
commit
247ca5f984
@ -106,7 +106,7 @@ public abstract class BaseAbilityBot extends DefaultAbsSender implements Ability
|
||||
private final String botUsername;
|
||||
|
||||
// Ability registry
|
||||
protected final List<AbilityExtension> extensions = new ArrayList<>();
|
||||
private final List<AbilityExtension> extensions = new ArrayList<>();
|
||||
private Map<String, Ability> abilities;
|
||||
private Map<String, Stats> stats;
|
||||
|
||||
@ -273,6 +273,18 @@ public abstract class BaseAbilityBot extends DefaultAbsSender implements Ability
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void addExtension(AbilityExtension extension) {
|
||||
this.extensions.add(extension);
|
||||
}
|
||||
|
||||
protected void addExtensions(AbilityExtension... extensions) {
|
||||
this.extensions.addAll(Arrays.asList(extensions));
|
||||
}
|
||||
|
||||
protected void addExtensions(Collection<AbilityExtension> extensions) {
|
||||
this.extensions.addAll(extensions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the declared abilities using method reflection. Also, replies are accumulated using the built abilities and standalone methods that return a Reply.
|
||||
* <p>
|
||||
|
Loading…
Reference in New Issue
Block a user