Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
SPIGOT-854: Reset idle timer on disconnect to prevent spam duplicate disconnect.
Dieser Commit ist enthalten in:
Ursprung
3408adb009
Commit
99449d5d8f
@ -1,5 +1,5 @@
|
|||||||
--- /home/matt/mc-dev-private//net/minecraft/server/PlayerConnection.java 2015-05-20 16:15:15.756362905 +0100
|
--- ../work/decompile-c2c33c10/net/minecraft/server/PlayerConnection.java 2015-05-21 17:15:25.666007073 +1000
|
||||||
+++ src/main/java/net/minecraft/server/PlayerConnection.java 2015-05-20 16:15:15.760362840 +0100
|
+++ src/main/java/net/minecraft/server/PlayerConnection.java 2015-05-21 17:15:25.670007030 +1000
|
||||||
@@ -17,6 +17,48 @@
|
@@ -17,6 +17,48 @@
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
@ -101,7 +101,7 @@
|
|||||||
public void c() {
|
public void c() {
|
||||||
this.h = false;
|
this.h = false;
|
||||||
++this.e;
|
++this.e;
|
||||||
@@ -58,9 +128,14 @@
|
@@ -58,15 +128,21 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.minecraftServer.methodProfiler.b();
|
this.minecraftServer.methodProfiler.b();
|
||||||
@ -116,7 +116,14 @@
|
|||||||
|
|
||||||
if (this.m > 0) {
|
if (this.m > 0) {
|
||||||
--this.m;
|
--this.m;
|
||||||
@@ -77,19 +152,37 @@
|
}
|
||||||
|
|
||||||
|
if (this.player.D() > 0L && this.minecraftServer.getIdleTimeout() > 0 && MinecraftServer.az() - this.player.D() > (long) (this.minecraftServer.getIdleTimeout() * 1000 * 60)) {
|
||||||
|
+ this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854
|
||||||
|
this.disconnect("You have been idle for too long!");
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -77,19 +153,37 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disconnect(String s) {
|
public void disconnect(String s) {
|
||||||
@ -159,7 +166,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void a(PacketPlayInSteerVehicle packetplayinsteervehicle) {
|
public void a(PacketPlayInSteerVehicle packetplayinsteervehicle) {
|
||||||
@@ -99,6 +192,17 @@
|
@@ -99,6 +193,17 @@
|
||||||
|
|
||||||
public void a(PacketPlayInFlying packetplayinflying) {
|
public void a(PacketPlayInFlying packetplayinflying) {
|
||||||
PlayerConnectionUtils.ensureMainThread(packetplayinflying, this, this.player.u());
|
PlayerConnectionUtils.ensureMainThread(packetplayinflying, this, this.player.u());
|
||||||
@ -177,7 +184,7 @@
|
|||||||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||||
|
|
||||||
this.h = true;
|
this.h = true;
|
||||||
@@ -117,8 +221,66 @@
|
@@ -117,8 +222,66 @@
|
||||||
this.checkMovement = true;
|
this.checkMovement = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -245,7 +252,7 @@
|
|||||||
this.f = this.e;
|
this.f = this.e;
|
||||||
double d7;
|
double d7;
|
||||||
double d8;
|
double d8;
|
||||||
@@ -146,6 +308,7 @@
|
@@ -146,6 +309,7 @@
|
||||||
|
|
||||||
this.minecraftServer.getPlayerList().d(this.player);
|
this.minecraftServer.getPlayerList().d(this.player);
|
||||||
if (this.player.vehicle != null) {
|
if (this.player.vehicle != null) {
|
||||||
@ -253,7 +260,7 @@
|
|||||||
if (d3 > 4.0D) {
|
if (d3 > 4.0D) {
|
||||||
Entity entity = this.player.vehicle;
|
Entity entity = this.player.vehicle;
|
||||||
|
|
||||||
@@ -153,7 +316,7 @@
|
@@ -153,7 +317,7 @@
|
||||||
this.a(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch);
|
this.a(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,7 +269,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.checkMovement) {
|
if (this.checkMovement) {
|
||||||
@@ -215,7 +378,7 @@
|
@@ -215,7 +379,7 @@
|
||||||
double d14 = this.player.motX * this.player.motX + this.player.motY * this.player.motY + this.player.motZ * this.player.motZ;
|
double d14 = this.player.motX * this.player.motX + this.player.motY * this.player.motY + this.player.motZ * this.player.motZ;
|
||||||
double d15 = d11 * d11 + d12 * d12 + d13 * d13;
|
double d15 = d11 * d11 + d12 * d12 + d13 * d13;
|
||||||
|
|
||||||
@ -271,7 +278,7 @@
|
|||||||
PlayerConnection.c.warn(this.player.getName() + " moved too quickly! " + d11 + "," + d12 + "," + d13 + " (" + d11 + ", " + d12 + ", " + d13 + ")");
|
PlayerConnection.c.warn(this.player.getName() + " moved too quickly! " + d11 + "," + d12 + "," + d13 + " (" + d11 + ", " + d12 + ", " + d13 + ")");
|
||||||
this.a(this.o, this.p, this.q, this.player.yaw, this.player.pitch);
|
this.a(this.o, this.p, this.q, this.player.yaw, this.player.pitch);
|
||||||
return;
|
return;
|
||||||
@@ -284,10 +447,53 @@
|
@@ -284,10 +448,53 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(double d0, double d1, double d2, float f, float f1) {
|
public void a(double d0, double d1, double d2, float f, float f1) {
|
||||||
@ -326,7 +333,7 @@
|
|||||||
this.checkMovement = false;
|
this.checkMovement = false;
|
||||||
this.o = d0;
|
this.o = d0;
|
||||||
this.p = d1;
|
this.p = d1;
|
||||||
@@ -321,32 +527,49 @@
|
@@ -321,32 +528,49 @@
|
||||||
|
|
||||||
public void a(PacketPlayInBlockDig packetplayinblockdig) {
|
public void a(PacketPlayInBlockDig packetplayinblockdig) {
|
||||||
PlayerConnectionUtils.ensureMainThread(packetplayinblockdig, this, this.player.u());
|
PlayerConnectionUtils.ensureMainThread(packetplayinblockdig, this, this.player.u());
|
||||||
@ -382,7 +389,7 @@
|
|||||||
double d0 = this.player.locX - ((double) blockposition.getX() + 0.5D);
|
double d0 = this.player.locX - ((double) blockposition.getX() + 0.5D);
|
||||||
double d1 = this.player.locY - ((double) blockposition.getY() + 0.5D) + 1.5D;
|
double d1 = this.player.locY - ((double) blockposition.getY() + 0.5D) + 1.5D;
|
||||||
double d2 = this.player.locZ - ((double) blockposition.getZ() + 0.5D);
|
double d2 = this.player.locZ - ((double) blockposition.getZ() + 0.5D);
|
||||||
@@ -361,7 +584,15 @@
|
@@ -361,7 +585,15 @@
|
||||||
if (!this.minecraftServer.a(worldserver, blockposition, this.player) && worldserver.getWorldBorder().a(blockposition)) {
|
if (!this.minecraftServer.a(worldserver, blockposition, this.player) && worldserver.getWorldBorder().a(blockposition)) {
|
||||||
this.player.playerInteractManager.a(blockposition, packetplayinblockdig.b());
|
this.player.playerInteractManager.a(blockposition, packetplayinblockdig.b());
|
||||||
} else {
|
} else {
|
||||||
@ -398,7 +405,7 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (packetplayinblockdig.c() == PacketPlayInBlockDig.EnumPlayerDigType.STOP_DESTROY_BLOCK) {
|
if (packetplayinblockdig.c() == PacketPlayInBlockDig.EnumPlayerDigType.STOP_DESTROY_BLOCK) {
|
||||||
@@ -381,11 +612,22 @@
|
@@ -381,11 +613,22 @@
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("Invalid player action");
|
throw new IllegalArgumentException("Invalid player action");
|
||||||
}
|
}
|
||||||
@ -421,7 +428,7 @@
|
|||||||
ItemStack itemstack = this.player.inventory.getItemInHand();
|
ItemStack itemstack = this.player.inventory.getItemInHand();
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
BlockPosition blockposition = packetplayinblockplace.a();
|
BlockPosition blockposition = packetplayinblockplace.a();
|
||||||
@@ -397,7 +639,50 @@
|
@@ -397,7 +640,50 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -473,7 +480,7 @@
|
|||||||
} else if (blockposition.getY() >= this.minecraftServer.getMaxBuildHeight() - 1 && (enumdirection == EnumDirection.UP || blockposition.getY() >= this.minecraftServer.getMaxBuildHeight())) {
|
} else if (blockposition.getY() >= this.minecraftServer.getMaxBuildHeight() - 1 && (enumdirection == EnumDirection.UP || blockposition.getY() >= this.minecraftServer.getMaxBuildHeight())) {
|
||||||
ChatMessage chatmessage = new ChatMessage("build.tooHigh", new Object[] { Integer.valueOf(this.minecraftServer.getMaxBuildHeight())});
|
ChatMessage chatmessage = new ChatMessage("build.tooHigh", new Object[] { Integer.valueOf(this.minecraftServer.getMaxBuildHeight())});
|
||||||
|
|
||||||
@@ -405,8 +690,19 @@
|
@@ -405,8 +691,19 @@
|
||||||
this.player.playerConnection.sendPacket(new PacketPlayOutChat(chatmessage));
|
this.player.playerConnection.sendPacket(new PacketPlayOutChat(chatmessage));
|
||||||
flag = true;
|
flag = true;
|
||||||
} else {
|
} else {
|
||||||
@ -494,7 +501,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
flag = true;
|
flag = true;
|
||||||
@@ -430,7 +726,8 @@
|
@@ -430,7 +727,8 @@
|
||||||
|
|
||||||
this.player.activeContainer.b();
|
this.player.activeContainer.b();
|
||||||
this.player.g = false;
|
this.player.g = false;
|
||||||
@ -504,7 +511,7 @@
|
|||||||
this.sendPacket(new PacketPlayOutSetSlot(this.player.activeContainer.windowId, slot.rawSlotIndex, this.player.inventory.getItemInHand()));
|
this.sendPacket(new PacketPlayOutSetSlot(this.player.activeContainer.windowId, slot.rawSlotIndex, this.player.inventory.getItemInHand()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -444,8 +741,8 @@
|
@@ -444,8 +742,8 @@
|
||||||
WorldServer[] aworldserver = this.minecraftServer.worldServer;
|
WorldServer[] aworldserver = this.minecraftServer.worldServer;
|
||||||
int i = aworldserver.length;
|
int i = aworldserver.length;
|
||||||
|
|
||||||
@ -515,7 +522,7 @@
|
|||||||
|
|
||||||
if (worldserver != null) {
|
if (worldserver != null) {
|
||||||
entity = packetplayinspectate.a(worldserver);
|
entity = packetplayinspectate.a(worldserver);
|
||||||
@@ -458,6 +755,8 @@
|
@@ -458,6 +756,8 @@
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
this.player.setSpectatorTarget(this.player);
|
this.player.setSpectatorTarget(this.player);
|
||||||
this.player.mount((Entity) null);
|
this.player.mount((Entity) null);
|
||||||
@ -524,7 +531,7 @@
|
|||||||
if (entity.world != this.player.world) {
|
if (entity.world != this.player.world) {
|
||||||
WorldServer worldserver1 = this.player.u();
|
WorldServer worldserver1 = this.player.u();
|
||||||
WorldServer worldserver2 = (WorldServer) entity.world;
|
WorldServer worldserver2 = (WorldServer) entity.world;
|
||||||
@@ -482,6 +781,9 @@
|
@@ -482,6 +782,9 @@
|
||||||
} else {
|
} else {
|
||||||
this.player.enderTeleportTo(entity.locX, entity.locY, entity.locZ);
|
this.player.enderTeleportTo(entity.locX, entity.locY, entity.locZ);
|
||||||
}
|
}
|
||||||
@ -534,11 +541,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -490,14 +792,29 @@
|
@@ -490,14 +793,29 @@
|
||||||
public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) {}
|
public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) {}
|
||||||
|
|
||||||
public void a(IChatBaseComponent ichatbasecomponent) {
|
public void a(IChatBaseComponent ichatbasecomponent) {
|
||||||
- PlayerConnection.c.info(this.player.getName() + " lost connection: " + ichatbasecomponent);
|
|
||||||
+ // CraftBukkit start - Rarely it would send a disconnect line twice
|
+ // CraftBukkit start - Rarely it would send a disconnect line twice
|
||||||
+ if (this.processedDisconnect) {
|
+ if (this.processedDisconnect) {
|
||||||
+ return;
|
+ return;
|
||||||
@ -546,7 +552,7 @@
|
|||||||
+ this.processedDisconnect = true;
|
+ this.processedDisconnect = true;
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
+ PlayerConnection.c.info(this.player.getName() + " lost connection: " + ichatbasecomponent.c()); // CraftBukkit - Don't toString the component
|
PlayerConnection.c.info(this.player.getName() + " lost connection: " + ichatbasecomponent);
|
||||||
+ // CraftBukkit start - Replace vanilla quit message handling with our own.
|
+ // CraftBukkit start - Replace vanilla quit message handling with our own.
|
||||||
+ /*
|
+ /*
|
||||||
this.minecraftServer.aH();
|
this.minecraftServer.aH();
|
||||||
@ -566,7 +572,7 @@
|
|||||||
if (this.minecraftServer.T() && this.player.getName().equals(this.minecraftServer.S())) {
|
if (this.minecraftServer.T() && this.player.getName().equals(this.minecraftServer.S())) {
|
||||||
PlayerConnection.c.info("Stopping singleplayer server as player logged out");
|
PlayerConnection.c.info("Stopping singleplayer server as player logged out");
|
||||||
this.minecraftServer.safeShutdown();
|
this.minecraftServer.safeShutdown();
|
||||||
@@ -519,6 +836,15 @@
|
@@ -519,6 +837,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -582,7 +588,7 @@
|
|||||||
try {
|
try {
|
||||||
this.networkManager.handle(packet);
|
this.networkManager.handle(packet);
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
@@ -539,18 +865,34 @@
|
@@ -539,18 +866,34 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(PacketPlayInHeldItemSlot packetplayinhelditemslot) {
|
public void a(PacketPlayInHeldItemSlot packetplayinhelditemslot) {
|
||||||
@ -619,7 +625,7 @@
|
|||||||
ChatMessage chatmessage = new ChatMessage("chat.cannotSend", new Object[0]);
|
ChatMessage chatmessage = new ChatMessage("chat.cannotSend", new Object[0]);
|
||||||
|
|
||||||
chatmessage.getChatModifier().setColor(EnumChatFormat.RED);
|
chatmessage.getChatModifier().setColor(EnumChatFormat.RED);
|
||||||
@@ -563,39 +905,249 @@
|
@@ -563,39 +906,249 @@
|
||||||
|
|
||||||
for (int i = 0; i < s.length(); ++i) {
|
for (int i = 0; i < s.length(); ++i) {
|
||||||
if (!SharedConstants.isAllowedChatCharacter(s.charAt(i))) {
|
if (!SharedConstants.isAllowedChatCharacter(s.charAt(i))) {
|
||||||
@ -877,7 +883,7 @@
|
|||||||
this.player.resetIdleTimer();
|
this.player.resetIdleTimer();
|
||||||
switch (PlayerConnection.SyntheticClass_1.b[packetplayinentityaction.b().ordinal()]) {
|
switch (PlayerConnection.SyntheticClass_1.b[packetplayinentityaction.b().ordinal()]) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -616,7 +1168,7 @@
|
@@ -616,7 +1169,7 @@
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
this.player.a(false, true, true);
|
this.player.a(false, true, true);
|
||||||
@ -886,7 +892,7 @@
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
@@ -638,6 +1190,7 @@
|
@@ -638,6 +1191,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(PacketPlayInUseEntity packetplayinuseentity) {
|
public void a(PacketPlayInUseEntity packetplayinuseentity) {
|
||||||
@ -894,7 +900,7 @@
|
|||||||
PlayerConnectionUtils.ensureMainThread(packetplayinuseentity, this, this.player.u());
|
PlayerConnectionUtils.ensureMainThread(packetplayinuseentity, this, this.player.u());
|
||||||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||||
Entity entity = packetplayinuseentity.a((World) worldserver);
|
Entity entity = packetplayinuseentity.a((World) worldserver);
|
||||||
@@ -652,18 +1205,67 @@
|
@@ -652,18 +1206,67 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.player.h(entity) < d0) {
|
if (this.player.h(entity) < d0) {
|
||||||
@ -963,7 +969,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -678,7 +1280,8 @@
|
@@ -678,7 +1281,8 @@
|
||||||
switch (PlayerConnection.SyntheticClass_1.c[packetplayinclientcommand_enumclientcommand.ordinal()]) {
|
switch (PlayerConnection.SyntheticClass_1.c[packetplayinclientcommand_enumclientcommand.ordinal()]) {
|
||||||
case 1:
|
case 1:
|
||||||
if (this.player.viewingCredits) {
|
if (this.player.viewingCredits) {
|
||||||
@ -973,7 +979,7 @@
|
|||||||
} else if (this.player.u().getWorldData().isHardcore()) {
|
} else if (this.player.u().getWorldData().isHardcore()) {
|
||||||
if (this.minecraftServer.T() && this.player.getName().equals(this.minecraftServer.S())) {
|
if (this.minecraftServer.T() && this.player.getName().equals(this.minecraftServer.S())) {
|
||||||
this.player.playerConnection.disconnect("You have died. Game over, man, it\'s game over!");
|
this.player.playerConnection.disconnect("You have died. Game over, man, it\'s game over!");
|
||||||
@@ -709,15 +1312,21 @@
|
@@ -709,15 +1313,21 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(PacketPlayInCloseWindow packetplayinclosewindow) {
|
public void a(PacketPlayInCloseWindow packetplayinclosewindow) {
|
||||||
@ -996,7 +1002,7 @@
|
|||||||
ArrayList arraylist = Lists.newArrayList();
|
ArrayList arraylist = Lists.newArrayList();
|
||||||
|
|
||||||
for (int i = 0; i < this.player.activeContainer.c.size(); ++i) {
|
for (int i = 0; i < this.player.activeContainer.c.size(); ++i) {
|
||||||
@@ -726,7 +1335,270 @@
|
@@ -726,7 +1336,270 @@
|
||||||
|
|
||||||
this.player.a(this.player.activeContainer, (List) arraylist);
|
this.player.a(this.player.activeContainer, (List) arraylist);
|
||||||
} else {
|
} else {
|
||||||
@ -1268,7 +1274,7 @@
|
|||||||
|
|
||||||
if (ItemStack.matches(packetplayinwindowclick.e(), itemstack)) {
|
if (ItemStack.matches(packetplayinwindowclick.e(), itemstack)) {
|
||||||
this.player.playerConnection.sendPacket(new PacketPlayOutTransaction(packetplayinwindowclick.a(), packetplayinwindowclick.d(), true));
|
this.player.playerConnection.sendPacket(new PacketPlayOutTransaction(packetplayinwindowclick.a(), packetplayinwindowclick.d(), true));
|
||||||
@@ -787,8 +1659,48 @@
|
@@ -787,8 +1660,48 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() < 36 + PlayerInventory.getHotbarSize();
|
boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() < 36 + PlayerInventory.getHotbarSize();
|
||||||
@ -1318,7 +1324,7 @@
|
|||||||
|
|
||||||
if (flag1 && flag2 && flag3) {
|
if (flag1 && flag2 && flag3) {
|
||||||
if (itemstack == null) {
|
if (itemstack == null) {
|
||||||
@@ -811,6 +1723,7 @@
|
@@ -811,6 +1724,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(PacketPlayInTransaction packetplayintransaction) {
|
public void a(PacketPlayInTransaction packetplayintransaction) {
|
||||||
@ -1326,7 +1332,7 @@
|
|||||||
PlayerConnectionUtils.ensureMainThread(packetplayintransaction, this, this.player.u());
|
PlayerConnectionUtils.ensureMainThread(packetplayintransaction, this, this.player.u());
|
||||||
Short oshort = (Short) this.n.get(this.player.activeContainer.windowId);
|
Short oshort = (Short) this.n.get(this.player.activeContainer.windowId);
|
||||||
|
|
||||||
@@ -821,6 +1734,7 @@
|
@@ -821,6 +1735,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(PacketPlayInUpdateSign packetplayinupdatesign) {
|
public void a(PacketPlayInUpdateSign packetplayinupdatesign) {
|
||||||
@ -1334,7 +1340,7 @@
|
|||||||
PlayerConnectionUtils.ensureMainThread(packetplayinupdatesign, this, this.player.u());
|
PlayerConnectionUtils.ensureMainThread(packetplayinupdatesign, this, this.player.u());
|
||||||
this.player.resetIdleTimer();
|
this.player.resetIdleTimer();
|
||||||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||||
@@ -837,14 +1751,30 @@
|
@@ -837,14 +1752,30 @@
|
||||||
|
|
||||||
if (!tileentitysign.b() || tileentitysign.c() != this.player) {
|
if (!tileentitysign.b() || tileentitysign.c() != this.player) {
|
||||||
this.minecraftServer.warning("Player " + this.player.getName() + " just tried to change non-editable sign");
|
this.minecraftServer.warning("Player " + this.player.getName() + " just tried to change non-editable sign");
|
||||||
@ -1366,7 +1372,7 @@
|
|||||||
|
|
||||||
tileentitysign.update();
|
tileentitysign.update();
|
||||||
worldserver.notify(blockposition);
|
worldserver.notify(blockposition);
|
||||||
@@ -867,11 +1797,27 @@
|
@@ -867,11 +1798,27 @@
|
||||||
|
|
||||||
public void a(PacketPlayInAbilities packetplayinabilities) {
|
public void a(PacketPlayInAbilities packetplayinabilities) {
|
||||||
PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.u());
|
PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.u());
|
||||||
@ -1395,7 +1401,7 @@
|
|||||||
ArrayList arraylist = Lists.newArrayList();
|
ArrayList arraylist = Lists.newArrayList();
|
||||||
Iterator iterator = this.minecraftServer.tabCompleteCommand(this.player, packetplayintabcomplete.a(), packetplayintabcomplete.b()).iterator();
|
Iterator iterator = this.minecraftServer.tabCompleteCommand(this.player, packetplayintabcomplete.a(), packetplayintabcomplete.b()).iterator();
|
||||||
|
|
||||||
@@ -911,13 +1857,16 @@
|
@@ -911,13 +1858,16 @@
|
||||||
itemstack1 = this.player.inventory.getItemInHand();
|
itemstack1 = this.player.inventory.getItemInHand();
|
||||||
if (itemstack1 != null) {
|
if (itemstack1 != null) {
|
||||||
if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack.getItem() == itemstack1.getItem()) {
|
if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack.getItem() == itemstack1.getItem()) {
|
||||||
@ -1412,7 +1418,7 @@
|
|||||||
return;
|
return;
|
||||||
} finally {
|
} finally {
|
||||||
packetdataserializer.release();
|
packetdataserializer.release();
|
||||||
@@ -940,16 +1889,21 @@
|
@@ -940,16 +1890,21 @@
|
||||||
itemstack1 = this.player.inventory.getItemInHand();
|
itemstack1 = this.player.inventory.getItemInHand();
|
||||||
if (itemstack1 != null) {
|
if (itemstack1 != null) {
|
||||||
if (itemstack.getItem() == Items.WRITTEN_BOOK && itemstack1.getItem() == Items.WRITABLE_BOOK) {
|
if (itemstack.getItem() == Items.WRITTEN_BOOK && itemstack1.getItem() == Items.WRITABLE_BOOK) {
|
||||||
@ -1434,7 +1440,7 @@
|
|||||||
return;
|
return;
|
||||||
} finally {
|
} finally {
|
||||||
packetdataserializer.release();
|
packetdataserializer.release();
|
||||||
@@ -966,11 +1920,12 @@
|
@@ -966,11 +1921,12 @@
|
||||||
}
|
}
|
||||||
} catch (Exception exception2) {
|
} catch (Exception exception2) {
|
||||||
PlayerConnection.c.error("Couldn\'t select trade", exception2);
|
PlayerConnection.c.error("Couldn\'t select trade", exception2);
|
||||||
@ -1448,7 +1454,7 @@
|
|||||||
packetdataserializer = packetplayincustompayload.b();
|
packetdataserializer = packetplayincustompayload.b();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -1006,6 +1961,7 @@
|
@@ -1006,6 +1962,7 @@
|
||||||
}
|
}
|
||||||
} catch (Exception exception3) {
|
} catch (Exception exception3) {
|
||||||
PlayerConnection.c.error("Couldn\'t set command block", exception3);
|
PlayerConnection.c.error("Couldn\'t set command block", exception3);
|
||||||
@ -1456,7 +1462,7 @@
|
|||||||
} finally {
|
} finally {
|
||||||
packetdataserializer.release();
|
packetdataserializer.release();
|
||||||
}
|
}
|
||||||
@@ -1031,6 +1987,7 @@
|
@@ -1031,6 +1988,7 @@
|
||||||
}
|
}
|
||||||
} catch (Exception exception4) {
|
} catch (Exception exception4) {
|
||||||
PlayerConnection.c.error("Couldn\'t set beacon", exception4);
|
PlayerConnection.c.error("Couldn\'t set beacon", exception4);
|
||||||
@ -1464,7 +1470,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ("MC|ItemName".equals(packetplayincustompayload.a()) && this.player.activeContainer instanceof ContainerAnvil) {
|
} else if ("MC|ItemName".equals(packetplayincustompayload.a()) && this.player.activeContainer instanceof ContainerAnvil) {
|
||||||
@@ -1046,7 +2003,28 @@
|
@@ -1046,7 +2004,28 @@
|
||||||
containeranvil.a("");
|
containeranvil.a("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren