From 963ddeb6ed4259fff0dee30223a87da3d6bb36a9 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Thu, 1 Feb 2018 23:24:27 -0500
Subject: [PATCH] Properly flag profile events as async as needed

---
 Spigot-API-Patches/Fill-Profile-Property-Events.patch | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Spigot-API-Patches/Fill-Profile-Property-Events.patch b/Spigot-API-Patches/Fill-Profile-Property-Events.patch
index 406cb7d6a4..1c5ea11df2 100644
--- a/Spigot-API-Patches/Fill-Profile-Property-Events.patch
+++ b/Spigot-API-Patches/Fill-Profile-Property-Events.patch
@@ -12,7 +12,7 @@ This is useful for implementing a ProfileCache for Player Skulls
 
 diff --git a/src/main/java/com/destroystokyo/paper/event/profile/FillProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/FillProfileEvent.java
 new file mode 100644
-index 00000000..a893dda1
+index 00000000..e8f6e7c1
 --- /dev/null
 +++ b/src/main/java/com/destroystokyo/paper/event/profile/FillProfileEvent.java
 @@ -0,0 +0,0 @@
@@ -56,6 +56,7 @@ index 00000000..a893dda1
 +    private final PlayerProfile profile;
 +
 +    public FillProfileEvent(@Nonnull PlayerProfile profile) {
++        super(!org.bukkit.Bukkit.isPrimaryThread());
 +        this.profile = profile;
 +    }
 +
@@ -89,7 +90,7 @@ index 00000000..a893dda1
 +}
 diff --git a/src/main/java/com/destroystokyo/paper/event/profile/PreFillProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/PreFillProfileEvent.java
 new file mode 100644
-index 00000000..e34312c1
+index 00000000..f7b332e1
 --- /dev/null
 +++ b/src/main/java/com/destroystokyo/paper/event/profile/PreFillProfileEvent.java
 @@ -0,0 +0,0 @@
@@ -135,6 +136,7 @@ index 00000000..e34312c1
 +    private final PlayerProfile profile;
 +
 +    public PreFillProfileEvent(PlayerProfile profile) {
++        super(!org.bukkit.Bukkit.isPrimaryThread());
 +        this.profile = profile;
 +    }
 +