mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 20:22:05 -07:00
Adventure 4.9.1 (#6634)
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
This commit is contained in:
@@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
+val adventureVersion = "4.8.1"
|
||||
+val adventureVersion = "4.9.1"
|
||||
+val apiAndDocs by configurations.creating {
|
||||
+ attributes {
|
||||
+ attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||
@@ -1696,6 +1696,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ @Deprecated // Paper
|
||||
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param title Title text
|
||||
* @param subtitle Subtitle text
|
||||
- * @deprecated API behavior subject to change
|
||||
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} or {@link #sendTitlePart(net.kyori.adventure.title.TitlePart, Object)}
|
||||
*/
|
||||
@Deprecated
|
||||
public void sendTitle(@Nullable String title, @Nullable String subtitle);
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param fadeIn time in ticks for titles to fade in. Defaults to 10.
|
||||
* @param stay time in ticks for titles to stay. Defaults to 70.
|
||||
* @param fadeOut time in ticks for titles to fade out. Defaults to 20.
|
||||
+ * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} or {@link #sendTitlePart(net.kyori.adventure.title.TitlePart, Object)}
|
||||
*/
|
||||
+ @Deprecated // Paper - Adventure
|
||||
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut);
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@@ -3571,6 +3590,45 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public @NotNull MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible, @Nullable net.kyori.adventure.text.Component caption) {
|
||||
+ return addCursor(new MapCursor((byte) x, (byte) y, direction, type, visible, caption));
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/permissions/Permissible.java b/src/main/java/org/bukkit/permissions/Permissible.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/permissions/Permissible.java
|
||||
+++ b/src/main/java/org/bukkit/permissions/Permissible.java
|
||||
@@ -0,0 +0,0 @@ public interface Permissible extends ServerOperator {
|
||||
*/
|
||||
@NotNull
|
||||
public Set<PermissionAttachmentInfo> getEffectivePermissions();
|
||||
+
|
||||
+ // Paper start - add TriState permission checks
|
||||
+ /**
|
||||
+ * Checks if this object has a permission set and, if it is set, the value of the permission.
|
||||
+ *
|
||||
+ * @param permission the permission to check
|
||||
+ * @return a tri-state of if the permission is set and, if it is set, it's value
|
||||
+ */
|
||||
+ default net.kyori.adventure.util.@NotNull TriState permissionValue(final @NotNull Permission permission) {
|
||||
+ if (this.isPermissionSet(permission)) {
|
||||
+ return net.kyori.adventure.util.TriState.byBoolean(this.hasPermission(permission));
|
||||
+ } else {
|
||||
+ return net.kyori.adventure.util.TriState.NOT_SET;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if this object has a permission set and, if it is set, the value of the permission.
|
||||
+ *
|
||||
+ * @param permission the permission to check
|
||||
+ * @return a tri-state of if the permission is set and, if it is set, it's value
|
||||
+ */
|
||||
+ default net.kyori.adventure.util.@NotNull TriState permissionValue(final @NotNull String permission) {
|
||||
+ if (this.isPermissionSet(permission)) {
|
||||
+ return net.kyori.adventure.util.TriState.byBoolean(this.hasPermission(permission));
|
||||
+ } else {
|
||||
+ return net.kyori.adventure.util.TriState.NOT_SET;
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/scoreboard/Objective.java b/src/main/java/org/bukkit/scoreboard/Objective.java
|
||||
|
Reference in New Issue
Block a user