You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/create-commands/arguments/suggestions/safe-suggestions.md
+35-35Lines changed: 35 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,41 +42,41 @@ Not all arguments support safe suggestions. This is mostly due to implementation
42
42
43
43
The list of supported arguments is displayed in the following table. The parameter `T` (shown in the method the signatures above) are also provided for each argument. This parameter is the same as the cast argument described in [Argument Casting](../command-arguments#argument-casting), except for a few exceptions which are outlined in **bold**.
Copy file name to clipboardExpand all lines: docs/en/create-commands/registration.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,13 +22,13 @@ I think the easiest way to explain it is with an example:
22
22
23
23
- First, we create a new `CommandAPICommand`, with the name of the command that the sender must enter to run it.
24
24
25
-
- Then, we create an argument to add to the command using `withArguments`. This is described in more detail in [the section on arguments](./arguments).
25
+
- Then, we create an argument to add to the command using `withArguments`. This is described in more detail in [the section on arguments](./arguments/arguments).
26
26
27
27
- In this example, we add an alias, "broadcast", to the command. This allows the sender to use either `/broadcastmsg <message>` or `/broadcast <message>`.
28
28
29
29
- By using `withPermission`, we require the sender to be an OP to run the command.
30
30
31
-
- We control what the command does using `executes` (this is described in more detail in [the section on command executors](./executors)).
31
+
- We control what the command does using `executes` (this is described in more detail in [the section on command executors](./executors/command-executors)).
32
32
33
33
- Finally, we register the command to the CommandAPI using `register`.
The `withPermission` method is used to assign a permission required to execute the command. (See [the section on permissions](permissions) for more info).
65
+
The `withPermission` method is used to assign a permission required to execute the command. (See [the section on permissions](./permissions) for more info).
Executes a command regardless of what the command sender is, using the `NativeProxyCommandSender`. Read more about native proxied command senders [here](./native).
143
+
Executes a command regardless of what the command sender is, using the `NativeProxyCommandSender`. Read more about native proxied command senders [here](./executors/native-sender).
144
144
145
145
:::info
146
146
@@ -199,9 +199,9 @@ Register the command with the provided plugin's name.
199
199
200
200
It is recommended to register commands in either the `onLoad()` or `onEnable()` method. With the CommandAPI, depending on whether you use `onLoad()` or `onEnable()` to load your commands depends on whether your plugin is used with Minecraft's functions:
The CommandAPI does support registering commands outside of these methods while the server is running. Commands registered after the server is done loading _should_ work the same as commands registered in `onEnable`.
Copy file name to clipboardExpand all lines: docs/en/create-commands/unregistration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,7 +145,7 @@ depend:
145
145
146
146
:::info
147
147
148
-
If you can't find the code where a CommandAPI command is registered or just don't have access to the code of a plugin, you can still figure out when a command is registered. If you set [`verbose-outputs`](./config.md#verbose-outputs) to `true` in the CommandAPI's configuration, it will log command registration.
148
+
If you can't find the code where a CommandAPI command is registered or just don't have access to the code of a plugin, you can still figure out when a command is registered. If you set [`verbose-outputs`](../user-setup/config#verbose-outputs) to `true` in the CommandAPI's configuration, it will log command registration.
149
149
150
150
For the ExamplePlugin, setting `verbose-outputs` to `true` gives this:
Copy file name to clipboardExpand all lines: docs/en/test/intro.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,10 @@ For a big-picture view, you can find example projects that include automated tes
12
12
13
13
:::danger Developer's Note:
14
14
15
-
Many methods have not yet been implemented in the test toolkit. Most notably, only [primitive arguments](../create-commands/arguments/types/primitive-arguments), [String arguments](../create-commands/arguments/types/string-arguments), [literal arguments](./category_literal_arguments.md), and the [`IntegerRangeArgument`](../create-commands/arguments/types/ranged-arguments) are fully implemented. The [`EntitySelectorArgument`, `PlayerArgument`, and `OfflinePlayerArgument`](../create-commands/arguments/types/entities-arguments) should mostly work, though [target selector arguments](https://minecraft.wiki/w/Target_selectors#Target_selector_arguments) (e.g. `@e[type=pig]`) are not yet implemented.
15
+
Many methods have not yet been implemented in the test toolkit. Most notably, only [primitive arguments](../create-commands/arguments/types/primitive-arguments), [String arguments](../create-commands/arguments/types/string-arguments), [literal arguments](../create-commands/arguments/types/literal/), and the [`IntegerRangeArgument`](../create-commands/arguments/types/ranged-arguments) are fully implemented. The [`EntitySelectorArgument`, `PlayerArgument`, and `OfflinePlayerArgument`](../create-commands/arguments/types/entities-arguments) should mostly work, though [target selector arguments](https://minecraft.wiki/w/Target_selectors#Target_selector_arguments) (e.g. `@e[type=pig]`) are not yet implemented.
16
16
17
17
If a test ends up calling a method that has not yet been implemented, an `UnimplementedMethodException` will be thrown, causing the test to fail. If you see an `UnimplementedMethodException`, please tell us about it with a [GitHub Issue](https://github.com/CommandAPI/CommandAPI/issues) or a message in the CommandAPI Discord. Pull requests are also always welcome!
18
18
19
-
In the short term, you can try to resolve an `UnimplementedMethodException` by implementing the method yourself. The process for doing that is described [here](./test_loadmockcommandapi.md#loading-a-custom-commandapi-platform-implementation).
19
+
In the short term, you can try to resolve an `UnimplementedMethodException` by implementing the method yourself. The process for doing that is described [here](./load-mock-commandapi#loading-a-custom-commandapi-platform-implementation).
0 commit comments