Skip to content

Commit

Permalink
fix some argument types
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadron67 committed Aug 13, 2020
1 parent 3ab4777 commit 1664dfe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.9.0+build.204

# Mod Properties
mod_version = 0.2.2
mod_version = 0.2.3
maven_group = test
archives_base_name = sreplay

Expand Down
10 changes: 4 additions & 6 deletions src/main/java/com/hadroncfy/sreplay/command/SReplayCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ public class SReplayCommand {

private static final ConfirmationManager cm = new ConfirmationManager(20000, 999);

public SReplayCommand(){
}
public static void register(CommandDispatcher<ServerCommandSource> d) {
final LiteralArgumentBuilder<ServerCommandSource> b = literal("sreplay")
.then(literal("player").then(argument("player", StringArgumentType.word())
Expand All @@ -58,19 +56,19 @@ public static void register(CommandDispatcher<ServerCommandSource> d) {
.then(literal("respawn").executes(SReplayCommand::playerRespawn))
.then(literal("tp").executes(SReplayCommand::playerTp))
.then(literal("name").executes(SReplayCommand::getName)
.then(argument("fileName", StringArgumentType.word()).executes(SReplayCommand::setName)))
.then(argument("fileName", StringArgumentType.greedyString()).executes(SReplayCommand::setName)))
.then(Photographer.PARAM_MANAGER.buildCommand())
.then(literal("pause").executes(SReplayCommand::pause))
.then(literal("resume").executes(SReplayCommand::resume))
.then(literal("locate").executes(SReplayCommand::locate))
.then(literal("marker")
.then(literal("list").executes(SReplayCommand::getMarkers)
.then(argument("page", IntegerArgumentType.integer(1)).executes(SReplayCommand::getMarkers))
.then(literal("add").then(argument("marker", StringArgumentType.word()).executes(SReplayCommand::marker)))
.then(literal("add").then(argument("marker", StringArgumentType.greedyString()).executes(SReplayCommand::marker)))
.then(literal("remove").then(argument("markerId", IntegerArgumentType.integer(1)).executes(SReplayCommand::removeMarker)))))))
.then(literal("list").executes(SReplayCommand::listRecordings)
.then(argument("page", IntegerArgumentType.integer(1)).executes(SReplayCommand::listRecordings)))
.then(literal("delete").then(argument("recording", StringArgumentType.word())
.then(literal("delete").then(argument("recording", StringArgumentType.greedyString())
.suggests(SReplayCommand::suggestRecordingFile)
.executes(SReplayCommand::deleteRecording)))
.then(literal("confirm")
Expand All @@ -81,7 +79,7 @@ public static void register(CommandDispatcher<ServerCommandSource> d) {
.then(literal("start").executes(SReplayCommand::startServer))
.then(literal("stop").executes(SReplayCommand::stopServer)))
.then(literal("get")
.then(argument("fileName", StringArgumentType.word())
.then(argument("fileName", StringArgumentType.greedyString())
.suggests(SReplayCommand::suggestRecordingFile)
.executes(SReplayCommand::getFile)))
.then(literal("help").executes(SReplayCommand::help)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import net.minecraft.util.Lazy;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.GameMode;
import net.minecraft.world.chunk.WorldChunk;
import net.minecraft.world.dimension.DimensionType;

import org.apache.logging.log4j.LogManager;
Expand Down

0 comments on commit 1664dfe

Please sign in to comment.