13
0
geforkt von Mirrors/Paper

Merge pull request #1250

Cleaned up some implementation notes to use existing Vanilla method for some things.
merged into parent patch

7dd5837d Fixed more stuff (NickAcPT)
09f01353 Remove unsed method (NickAcPT)
e5ea4656 Extend player profile API to support skin changes (NickAcPT)
e67d55d0 Extend player profile API to support skin changes (NickAcPT)

* pull/1250/head:
  Fixed more stuff
  Remove unsed method
  Extend player profile API to support skin changes
  Extend player profile API to support skin changes
Dieser Commit ist enthalten in:
Aikar 2018-07-23 20:31:33 -04:00
Commit 5f175ef9c3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE
4 geänderte Dateien mit 30 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From a949306e1efe3b5ba7ae41b9ea584778b59a5265 Mon Sep 17 00:00:00 2001
From f0ff71ed88b27c82c77ecc140d2dd068749f9807 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:52:34 -0600
Subject: [PATCH] Prevent tile entity and entity crashes

Datei anzeigen

@ -1,4 +1,4 @@
From 76648e3954c2467150ff499f71a67f70f8e6f5a4 Mon Sep 17 00:00:00 2001
From 449eb3fe46c8082e18636765fd22ab8a9be1b4ca Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:58:50 -0600
Subject: [PATCH] Configurable top of nether void damage
@ -20,7 +20,7 @@ index d3484489b..bf7af475c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 43b802855..aadc426fd 100644
index 011cf59c0..296bdfba5 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -450,9 +450,15 @@ public abstract class Entity implements ICommandListener, KeyedObject { // Paper

Datei anzeigen

@ -1,4 +1,4 @@
From f66fc891df81485d65a13598e72d1fc97298470c Mon Sep 17 00:00:00 2001
From 4af3e524620c76a07efafb4d4053e55cd4190fa4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 18 Mar 2018 12:29:48 -0400
Subject: [PATCH] Player.setPlayerProfile API
@ -48,7 +48,7 @@ index 2842956bf..8aeded425 100644
uniqueId = i.getId();
// Paper end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 77c50ba14..598b210ce 100644
index 77c50ba14..8b20509bc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,6 +1,8 @@
@ -91,7 +91,7 @@ index 77c50ba14..598b210ce 100644
getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other));
@@ -1148,6 +1161,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1148,6 +1161,46 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
entry.updatePlayer(getHandle());
}
}
@ -109,10 +109,31 @@ index 77c50ba14..598b210ce 100644
+ for (EntityPlayer player : players) {
+ player.getBukkitEntity().reregisterPlayer(self);
+ }
+ refreshPlayer();
+ }
+ public PlayerProfile getPlayerProfile() {
+ return new CraftPlayerProfile(this).clone();
+ }
+
+ private void refreshPlayer() {
+ EntityPlayer handle = getHandle();
+
+ Location loc = getLocation();
+
+ PlayerConnection connection = handle.playerConnection;
+ reregisterPlayer(handle);
+
+ //Respawn the player then update their position and selected slot
+ connection.sendPacket(new PacketPlayOutRespawn(handle.dimension, handle.world.getDifficulty(), handle.world.getWorldData().getType(), handle.playerInteractManager.getGameMode()));
+ handle.updateAbilities();
+ connection.sendPacket(new PacketPlayOutPosition(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), new HashSet<>(), 0));
+ MinecraftServer.getServer().getPlayerList().updateClient(handle);
+
+ if (this.isOp()) {
+ this.setOp(false);
+ this.setOp(true);
+ }
+ }
+ // Paper end
public void removeDisconnectingPlayer(Player player) {

Datei anzeigen

@ -1,4 +1,4 @@
From 8f87642299aca3ce9cdb278c2a249ef44c78299a Mon Sep 17 00:00:00 2001
From 8709478ac991a905296c1d2cf7399525648cd014 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 31 Mar 2018 17:04:26 +0100
Subject: [PATCH] Flag to disable the channel limit
@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 598b210ce..c0f4cec4d 100644
index 8b20509bc..1874c15ab 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -93,6 +93,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -20,7 +20,7 @@ index 598b210ce..c0f4cec4d 100644
// Paper end
public CraftPlayer(CraftServer server, EntityPlayer entity) {
@@ -1341,7 +1342,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1362,7 +1363,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void addChannel(String channel) {