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 3bc80d0 commit 0e198c6
Show file tree
Hide file tree
Showing 105 changed files with 105 additions and 105 deletions.
Expand Up @@ -76,7 +76,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.matchesPrefix("script", "s")
&& arg.matchesArgumentType(ScriptTag.class)) {
scriptEntry.addObject("script", arg.asType(ScriptTag.class));
Expand Down
Expand Up @@ -49,7 +49,7 @@ private enum Type {PLAYER_COOLDOWN, GLOBAL_COOLDOWN}

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (arg.matches("cooldown")
&& !scriptEntry.hasObject("type")) {
scriptEntry.addObject("type", Type.PLAYER_COOLDOWN);
Expand Down
Expand Up @@ -87,7 +87,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("script")
&& !scriptEntry.hasObject("step")
&& arg.hasPrefix()
Expand Down
Expand Up @@ -62,7 +62,7 @@ private enum AgeType {ADULT, BABY}
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {

for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {

if (!scriptEntry.hasObject("entities")
&& arg.matchesArgumentList(EntityTag.class)) {
Expand Down
Expand Up @@ -87,7 +87,7 @@ public void addCustomTabCompletions(String arg, Consumer<String> addOne) {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
AnimationHelper animationHelper = NMSHandler.getAnimationHelper();
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("for")
&& arg.matchesPrefix("for")
&& arg.matchesArgumentList(PlayerTag.class)) {
Expand Down
Expand Up @@ -72,7 +72,7 @@ public AttachCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("to")
&& !scriptEntry.hasObject("cancel")
&& arg.matchesPrefix("to")
Expand Down
Expand Up @@ -60,7 +60,7 @@ public AttackCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("cancel")
&& arg.matches("cancel", "stop")) {
scriptEntry.addObject("cancel", "true");
Expand Down
Expand Up @@ -53,7 +53,7 @@ public BurnCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("entities")
&& arg.matchesArgumentList(EntityTag.class)) {
scriptEntry.addObject("entities", arg.asType(ListTag.class).filter(EntityTag.class, scriptEntry));
Expand Down
Expand Up @@ -85,7 +85,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("remove")
&& arg.matches("remove", "cancel")) {
scriptEntry.addObject("remove", new ElementTag(true));
Expand Down
Expand Up @@ -69,7 +69,7 @@ public EquipCommand() {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
Map<String, ItemTag> equipment = new HashMap<>();
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("entities")
&& arg.matchesArgumentList(EntityTag.class)) {
scriptEntry.addObject("entities", arg.asType(ListTag.class).filter(EntityTag.class, scriptEntry));
Expand Down
Expand Up @@ -78,7 +78,7 @@ public FakeEquipCommand() {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
EquipmentOverride equipment = new EquipmentOverride();
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("entities")
&& arg.matchesArgumentList(EntityTag.class)) {
scriptEntry.addObject("entities", arg.asType(ListTag.class).filter(EntityTag.class, scriptEntry));
Expand Down
Expand Up @@ -63,7 +63,7 @@ public FeedCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (arg.matchesInteger()
&& arg.matchesPrefix("amount", "amt", "quantity", "qty", "a", "q")
&& !scriptEntry.hasObject("amount")) {
Expand Down
Expand Up @@ -68,7 +68,7 @@ public FlyCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("cancel")
&& arg.matches("cancel")) {
scriptEntry.addObject("cancel", "");
Expand Down
Expand Up @@ -67,7 +67,7 @@ public FollowCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("stop") &&
arg.matches("stop")) {
scriptEntry.addObject("stop", new ElementTag(true));
Expand Down
Expand Up @@ -32,7 +32,7 @@ public HeadCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("material")
&& arg.matchesArgumentType(MaterialTag.class)
&& !arg.matchesPrefix("skin", "s")) {
Expand Down
Expand Up @@ -58,7 +58,7 @@ public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException

boolean specified_targets = false;

for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {

if (!scriptEntry.hasObject("amount")
&& arg.matchesFloat()) {
Expand Down
Expand Up @@ -71,7 +71,7 @@ public HealthCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("target")
&& arg.matches("player")) {
if (!Utilities.entryHasPlayer(scriptEntry)) {
Expand Down
Expand Up @@ -73,7 +73,7 @@ public HurtCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("amount")
&& (arg.matchesFloat()
|| arg.matchesInteger())) {
Expand Down
Expand Up @@ -57,7 +57,7 @@ enum Action {TRUE, FALSE, TOGGLE}

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("state")
&& arg.matchesEnum(Action.values())) {
scriptEntry.addObject("state", arg.asElement());
Expand Down
Expand Up @@ -60,7 +60,7 @@ public LeashCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("cancel")
&& arg.matches("cancel", "stop")) {
scriptEntry.addObject("cancel", "");
Expand Down
Expand Up @@ -64,7 +64,7 @@ public LookCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("location")
&& !scriptEntry.hasObject("cancel")
&& arg.matchesArgumentType(LocationTag.class)) {
Expand Down
Expand Up @@ -63,7 +63,7 @@ public MountCommand() {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
List<EntityTag> entities = null;
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("cancel")
&& arg.matches("cancel")) {
scriptEntry.addObject("cancel", "");
Expand Down
Expand Up @@ -85,7 +85,7 @@ public PushCommand() {

@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", "source", "shooter", "s")) {
if (arg.matchesArgumentType(EntityTag.class)) {
Expand Down
Expand Up @@ -60,7 +60,7 @@ public RemoveCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("entities")
&& arg.matchesArgumentList(EntityTag.class)) {
scriptEntry.addObject("entities", arg.asType(ListTag.class).filter(EntityTag.class, scriptEntry));
Expand Down
Expand Up @@ -88,7 +88,7 @@ public RenameCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("targets")
&& arg.matchesPrefix("t", "target", "targets")) {
scriptEntry.addObject("targets", ListTag.getListFor(TagManager.tagObject(arg.getValue(), scriptEntry.getContext()), scriptEntry.getContext()));
Expand Down
Expand Up @@ -70,7 +70,7 @@ public RotateCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("cancel")
&& (arg.matches("cancel") || arg.matches("stop"))) {
scriptEntry.addObject("cancel", new ElementTag("true"));
Expand Down
Expand Up @@ -100,7 +100,7 @@ public ShootCommand() {

@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", "source", "s")) {

Expand Down
Expand Up @@ -63,7 +63,7 @@ public SneakCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (arg.matches("fake")
&& !scriptEntry.hasObject("fake")
&& !scriptEntry.hasObject("stopfake")) {
Expand Down
Expand Up @@ -72,7 +72,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("entities")
&& arg.matchesArgumentList(EntityTag.class)) {
EntityTag.allowDespawnedNpcs = true;
Expand Down
Expand Up @@ -73,7 +73,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("location")
&& arg.matchesArgumentType(LocationTag.class)) {
scriptEntry.addObject("location", arg.asType(LocationTag.class));
Expand Down
Expand Up @@ -104,7 +104,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("lookat")
&& arg.matchesPrefix("lookat")
&& arg.matchesArgumentType(LocationTag.class)) {
Expand Down
Expand Up @@ -87,7 +87,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.matchesArgumentType(DurationTag.class)
&& !scriptEntry.hasObject("duration")) {
scriptEntry.addObject("duration", arg.asType(DurationTag.class));
Expand Down
Expand Up @@ -75,7 +75,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("slot")
&& arg.matchesPrefix("slot")) {
scriptEntry.addObject("slot", arg.asElement());
Expand Down
Expand Up @@ -90,7 +90,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("quantity")
&& arg.matchesPrefix("q", "qty", "quantity")
&& arg.matchesFloat()) {
Expand Down
Expand Up @@ -175,7 +175,7 @@ public void addCustomTabCompletions(String arg, Consumer<String> addOne) {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
boolean isAdjust = false, isFlag = false;
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("origin")
&& arg.matchesPrefix("origin", "o", "source", "items", "item", "i", "from", "f")
&& (arg.matchesArgumentTypes(InventoryTag.class, EntityTag.class, LocationTag.class, MapTag.class)
Expand Down
Expand Up @@ -84,7 +84,7 @@ public MapCommand() {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("new")
&& arg.matchesPrefix("new")
&& arg.matchesArgumentType(WorldTag.class)) {
Expand Down
Expand Up @@ -23,7 +23,7 @@ public NBTCommand() {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {

for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {

if (!scriptEntry.hasObject("key")
&& arg.getRawValue().split(":", 2).length == 2) {
Expand Down
Expand Up @@ -32,7 +32,7 @@ private enum BookAction {GIVE, DROP, EQUIP, NONE}
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {

for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {

if (arg.matchesEnum(BookAction.values())
&& !scriptEntry.hasObject("action")) {
Expand Down
Expand Up @@ -132,7 +132,7 @@ else if (arg.startsWith("item:")) {

@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {
for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {
if (!scriptEntry.hasObject("type")
&& arg.matches("money", "coins")) {
Deprecations.giveTakeMoney.warn(scriptEntry);
Expand Down
Expand Up @@ -55,7 +55,7 @@ public ActionCommand() {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {

for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {

if (!scriptEntry.hasObject("npcs")
&& arg.matchesArgumentList(NPCTag.class)) {
Expand Down
Expand Up @@ -56,7 +56,7 @@ private enum Action { ADD, REMOVE }

@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 @@ -75,7 +75,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.matchesEnum(Action.values())
&& !scriptEntry.hasObject("action")) {
scriptEntry.addObject("action", Action.valueOf(arg.getValue().toUpperCase()));
Expand Down
Expand Up @@ -65,7 +65,7 @@ public BreakCommand() {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {

for (Argument arg : scriptEntry.getProcessedArgs()) {
for (Argument arg : scriptEntry) {

if (!scriptEntry.hasObject("location")
&& arg.matchesArgumentType(LocationTag.class)) {
Expand Down
Expand Up @@ -69,7 +69,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("entity_type")
&& arg.matchesArgumentType(EntityTag.class)) {
// Avoid duplication of objects
Expand Down

0 comments on commit 0e198c6

Please sign in to comment.