geforkt von Mirrors/Paper
Inform the client when break events are cancelled. Thanks mrapple!
Dieser Commit ist enthalten in:
Ursprung
86fef037e0
Commit
13470ccf79
@ -93,6 +93,8 @@ public class ItemInWorldManager {
|
|||||||
|
|
||||||
if (this.b()) {
|
if (this.b()) {
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
|
// Let the client know the block still exists
|
||||||
|
((EntityPlayer) this.player).netServerHandler.sendPacket(new Packet53BlockChange(i, j, k, this.world));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.c(i, j, k);
|
this.c(i, j, k);
|
||||||
@ -133,6 +135,8 @@ public class ItemInWorldManager {
|
|||||||
BlockDamageEvent blockEvent = CraftEventFactory.callBlockDamageEvent(this.player, i, j, k, this.player.inventory.getItemInHand(), toolDamage >= 1.0f);
|
BlockDamageEvent blockEvent = CraftEventFactory.callBlockDamageEvent(this.player, i, j, k, this.player.inventory.getItemInHand(), toolDamage >= 1.0f);
|
||||||
|
|
||||||
if (blockEvent.isCancelled()) {
|
if (blockEvent.isCancelled()) {
|
||||||
|
// Let the client know the block still exists
|
||||||
|
((EntityPlayer) this.player).netServerHandler.sendPacket(new Packet53BlockChange(i, j, k, this.world));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,6 +205,8 @@ public class ItemInWorldManager {
|
|||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
|
// Let the client know the block still exists
|
||||||
|
((EntityPlayer) this.player).netServerHandler.sendPacket(new Packet53BlockChange(i, j, k, this.world));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren