Skip to content

Commit

Permalink
Use newest RCs/betas and recent upstream changes
Browse files Browse the repository at this point in the history
Signed-off-by: BT (calcastor/mame) <[email protected]>
  • Loading branch information
calcastor committed May 30, 2024
1 parent f73eea8 commit ff322a6
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public final class MatchPlayerParser
@Override
public @NotNull ArgumentParseResult<@NotNull MatchPlayer> parse(
@NotNull CommandContext<@NotNull CommandSender> context, @NotNull CommandInput inputQueue) {
return parser.parse(context, inputQueue).mapParsedValue(PGM.get().getMatchManager()::getPlayer);
return parser.parse(context, inputQueue).mapSuccess(PGM.get().getMatchManager()::getPlayer);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public ArgumentParseResult<Party> parse(

if (text.equalsIgnoreCase("obs")) return success(match.getDefaultParty());

return teamParser.parse(context, text).mapParsedValue(team -> team);
return teamParser.parse(context, text).mapSuccess(team -> team);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public final class RotationParser
final @NotNull CommandContext<CommandSender> context,
final @NotNull CommandInput inputQueue) {
context.set(CommandKeys.POOL_TYPE, MapPoolType.ORDERED);
return POOL_PARSER.parse(context, inputQueue).mapParsedValue(p -> (Rotation) p);
return POOL_PARSER.parse(context, inputQueue).mapSuccess(p -> (Rotation) p);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public StringLikeParser(CommandManager<S> manager, ParserParameters options) {
@NotNull CommandContext<S> context, @NotNull CommandInput args) {
return stringParser
.parse(context, args)
.flatMapParsedValue(text -> parse(context, StringUtils.suggestionToText(text)));
.flatMapSuccess(text -> parse(context, StringUtils.suggestionToText(text)));
}

public abstract ArgumentParseResult<T> parse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public ArgumentParseResult<Collection<Team>> parse(
return success(teams.getTeams());
}

return teamParser.parse(context, text).mapParsedValue(Collections::singleton);
return teamParser.parse(context, text).mapSuccess(Collections::singleton);
}

@Override
Expand Down
11 changes: 4 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,31 +145,28 @@
</dependency>

<!-- Framework for defining and parsing commands -->
<!-- Version 2.0.0-pgm includes fixes/features not yet in upstream. To be changed when merged. -->
<!-- Source: https://github.com/Pablete1234/cloud/commits/2.0.0-pgm -->
<!-- Repo: https://repo.pgm.fyi/#/snapshots/org/incendo -->
<dependency>
<groupId>org.incendo</groupId>
<artifactId>cloud-core</artifactId>
<version>2.0.0-pgm-SNAPSHOT</version>
<version>2.0.0-rc.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.incendo</groupId>
<artifactId>cloud-annotations</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.0-rc.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.incendo</groupId>
<artifactId>cloud-paper</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.0-beta.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.incendo</groupId>
<artifactId>cloud-minecraft-extras</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.0-beta.8</version>
<scope>compile</scope>
</dependency>
<!-- Allows registering brigadier mappings -->
Expand Down

0 comments on commit ff322a6

Please sign in to comment.