Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Please note that this build includes changes to meet upstreams requirements for nullability annotations. While we aim for a level of accuracy, these might not be 100% correct, if there are any issues, please speak to us on discord, or open an issue on the tracker to discuss. Bukkit Changes: 9a6a1de3 Remove nullability annotations from enum constructors 3f0591ea SPIGOT-2540: Add nullability annotations to entire Bukkit API CraftBukkit Changes: 8d8475fc SPIGOT-4666: Force parameter in HumanEntity#sleep 8b1588e2 Fix ExplosionPrimeEvent#setFire not working with EnderCrystals 39a287b7 Don't ignore newlines in PlayerListHeader/Footer Spigot Changes: cf694d87 Add nullability annotations
This commit is contained in:
parent
c3c889523f
commit
0976d52bbd
261 changed files with 3224 additions and 2923 deletions
|
@ -1,4 +1,4 @@
|
|||
From 6df1eea3118148d343e2ba943ed0e79e3272e981 Mon Sep 17 00:00:00 2001
|
||||
From 907a0b84b6a2bfa31356bf1d72f7a8210be4e612 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 19 Jan 2018 00:29:28 -0500
|
||||
Subject: [PATCH] Add setPlayerProfile API for Skulls
|
||||
|
@ -7,28 +7,27 @@ This allows you to create already filled textures on Skulls to avoid texture loo
|
|||
which commonly cause rate limit issues with Mojang API
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/Skull.java b/src/main/java/org/bukkit/block/Skull.java
|
||||
index 499a153e..3c75341e 100644
|
||||
index 6325f583..27675ecd 100644
|
||||
--- a/src/main/java/org/bukkit/block/Skull.java
|
||||
+++ b/src/main/java/org/bukkit/block/Skull.java
|
||||
@@ -4,6 +4,8 @@ import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.SkullType;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
+import com.destroystokyo.paper.profile.PlayerProfile;
|
||||
+import javax.annotation.Nullable;
|
||||
@@ -7,6 +7,7 @@ import org.bukkit.block.data.BlockData;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
+import com.destroystokyo.paper.profile.PlayerProfile; // Paper
|
||||
|
||||
/**
|
||||
* Represents a captured state of a skull block.
|
||||
@@ -55,6 +57,20 @@ public interface Skull extends BlockState {
|
||||
@@ -61,6 +62,20 @@ public interface Skull extends BlockState {
|
||||
*/
|
||||
public void setOwningPlayer(OfflinePlayer player);
|
||||
public void setOwningPlayer(@NotNull OfflinePlayer player);
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Sets this skull to use the supplied Player Profile, which can include textures already prefilled.
|
||||
+ * @param profile The profile to set this Skull to use, may not be null
|
||||
+ */
|
||||
+ void setPlayerProfile(PlayerProfile profile);
|
||||
+ void setPlayerProfile(@NotNull PlayerProfile profile);
|
||||
+
|
||||
+ /**
|
||||
+ * If the skull has an owner, per {@link #hasOwner()}, return the owners {@link PlayerProfile}
|
||||
|
@ -41,23 +40,24 @@ index 499a153e..3c75341e 100644
|
|||
* Gets the rotation of the skull in the world (or facing direction if this
|
||||
* is a wall mounted skull).
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
index 15c1dfd9..a458000f 100644
|
||||
index 1583764b..43cdc4c6 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java
|
||||
@@ -1,7 +1,10 @@
|
||||
@@ -1,9 +1,11 @@
|
||||
package org.bukkit.inventory.meta;
|
||||
|
||||
+import com.destroystokyo.paper.profile.PlayerProfile;
|
||||
+import javax.annotation.Nullable;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
+
|
||||
/**
|
||||
* Represents a skull that can have an owner.
|
||||
*/
|
||||
@@ -36,6 +39,20 @@ public interface SkullMeta extends ItemMeta {
|
||||
@@ -36,6 +38,20 @@ public interface SkullMeta extends ItemMeta {
|
||||
@Deprecated
|
||||
boolean setOwner(String owner);
|
||||
boolean setOwner(@Nullable String owner);
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
|
@ -77,5 +77,5 @@ index 15c1dfd9..a458000f 100644
|
|||
* Gets the owner of the skull.
|
||||
*
|
||||
--
|
||||
2.20.1
|
||||
2.21.0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue