Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PaperMC/Paper
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf418905d0a5625aec714f50408d9832b57b917a
Choose a base ref
..
head repository: PaperMC/Paper
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9d0fd05ac5a8a4393d63b4f6fc9e9de7eaaf5266
Choose a head ref
Showing with 23 additions and 2 deletions.
  1. +23 −2 patches/api/0477-add-disguise-api.patch
25 changes: 23 additions & 2 deletions patches/api/0477-add-disguise-api.patch
Original file line number Diff line number Diff line change
@@ -196,15 +196,36 @@ index 27084402cf0e46dcd171074629b7c4156e48aa44..6fc54f9f8414808a9250235f179bd068
+ // Paper end - add disguise api
}
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index 62e3793903905b94eb1a120345015149abb33713..fd73fa94b1bd7418c5f87254bab093c27d68b8e0 100644
index 62e3793903905b94eb1a120345015149abb33713..634f910ae61ce87c64793aa2b24cc5bb460a2872 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -1155,4 +1155,8 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
@@ -1155,4 +1155,29 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
*/
@NotNull String getScoreboardEntryName();
// Paper end - entity scoreboard name
+ // Paper start - disguise api
+
+ /**
+ * Gets the current {@link io.papermc.paper.disguise.DisguiseData} of the entity.
+ *
+ * @return {@link io.papermc.paper.disguise.DisguiseData.OriginalDisguise} if entity is not disguised.
+ * Otherwise, one of {@link io.papermc.paper.disguise.EntityTypeDisguise} or {@link io.papermc.paper.disguise.PlayerDisguise}
+ */
+ @NotNull io.papermc.paper.disguise.DisguiseData getDisguiseData();
+
+ /**
+ * Sets the current {@link io.papermc.paper.disguise.DisguiseData} of the entity.
+ * <p>
+ * Following {@link io.papermc.paper.disguise.DisguiseData} can be set:
+ * <ul>
+ * <li>{@link io.papermc.paper.disguise.PlayerDisguise} use {@link io.papermc.paper.disguise.DisguiseData#player(com.destroystokyo.paper.profile.PlayerProfile)}.
+ * It returns a builder where you are able to configure additional settings</li>
+ * <li>{@link io.papermc.paper.disguise.EntityTypeDisguise} use {@link io.papermc.paper.disguise.DisguiseData#entity(EntityType)}</li>
+ * <li>{@link io.papermc.paper.disguise.DisguiseData.OriginalDisguise} use {@link io.papermc.paper.disguise.DisguiseData#original()} or {@link io.papermc.paper.disguise.DisguiseData#reset()} to reset it again to the original state</li>
+ * </ul>
+ *
+ * @param disguiseData the {@link io.papermc.paper.disguise.DisguiseData} that will be set.
+ */
+ void setDisguiseData(@NotNull io.papermc.paper.disguise.DisguiseData disguiseData);
+ // Paper end - disguise api
}