diff --git a/2006Redone Server/src/redone/game/items/ItemDefinitions.java b/2006Redone Server/src/redone/game/items/ItemDefinitions.java index cfdde90d..c9bc66df 100644 --- a/2006Redone Server/src/redone/game/items/ItemDefinitions.java +++ b/2006Redone Server/src/redone/game/items/ItemDefinitions.java @@ -227,7 +227,12 @@ public class ItemDefinitions { * Returns the weight of an item. */ public static double getWeight(int id) { - return definitions[id].weight; + try { + return definitions[id].weight; + } catch (NullPointerException noId) { + System.out.println("WARNING: id " + id + " doesn't have a definition!"); + return 0; + } } /** diff --git a/CompiledServer/production/2006rebotted/redone/game/items/ItemDefinitions.class b/CompiledServer/production/2006rebotted/redone/game/items/ItemDefinitions.class index 1964e39f..4739f71b 100644 Binary files a/CompiledServer/production/2006rebotted/redone/game/items/ItemDefinitions.class and b/CompiledServer/production/2006rebotted/redone/game/items/ItemDefinitions.class differ