Skip to content

Commit

Permalink
fix annotation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Machine-Maker committed May 11, 2024
1 parent 7963241 commit 0d8c390
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions patches/api/0481-temp-Paper-MojangAPI.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] temp: Paper-MojangAPI


diff --git a/build.gradle.kts b/build.gradle.kts
index 538736cf17592829f0f26477c2bf8d80f3714d9a..aed3440e6496f049a30107197e1f6d96487bf300 100644
index 538736cf17592829f0f26477c2bf8d80f3714d9a..fd39ed209b20c927054b8482c400beeeeab460a3 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -93,9 +93,29 @@ sourceSets {
Expand All @@ -21,7 +21,7 @@ index 538736cf17592829f0f26477c2bf8d80f3714d9a..aed3440e6496f049a30107197e1f6d96
+ outgoing {
+ capability("${project.group}:${project.name}:${project.version}")
+ capability("io.papermc.paper:paper-mojangapi:${project.version}")
+ capability("com.destroystokyo:paper-mojangapi:${project.version}")
+ capability("com.destroystokyo.paper:paper-mojangapi:${project.version}")
+ }
+ }
+ }
Expand Down Expand Up @@ -93,10 +93,10 @@ index 0000000000000000000000000000000000000000..28b44789e3be586c4b680fff56e5d2ff
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/brigadier/AsyncPlayerSendCommandsEvent.java b/src/main/java/com/destroystokyo/paper/event/brigadier/AsyncPlayerSendCommandsEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..70ac52f3864ac6e9603d527338bbc015a12f5711
index 0000000000000000000000000000000000000000..a56ab5a031f8e254bf4e5ea063df0fad2e585206
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/brigadier/AsyncPlayerSendCommandsEvent.java
@@ -0,0 +1,71 @@
@@ -0,0 +1,72 @@
+package com.destroystokyo.paper.event.brigadier;
+
+import com.mojang.brigadier.tree.RootCommandNode;
Expand Down Expand Up @@ -134,7 +134,8 @@ index 0000000000000000000000000000000000000000..70ac52f3864ac6e9603d527338bbc015
+ private final RootCommandNode<S> node;
+ private final boolean hasFiredAsync;
+
+ public AsyncPlayerSendCommandsEvent(Player player, RootCommandNode<S> node, boolean hasFiredAsync) {
+ @ApiStatus.Internal
+ public AsyncPlayerSendCommandsEvent(@NotNull Player player, @NotNull RootCommandNode<S> node, boolean hasFiredAsync) {
+ super(player, !Bukkit.isPrimaryThread());
+ this.node = node;
+ this.hasFiredAsync = hasFiredAsync;
Expand All @@ -145,7 +146,7 @@ index 0000000000000000000000000000000000000000..70ac52f3864ac6e9603d527338bbc015
+ *
+ * @return the root command node
+ */
+ public RootCommandNode<S> getCommandNode() {
+ public @NotNull RootCommandNode<S> getCommandNode() {
+ return node;
+ }
+
Expand All @@ -170,10 +171,10 @@ index 0000000000000000000000000000000000000000..70ac52f3864ac6e9603d527338bbc015
+}
diff --git a/src/main/java/com/destroystokyo/paper/event/brigadier/AsyncPlayerSendSuggestionsEvent.java b/src/main/java/com/destroystokyo/paper/event/brigadier/AsyncPlayerSendSuggestionsEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..6b0dcc60fc097675b19c7389f30b96e8680ec52d
index 0000000000000000000000000000000000000000..6ac205de582983863bd5b3c0fa70d4375dd751c5
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/brigadier/AsyncPlayerSendSuggestionsEvent.java
@@ -0,0 +1,83 @@
@@ -0,0 +1,85 @@
+package com.destroystokyo.paper.event.brigadier;
+
+import com.mojang.brigadier.suggestion.Suggestions;
Expand All @@ -182,6 +183,7 @@ index 0000000000000000000000000000000000000000..6b0dcc60fc097675b19c7389f30b96e8
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
+
+/**
Expand All @@ -197,7 +199,8 @@ index 0000000000000000000000000000000000000000..6b0dcc60fc097675b19c7389f30b96e8
+ private Suggestions suggestions;
+ private final String buffer;
+
+ public AsyncPlayerSendSuggestionsEvent(Player player, Suggestions suggestions, String buffer) {
+ @ApiStatus.Internal
+ public AsyncPlayerSendSuggestionsEvent(@NotNull Player player, @NotNull Suggestions suggestions, @NotNull String buffer) {
+ super(player, !Bukkit.isPrimaryThread());
+ this.suggestions = suggestions;
+ this.buffer = buffer;
Expand All @@ -208,7 +211,7 @@ index 0000000000000000000000000000000000000000..6b0dcc60fc097675b19c7389f30b96e8
+ *
+ * @return the input buffer
+ */
+ public String getBuffer() {
+ public @NotNull String getBuffer() {
+ return buffer;
+ }
+
Expand All @@ -217,7 +220,7 @@ index 0000000000000000000000000000000000000000..6b0dcc60fc097675b19c7389f30b96e8
+ *
+ * @return the suggestions
+ */
+ public Suggestions getSuggestions() {
+ public @NotNull Suggestions getSuggestions() {
+ return suggestions;
+ }
+
Expand All @@ -226,7 +229,7 @@ index 0000000000000000000000000000000000000000..6b0dcc60fc097675b19c7389f30b96e8
+ *
+ * @param suggestions suggestions
+ */
+ public void setSuggestions(Suggestions suggestions) {
+ public void setSuggestions(@NotNull Suggestions suggestions) {
+ this.suggestions = suggestions;
+ }
+
Expand Down

0 comments on commit 0d8c390

Please sign in to comment.