Skip to content

Commit 3640723

Browse files
committed
Added documentation for NativeCommandUtils.kt.
Updated documentation for developers. Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent 3d02f0f commit 3640723

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

documentation/for-developers.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies {
1111
compile(
1212
group: "com.github.projectessentials",
1313
name: "ProjectEssentials-Core",
14-
version: "v1.14.4-1.0.3.2"
14+
version: "v1.14.4-1.1.0.0"
1515
)
1616
}
1717
```
@@ -135,6 +135,14 @@ JsonHelper.jsonInstance
135135
- description: Common json instance with default configuration for Project Essentials modules, if module using json configuration, then you need use this property.
136136
```
137137

138+
```
139+
NativeCommandUtils.removeCommand
140+
- accepts:
141+
- commandName - command name to remove. (string)
142+
143+
- description: Just remove vanilla or other registered command.
144+
```
145+
138146
### Dependencies using by Core API.
139147

140148
```

src/main/kotlin/com/mairwunnx/projectessentials/core/vanilla/utils/NativeCommandUtils.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import com.mojang.brigadier.tree.RootCommandNode
55
import net.minecraft.command.CommandSource
66
import org.apache.logging.log4j.LogManager
77

8-
internal object NativeCommandUtils {
8+
/**
9+
* @since 1.14.4-1.1.0.0
10+
*/
11+
object NativeCommandUtils {
912
private val logger = LogManager.getLogger()
1013
private lateinit var registeredCommands: RootCommandNode<CommandSource>
1114

@@ -21,6 +24,11 @@ internal object NativeCommandUtils {
2124
registeredCommands = root.get(dispatcher) as RootCommandNode<CommandSource>
2225
}
2326

27+
/**
28+
* Just remove vanilla or other registered command.
29+
* @param commandName command name to remove.
30+
* @since 1.14.4-1.1.0.0
31+
*/
2432
@JvmStatic
2533
fun removeCommand(commandName: String) {
2634
logger.info("Removing native vanilla command /$commandName")

0 commit comments

Comments
 (0)