diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-01-14 12:29:11 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-01-14 12:29:11 +0000 |
commit | 84b0310ae8383e9c37ccbca672cf40aeab1cc4d0 (patch) | |
tree | 5abfca2ac634a4e74a1c62adc1288621cd0ea230 /src/main/java/net/minecraft/server/NBTTagCompound.java | |
parent | 0a2a38c25b0dfbae160546f2460b203063dd8c4b (diff) | |
download | craftbukkit-84b0310ae8383e9c37ccbca672cf40aeab1cc4d0.tar craftbukkit-84b0310ae8383e9c37ccbca672cf40aeab1cc4d0.tar.gz craftbukkit-84b0310ae8383e9c37ccbca672cf40aeab1cc4d0.tar.lz craftbukkit-84b0310ae8383e9c37ccbca672cf40aeab1cc4d0.tar.xz craftbukkit-84b0310ae8383e9c37ccbca672cf40aeab1cc4d0.zip |
Fixed items retaining enchantment visual effects after all enchantments are lost
Issue #BUKKIT-24 - Upon removing enchantments, visual effect on item does not go away
Diffstat (limited to 'src/main/java/net/minecraft/server/NBTTagCompound.java')
-rw-r--r-- | src/main/java/net/minecraft/server/NBTTagCompound.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java index cdab2347..1c8229b5 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java @@ -2,10 +2,13 @@ package net.minecraft.server; import java.io.DataInput; import java.io.DataOutput; +import java.io.IOException; // CraftBukkit import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.Map; +import java.util.logging.Level; // CraftBukkit +import java.util.logging.Logger; // CraftBukkit public class NBTTagCompound extends NBTBase { @@ -28,9 +31,20 @@ public class NBTTagCompound extends NBTBase { NBTBase.a(nbtbase, dataoutput); } - dataoutput.writeByte(0); + // CraftBukkit start + try { + dataoutput.writeByte(0); + } catch (IOException ex) { + Logger.getLogger(NBTTagCompound.class.getName()).log(Level.SEVERE, null, ex); + } + } + + public void remove(String name) { + map.remove(name); } + // CraftBukkit end + void load(DataInput datainput) { this.map.clear(); |