-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
100 changed files
with
1,833 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 0 additions & 105 deletions
105
...-test-tests/src/test/java/dev/jorel/commandapi/test/arguments/ArgumentChatColorTests.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 119 additions & 0 deletions
119
...latforms/commandapi-paper/commandapi-paper-test/commandapi-paper-test-impl-1.16.5/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>dev.jorel</groupId> | ||
<artifactId>commandapi-paper-test</artifactId> | ||
<version>9.4.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>commandapi-paper-test-impl-1.16.5</artifactId> | ||
|
||
<properties> | ||
<spigot.version>1.16.5-R0.1-SNAPSHOT</spigot.version> | ||
</properties> | ||
|
||
<repositories> | ||
<repository> | ||
<!-- NBT API --> | ||
<id>codemc-repo-public</id> | ||
<url>https://repo.codemc.io/repository/maven-public/</url> | ||
<layout>default</layout> | ||
</repository> | ||
<repository> | ||
<id>codemc-repo</id> | ||
<url>https://repo.codemc.io/repository/nms/</url> | ||
<layout>default</layout> | ||
</repository> | ||
<repository> | ||
<id>spigot-repo</id> | ||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> | ||
</repository> | ||
<repository> | ||
<id>papermc</id> | ||
<url>https://repo.papermc.io/repository/maven-public/</url> | ||
</repository> | ||
<repository> | ||
<id>minecraft-libraries</id> | ||
<url>https://libraries.minecraft.net</url> | ||
</repository> | ||
</repositories> | ||
|
||
<dependencies> | ||
<!-- Main dependencies --> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<version>5.8.2</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>4.6.1</version> | ||
</dependency> | ||
<dependency> | ||
<!-- This is literally just for testing, we're not actually packaging this --> | ||
<groupId>de.tr7zw</groupId> | ||
<artifactId>item-nbt-api</artifactId> | ||
<version>2.11.1</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.mojang</groupId> | ||
<artifactId>brigadier</artifactId> | ||
<version>1.0.17</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>dev.jorel</groupId> | ||
<artifactId>commandapi-paper-test-impl</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>dev.jorel</groupId> | ||
<artifactId>commandapi-paper-shade</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>dev.jorel</groupId> | ||
<artifactId>commandapi-bukkit-test-impl-1.16.5</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<!-- Version-specific dependencies --> | ||
<dependency> | ||
<groupId>com.github.seeseemelk</groupId> | ||
<artifactId>MockBukkit-v1.16</artifactId> | ||
<version>1.5.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.destroystokyo.paper</groupId> | ||
<artifactId>paper-api</artifactId> | ||
<version>${spigot.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.spigotmc</groupId> | ||
<artifactId>spigot</artifactId> | ||
<version>${spigot.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<!-- | ||
Spigot 1.16.5 is really fussy and wants log4j. If you do give it | ||
log4j, every test fails for some reason, so we don't give it what it | ||
wants. We can already assert that tests ARE running properly due to | ||
test failures being reported, and by writing files during tests. | ||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-core</artifactId> | ||
<version>2.19.0</version> | ||
</dependency> | ||
--> | ||
|
||
</dependencies> | ||
|
||
</project> |
39 changes: 39 additions & 0 deletions
39
...mmandapi-paper-test-impl-1.16.5/src/main/java/dev/jorel/commandapi/test/PaperMockNMS.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package dev.jorel.commandapi.test; | ||
|
||
import com.mojang.brigadier.context.CommandContext; | ||
import com.mojang.brigadier.exceptions.CommandSyntaxException; | ||
import dev.jorel.commandapi.CommandAPIPaper; | ||
import dev.jorel.commandapi.nms.NMS; | ||
import dev.jorel.commandapi.nms.NMS_1_16_R3; | ||
import net.kyori.adventure.text.Component; | ||
import net.kyori.adventure.text.format.NamedTextColor; | ||
import net.minecraft.server.v1_16_R3.CommandListenerWrapper; | ||
|
||
public class PaperMockNMS extends PaperMockPlatform<CommandListenerWrapper> { | ||
|
||
private final CommandAPIPaper<CommandListenerWrapper> basePaperNMS; | ||
|
||
public PaperMockNMS(CommandAPIPaper<?> basePaperNMS) { | ||
this.basePaperNMS = (CommandAPIPaper<CommandListenerWrapper>) basePaperNMS; | ||
} | ||
|
||
@Override | ||
public Component getChat(CommandContext<CommandListenerWrapper> cmdCtx, String key) throws CommandSyntaxException { | ||
return basePaperNMS.getChat(cmdCtx, key); | ||
} | ||
|
||
@Override | ||
public NamedTextColor getChatColor(CommandContext<CommandListenerWrapper> cmdCtx, String key) { | ||
return basePaperNMS.getChatColor(cmdCtx, key); | ||
} | ||
|
||
@Override | ||
public Component getChatComponent(CommandContext<CommandListenerWrapper> cmdCtx, String key) { | ||
return basePaperNMS.getChatComponent(cmdCtx, key); | ||
} | ||
|
||
@Override | ||
public NMS<?> bukkitNMS() { | ||
return new MockNMS(new NMS_1_16_R3()); | ||
} | ||
} |
Oops, something went wrong.