Fix (again) Player#getPlayerProfile no such method error (#8722)

This commit is contained in:
Jake Potrebic
2022-12-26 04:34:23 -08:00
parent e794bcecbd
commit d4d31bb847
2 changed files with 2 additions and 2 deletions

View File

@@ -170,7 +170,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ // Paper start - Rewrite plugins
+ if (owner.equals("org/bukkit/OfflinePlayer") && name.equals("getPlayerProfile") && desc.equals("()Lorg/bukkit/profile/PlayerProfile;")) {
+ if ((owner.equals("org/bukkit/OfflinePlayer") || owner.equals("org/bukkit/entity/Player")) && name.equals("getPlayerProfile") && desc.equals("()Lorg/bukkit/profile/PlayerProfile;")) {
+ super.visitMethodInsn(opcode, owner, name, "()Lcom/destroystokyo/paper/profile/PlayerProfile;", itf);
+ return;
+ }