Fix minor bugs in converters

This commit is contained in:
Kenzie Togami 2019-04-29 22:11:15 -07:00
parent d0f9a71d53
commit 7188d27aaa
No known key found for this signature in database
GPG Key ID: 5D200B325E157A81
2 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ public class BooleanConverter {
.putAll(true, "on", "t", "true", "y", "yes") .putAll(true, "on", "t", "true", "y", "yes")
.build() .build()
) )
.errorMessage(arg -> "Not a boolean value" + arg) .errorMessage(arg -> "Not a boolean value: " + arg)
.build() .build()
); );
} }

View File

@ -53,14 +53,14 @@ public class VectorConverter<C, T> implements ArgumentConverter<T> {
commandManager.registerConverter(Key.of(Vector2.class), commandManager.registerConverter(Key.of(Vector2.class),
new VectorConverter<>( new VectorConverter<>(
doubleConverter, doubleConverter,
3, 2,
cmps -> Vector2.at(cmps.get(0), cmps.get(1)), cmps -> Vector2.at(cmps.get(0), cmps.get(1)),
"vector with x and z" "vector with x and z"
)); ));
commandManager.registerConverter(Key.of(BlockVector3.class), commandManager.registerConverter(Key.of(BlockVector3.class),
new VectorConverter<>( new VectorConverter<>(
intConverter, intConverter,
2, 3,
cmps -> BlockVector3.at(cmps.get(0), cmps.get(1), cmps.get(2)), cmps -> BlockVector3.at(cmps.get(0), cmps.get(1), cmps.get(2)),
"block vector with x, y, and z" "block vector with x, y, and z"
)); ));