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
| GAME_EVENT | GameEvent | Events in the game (eating, flying with an elytra etc.) |
64
-
| STRUCTURE_TYPE | StructureType |[Structures](https://minecraft.wiki/w/Structure#Overworld) - Beware that, as of Paper 1.20.6-147, there is also a Registry named `STRUCTURE` that is not recognized by the client and makes it unable to connect. This has been reported to Paper developers and will be fixed in a future release. |
Brigadier itself also specifies many argument types. For more information on them, see <Javadocname={"io.papermc.paper.command.brigadier.argument.ArgumentTypes"}>ArgumentTypes</Javadoc>.
90
+
Brigadier itself also specifies many argument types. For more information on them, see <Javadocname={"io.papermc.paper.command.brigadier.argument.ArgumentTypes"}>LifecycleEventManager</Javadoc>
93
91
94
92
### Custom types
95
93
96
94
Custom arguments can be created by implementing the <Javadocname={"io.papermc.paper.command.brigadier.argument.CustomArgumentType"}>CustomArgumentType</Javadoc>
97
95
interface.
98
96
99
-
Now, let's say that we want to implement a command which lets you order ice cream. For that,
97
+
Now, lets say that we want to implement a command which lets you order ice cream. For that,
100
98
we add an enum that specifies all available values for our custom type.
101
99
102
100
```java
@@ -142,7 +140,7 @@ public class IceCreamTypeArgument implements CustomArgumentType.Converted<IceCre
142
140
}
143
141
```
144
142
145
-
That's a lot of code, so let's start from the top. We implemented the `CustomArgumentType.Converted`
143
+
That's a lot of code, so let's start from the top. We implemented the <Javadocname={"io.papermc.paper.command.brigadier.argument.CustomArgumentType$Converted"}>CustomArgumentType.Converted</Javadoc>
146
144
interface. This interface takes two type arguments: our custom enum, T, and a type that is native to
147
145
Minecraft, such as String, Integer, etc., called N. The native type exists so that the client can use
148
146
the input data, as it doesn't know what our custom `IceCreamType` is.
@@ -160,7 +158,7 @@ In the last method, `listSuggestions()`, we return `CompletableFuture<Suggestion
160
158
can suggest all available options. We can even add tooltips to the suggestions to explain them in greater
0 commit comments