coroutine-based kotlin minecraft game engine
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: remove ksp

+26 -89
-1
docs/.vitepress/config.mts
··· 23 23 items: [ 24 24 {text: 'Introduction', link: '/getting-started/introduction'}, 25 25 {text: 'Quickstart', link: '/getting-started/quickstart'}, 26 - {text: 'Applying KSP', link: '/getting-started/ksp'}, 27 26 {text: 'Examples', link: '/getting-started/examples'}, 28 27 ] 29 28 },
+26 -19
docs/src/core-apis/commands.md
··· 53 53 ```kt 54 54 val TestCommand = Command("test") { 55 55 async() 56 - 56 + 57 57 executor { 58 58 ctx.sendMesage(text("Hello, world!")) 59 59 } ··· 81 81 ```kt 82 82 val TestCommand = Command("test") { 83 83 aliases("hello") 84 - 84 + 85 85 executor { 86 86 ctx.sendMesage(text("Hello, world!")) 87 87 } ··· 97 97 ```kt 98 98 val TestCommand = Command("test") { 99 99 aliases("hello") 100 - 100 + 101 101 executor { 102 102 ctx.sendMesage(text("Hello, world!")) 103 - } 104 - 103 + } 104 + 105 105 sub("bye") { 106 106 executor { 107 107 ctx.sendMessage(text("Bye, world!")) ··· 123 123 ```kt 124 124 val TestCommand = Command("test") { 125 125 aliases("hello") 126 - 126 + 127 127 val name by arg("name", stringParser()) // stringParser comes from Cloud's StringParser 128 - 128 + 129 129 executor { 130 130 ctx.sendMesage(text("Hello, $name!")) 131 131 } ··· 141 141 This will work for `/hello rad`: `Hello, rad!`. But when we 142 142 try to do `/hello bye rad` 143 143 or `/hello rad bye`, we will either get a syntax exception 144 - or this: 144 + or this cloud exception: 145 145 146 - ``` 146 + ```txt 147 147 There is no object in the registry identified by the key 'name' 148 148 ``` 149 149 ··· 155 155 ```kt 156 156 val TestCommand = Command("test") { 157 157 aliases("hello") 158 - 158 + 159 159 val name by arg("name", stringParser()) 160 160 161 161 executor { ··· 164 164 165 165 sub("bye") { 166 166 val name by arg("name", stringParser()) 167 - 167 + 168 168 executor { 169 169 ctx.sendMessage(text("Bye, $name!")) 170 170 } ··· 194 194 ```kt 195 195 val TestCommand = Command("test") { 196 196 aliases("hello") 197 - 197 + 198 198 val name by arg("name", stringParser()) 199 199 200 200 permission("axi.testcommands.hello") 201 - 201 + 202 202 executor { 203 203 ctx.sendMesage(text("Hello, $name!")) 204 204 } 205 - 205 + 206 206 // ... 207 207 } 208 208 ``` ··· 225 225 226 226 Well, there's two options: 227 227 228 - * Use the [KSP processor](/getting-started/ksp) to register 229 - them automatically 230 - * Register them manually 228 + - Use the KSP processor to register them automatically 229 + - Register them manually 231 230 232 231 ### Automatic Registration 233 232 234 - First, make sure you have set up 235 - the [KSP processor](/getting-started/ksp). 233 + First, make sure you are using the 234 + Axi gradle plugin, as specified in the 235 + [Quickstart](/getting-started/quickstart) page. 236 236 237 237 Then, all you need to do is to add the `@AutoRegistered` 238 238 annotation to your ··· 242 242 @AutoRegistered 243 243 val MyCommand = Command("hello") 244 244 ``` 245 + 246 + ::: warning 247 + If you are making an Axi module used 248 + by other people, this will not work 249 + due to library loading and classloaders. 250 + See the manual section below. 251 + ::: 245 252 246 253 ### Manual Registration 247 254
-69
docs/src/getting-started/ksp.md
··· 1 - # Applying KSP 2 - 3 - This guide will teach you how to set up KSP and Axi's KSP 4 - processor, for automatically registering commands and 5 - more to come. 6 - 7 - ## Applying the plugin 8 - 9 - Apply the plugin to your buildscript: 10 - 11 - ::: code-group 12 - 13 - ```kts [build.gradle.kts] 14 - plugins { 15 - id("com.google.devtools.ksp") version "2.1.20-1.0.31" 16 - } 17 - ``` 18 - 19 - ```groovy [build.gradle] 20 - plugins { 21 - id 'com.google.devtools.ksp' version '2.1.20-1.0.31' 22 - } 23 - ``` 24 - 25 - ::: 26 - 27 - ## Add the processor 28 - 29 - Add the processor to your dependencies: 30 - 31 - ::: code-group 32 - 33 - ```kts{2} [build.gradle.kts] 34 - dependencies { 35 - ksp("net.radstevee.axi:axi-ksp") 36 - } 37 - ``` 38 - 39 - ```groovy{2} [build.gradle] 40 - dependencies { 41 - ksp 'net.radstevee.axi:axi-ksp' 42 - } 43 - ``` 44 - 45 - ::: 46 - 47 - ::: warning 48 - If you are using shadow, you may have to change 49 - your shaded archive classifier: 50 - 51 - ::: code-group 52 - 53 - ```kts{3} [build.gradle.kts] 54 - tasks { 55 - shadowJar { 56 - archiveClassifier = "" 57 - } 58 - } 59 - ``` 60 - 61 - ```groovy{3} [build.gradle] 62 - tasks { 63 - shadowJar { 64 - archiveClassifier = '' 65 - } 66 - } 67 - ``` 68 - 69 - :::