diff --git a/src/com/lishid/openinv/internal/craftbukkit/SpecialPlayerInventory.java b/src/com/lishid/openinv/internal/craftbukkit/SpecialPlayerInventory.java index f3dd95b..c9f1d70 100644 --- a/src/com/lishid/openinv/internal/craftbukkit/SpecialPlayerInventory.java +++ b/src/com/lishid/openinv/internal/craftbukkit/SpecialPlayerInventory.java @@ -243,19 +243,16 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP i = getReversedArmorSlotNum(i); } - /* - * - * //Effects - * if(is == this.extra) - * { - * if(i == 0) - * { - * itemstack.setData(0); - * } - * } - */ + // Effects + if (is == this.extra) + { + owner.getHandle().drop(itemstack); + itemstack = null; + } is[i] = itemstack; + + owner.getHandle().defaultContainer.b(); } private int getReversedItemSlotNum(int i) diff --git a/src/com/lishid/openinv/internal/v1_4_5/SpecialPlayerInventory.java b/src/com/lishid/openinv/internal/v1_4_5/SpecialPlayerInventory.java index 5b81c4f..f888014 100644 --- a/src/com/lishid/openinv/internal/v1_4_5/SpecialPlayerInventory.java +++ b/src/com/lishid/openinv/internal/v1_4_5/SpecialPlayerInventory.java @@ -243,19 +243,16 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP i = getReversedArmorSlotNum(i); } - /* - * - * //Effects - * if(is == this.extra) - * { - * if(i == 0) - * { - * itemstack.setData(0); - * } - * } - */ + // Effects + if (is == this.extra) + { + owner.getHandle().drop(itemstack); + itemstack = null; + } is[i] = itemstack; + + owner.getHandle().defaultContainer.b(); } private int getReversedItemSlotNum(int i) diff --git a/src/com/lishid/openinv/internal/v1_4_6/SpecialPlayerInventory.java b/src/com/lishid/openinv/internal/v1_4_6/SpecialPlayerInventory.java index d3e8f3b..7ba25f2 100644 --- a/src/com/lishid/openinv/internal/v1_4_6/SpecialPlayerInventory.java +++ b/src/com/lishid/openinv/internal/v1_4_6/SpecialPlayerInventory.java @@ -243,19 +243,16 @@ public class SpecialPlayerInventory extends PlayerInventory implements ISpecialP i = getReversedArmorSlotNum(i); } - /* - * - * //Effects - * if(is == this.extra) - * { - * if(i == 0) - * { - * itemstack.setData(0); - * } - * } - */ + // Effects + if (is == this.extra) + { + owner.getHandle().drop(itemstack); + itemstack = null; + } is[i] = itemstack; + + owner.getHandle().defaultContainer.b(); } private int getReversedItemSlotNum(int i) diff --git a/src/com/lishid/openinv/utils/Updater.java b/src/com/lishid/openinv/utils/Updater.java index 7edc8f0..1890219 100644 --- a/src/com/lishid/openinv/utils/Updater.java +++ b/src/com/lishid/openinv/utils/Updater.java @@ -10,7 +10,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.stream.XMLEventReader; import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamException; import javax.xml.stream.events.XMLEvent; import org.bukkit.configuration.file.YamlConfiguration; @@ -247,7 +246,7 @@ public class Updater { // Obtain the results of the project's file feed readFeed(); - if (!versionTitle.equals(versionDownloaded) && versionCheck(versionTitle)) + if (versionTitle != null && !versionTitle.equals(versionDownloaded) && versionCheck(versionTitle)) { String fileLink = getFile(versionLink); if (fileLink != null && type != UpdateType.NO_DOWNLOAD) @@ -548,9 +547,9 @@ public class Updater } } } - catch (XMLStreamException e) + catch (Exception e) { - throw new RuntimeException(e); + //throw new RuntimeException(e); } } diff --git a/src/plugin.yml b/src/plugin.yml index 9c476b8..6187799 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: OpenInv main: com.lishid.openinv.OpenInv -version: 1.9.4 +version: 1.9.5 author: lishid description: > This plugin allows you to open a player's inventory as a chest and interact with it in real time.