mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Update adventure and fix command perm serialization NPE (#6729)
This commit is contained in:
parent
e155002b31
commit
e4d8c47ebf
1 changed files with 15 additions and 5 deletions
|
@ -7,14 +7,14 @@ Co-authored-by: zml <zml@stellardrift.ca>
|
||||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 3a395a44ff50a77895341bbbfb8c81deede41b8b..6ebea1d9fafb08ede7e37dfe1b145a676c7aaaf9 100644
|
index 3a395a44ff50a77895341bbbfb8c81deede41b8b..0a49a70a8f70e9b0af1eb5cff10884b98f86da7d 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -10,6 +10,19 @@ java {
|
@@ -10,6 +10,19 @@ java {
|
||||||
withJavadocJar()
|
withJavadocJar()
|
||||||
}
|
}
|
||||||
|
|
||||||
+val adventureVersion = "4.9.1"
|
+val adventureVersion = "4.9.2"
|
||||||
+val apiAndDocs by configurations.creating {
|
+val apiAndDocs by configurations.creating {
|
||||||
+ attributes {
|
+ attributes {
|
||||||
+ attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
+ attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||||
|
@ -1221,7 +1221,7 @@ index ab6b0ec328e94bf65a0dafd0403e5ee3b870296c..c8d37184d8e882a4084a1bfef85faa33
|
||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
|
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
|
||||||
index 03bdc1622791e1206406c87065978688d602e39e..96067ea484eab10bc2be35656481185a67cbcad5 100644
|
index 03bdc1622791e1206406c87065978688d602e39e..c4dcafac892169a7bfcc065701fffb43c6cfdf44 100644
|
||||||
--- a/src/main/java/org/bukkit/command/Command.java
|
--- a/src/main/java/org/bukkit/command/Command.java
|
||||||
+++ b/src/main/java/org/bukkit/command/Command.java
|
+++ b/src/main/java/org/bukkit/command/Command.java
|
||||||
@@ -32,7 +32,7 @@ public abstract class Command {
|
@@ -32,7 +32,7 @@ public abstract class Command {
|
||||||
|
@ -1258,7 +1258,7 @@ index 03bdc1622791e1206406c87065978688d602e39e..96067ea484eab10bc2be35656481185a
|
||||||
+ @Deprecated // Paper
|
+ @Deprecated // Paper
|
||||||
public String getPermissionMessage() {
|
public String getPermissionMessage() {
|
||||||
- return permissionMessage;
|
- return permissionMessage;
|
||||||
+ return io.papermc.paper.text.PaperComponents.legacySectionSerializer().serialize(permissionMessage); // Paper
|
+ return io.papermc.paper.text.PaperComponents.legacySectionSerializer().serializeOrNull(permissionMessage); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1276,15 +1276,25 @@ index 03bdc1622791e1206406c87065978688d602e39e..96067ea484eab10bc2be35656481185a
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,6 +402,15 @@ public abstract class Command {
|
@@ -398,6 +402,25 @@ public abstract class Command {
|
||||||
this.usageMessage = (usage == null) ? "" : usage;
|
this.usageMessage = (usage == null) ? "" : usage;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
+ /**
|
||||||
|
+ * Gets the permission message.
|
||||||
|
+ *
|
||||||
|
+ * @return the permission message
|
||||||
|
+ */
|
||||||
+ public @Nullable net.kyori.adventure.text.Component permissionMessage() {
|
+ public @Nullable net.kyori.adventure.text.Component permissionMessage() {
|
||||||
+ return this.permissionMessage;
|
+ return this.permissionMessage;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Sets the permission message.
|
||||||
|
+ *
|
||||||
|
+ * @param permissionMessage the permission message
|
||||||
|
+ */
|
||||||
+ public void permissionMessage(@Nullable net.kyori.adventure.text.Component permissionMessage) {
|
+ public void permissionMessage(@Nullable net.kyori.adventure.text.Component permissionMessage) {
|
||||||
+ this.permissionMessage = permissionMessage;
|
+ this.permissionMessage = permissionMessage;
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in a new issue