Version bump.
This commit is contained in:
parent
a6db68fa66
commit
7501bd4743
16 changed files with 47 additions and 41 deletions
|
|
@ -97,7 +97,7 @@ To use `cloud` you will first need to add it as a dependency to your project. Cl
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-PLATFORM</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!--
|
||||
~ 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>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-annotations</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ repositories {
|
|||
|
||||
```groovy
|
||||
dependencies {
|
||||
implementation 'com.intellectualsites:cloud-PLATFORM:0.1.0-SNAPSHOT'
|
||||
implementation 'com.intellectualsites:cloud-PLATFORM:0.2.0-SNAPSHOT'
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>cloud-annotations</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-core</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
<artifactId>cloud-core</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@ public final class StringArgument<C> extends CommandArgument<C, String> {
|
|||
boolean started = false;
|
||||
boolean finished = false;
|
||||
|
||||
char start = ' ';
|
||||
for (int i = 0; i < size; i++) {
|
||||
String string = inputQueue.peek();
|
||||
|
||||
|
|
@ -274,13 +275,16 @@ public final class StringArgument<C> extends CommandArgument<C, String> {
|
|||
|
||||
if (this.stringMode == StringMode.QUOTED) {
|
||||
if (!started) {
|
||||
if (string.startsWith("\"")) {
|
||||
if (string.startsWith("\"") || string.startsWith("'")) {
|
||||
start = string.charAt(0);
|
||||
string = string.substring(1);
|
||||
started = true;
|
||||
} 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));
|
||||
inputQueue.remove();
|
||||
finished = true;
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ import org.junit.jupiter.api.Assertions;
|
|||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class StringArgumentTest {
|
||||
|
||||
private static final String[] storage = new String[2];
|
||||
|
|
@ -80,8 +78,12 @@ class StringArgumentTest {
|
|||
@Test
|
||||
void testQuotes() {
|
||||
clear();
|
||||
manager.executeCommand(new TestCommandSender(), "quoted \"quoted string\" unquoted").join();
|
||||
Assertions.assertEquals("quoted string", storage[0]);
|
||||
manager.executeCommand(new TestCommandSender(), "quoted 'quoted \" string' unquoted").join();
|
||||
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]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cloud-jline</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-core</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Bukkit mappings for cloud. If `commodore` is present on the classpath and the se
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-bukkit</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ An example plugin using the `cloud-paper` API can be found [here](https://github
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-paper</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ BungeeCord mappings for cloud.
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-bungee</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ An example plugin using the `cloud-velocity` API can be found [here](https://git
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-velocity</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
Simply do:
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
</parent>
|
||||
|
||||
<artifactId>cloud-brigadier</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-core</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mojang</groupId>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cloud-bukkit-test</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-paper</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-annotations</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.lucko</groupId>
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-minecraft-extras</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cloud-bukkit</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
|
|
@ -56,12 +56,12 @@
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-core</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-brigadier</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.lucko</groupId>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cloud-bungee</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-core</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>cloud-minecraft-extras</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-core</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cloud-paper</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-bukkit</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.destroystokyo.paper</groupId>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cloud-velocity-test</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
|
|
@ -209,12 +209,12 @@
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-velocity</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-annotations</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ import java.util.function.Function;
|
|||
@Plugin(
|
||||
id = "cloud-velocity-test",
|
||||
name = "Cloud Velocity Test",
|
||||
version = "0.0.1.0-SNAPSHOT"
|
||||
version = "0.0.2.0-SNAPSHOT"
|
||||
)
|
||||
public class CloudVelocityTest {
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>cloud-velocity</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
|
|
@ -50,12 +50,12 @@
|
|||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-core</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.intellectualsites</groupId>
|
||||
<artifactId>cloud-brigadier</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<version>0.2.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.velocitypowered</groupId>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue