Version bump.

This commit is contained in:
Alexander Söderberg 2020-09-22 18:58:43 +02:00
parent a6db68fa66
commit 7501bd4743
No known key found for this signature in database
GPG key ID: C0207FF7EA146678
16 changed files with 47 additions and 41 deletions

View file

@ -97,7 +97,7 @@ To use `cloud` you will first need to add it as a dependency to your project. Cl
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-PLATFORM</artifactId> <artifactId>cloud-PLATFORM</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
<!-- <!--
~ Optional: Allows you to use annotated methods ~ Optional: Allows you to use annotated methods
@ -106,7 +106,7 @@ To use `cloud` you will first need to add it as a dependency to your project. Cl
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-annotations</artifactId> <artifactId>cloud-annotations</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
``` ```
@ -119,7 +119,7 @@ repositories {
```groovy ```groovy
dependencies { dependencies {
implementation 'com.intellectualsites:cloud-PLATFORM:0.1.0-SNAPSHOT' implementation 'com.intellectualsites:cloud-PLATFORM:0.2.0-SNAPSHOT'
} }
``` ```

View file

@ -36,13 +36,13 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>cloud-annotations</artifactId> <artifactId>cloud-annotations</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-core</artifactId> <artifactId>cloud-core</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>

View file

@ -35,7 +35,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
<artifactId>cloud-core</artifactId> <artifactId>cloud-core</artifactId>
<dependencies> <dependencies>

View file

@ -265,6 +265,7 @@ public final class StringArgument<C> extends CommandArgument<C, String> {
boolean started = false; boolean started = false;
boolean finished = false; boolean finished = false;
char start = ' ';
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
String string = inputQueue.peek(); String string = inputQueue.peek();
@ -274,13 +275,16 @@ public final class StringArgument<C> extends CommandArgument<C, String> {
if (this.stringMode == StringMode.QUOTED) { if (this.stringMode == StringMode.QUOTED) {
if (!started) { if (!started) {
if (string.startsWith("\"")) { if (string.startsWith("\"") || string.startsWith("'")) {
start = string.charAt(0);
string = string.substring(1); string = string.substring(1);
started = true; started = true;
} else { } else {
return ArgumentParseResult.failure(new StringParseException(string, StringMode.QUOTED)); /* Just read a single string instead */
inputQueue.remove();
return ArgumentParseResult.success(string);
} }
} else if (string.endsWith("\"")) { } else if (string.endsWith(Character.toString(start))) {
sj.add(string.substring(0, string.length() - 1)); sj.add(string.substring(0, string.length() - 1));
inputQueue.remove(); inputQueue.remove();
finished = true; finished = true;

View file

@ -30,8 +30,6 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class StringArgumentTest { class StringArgumentTest {
private static final String[] storage = new String[2]; private static final String[] storage = new String[2];
@ -80,8 +78,12 @@ class StringArgumentTest {
@Test @Test
void testQuotes() { void testQuotes() {
clear(); clear();
manager.executeCommand(new TestCommandSender(), "quoted \"quoted string\" unquoted").join(); manager.executeCommand(new TestCommandSender(), "quoted 'quoted \" string' unquoted").join();
Assertions.assertEquals("quoted string", storage[0]); Assertions.assertEquals("quoted \" string", storage[0]);
Assertions.assertEquals("unquoted", storage[1]);
clear();
manager.executeCommand(new TestCommandSender(), "quoted quoted unquoted");
Assertions.assertEquals("quoted", storage[0]);
Assertions.assertEquals("unquoted", storage[1]); Assertions.assertEquals("unquoted", storage[1]);
} }

View file

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>cloud-jline</artifactId> <artifactId>cloud-jline</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
<dependencies> <dependencies>
<dependency> <dependency>
@ -21,7 +21,7 @@
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-core</artifactId> <artifactId>cloud-core</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View file

@ -17,7 +17,7 @@ Bukkit mappings for cloud. If `commodore` is present on the classpath and the se
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-bukkit</artifactId> <artifactId>cloud-bukkit</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
``` ```
@ -64,7 +64,7 @@ An example plugin using the `cloud-paper` API can be found [here](https://github
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-paper</artifactId> <artifactId>cloud-paper</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
``` ```
@ -79,7 +79,7 @@ BungeeCord mappings for cloud.
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-bungee</artifactId> <artifactId>cloud-bungee</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
``` ```
@ -102,7 +102,7 @@ An example plugin using the `cloud-velocity` API can be found [here](https://git
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-velocity</artifactId> <artifactId>cloud-velocity</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
``` ```
Simply do: Simply do:

View file

@ -38,7 +38,7 @@
</parent> </parent>
<artifactId>cloud-brigadier</artifactId> <artifactId>cloud-brigadier</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
<repositories> <repositories>
<repository> <repository>
@ -52,7 +52,7 @@
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-core</artifactId> <artifactId>cloud-core</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.mojang</groupId> <groupId>com.mojang</groupId>

View file

@ -37,7 +37,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>cloud-bukkit-test</artifactId> <artifactId>cloud-bukkit-test</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
<build> <build>
<plugins> <plugins>
@ -75,7 +75,7 @@
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-paper</artifactId> <artifactId>cloud-paper</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
@ -86,7 +86,7 @@
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-annotations</artifactId> <artifactId>cloud-annotations</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>me.lucko</groupId> <groupId>me.lucko</groupId>
@ -96,7 +96,7 @@
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-minecraft-extras</artifactId> <artifactId>cloud-minecraft-extras</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.kyori</groupId> <groupId>net.kyori</groupId>

View file

@ -37,7 +37,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>cloud-bukkit</artifactId> <artifactId>cloud-bukkit</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
<repositories> <repositories>
<repository> <repository>
@ -56,12 +56,12 @@
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-core</artifactId> <artifactId>cloud-core</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-brigadier</artifactId> <artifactId>cloud-brigadier</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>me.lucko</groupId> <groupId>me.lucko</groupId>

View file

@ -37,7 +37,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>cloud-bungee</artifactId> <artifactId>cloud-bungee</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
<repositories> <repositories>
<repository> <repository>
@ -56,7 +56,7 @@
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-core</artifactId> <artifactId>cloud-core</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View file

@ -37,7 +37,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>cloud-minecraft-extras</artifactId> <artifactId>cloud-minecraft-extras</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
<repositories> <repositories>
<repository> <repository>
@ -55,7 +55,7 @@
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-core</artifactId> <artifactId>cloud-core</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.kyori</groupId> <groupId>net.kyori</groupId>

View file

@ -37,7 +37,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>cloud-paper</artifactId> <artifactId>cloud-paper</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
<repositories> <repositories>
<repository> <repository>
@ -50,7 +50,7 @@
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-bukkit</artifactId> <artifactId>cloud-bukkit</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.destroystokyo.paper</groupId> <groupId>com.destroystokyo.paper</groupId>

View file

@ -37,7 +37,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>cloud-velocity-test</artifactId> <artifactId>cloud-velocity-test</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
<profiles> <profiles>
<profile> <profile>
@ -209,12 +209,12 @@
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-velocity</artifactId> <artifactId>cloud-velocity</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-annotations</artifactId> <artifactId>cloud-annotations</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View file

@ -46,7 +46,7 @@ import java.util.function.Function;
@Plugin( @Plugin(
id = "cloud-velocity-test", id = "cloud-velocity-test",
name = "Cloud Velocity Test", name = "Cloud Velocity Test",
version = "0.0.1.0-SNAPSHOT" version = "0.0.2.0-SNAPSHOT"
) )
public class CloudVelocityTest { public class CloudVelocityTest {

View file

@ -37,7 +37,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>cloud-velocity</artifactId> <artifactId>cloud-velocity</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
<repositories> <repositories>
<repository> <repository>
@ -50,12 +50,12 @@
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-core</artifactId> <artifactId>cloud-core</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.intellectualsites</groupId> <groupId>com.intellectualsites</groupId>
<artifactId>cloud-brigadier</artifactId> <artifactId>cloud-brigadier</artifactId>
<version>0.1.0-SNAPSHOT</version> <version>0.2.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.velocitypowered</groupId> <groupId>com.velocitypowered</groupId>