[SPIGOT-372] CLONE - Instant potions cannot be extended Created: 07/Jan/15  Updated: 28/Mar/15  Resolved: 08/Mar/15

Status: Closed
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: wysohn Assignee: Thinkofname
Resolution: Invalid Votes: 0
Labels: None
Environment:

1.8.1 craftbukkit


Issue Links:
Cloners
clones SPIGOT-339 Instant potions cannot be extended Closed
is cloned by SPIGOT-749 Instant potions throw NPE if Potion.f... Resolved

 Description   

Potion.fromItemStack(IS); causes this problem IS is itemstack

and here is the log:
/////////////////////////////////////////////////////////////////////////////////////////////////

[Server thread/ERROR]: Could not pass event InventoryOpenEvent to GUI_Shop v0.0.1
org.bukkit.event.EventException
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:297) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:36) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.craftbukkit.v1_8_R1.event.CraftEventFactory.callInventoryOpenEvent(CraftEventFactory.java:692) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.EntityPlayer.openContainer(EntityPlayer.java:641) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.BlockChest.interact(SourceFile:339) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PlayerInteractManager.interact(PlayerInteractManager.java:495) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:693) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:50) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:80) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_11]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_11]
	at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:643) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:284) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:598) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:506) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_11]
Caused by: java.lang.IllegalArgumentException: Instant potions cannot be extended
	at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.potion.Potion.setHasExtendedDuration(Potion.java:268) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.potion.Potion.extend(Potion.java:152) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.potion.Potion.fromDamage(Potion.java:409) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.potion.Potion.fromItemStack(Potion.java:418) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at shop.constant.items.PotionItem.<init>(PotionItem.java:16) ~[?:?]
	at shop.constant.items.CustomItem.toCIFromItemStack(CustomItem.java:206) ~[?:?]
	at shop.event.handler.InventoryEventHandler.serializeItem(InventoryEventHandler.java:100) ~[?:?]
	at shop.event.handler.InventoryEventHandler.onInventoryOpen(InventoryEventHandler.java:48) ~[?:?]
	at sun.reflect.GeneratedMethodAccessor627.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_11]
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:295) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	... 19 more
[03:13:04] [Server thread/ERROR]: Could not pass event InventoryCloseEvent to GUI_Shop v0.0.1
org.bukkit.event.EventException
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:297) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:36) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.craftbukkit.v1_8_R1.event.CraftEventFactory.handleInventoryCloseEvent(CraftEventFactory.java:815) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:1301) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.craftbukkit.v1_8_R1.event.CraftEventFactory.callInventoryOpenEvent(CraftEventFactory.java:684) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.EntityPlayer.openContainer(EntityPlayer.java:641) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.BlockChest.interact(SourceFile:339) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PlayerInteractManager.interact(PlayerInteractManager.java:495) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:693) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:50) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:80) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_11]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_11]
	at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:643) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:284) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:598) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:506) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_11]
Caused by: java.lang.IllegalArgumentException: Instant potions cannot be extended
	at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.potion.Potion.setHasExtendedDuration(Potion.java:268) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.potion.Potion.extend(Potion.java:152) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.potion.Potion.fromDamage(Potion.java:409) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.potion.Potion.fromItemStack(Potion.java:418) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at shop.constant.items.PotionItem.<init>(PotionItem.java:16) ~[?:?]
	at shop.constant.items.CustomItem.toCIFromItemStack(CustomItem.java:206) ~[?:?]
	at shop.event.handler.InventoryEventHandler.serializeItem(InventoryEventHandler.java:100) ~[?:?]
	at shop.event.handler.InventoryEventHandler.onInventoryClose(InventoryEventHandler.java:62) ~[?:?]
	at sun.reflect.GeneratedMethodAccessor609.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_11]
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:295) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	... 21 more
[03:13:04] [Server thread/ERROR]: Could not pass event InventoryOpenEvent to GUI_Shop v0.0.1
org.bukkit.event.EventException
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:297) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:36) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.craftbukkit.v1_8_R1.event.CraftEventFactory.callInventoryOpenEvent(CraftEventFactory.java:692) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.EntityPlayer.openContainer(EntityPlayer.java:641) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.BlockChest.interact(SourceFile:339) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PlayerInteractManager.interact(PlayerInteractManager.java:495) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:693) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:50) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:80) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_11]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_11]
	at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:643) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:284) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:598) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:506) [craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_11]
Caused by: java.lang.IllegalArgumentException: Instant potions cannot be extended
	at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.potion.Potion.setHasExtendedDuration(Potion.java:268) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.potion.Potion.extend(Potion.java:152) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.potion.Potion.fromDamage(Potion.java:409) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at org.bukkit.potion.Potion.fromItemStack(Potion.java:418) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	at shop.constant.items.PotionItem.<init>(PotionItem.java:16) ~[?:?]
	at shop.constant.items.CustomItem.toCIFromItemStack(CustomItem.java:206) ~[?:?]
	at shop.event.handler.InventoryEventHandler.serializeItem(InventoryEventHandler.java:100) ~[?:?]
	at shop.event.handler.InventoryEventHandler.onInventoryOpen(InventoryEventHandler.java:48) ~[?:?]
	at sun.reflect.GeneratedMethodAccessor627.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_11]
	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:295) ~[craftbukkit-1.8.jar:git-Bukkit-40aaa31]
	... 19 more

Generated at Wed Apr 02 09:49:02 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.