13
0
geforkt von Mirrors/Paper

ItemStack.getMaxStackSize no longer incorrectly returns -1 when not backed by an NMS instance. Thanks to feildmaster for the PR. This fixes BUKKIT-530

By: Nathan Adams <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2012-01-15 09:52:56 +00:00
Ursprung 10700630bb
Commit 62510f93b8

Datei anzeigen

@ -174,6 +174,11 @@ public class ItemStack implements ConfigurationSerializable {
* @return The maximum you can stack this material to.
*/
public int getMaxStackSize() {
Material material = getType();
if (material != null) {
return material.getMaxStackSize();
}
return -1;
}