aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0273-Replace-OfflinePlayer-getLastPlayed.patch
diff options
context:
space:
mode:
authorBjarne Koll <[email protected]>2024-06-14 16:01:00 +0200
committerBjarne Koll <[email protected]>2024-06-14 16:01:00 +0200
commit547f09dfa05da0c7b56d89cd27f8f2e47a953416 (patch)
tree7c7ae6179109dcf88705cd524e1fff0eab1c022d /patches/server/0273-Replace-OfflinePlayer-getLastPlayed.patch
parent69d1d0a4f4ea5e117f68464ea67e2fbc0ae358bb (diff)
downloadPaper-547f09dfa05da0c7b56d89cd27f8f2e47a953416.tar.gz
Paper-547f09dfa05da0c7b56d89cd27f8f2e47a953416.zip
Some work on the ItemMend events
Diffstat (limited to 'patches/server/0273-Replace-OfflinePlayer-getLastPlayed.patch')
-rw-r--r--patches/server/0273-Replace-OfflinePlayer-getLastPlayed.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/patches/server/0273-Replace-OfflinePlayer-getLastPlayed.patch b/patches/server/0273-Replace-OfflinePlayer-getLastPlayed.patch
index e59fe138f2..65dd0a1d0f 100644
--- a/patches/server/0273-Replace-OfflinePlayer-getLastPlayed.patch
+++ b/patches/server/0273-Replace-OfflinePlayer-getLastPlayed.patch
@@ -106,7 +106,7 @@ index 461656e1cb095243bfe7a9ee2906e5b00574ae78..411b280ac3e27e72091db813c0c9b69b
public Location getLastDeathLocation() {
if (this.getData().contains("LastDeathLocation", 10)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 0fb6c7b63ac15db4921e7c52f98c9070f403e4f3..e5a3d0aa6e800007caea6b0c2ceffa473a40d080 100644
+index a33fc9288165ec013cef6b90d72871f0058c0857..d649fd886faf0d4d989362c4ef0e9c50247c280f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -210,6 +210,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -117,7 +117,7 @@ index 0fb6c7b63ac15db4921e7c52f98c9070f403e4f3..e5a3d0aa6e800007caea6b0c2ceffa47
public CraftPlayer(CraftServer server, ServerPlayer entity) {
super(server, entity);
-@@ -2045,6 +2046,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -2048,6 +2049,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.firstPlayed = firstPlayed;
}
@@ -136,7 +136,7 @@ index 0fb6c7b63ac15db4921e7c52f98c9070f403e4f3..e5a3d0aa6e800007caea6b0c2ceffa47
public void readExtraData(CompoundTag nbttagcompound) {
this.hasPlayedBefore = true;
if (nbttagcompound.contains("bukkit")) {
-@@ -2067,6 +2080,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -2070,6 +2083,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setExtraData(CompoundTag nbttagcompound) {
@@ -145,7 +145,7 @@ index 0fb6c7b63ac15db4921e7c52f98c9070f403e4f3..e5a3d0aa6e800007caea6b0c2ceffa47
if (!nbttagcompound.contains("bukkit")) {
nbttagcompound.put("bukkit", new CompoundTag());
}
-@@ -2081,6 +2096,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -2084,6 +2099,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
data.putLong("firstPlayed", this.getFirstPlayed());
data.putLong("lastPlayed", System.currentTimeMillis());
data.putString("lastKnownName", handle.getScoreboardName());