mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-05 00:53:04 +00:00
[AB-246] changing parameter handling to only actually evaluate the necessary parameter handlers, this helps avoiding providing the wrong parameter to the actual command
This commit is contained in:
@@ -33,10 +33,11 @@ public class TrackedEmoteParameterHandler implements CommandParameterHandler {
|
||||
/**
|
||||
* This {@link CommandParameterHandler} only handles {@link TrackedEmote}
|
||||
* @param clazz The desired {@link Class} of a parameter
|
||||
* @param value
|
||||
* @return Whether or not the given {@link Class} will be handled by this {@link CommandParameterHandler}
|
||||
*/
|
||||
@Override
|
||||
public boolean handles(Class clazz) {
|
||||
public boolean handles(Class clazz, UnparsedCommandParameterPiece value) {
|
||||
return clazz.equals(TrackedEmote.class);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,10 +37,11 @@ public class TrackedEmoteParameterParameterHandler implements CommandParameterHa
|
||||
/**
|
||||
* This {@link CommandParameterHandler} only handles {@link TrackEmoteParameter}
|
||||
* @param clazz The desired {@link Class} of a parameter
|
||||
* @param value
|
||||
* @return Whether or not the given {@link Class} will be handled by this {@link CommandParameterHandler}
|
||||
*/
|
||||
@Override
|
||||
public boolean handles(Class clazz) {
|
||||
public boolean handles(Class clazz, UnparsedCommandParameterPiece value) {
|
||||
return clazz.equals(TrackEmoteParameter.class);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user