This repository has been archived by the owner on Feb 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update test mod and Maven artifact in README
- Loading branch information
Showing
5 changed files
with
38 additions
and
24 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
21 changes: 0 additions & 21 deletions
21
src/test/java/io/github/cottonmc/clientcommands/test/ExampleMod.java
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
src/test/java/io/github/cottonmc/clientcommands/test/ExampleModCommands.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,20 @@ | ||
package io.github.cottonmc.clientcommands.test; | ||
|
||
import com.mojang.brigadier.CommandDispatcher; | ||
import io.github.cottonmc.clientcommands.ArgumentBuilders; | ||
import io.github.cottonmc.clientcommands.ClientCommandPlugin; | ||
import io.github.cottonmc.clientcommands.Feedback; | ||
import net.minecraft.server.command.CommandSource; | ||
import net.minecraft.text.StringTextComponent; | ||
|
||
public class ExampleModCommands implements ClientCommandPlugin { | ||
@Override | ||
public void registerCommands(CommandDispatcher<CommandSource> dispatcher) { | ||
dispatcher.register(ArgumentBuilders.literal("client-commands").executes( | ||
source -> { | ||
Feedback.sendFeedback(new StringTextComponent("Hello, world!")); | ||
return 1; | ||
} | ||
)); | ||
} | ||
} |
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,16 @@ | ||
{ | ||
"schemaVersion": 1, | ||
"id": "cotton-client-commands-test", | ||
"name": "Cotton Client Commands Test", | ||
"version": "1", | ||
"environment": "client", | ||
"license": "MIT", | ||
"requires": { | ||
"cotton-client-commands": ">=0.3.0" | ||
}, | ||
"entrypoints": { | ||
"cotton-client-command": [ | ||
"io.github.cottonmc.clientcommands.test.ExampleModCommands" | ||
] | ||
} | ||
} |