Don't swallow random exceptions, don't bother with CommandExceptions
This commit is contained in:
@@ -373,6 +373,8 @@ public class ArgConsumer implements IArgConsumer {
|
||||
public <T extends IDatatype> Stream<String> tabCompleteDatatype(T datatype) {
|
||||
try {
|
||||
return datatype.tabComplete(this.context);
|
||||
} catch (CommandException ignored) {
|
||||
// NOP
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -151,9 +151,12 @@ public class CommandManager implements ICommandManager {
|
||||
private Stream<String> tabComplete() {
|
||||
try {
|
||||
return this.command.tabComplete(this.label, this.args);
|
||||
} catch (CommandException ignored) {
|
||||
// NOP
|
||||
} catch (Throwable t) {
|
||||
return Stream.empty();
|
||||
t.printStackTrace();
|
||||
}
|
||||
return Stream.empty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user