Paper/Spigot-API-Patches/0088-Player.setPlayerProfile-API.patch
Zach Brown ef170ee659
Update upstream B/CB/S
--- work/Bukkit
Submodule work/Bukkit 6eac6d70..1ef8b9d9:
  > Add Player#openBook(ItemStack) method

--- work/CraftBukkit
Submodule work/CraftBukkit 17543ecf..649921e5:
  > Add Player#openBook(ItemStack) method
  > SPIGOT-2000: Picking up items to shield slot working inconsistently when inventory is full
  > SPIGOT-5037: Player.openMerchant does not show merchant level
  > SPIGOT-5038: Inventory.getHolder returns null for wandering traders

--- work/Spigot
Submodule work/Spigot baafee91..df0eb250:
  > SPIGOT-5043: Desync if world is changed in PlayerSpawnLocationEvent
  > Rebuild patches

Implementation developer note:
This patch adds a "pre-source" patch system for fixing malformed patches
from upstream directly. This seems to keep happening so it's best we
have some way to deal with them. This system brings those issues into
our domain rather than needing to wait for upstream to fix their
malformed files.
2019-06-08 15:33:05 -05:00

44 lines
1.5 KiB
Diff

From 3d8f97070c36b970b9f4594e0c98d07832974efa Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 18 Mar 2018 12:28:55 -0400
Subject: [PATCH] Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 1e7bbd0e..759d4210 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3,6 +3,7 @@ package org.bukkit.entity;
import java.net.InetSocketAddress;
import com.destroystokyo.paper.Title;
+import com.destroystokyo.paper.profile.PlayerProfile;
import org.bukkit.Achievement;
import org.bukkit.Effect;
import org.bukkit.GameMode;
@@ -1761,6 +1762,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
*/
boolean hasResourcePack();
+
+ /**
+ * Gets a copy of this players profile
+ * @return The players profile object
+ */
+ @NotNull
+ PlayerProfile getPlayerProfile();
+
+ /**
+ * Changes the PlayerProfile for this player. This will cause this player
+ * to be reregistered to all clients that can currently see this player
+ * @param profile The new profile to use
+ */
+ void setPlayerProfile(@NotNull PlayerProfile profile);
// Paper end
// Spigot start
--
2.21.0