Skip to content

Commit 1d41188

Browse files
Merge remote-tracking branch 'origin/master'
2 parents c41c3d3 + fe0c540 commit 1d41188

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 DatAsianBoi123
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ public class GreetCommand {
8686
```
8787
The `CommandBuilder` is what you use create commands.
8888

89-
The constructor argument tells CommandCore that only `Player`s may execute this command and won't let other senders execute it (command blocks, the console, etc.).
90-
9189
On the 5th line, we use a `.executes` call. This tells CommandCore to execute whatever is in the lambda when we run the command with no arguments.
9290

9391
On the next line, we make a `.then` call. It adds another 'branch' to the command 'tree'. You can think of the entire command as a tree, with the `CommandBuilder` as the main trunk. Any extra `.then` calls creates another branch, or path, that the user can go down.
@@ -98,7 +96,8 @@ Notice how the literal `CommandNode` doesn't have an `.executes` call. This tell
9896

9997
On the next line, we create a new branch under the literal. This time, it is an argument. An argument is any string that the argument type can understand. In this case, we give it an argument type of `PLAYER`. This means that CommandCore will suggest us player names.
10098

101-
After that, we have a `.executes` call. This gets executed when we have typed that entire branch out. (ex. `/... player DatAsiqn`).
99+
After that, we have a `.requiresPlayer` call. This tells CommandCore that the current node (the PLAYER argument) requires a player to use it. If, for example, the console sends it, CommandCore will not execute the command and instead give the user an error.
100+
Finally, we have a `.executes` call. This gets executed when we have typed that entire branch out. (ex. `/... player DatAsiqn`).
102101

103102
The next line is adding another literal onto the main trunk (notice the indentation). This literal is less complicated than the last, and just makes the sender chat "Hello Server!".
104103

@@ -128,4 +127,4 @@ You can contribute to this project by
128127
* [Forking](https://github.com/DatAsianBoi123/CommandCore/fork) this repo
129128
* Creating a [pull request](https://github.com/DatAsianBoi123/CommandCore/compare)
130129
---
131-
Have any questions? Ask me on [discord](https://discord.com)! My tag is `DatAsianBoi1234#7767`
130+
Have any questions? Ask me on [discord](https://discord.com)! My tag is `datasianboi123`

0 commit comments

Comments
 (0)