Profile Lookup Events

Adds a Pre Lookup Event and a Post Lookup Event so that plugins may prefill in profile data, and cache the responses from
profiles that had to be looked up.
This commit is contained in:
Aikar
2017-06-17 17:15:25 -04:00
parent 5d51c00fac
commit 43e2c9c48c
3 changed files with 258 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Shoulder Entities Release API
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index f5e25e63d..8f3cefaa8 100644
index f5e25e63d..c74095554 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
@@ -35,7 +35,7 @@ index f5e25e63d..8f3cefaa8 100644
+ private boolean spawnEntityFromShoulder(@Nullable NBTTagCompound nbttagcompound) {
+ return spawnEntityFromShoulder0(nbttagcompound) != null;
+ }
+ // Paper - Moved to new method that now returns entiy, and properly null checks
+ // Paper - Moved to new method that now returns entity, and properly null checks
+ private Entity spawnEntityFromShoulder0(@Nullable NBTTagCompound nbttagcompound) { // CraftBukkit void->boolean - Paper - return Entity
+ if (!this.world.isClientSide && nbttagcompound != null && !nbttagcompound.isEmpty()) { // Paper - null check
Entity entity = EntityTypes.a(nbttagcompound, this.world);