Skip to content

Commit

Permalink
remove outdated getProcessedArgs call
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Oct 23, 2021
1 parent 8f33ebb commit 0177610
Show file tree
Hide file tree
Showing 27 changed files with 27 additions and 27 deletions.
Expand Up @@ -78,7 +78,7 @@ public void addCustomTabCompletions(String arg, Consumer<String> addOne) {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("object")) {
if (arg.object instanceof ListTag) {
scriptEntry.addObject("object", arg.object);
Expand Down
Expand Up @@ -84,7 +84,7 @@ public enum DebugType {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("type")
&& arg.limitToOnlyPrefix("type")
&& arg.matchesEnum(DBINFO)) {
Expand Down
Expand Up @@ -56,7 +56,7 @@ public EventCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("context")
&& arg.matchesPrefix("context", "c")) {
scriptEntry.addObject("context", arg.asType(ListTag.class));
Expand Down
Expand Up @@ -155,7 +155,7 @@ public void addCustomTabCompletions(String arg, Consumer<String> addOne) {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("targets")
&& !arg.hasPrefix()) {
scriptEntry.addObject("targets", arg.asType(ListTag.class));
Expand Down
Expand Up @@ -60,7 +60,7 @@ public NoteCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (arg.matchesPrefix("as", "i", "id")
&& !scriptEntry.hasObject("id")) {
scriptEntry.addObject("id", arg.asElement());
Expand Down
Expand Up @@ -111,7 +111,7 @@ public void onDisable() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("sqlid")
&& arg.matchesPrefix("id")) {
scriptEntry.addObject("sqlid", arg.asElement());
Expand Down
Expand Up @@ -95,7 +95,7 @@ public WebGetCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("url")) {
scriptEntry.addObject("url", new ElementTag(arg.getRawValue()));
}
Expand Down
Expand Up @@ -55,7 +55,7 @@ public FileCopyCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("origin")
&& arg.matchesPrefix("origin", "o")) {
scriptEntry.addObject("origin", arg.asElement());
Expand Down
Expand Up @@ -85,7 +85,7 @@ public enum Type {SEVERE, INFO, WARNING, FINE, FINER, FINEST, NONE, CLEAR}

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("type")
&& arg.matchesPrefix("type")
&& arg.matchesEnum(Type.values())) {
Expand Down
Expand Up @@ -158,7 +158,7 @@ public void addCustomTabCompletions(String arg, Consumer<String> addOne) {
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
boolean isSet = false;
boolean isCopyKey = false;
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("action") &&
arg.matchesPrefix("load")) {
scriptEntry.addObject("action", new ElementTag("LOAD"));
Expand Down
Expand Up @@ -74,7 +74,7 @@ public ChooseCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("choice")) {
scriptEntry.addObject("choice", arg.asElement());
break;
Expand Down
Expand Up @@ -97,7 +97,7 @@ public void setValueAt(String keyName, ObjectTag value) {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("definition")) {
if (CoreUtilities.contains(arg.getRawValue(), ':')) {
DefinitionActionProvider provider = new DefinitionActionProvider();
Expand Down
Expand Up @@ -55,7 +55,7 @@ public DefineMapCommand() {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
MapTag value = new MapTag();
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("definition")
&& !arg.hasPrefix()) {
scriptEntry.addObject("definition", new ElementTag(CoreUtilities.toLowerCase(arg.getValue())));
Expand Down
Expand Up @@ -57,7 +57,7 @@ public DetermineCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (arg.matches("passive", "passively")
&& !scriptEntry.hasObject("passively")) {
scriptEntry.addObject("passively", new ElementTag(true));
Expand Down
Expand Up @@ -97,7 +97,7 @@ public void reapplyAtEnd(ScriptQueue queue) {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
boolean handled = false;
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!handled
&& arg.matches("stop") && !arg.hasPrefix()) {
scriptEntry.addObject("stop", new ElementTag(true));
Expand Down
Expand Up @@ -46,7 +46,7 @@ public GotoCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("m_name")) {
scriptEntry.addObject("m_name", arg.asElement());
}
Expand Down
Expand Up @@ -57,7 +57,7 @@ public void addCustomTabCompletions(String arg, Consumer<String> addOne) {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (arg.matches("instant", "instantly")) {
scriptEntry.addObject("instant", new ElementTag(true));
}
Expand Down
Expand Up @@ -39,7 +39,7 @@ public MarkCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("m_name")) {
scriptEntry.addObject("m_name", arg.asElement());
}
Expand Down
Expand Up @@ -75,7 +75,7 @@ private enum Action {CLEAR, DELAY, PAUSE, RESUME, STOP}

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("action")
&& arg.matchesEnum(Action.values())) {
scriptEntry.addObject("action", Action.valueOf(arg.getValue().toUpperCase()));
Expand Down
Expand Up @@ -66,7 +66,7 @@ public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException
if (bdat != null && bdat.size() > 0) {
scriptEntry.addObject("braces", bdat);
}
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (arg.matches("{")) {
break;
}
Expand Down
Expand Up @@ -52,7 +52,7 @@ public RateLimitCommand() {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {

for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (arg.matchesArgumentType(DurationTag.class)
&& !scriptEntry.hasObject("duration")
&& arg.limitToOnlyPrefix("duration")) {
Expand Down
Expand Up @@ -76,7 +76,7 @@ public void reapplyAtEnd(ScriptQueue queue) {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
boolean handled = false;
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!handled
&& arg.matchesInteger() && !arg.hasPrefix()) {
scriptEntry.addObject("quantity", arg.asElement());
Expand Down
Expand Up @@ -107,7 +107,7 @@ public void addCustomTabCompletions(String arg, Consumer<String> addOne) {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
MapTag defMap = new MapTag();
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (arg.matchesPrefix("i", "id")) {
scriptEntry.addObject("id", arg.asElement());
}
Expand Down
Expand Up @@ -68,7 +68,7 @@ public RunLaterCommand() {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
MapTag defMap = new MapTag();
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (arg.matchesPrefix("def")) {
scriptEntry.addObject("definitions", arg.asType(ListTag.class));
}
Expand Down
Expand Up @@ -37,7 +37,7 @@ public StopCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
arg.reportUnhandled();
}
}
Expand Down
Expand Up @@ -50,7 +50,7 @@ public WaitCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (arg.matchesArgumentType(DurationTag.class)
&& !scriptEntry.hasObject("delay")
&& arg.limitToOnlyPrefix("delay")) {
Expand Down
Expand Up @@ -58,7 +58,7 @@ public WaitUntilCommand() {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
List<String> arguments = new ArrayList<>(scriptEntry.getOriginalArguments());
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (arg.matchesPrefix("rate")
&& arg.matchesArgumentType(DurationTag.class)) {
scriptEntry.addObject("rate", arg.asType(DurationTag.class));
Expand Down

0 comments on commit 0177610

Please sign in to comment.