From 03be05790e39b428e7da8f893b884d5994441fbb Mon Sep 17 00:00:00 2001 From: Tahg Date: Tue, 8 Feb 2011 21:52:06 -0500 Subject: [PATCH] added method to force an inventory update --- src/main/java/net/minecraft/server/Explosion.java | 2 +- src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java index fc93f3a046..3eb7bcc91c 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -126,7 +126,7 @@ public class Explosion { DamageCause damageType; int damageDone = (int) ((d10 * d10 + d10) / 2.0D * 8.0D * (double) this.f + 1.0D); - if(damagee == null){ + if(damagee == null) { // nothing was hurt } else if (e == null) { // Block explosion // TODO: get the x/y/z of the tnt block? diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index b90931fe09..7871480a0d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -158,4 +158,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean isSneaking() { return entity.J(); } + + public void updateInventory() { + entity.l(); + } }