geforkt von Mirrors/Paper
SPIGOT-3571: Packet handling must be synchronous
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
5e3ba4ff73
Commit
fee051b1a3
@ -1519,7 +1519,15 @@
|
|||||||
|
|
||||||
tileentitysign.update();
|
tileentitysign.update();
|
||||||
worldserver.notify(blockposition, iblockdata, iblockdata, 3);
|
worldserver.notify(blockposition, iblockdata, iblockdata, 3);
|
||||||
@@ -1016,11 +2089,27 @@
|
@@ -999,6 +2072,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {
|
||||||
|
+ PlayerConnectionUtils.ensureMainThread(packetplayinkeepalive, this, this.player.x()); // CraftBukkit
|
||||||
|
if (this.g && packetplayinkeepalive.a() == this.h) {
|
||||||
|
int i = (int) (this.d() - this.f);
|
||||||
|
|
||||||
|
@@ -1016,11 +2090,27 @@
|
||||||
|
|
||||||
public void a(PacketPlayInAbilities packetplayinabilities) {
|
public void a(PacketPlayInAbilities packetplayinabilities) {
|
||||||
PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.x());
|
PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.x());
|
||||||
@ -1548,7 +1556,7 @@
|
|||||||
ArrayList arraylist = Lists.newArrayList();
|
ArrayList arraylist = Lists.newArrayList();
|
||||||
Iterator iterator = this.minecraftServer.tabCompleteCommand(this.player, packetplayintabcomplete.a(), packetplayintabcomplete.b(), packetplayintabcomplete.c()).iterator();
|
Iterator iterator = this.minecraftServer.tabCompleteCommand(this.player, packetplayintabcomplete.a(), packetplayintabcomplete.b(), packetplayintabcomplete.c()).iterator();
|
||||||
|
|
||||||
@@ -1046,6 +2135,13 @@
|
@@ -1046,6 +2136,13 @@
|
||||||
ItemStack itemstack1;
|
ItemStack itemstack1;
|
||||||
|
|
||||||
if ("MC|BEdit".equals(s)) {
|
if ("MC|BEdit".equals(s)) {
|
||||||
@ -1562,7 +1570,7 @@
|
|||||||
packetdataserializer = packetplayincustompayload.b();
|
packetdataserializer = packetplayincustompayload.b();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -1064,15 +2160,25 @@
|
@@ -1064,15 +2161,25 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack.getItem() == itemstack1.getItem()) {
|
if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack.getItem() == itemstack1.getItem()) {
|
||||||
@ -1588,7 +1596,7 @@
|
|||||||
packetdataserializer = packetplayincustompayload.b();
|
packetdataserializer = packetplayincustompayload.b();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -1106,10 +2212,11 @@
|
@@ -1106,10 +2213,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
itemstack2.a("pages", (NBTBase) nbttaglist);
|
itemstack2.a("pages", (NBTBase) nbttaglist);
|
||||||
@ -1601,7 +1609,7 @@
|
|||||||
}
|
}
|
||||||
} else if ("MC|TrSel".equals(s)) {
|
} else if ("MC|TrSel".equals(s)) {
|
||||||
try {
|
try {
|
||||||
@@ -1121,6 +2228,7 @@
|
@@ -1121,6 +2229,7 @@
|
||||||
}
|
}
|
||||||
} catch (Exception exception2) {
|
} catch (Exception exception2) {
|
||||||
PlayerConnection.LOGGER.error("Couldn\'t select trade", exception2);
|
PlayerConnection.LOGGER.error("Couldn\'t select trade", exception2);
|
||||||
@ -1609,7 +1617,7 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
TileEntity tileentity;
|
TileEntity tileentity;
|
||||||
@@ -1170,6 +2278,7 @@
|
@@ -1170,6 +2279,7 @@
|
||||||
}
|
}
|
||||||
} catch (Exception exception3) {
|
} catch (Exception exception3) {
|
||||||
PlayerConnection.LOGGER.error("Couldn\'t set command block", exception3);
|
PlayerConnection.LOGGER.error("Couldn\'t set command block", exception3);
|
||||||
@ -1617,7 +1625,7 @@
|
|||||||
}
|
}
|
||||||
} else if ("MC|AutoCmd".equals(s)) {
|
} else if ("MC|AutoCmd".equals(s)) {
|
||||||
if (!this.minecraftServer.getEnableCommandBlock()) {
|
if (!this.minecraftServer.getEnableCommandBlock()) {
|
||||||
@@ -1237,6 +2346,7 @@
|
@@ -1237,6 +2347,7 @@
|
||||||
}
|
}
|
||||||
} catch (Exception exception4) {
|
} catch (Exception exception4) {
|
||||||
PlayerConnection.LOGGER.error("Couldn\'t set command block", exception4);
|
PlayerConnection.LOGGER.error("Couldn\'t set command block", exception4);
|
||||||
@ -1625,7 +1633,7 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int k;
|
int k;
|
||||||
@@ -1260,6 +2370,7 @@
|
@@ -1260,6 +2371,7 @@
|
||||||
}
|
}
|
||||||
} catch (Exception exception5) {
|
} catch (Exception exception5) {
|
||||||
PlayerConnection.LOGGER.error("Couldn\'t set beacon", exception5);
|
PlayerConnection.LOGGER.error("Couldn\'t set beacon", exception5);
|
||||||
@ -1633,7 +1641,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ("MC|ItemName".equals(s)) {
|
} else if ("MC|ItemName".equals(s)) {
|
||||||
@@ -1346,6 +2457,7 @@
|
@@ -1346,6 +2458,7 @@
|
||||||
}
|
}
|
||||||
} catch (Exception exception6) {
|
} catch (Exception exception6) {
|
||||||
PlayerConnection.LOGGER.error("Couldn\'t set structure block", exception6);
|
PlayerConnection.LOGGER.error("Couldn\'t set structure block", exception6);
|
||||||
@ -1641,7 +1649,7 @@
|
|||||||
}
|
}
|
||||||
} else if ("MC|PickItem".equals(s)) {
|
} else if ("MC|PickItem".equals(s)) {
|
||||||
packetdataserializer = packetplayincustompayload.b();
|
packetdataserializer = packetplayincustompayload.b();
|
||||||
@@ -1358,11 +2470,49 @@
|
@@ -1358,11 +2471,49 @@
|
||||||
this.player.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(this.player.inventory.itemInHandIndex));
|
this.player.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(this.player.inventory.itemInHandIndex));
|
||||||
} catch (Exception exception7) {
|
} catch (Exception exception7) {
|
||||||
PlayerConnection.LOGGER.error("Couldn\'t pick item", exception7);
|
PlayerConnection.LOGGER.error("Couldn\'t pick item", exception7);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren